Chris Laffra
EGL Rich UI Architect
June 2008
Introduction
This document outlines the goals and values of EGL Rich UI. It describes the long term vision by providing usage scenarios to indicate what the EGL developer would be able to do with the new technology being offered. Finally, the types of applications are described that could be built with the RICH UI.
EGL RICH UI is offered today from AlphaWorks (latest refresh was July 25, 2008). The primary goal of the AlphaWorks project is to accelerate the visibility of the new EGL RICH UI capabilities in the marketplace and extend its values beyond already proven success areas, such as database access, business rule definition, and SOA support. Through this tech preview, IBM intends to provide early evaluators/experimenters with an opportunity to give feedback on very early forms of EGL technology and tools. The earlier the feedback, the greater the influence customers have in the direction of IBM products.
In the rest of this document we will position the EGL Rich UI technology in relation to other technologies, provide insight into our longer term vision of how rich web application will likely be developed in the future, and how we intend to provide a roadmap to take both IBM and customers on this exciting trip. We will use concrete development scenarios and examples to introduce the various concepts, tradeoffs, challenges, and solutions.
What is a Rich Web Application and what’s the Buzz surrounding Web 2.0 all about?
Rich Web Applications, sometimes also called Rich Internet Applications, are applications offered via a browser that behave like desktop applications,. They typically serve up data stored on one or more servers, and display that data in a highly responsive user interface. Both validation and business logic can run inside the browser and no installation is required. Typical examples are applications to process a travel expense account, do tax processing, perform a mortgage calculator, or find the perfect house based on a wide variety of requirements.
Most rich web applications are situational in nature, meaning that they are used infrequently or from different locations and/or computers. The web is the ideal distribution medium for those types of applications. Namely, unlike
desktop applications, rich web applications are easy to maintain because new versions can be offered by simply refreshing the current page in the browser. There is no installation required, so new users get going faster also.
Furthermore, when compared to traditional static websites, rich web applications have operational advantages. Rich web applications tend to do most of the orchestration in the browser itself, thereby moving presentation logic from the server to the browser. This is why people refer to those applications as “mashup” applications. This reduces the
load on the server, thereby increasing both throughput and improving transaction rates. Finally, the type of services calls invoked by rich web application tend to be more stateless, improving the opportunity for caching of results both inside the server and on edges, such as inside proxy servers.
What are the Programming Challenges in Writing Rich Web Applications?
Web2.0 applications are hard to build because developers have to learn many different technologies, such as JavaScript, HTML, CSS, Ajax, Dojo, SilverLight, SOAP, Flex, XML, JSON; the list of acronyms goes on forever. Many of the required technologies operate on a very detailed, low level. Furthermore, most of these technologies use completely different metaphors and abstractions, which makes them hard to mix and match. The end result is that web rich applications require highly skilled adaptable software hackers. Matching those skills from a
pool of traditional business developers is a big challenge.
EGL Rich Web was specifically developed to easily develop these highly responsive rich web applications. EGL strives to provide abstractions that are at just the right level, allowing developers to focus on the “what”, rather than on the “how”. All user interfaces are expressed in a declarative language. Ajax calls are very easily implemented because EGL Rich Web automatically parses the resulting JSON and XML documents and turns them into easy to manage EGL data structures.
Furthermore, with the addition of EGL Rich Web support, it is now possible to write an entire web based application, from server to the user interface, in EGL. And, once you have learned EGL for one specific application tier, you can immediately transfer those skills and be productive in all parts of an application.
What are the key Elements of the EGL Rich Web Programming Model?
With earlier versions of IBM Rational Business Developer, EGL source code can already be translated into Java and COBOL for deployment on System Z and I servers. The same EGL code allows easy access to databases and existing programs written in COBOL, Java, PL1, and RPG. That makes EGL a perfect language for doing enterprise modernization and successfully SOA-enabling legacy applications.
In addition to COBOL and Java, EGL Rich Web now adds the ability to also generate JavaScript, that then runs in a web browser and that accesses logic on the server using Services calls. The resulting JavaScript allows for mashups of various data sources being integrated inside the browser by simple code written in EGL. Existing JavaScript libraries can also be easily exposed in EGL and used in compositions thereafter.
The JavaScript that is generated from the EGL, and any dependent native JavaScript libraries can be deployed to various application servers, such as WebSphere Application Server and Apache Tomcat. However, EGL Rich Web runs just as well on lightweight stacks, such as the LAMP stacks that just rely on an Apache HTTP Server. EGL Rich Web applications run in the most prominent browsers, such as Internet Explorer, Firefox, and Safari. The latter one is especially interesting to many people, as it is the browser that is included with the iPhone.
When used end to end, EGL can be used as a very productive technology to modernize user interfaces and leverage existing investments in software and hardware, but also in people skills.
How does EGL integrate with other Technologies like Flex, Silverlight, or Dojo?
HTML and JavaScript by themselves make it hard to develop highly interactive, complex applications that manage state, services, and presentation. Various solutions have risen to the surface to fill the gap. Both Flex and Silverlight are examples where a new programming runtime was developed from scratch to write rich clients in, and the browser is just used as a transport and hosting mechanism. The actual application logic and presentation code runs inside a browser add-on and interaction from normal HTML and JavaScript is provided through a special JavaScript API. EGL Rich Web uses that API to integrate with technologies like Flex and Silverlight so that these technologies can be seamlessly integrated into a comprehensive solution.
Dojo is a different story. It does not require any browser add-on but instead is implemented as a regular JavaScript library. Dojo offers both a component model and a set of rich widgets, some of which have fairly advanced support for management of application data. Dojo is quickly becoming a de facto standard for many web presentation components in IBM products, such as the new and exciting Jazz platform and Project Zero.
Dojo is a very powerful solution, but being a JavaScript technology, dojo tends to expose many complexities of browser-based applications, such as the quirky JavaScript language, CSS styling, and figuring out how to do HTML layouts using divs and tables. JavaScript has its uses but is not for everyone. The same is true for both Flex and SilverLight that use complex languages such as ActionScript and C# for doing event handling and doing things like validation of inputs.
EGL Rich Web allows people to focus more on the "what" rather than the "how". The composition of user interfaces is much more declarative using EGL Rich Web, allowing developers to focus more on their intent rather than on technical details, making them much more productive then when they would use complex solutions like JavaScript. Developers can still reach out into the native JavaScript layer if they really need to, but EGL Rich Web offers a much smoother progressive disclosure story. Things are simple when they need to be, and only get complex when they
EGL Rich Web is designed to be extensible from day one. In essence, any technology or library that is written in JavaScript or that has a JavaScript interface can be exposed very easily into EGL Rich Web. Included with the EGL Rich Web offering we provide numerous examples that do just that. Some of those examples are Google Maps, dojo, SilverLight, 2D rendering, Flex, etc. Each offer their own specific values and features.
How does EGL Rich UI compare with application server approaches such as JSF?
EGL already has various solutions for connecting a user interface to business logic running on a server, originally focusing on techniques such as "green screens". With the increased popularity of application servers, the Java programming language, and the J2EE stack in particular, EGL was subsequently enhanced with first-class support for defining Java Server Faces. The current state of the art is essentially a server-side application that runs on a server and that can generate HTML pages consumed by browsers.
With JSF, users move from page to page, keeping the application and its state alive on the server. This model is popular for various valid business reasons, such as scalability and performance obtained through server virtualization. However, for solutions that require sophisticated user interactions, server side applications become excessively heavy and are quite taxing on servers.
More recently though, browsers have become increasingly powerful, and companies like Google have blazed the way to moving more richness to the browser, as showcased in their email client and news feed reader. This type of web2.0 applications typically repaint only portions of the screen using Ajax calls back to any random service, and use much richer widgets and animations that traditional website can do. Technology providers, including IBM, have attempted to add Ajax support to the existing application server model with JSF, but those attempts mix two models of control, with both the server and the client fighting over who gets to mashup the final application.
With EGL Rich Web all the orchestration happens inside the browser. The rich internet application performs all the choreography to connect the many different information sources resulting in more dynamically configured applications. With EGL Rich Web, easy development of situational applications is possible, for instance company mashups such as dashboards, but also for highly responsive, modern-looking, mission-critical business applications.
Good reading!