{"id":178,"date":"2007-12-09T12:53:53","date_gmt":"2007-12-09T17:53:53","guid":{"rendered":"\/cgi\/wp\/?p=178"},"modified":"2019-12-06T18:37:53","modified_gmt":"2019-12-06T23:37:53","slug":"book-review-microsoft-ajax-library-essentials","status":"publish","type":"post","link":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=178","title":{"rendered":"Book Review: Microsoft AJAX Library Essentials"},"content":{"rendered":"<div class=\"entry\">\n<p>Blogging on the Microsoft Community web site <a href=\"http:\/\/weblogs.asp.net\/\">http:\/\/weblogs.asp.net<\/a> has proven to be more rewarding than blogging on my own. I get more feedback from other developers. There have also been other benefits. For example, I was sent a free book to review. <a href=\"http:\/\/www.amazon.com\/Microsoft-AJAX-Library-Essentials-Client-side\/dp\/1847190987\">Microsoft AJAX Library Essentials: Client-side ASP.NET AJAX 1.0 Explained<\/a> by Cristian Darie and Bogdan Brinzarea is a book on the Microsoft JavaScript library for AJAX. There are many AJAX JavaScript libraries available like <a href=\"http:\/\/script.aculo.us\/\">script.aculo.us<\/a>, <a href=\"http:\/\/jquery.com\/\">jQuery<\/a>, and <a href=\"http:\/\/www.prototypejs.org\/\">Prototype<\/a> but the <strong>Microsoft AJAX Library<\/strong> is designed to make the most sense to ASP.NET developers because it uses namespaces and classes that are similar to C# and the .NET Framework.<\/p>\n<p>This book provides an excellent overview of the object-oriented programming capabilities of JavaScript. Most web developers just hack JavaScript without getting into its OOP aspects so there is a lot to be gained from this material. For instance, I learned that the proper way to create HTML code is through the Document Object Model using functions like <em>createElement<\/em>, <em>createTextNode<\/em>, and <em>appendChild<\/em> instead of just doing it the lazy way with <em>innerHTML<\/em>. JavaScript isn&#8217;t a proper OOP language so there are many work arounds to get it to emulate classes. Some of these language features are similar to what has been added to C# 3.0; anonymous functions, inner functions, closures, functions as variables, and prototypes. However you don&#8217;t really need to know all the insidious OOP details to use the library.<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/img252.imageshack.us\/img252\/7687\/msajaxrw6.jpg\" width=\"188\" height=\"239\" longdesc=\"http:\/\/www.williamsportwebdeveloper.com\/cgi\/wp\/Microsoft AJAX Library Essentials\" align=\"right\" border=\"0\" \/><\/p>\n<p>There is also some information in the book on JSON (JavaScript Object Notation) which the Microsoft AJAX Library uses to exchange data. Basically it is a way to serialize JavaScript object arrays as plain text. I&#8217;m not sure if the Microsoft AJAX Library will accept XML. When I tried to use it with YouTube gData I got an error and had to include the json query string variable &amp;alt=json.<\/p>\n<p>The book also covers all the debugging tools available for JavaScript. I did find a few I did not have like the <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/216\">Venkman JavaScript Debugger<\/a> and Nikhil Kothari&#8217;s <a href=\"http:\/\/projects.nikhilk.net\/Projects\/WebDevHelper.aspx\">Web Development Helper<\/a>. There is a debug version of the library, <strong>MicrosoftAjax.debug.js<\/strong>, which contains code comments, readable code, and summary data for Visual Studio 2008 code completion. The library itself contains a debug class with methods for debugging and tracing. I consider this an excellent reason to use this library instead of other AJAX libraries because I rely heavily on debug statements and tracing.<\/p>\n<p>I tried to use the Microsoft AJAX Library in my custom help collection. The request went out but the response gave me an error, <em>&#8220;Access is denied.<\/em>&#8220;. I suspect this is caused by the same origin policy which prevents documents or scripts loaded from one origin from getting or setting properties of documents from a different origin. A web page in a help 2.0 collection frequently has problems in referencing files and does not exactly operate within a domain.<\/p>\n<p>You can find additional information on this book at: <a href=\"http:\/\/www.packtpub.com\/ajax-csharp-essentials\/book\">http:\/\/www.packtpub.com\/ajax-csharp-essentials\/book<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Blogging on the Microsoft Community web site http:\/\/weblogs.asp.net has proven to be more rewarding than blogging on my own. I get more feedback from other developers. There have also been other benefits. For example, I was sent a free book &hellip; <a href=\"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=178\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,1],"tags":[],"_links":{"self":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/178"}],"collection":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=178"}],"version-history":[{"count":1,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/178\/revisions"}],"predecessor-version":[{"id":3166,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/178\/revisions\/3166"}],"wp:attachment":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}