Home | | Internet & World Wide Web HOW TO PROGRAM | | Internet Programming | | Web Programming | Spry Framework for Creating Ajax Applications - Adobe Dreamweaver CS3

Chapter: Internet & World Wide Web HOW TO PROGRAM - Rich Internet Application Client Technologies - Adobe Dreamweaver CS3

| Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail |

Spry Framework for Creating Ajax Applications - Adobe Dreamweaver CS3

Many toolkits are available that provide prebuilt controls to enhance web applications and make it easier to include JavaScript functions in your applications with minimal coding.

Spry Framework for Creating Ajax Applications

 

Many toolkits are available that provide prebuilt controls to enhance web applications and make it easier to include JavaScript functions in your applications with minimal coding (such as the Dojo toolkit mentioned in Chapter 15, and the Prototype and Script.aculo.us toolkits in Chapter 24). Adobe also created its own toolkit for Dreamweaver to develop dynamic and more robust web pages known as the Spry Framework.

 

The Spry Framework enables web developers with basic knowledge of HTML, CSS and JavaScript to create richer websites and dynamic pages. The framework includes a ready-to-use JavaScript library, which contains prebuilt, but customizable, widgets (such as a Validation Textarea, Validation Text Field and a Menu Bar), effects (such as grow, shrink, fade and highlight) and Ajax capabilities. To view all of the available spry tools, click the Spry tab in the Insert bar (Fig. 20.31).

 

Recall that Ajax applications separate client-side user interaction and server commu-nication and run them in parallel, making the delays of server-side processing more trans-parent to the user. Consider the form example that you built in Fig. 20.29. None of the data entered into the form is transmitted to the server until the user clicks the Submit button. At that time, any errors in the form are sent back to the user for correction. With Ajax and the Spry framework, text field input is validated on the client side. When the page loads, the files that provide the validation are loaded directly into the page, so you can check for errors in any given field as soon as the user moves to the next field in the form.

 

Now, let’s rebuild the form in Fig. 20.29 using Spry controls. First, insert Spry Validation Text Fields next to the Name and E-mail Address labels.

 

Select the blue Spry box connected to the text field you created next to the E-mail Address label. In the Property Inspector, set the Type: to Email Address. Make sure that the Change checkbox is selected. This means that a valid e-mail address must be in the field and if any changes are made to the address, the client will display a message prompting the user to make a change before continuing (Fig. 20.33).




Our application detects an error when validating the information in the e-mail address text field. As soon as we try to move to the next field, the application displays the error Invalid format to let us know that we must correct the information that we originally typed into that field.

 

Real-time validation is a key element in Ajax and rich Internet applications. The framework also provides capabilities for loading and processing XML data obtained via Ajax interactions with the server. Using the Spry Framework, developers can take advan-tage of such rich functionality, even if they don’t have a deep understanding of XML and JavaScript. For more information on the Spry framework, for Ajax-based examples and for

the latest version of the framework, visit labs.adobe.com/technologies/spry/.

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail


Copyright © 2018-2020 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.