Online Book Reader

Home Category

Programming Microsoft ASP.NET 4 - Dino Esposito [485]

By Root 5365 0
HTTP/1.1

As a developer, you have no control over the algorithm that generates the JavaScript function name. Using a fixed name, however, brings you some benefits in terms of caching ability. If you use the $.ajax function to arrange a JSONP call, you can use the jsonp and jsonpcallback parameters to replace the query string parameter name and the JavaScript function name, respectively.

Important

As mentioned, Microsoft provides full support for jQuery when it’s used within ASP.NET applications. Microsoft also created a few components that were accepted as official jQuery plug-ins in late 2010.

At least the biggest of them—the Templates plug-in—is incorporated in the main library with version 1.5. The Templates plug-in fills a significant gap in client-side programming because it provides a way to declare HTML-based, data-bound templates. Ajax calls make it easy to download fresh JSON data, but displaying raw data is never easy because you just want to display data in the context of a rich graphical layout. With templates, you have the power of HTML for the layout and an ad hoc syntax to control how external data is inserted.

Another interesting plug-in from Microsoft is the Data Link plug-in, which allows you to implement an MVVM-like design on the client. The plug-in keeps your user interface and data synchronized. It also makes it possible to keep the input fields of an HTML form in sync with the properties of a JavaScript object.

Finally, the third Microsoft plug-in is the Globalization plug-in, which emits on the client information about more than 350 different cultures, thus enabling you to use formats or parse numbers, dates and times, calendars, and currencies according to the current settings.

Summary


As emphatic as it might sound, knowing how to use JavaScript is a necessary skill today, whether you use a rich library or not.

jQuery delivers a number of benefits. In the first place, it makes JavaScript code easier and quicker to write. The library provides helper functions that dramatically increase your productivity while decreasing frustration. The key to the wide adoption of jQuery is probably that it makes it simpler to do what developers need to do more often—query for DOM elements and manipulate them.

No ASP.NET application today can ignore client programming and jQuery. Microsoft now fully supports jQuery and has abandoned further development of the Microsoft AJAX Client library. Isn’t this a big enough reason to develop JavaScript skills?

Index


A note on the digital index

A link in an index entry is displayed as the section title in which that entry appears. Because some sections have multiple index markers, it is not unusual for an entry to have several links to the same section. Clicking on any link will take you directly to the place in the text in which the marker appears.

Symbols

tag, Definition of the Data Model in a Web Site Project

section, The Section, The Section, The Section

section, The Section

section, The Configuration Schema, The Section, The Section

tag, Content Pages and Auxiliary Content

control, Post-Cache Substitution

section, The Section, The Section, ASP.NET Authentication Methods

section, The Section, The Section, The Section, The Section

section, The Section, The Section, Browser Capabilities Providers

section, The Section, The Section, The Section, The Section

section, The Section

element, The Configuration Schema

element, Web.config Transformations, The Configuration Schema, The Configuration Schema

main children of, The Configuration Schema

Return Main Page Previous Page Next Page

®Online Book Reader