Chapter 8. Client Script Library

In addition to delivering a lot of Ajax functionality in an easy-to-use framework, Atlas provides a number of additions to JavaScript that can make its use for client coding easier. Among these are OOP-style constructs, such as namespaces, inheritance, and interfaces, as well as client-side reimplementations that resemble .NET constructs such as StringBuilder.

Atlas OOP Features for JavaScript

As you have seen in Chapter 2, JavaScript does have some OOP capabilities, but they are no match for those in programming languages like Visual Basic or C#. However, it’s relatively easy to add new features to JavaScript using JavaScript itself, something that the Atlas team has exploited.

To facilitate OOP development, Atlas adds to JavaScript some OOP-type features, which are covered in this chapter. These include namespaces, abstract classes, and interfaces. The additional features are designed to help you architect and write more structured client-side code. They apply not only to Ajax applications, but can also be used with any JavaScript code that you write.

The Atlas runtime script library is sufficient for using the JavaScript OOP features. To use this runtime library, include the Atlas ScriptManager element in the page. It will look like this:

<atlas:ScriptManager ID="ScriptManager1" runat="server"
  EnableScriptComponents="false" />

If the EnableScriptComponents attribute is set to false, you do not have access to Atlas controls, but still can use the client-site ...

Get Programming Atlas now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.