1 |
<response> |
2 |
<action type='html'> |
3 |
<a name='top' /> |
4 |
<h2>Frequently Asked Questions</h2> |
5 |
<p> |
6 |
<ol> |
7 |
<li><a href='#whatis'>What is IWF?</a></li> |
8 |
<li><a href='#simplify'>What can IWF simplify for me?</a></li> |
9 |
<li><a href='#js'>Do I need to know javascript to use it?</a></li> |
10 |
<li><a href='#licensing'>What kind of licensing applies?</a></li> |
11 |
</ol> |
12 |
</p> |
13 |
<hr /> |
14 |
|
15 |
<a name='whatis' /> |
16 |
<h3>What is IWF?</h3> |
17 |
<p> |
18 |
Interactive Website Framework, or IWF, is essentially a wrapper |
19 |
for much of the mundane javascripting associated with creating |
20 |
highly interactive, browser independent, responsive websites. |
21 |
It keeps much of the "traditional" website coding paradigm, |
22 |
while introducing several new functionalities -- such as |
23 |
being able to suppress a page from entering the browser history (good for preventing data duplication when a user reposts the last request) |
24 |
</p> |
25 |
<a href='#top'>top</a> |
26 |
<hr width='50%' align='center'/> |
27 |
|
28 |
<a name='js' /> |
29 |
<h3>Do I need to know javascript to use it?</a></h3> |
30 |
<p> |
31 |
Yes, but very minimally. For instance, if you understand what the following anchor tag |
32 |
does, you'll be able to use IWF effectively: |
33 |
<pre> |
34 |
<a href='javascript:alert("Hello!")'>Say Hi</a> |
35 |
</pre> |
36 |
A common example of something relatively complex that IWF boils down to a simple |
37 |
function call is AJAX. AJAX is a term for the browser sending a request to the server |
38 |
without clearing the current page. |
39 |
<br /> |
40 |
<br /> |
41 |
Suppose you have a <code>listcds.php</code> page which returns |
42 |
HTML representing a list of cds and you want to put that HTML into an element with |
43 |
the id of "putCdsHere": |
44 |
<pre> |
45 |
<a href='javascript:iwfRequest("listcds.php", "putCdsHere");'>List Cds</a> |
46 |
</pre> |
47 |
All the details of creating the XmlHttpRequest object, setting its properties, asynchronously calling the server |
48 |
in the background, catching the response upon completion, parsing that response, |
49 |
finding the appropriate element on the page, and injecting the HTML is done for you. |
50 |
The only thing you need to do is tell IWF what you want and where to put it. Simple, right? |
51 |
</p> |
52 |
<a href='#top'>top</a> |
53 |
<hr width='50%', align='center' /> |
54 |
|
55 |
|
56 |
<a name='simplify' /> |
57 |
<h3>What can IWF simplify for me?</h3> |
58 |
<p> |
59 |
IWF contains a multitude of helper functions and objects, broken into 4 main categories: |
60 |
<ul> |
61 |
<li><h4>Common Functions (iwfcore.js)</h4> |
62 |
<p> |
63 |
Consists primarily of: |
64 |
<ul> |
65 |
<li>data typing (e.g. <code>iwfToDate</code>)</li> |
66 |
<li>type checking (e.g. <code>iwfIsString</code>)</li> |
67 |
<li>element manipulation (e.g. <code>iwfGetById</code>, <code>iwfAppendChild</code>)</li> |
68 |
<li>string manipulation (e.g. <code>iwfHtmlEncode</code>, <code>iwfXmlDecode</code>)</li> |
69 |
<li>formatting (e.g. <code>iwfFloatFormat</code>)</li> |
70 |
</ul> |
71 |
<a href='javascript:alert("Sorry, not done yet!");/*iwfRequest("ref_core.xml");*/'>Reference for IWF Core</a> |
72 |
</p> |
73 |
|
74 |
</li> |
75 |
<li><h4>XML (iwfxml.js)</h4> |
76 |
<p> |
77 |
Consists of three objects, <code>iwfXmlDoc</code>, <code>iwfXmlNode</code>, and <code>iwfXmlWriter</code>. These objects |
78 |
can be used to parse and create xml. These are <strong>not</strong> a reimplementation of the DOM objects -- these are |
79 |
designed to have more readable javascript code. For example, let's say we have the following xml: |
80 |
<pre> |
81 |
<internet> |
82 |
<site url='www.sourceforge.net'> |
83 |
<description>Great place for open source projects!</description> |
84 |
</site> |
85 |
<site url='iwf.sourceforge.net'> |
86 |
<description>IWF Project Home</description> |
87 |
</site> |
88 |
</internet> |
89 |
</pre> |
90 |
To pull the description for the IWF site using the typical DOM:<br /> |
91 |
<pre>var desc = doc.documentElement.lastChild().firstChild().innerText;</pre> |
92 |
To pull the same node using the custom IWF implementation:<br /> |
93 |
<pre>var desc = doc.internet.site[1].description[0].getText();</pre> |
94 |
<a href='javascript:alert("Sorry, not done yet!");/*iwfRequest("ref_xml.xml");*/'>Reference for IWF XML</a> |
95 |
</p> |
96 |
</li> |
97 |
<li><h4>User Interface (iwfgui.js)</h4> |
98 |
<p> |
99 |
This contains functions to affect the user interface. |
100 |
Ability to change the following aspects are included: |
101 |
<ul> |
102 |
<li>Visibility (e.g. <code>iwfShow</code>, <code>iwfHideGently</code>)</li> |
103 |
<li>Position (e.g. <code>iwfX1</code>, <code>iwfMoveTo</code>)</li> |
104 |
<li>Depth (e.g. <code>iwfZIndex</code>)</li> |
105 |
<li>Size (e.g. <code>iwfHeight</code>, <code>iwfWidth</code>)</li> |
106 |
<li>Opacity (e.g. <code>iwfOpacity</code>)</li> |
107 |
</ul> |
108 |
Also, user interaction objects have been generalized to be browser independent as well: |
109 |
<ul> |
110 |
<li>Event object (<code>iwfEvent</code>)</li> |
111 |
</ul> |
112 |
<a href='javascript:alert("Sorry, not done yet!");/*iwfRequest("ref_gui.js");*/'>Reference for IWF GUI</a> |
113 |
</p> |
114 |
</li> |
115 |
<li><h4>AJAX (iwfajax.js)</h4> |
116 |
<p> |
117 |
This contains code required to perform AJAX requests. |
118 |
<a href='javascript:alert("Sorry, not done yet!");/*iwfRequest("ref_ajax.js");*/'>Reference for IWF AJAX</a> |
119 |
|
120 |
</p> |
121 |
</li> |
122 |
</ul> |
123 |
</p> |
124 |
<a href='#top'>top</a> |
125 |
<hr width='50%' align='center'/> |
126 |
|
127 |
<a name='licensing' /> |
128 |
<h3>What kind of licensing applies?</h3> |
129 |
<p> |
130 |
I have chosen the Lesser GPL (or LGPL) to license the IWF. |
131 |
I wanted this code to be free and in the wild, but I thought the GPL |
132 |
was overkill for this type of library-like code. |
133 |
</p> |
134 |
<a href='#top'>top</a> |
135 |
<hr width='50%' align='center'/> |
136 |
|
137 |
|
138 |
|
139 |
|
140 |
</action> |
141 |
</response> |