Google has provided developers Google Web Toolkit (GWT) framework for fast and friendly web application development. Of course the word "nice" is a relative question, but I certainly would say yes Java programmer who shuns JavaScript and HTML. Why? Because GWT does not need to use any language other than Java. But whether this is the direction of web development frameworks, which proves to be the most appropriate. At this point, hard to anticipate.
completely different concept is proposed Yahoo - so, so Yahoo also has decided to leave your player:) It's called The Yahoo User Interface (YUI). This library is a collection of tools and controls, written in JavaScript, for building interactive Web applications. It is based largely on manipulation of the House of, DHTMLu and Ajax. All the components provided by Yahoo sourcowe are open under the BSD license and can be used at will.
In order to demonstrate the fundamental possibility Yahoo will use a simple example component AutoComplete.
To use the controls in general we attach to our HTML page, CSS files and JavaScript:
\u0026lt;link type = "text / css" rel = "stylesheet" href =
"http://yui.yahooapis.com/2.3 .1/build/autocomplete/assets/skins/sam/autocomplete.css ">
<script type="text/javascript"
src="http://yui.yahooapis.com/2.3.1/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript"
src="http://yui.yahooapis.com/2.3.1/build/connection/connection-min.js"></script>
<script type="text/javascript"
src="http://yui.yahooapis.com/2.3.1/build/animation/animation-min.js"></script>
<script type="text/javascript"
src="http://www.json.org/json.js"></script>
\u0026lt;script type="text/javascript"
src="http://yui.yahooapis.com/2.3.1/build/autocomplete/autocomplete-min.js"> \u0026lt;/ script> Then we AutoComplete instance fields as follows: \u0026lt;div id="myAutoComplete">
\u0026lt;input id="myInput" type="text">
\u0026lt;div id="myContainer"> \u0026lt;/ div> ;
\u0026lt;/ div> \u0026lt;script type="text/javascript">
myAutoComp var = new YAHOO.widget.AutoComplete ("myInput", "myContainer" myDataSource);
\u0026lt;/ script> AutoComplete constructor has three parameters: - texbox ID type field or a textarea in which the user typed the query.
- ID HTML element that is a container that contains the query results.
- Finally, the third parameter is the DataSource, which will contain data that will be narrowed down by the query and presented in a container.
Before AutoComplete facility will be established, the third parameter to initialize the DataSource can be done in three different depending sposby needs.
simple plaque on the side of the browser:
\u0026lt;script type="text/javascript">
myArray1 var = ['a', 'b', 'c'];
myDataSource1 var = new YAHOO.widget.DS_JSArray (myArray1);
\u0026lt;/ script> JavaScript function, which will provide details:
\u0026lt;script type="text/javascript"> var myFunction = function () {var
myArray2 = ['d', 'e', 'f'];
myArray2.reverse return ();}
myDataSource2 var = new YAHOO.widget.DS_JSFunction (myFunction);
\u0026lt;/ script> Finally the most useful way to pull data from the server: \u0026lt;script type="text/javascript"> var
myserver = "someServlet"
mySchema var = ["ResultItem", "KeyDataField"];
myDataSource3 var YAHOO = new . widget.DS_XHR (MyServer, mySchema);
\u0026lt;/ script> I hope that this example is at hand the principle of YUI. More information is available at: http://developer.yahoo.com/yui/
also encourage you to discuss to what should be the future of web frameworks?
0 comments:
Post a Comment