11
AJAX .Net Wrapper usage guide AJAX .Net Wrapper usage guide AJAX .Net Wrapper usage guide .........................................................................1 Backgroun d.................................................................................................. 1 How it works - Overvi ew................................................................................. 2 Initia l Setup .................................................................................................. 2 Setting up the HttpHandler............................................................................. 3 Settin g up the Page .......................................................................................3 Creati ng the Server-Side Functions .................................................................. 4 Making our client-side call............................................................................... 5 Dealin g with T ypes......................................................................................... 6 Returning complex types .............................................................................. 6 Custom Converters..................................................................................... 8 Miscell aneous................................................................................................ 8 Registering functions in another class............................................................ 8 How the proxy really works ..........................................................................9 Returning Unicod e characters ....................................................................... 9 SessionSt ate.............................................................................................. 9 Conclusio n..................................................................................................11 Background Asynchronous JavaSc ript and XML (AJAX) has recently become t he craze thanks, in no small part, to Google’s usage of it in Google Suggest as well as Google Maps. In ASP.Net terms, AJAX allows server-side processing to occur without requiring postback, thus enabling clients ( browsers) with ric h server-side capabilities. In other words it provides a framework for asynchronously dispatching and processing requests and responses from the server . AJAX leverages a number of existing technologies, which aren't particularly new, however fondness for what these technologies have to offer (collectively , they are AJAX) has recently soared. Enter Michael Schwarz's AJAX .Net wrapper which allows ASP.Net developers to quickly and easily deploy pages capable of easily capitalizing on AJAX. Users should be cautioned that the wrapper is early in development, and as such isn't fully matured. It should be pointed out that technologies such as AJAX are very likely going to lead to violations of layered arc hitectures (N- Tier). My opinion is that AJAX inc reases the likelihood that the presentation logic layer (or worse, the business layer) will leak into the presentation layer . Strict architects , like me, migh t cringe at this notion. I feel that even if AJAX is used in a manor which slightly violates layer boundaries, the payoffs are well worth it. Of course, that's something you'll need to look at for your specific project and environment. To learn more about AJAX, visit: http://en.wikipedia.org/wiki/AJAX http://www.adaptivepath.com/publications/ essays/archiv es/000385.php © Karl Seguin Page 1 3/25/2008

AJAX .Net Wrapper usage guide

Embed Size (px)

Citation preview

Page 3: AJAX .Net Wrapper usage guide

8/14/2019 AJAX .Net Wrapper usage guide

http://slidepdf.com/reader/full/ajax-net-wrapper-usage-guide 3/11

Page 4: AJAX .Net Wrapper usage guide

8/14/2019 AJAX .Net Wrapper usage guide

http://slidepdf.com/reader/full/ajax-net-wrapper-usage-guide 4/11

Page 5: AJAX .Net Wrapper usage guide

8/14/2019 AJAX .Net Wrapper usage guide

http://slidepdf.com/reader/full/ajax-net-wrapper-usage-guide 5/11

Page 6: AJAX .Net Wrapper usage guide

8/14/2019 AJAX .Net Wrapper usage guide

http://slidepdf.com/reader/full/ajax-net-wrapper-usage-guide 6/11

Page 7: AJAX .Net Wrapper usage guide

8/14/2019 AJAX .Net Wrapper usage guide

http://slidepdf.com/reader/full/ajax-net-wrapper-usage-guide 7/11

Page 8: AJAX .Net Wrapper usage guide

8/14/2019 AJAX .Net Wrapper usage guide

http://slidepdf.com/reader/full/ajax-net-wrapper-usage-guide 8/11

Page 9: AJAX .Net Wrapper usage guide

8/14/2019 AJAX .Net Wrapper usage guide

http://slidepdf.com/reader/full/ajax-net-wrapper-usage-guide 9/11

Page 10: AJAX .Net Wrapper usage guide

8/14/2019 AJAX .Net Wrapper usage guide

http://slidepdf.com/reader/full/ajax-net-wrapper-usage-guide 10/11

Page 11: AJAX .Net Wrapper usage guide

8/14/2019 AJAX .Net Wrapper usage guide

http://slidepdf.com/reader/full/ajax-net-wrapper-usage-guide 11/11