Datasheet
Part I: Introduction to Python Frameworks
10
Web 2.0 Capability Description
Leveraging industry-wide
display standards (HTML,
Flex, and JavaScript)
This means that you can erase phrases such as Windows Foundation
Classes (WFCs), Cocoa, and Abstract Window Toolkit (AWT) from
your memory.
Leveraging a common data
format (XML or JSON)
This means that data sharing among applications is straight-
forward.
Leveraging high-speed
networking
This makes running Web 2.0 applications generally as seamless as
running desktop applications.
Platform-independent
development
Writing to a standard that is above the platform level means that
you can develop applications without having to worry about
which operating systems, browsers, and so on they will run on
(with caveats).
The Role of AJAX in Web 2.0
The ability to make an asynchronous call to a URL and have the data return handled by code within the
browser is key to creating the RIA experience for the user. Without AJAX ( Asynchronous JavaScript and
XML ), browser-resident RIAs would not be feasible for the reasons discussed previously. Additionally,
not only can AJAX make asynchronous external method calls (out from the browser), but it can also make
internal method calls (within the browser). The latter capability is the basis for providing changes in
visual elements within the RIA, including special effects like growing and shrinking areas, tabbed pages,
and drag and drop.
As good and as useful as AJAX is in this regard, the fact is that AJAX must be implemented in JavaScript,
and that is the source of a good deal of pain for the developer. Although JavaScript has only recently
been taken seriously as a development language, its idiosyncrasies and tendency to be broken in differ-
ent ways in different browsers is a constant source of consternation to developers and end users alike.
Even in a nonbroken world though, it’s great to have a level of abstraction sitting atop JavaScript.
Fortunately, MochiKit and other libraries are there to help.
MochiKit is covered specifically in Chapter 11 , but you will find code snippets and explanations of its
use in other chapters in this book.
Leveraging the Power of DSL s
Domain-specific languages ( DSL s) are limited computer languages designed for a specific class of problem.
However, using a special-purpose language that’s really good at creating solutions in a specific
problem domain is not a brand-new idea. Developers have been creating special syntaxes in languages
since way back when, especially in the bygone heyday of early work in Lisp (list processing) and artifi-
cial intelligence. In Python and one or two other languages classified as scripting languages, creating a
special syntax on top of the basic language becomes a highly tractable problem.