Page 59 - DCAP312_WEB_TECHNOLOGIES_II
P. 59
Unit 3: Server Controls Basic
Notes
browser. There are several technologies that could be used to implement our feature set:
Java Applets, Flash, ActiveX or AJAX.
Java Applets are programs written in Java that run in the sandbox inside the browser. They
have been around since 1995, and are a well understood technology. One thing to note is
despite their long history, they are still relatively rare on the public web. The following
drawbacks:
1. The versions of the Java runtime available in browsers is inconsistent.
2. Not every browser comes with Java by default, and Java is not ubiquitous enough for
many applications.
3. Java applets do not integrate well with other browser technologies such as CSS and
JavaScript.
Despite that, Java applets are still a viable option for many applications. They are more
common in enterprise intranet applications where the desktop machines are more regular
and controlled. They are cross-platform and cross browser, they can have high interactivity,
and if you program within the confines of the sandbox, there are no special security settings.
The only other problems, from our point of view, are that they do not integrate well into
ASP.NET applications. The main reason is that they do not automatically keep and restore
state through a post-back. We recommend do not use a post-back to update our controls
(we provide better ways), but these controls live on a page with other controls that might
need to post-back, so we need to support it. The big advantage we get from this now is
full integration with the Microsoft ASP.NET AJAX (formerly Atlas) UpdatePanel, which is
based on post-backs.
Second, there is no standard way for Java applets to be controlled from the server-side. Since
we want to be able to have an ASP.NET control on the server that behaves like any other
server control (which will integrate tightly with Visual Studio’s designer), we would have
to write this part ourselves.
Flash programs run inside the browser via a plug-in published by Adobe. The player is
ubiquitous (an independent assessment says that 97-98% of internet users have it in their
browser), and it is possible to create stunning User Interfaces with it. Although it is common
to see Flash used for online advertising and games, it is still not widely used to create
applications. Flash does have the best cross-browser/cross-platform multimedia support
which is one reason why YouTube and Google Video chose it for their respective video
services.
Similarly to Java applets, they do not have standard ways to integrate with CSS and JavaScript
(although recent Flash players expose some controls to JavaScript), and they would not
behave well through a post-back.
The biggest drawback at the time is the programming model for Flash which is very
different from the standard ways of writing software. The player evolved from an interactive
presentation creation system, and still has many artefacts from that. Essentially, creating a
Flash application was modelled after stringing together movie clips or animations, and not
based on any developer-friendly GUI methodology.
There are two alternatives for that now. Adobe themselves have released Flex, which among
other things adds a mark-up language to describing Flash user interfaces, and OpenLaszlo,
which is an open-source alternative that also provides a more standard programming model
to delivering programs to the Flash player. At the time we were creating our controls, both
of these technologies were in their infancy (and Laszlo was not open until October 2004).
Contd...
LOVELY PROFESSIONAL UNIVERSITY 53