Welcome!

AJAX & REA Authors: Scott Hirsch, David H Deans, Carmen Gonzalez, Pat Romanski, Aria Blog

Related Topics: Web 2.0, AJAX & REA

Web 2.0: Article

Has Web Development Lost Its Way?

Introducing an open source Java AJAX component based web application development framework

To understand where web development is going, we need a brief review of web development history. Many years have gone since the old CGI bridge was invented, a quick hack to achieve the impossible, create server-based web applications. The first CGI based web applications were C (and Perl) programs based on a terrific mix of HTML and printf calls. This primitive approach was valid to build those "magic" dynamic web pages constructed with our data introduced with forms. This was the starting point of a race to improve the developer tools and the user experience. The live web starts here.

A bit later, Allaire's ColdFusion brought us a new way to build our primitive web applications, the HTML based templating (disclaimer: I'm not claiming Allaire invented web templating, but this technique was very popular thanks to ColdFusion). The HTML page was again the protagonist but mixed with a scripting language, the "Server Page" paradigm. Microsoft of course entered the web scene pressed by the Netscape and Allaire success, the fear of losing ground in business is a very strong reason to innovate, and they gave us ASP technology to compete with the successful ColdFusion, including the Visual Basic Script as the script language.

Years later the Java world put its foot in the server side with the expected logical path, servlets (a CGI Java version) and JSP (the ASP competitor) introducing Java in the web server. Model 1 was born.

Model 1 had a downside: too much code mixed with markup, so the custom-tag invention starts to shine. The custom-tag technique opens the door to two new protagonists, XML-based programming and expression languages (EL). XML + EL are the "weak" replacement of the typical strong full featured and verbose programming language used before to manage the dynamic parts of the markup, reducing (slightly) the impedance of both worlds and promoting an improved separation of business code and view. They brought a need to bridge page templates and business code... the "bindings."

The next step: why does the view decide the navigation, the target view? The answer to this question is the adaptation of the MVC pattern to the web. In Java the most popular MVC framework, Struts, defines the navigation rules using again XML, in this case the "XML metaprogramming" is not to develop the view, is the MVC glue.  Model 2 was born.


The Birth of the Event-Based Web

Model 2 introduced desktop culture in the web. The temptation is near, and the temptation is called "components". HTML form components are very basic and the HTML/W3C world is very conservative to welcome something new. But we need new desktop-like drag and drop components beyond form controls...now! The answer is HTML and JavaScript generated by tools. How to package? How to bind with the business code? The Java answer is JSF with more custom tags, more XML files, metaprogramming and Java bindings, and a "new kid on the block" in the server centric world, JavaScript. The server generates and sends to the client custom JavaScript, usually with support of client JavaScript libraries, as the way to add desktop-like behavior to the components and to drive user events to the server reloading the page with the new visual state of the component when necessary. The event-based web was born.

Now AJAX is here, what can we do? Umm... we can generate more custom JavaScript or XML, transporting the data from the server and render this data in the client using JavaScript centric components, or we can build the component view in the server and generate the necessary custom JavaScript from the server to change the appearance of the component in the client as response of user actions.

So what is wrong with this path?

1) Custom tags (with custom HTML and JavaScript generation): violates web development culture

In the desktop a program's appearance can be fully customized because the developer usually has a pixel-based level. You can build your custom controls from scratch but it is usually a hard task. The web space is very different, there is not so much power (for instance there is no API to draw on) but is not difficult to customize the visual appearance of your web application using tags, CSS, and JavaScript. For instance, almost all Swing applications use the default "boring" controls, in web applications every <table> is different and there is no steep learning curve.

Traditionally when a web developer fills a <table> with data the developer usually has full control of the <table> layout. This full control is being lost with so many intrusive custom-tag based tools. These custom tags usually "replace" the web designer, generating tons of obscure markup mixed with JavaScript. There are two problems: corporate style may be not fulfilled and complex components are not possible. With simple components this approach may be valid because the CSS has some control of the visual appearance, but with complex components like composite components you are in trouble.

2) XML based metaprogramming: disturbs the Object Oriented Programming paradigm

XML is very nice for custom configuration but it is verbose and very poor when used as a pseudo imperative language. The current tendency to use declarative programming underuses the power of OOP because this XML-based declarative programming is usually being used in an architectural manner (with a deep architectural impact). For instance, is very hard in XML to declare a feature applying to different levels (globally, locally) or to groups ("batch" configuration). Most of the time you need to repeat the same again and again because the XML format used impose it.

Custom-tags and XML-centric frameworks are usually designed with tools in mind. Tools increase productivity of course, but the most productive tool is reuse, and OOP strongly promotes reusing easily, with XML-based components it is very hard to reuse your own work because you need to build your own XML-based components otherwise you will be repeating the same again and again.

3) Old tools do not fit with AJAX

Most of the server-based web frameworks were designed before the AJAX explosion. Many page-based frameworks are not very useful in the AJAX space, because a web application with 100 pages can be replaced with a new one with only 1 page, classical navigation utilities are underused with AJAX. This applies to the pre-AJAX component (or event) based frameworks too; these frameworks tried to simulate a desktop application using classical navigation with full page reload, the sophisticated techniques used to keep track of the component state while the user navigates, including back and forward button support, are now over-engineering.

Is there some other alternative?

Yes.

The design problem of classical web application development is mainly in the view. The view is defined as plain text, this text is never exposed as a DOM tree to the developer, so any binding to business code, declarations, region marks etc are always done in the markup with special tags, regular expressions etc. Because the normal HTML is treated as plain text only the special tags and regular expressions are the live elements of the page. Components are usually defined with custom tags because it is extremely difficult to delegate the markup design to the developer because the developer needs to explain to the framework how the markup design fits in the expected component behavior defined by the framework.

The alternative is to repeat the nature of the client in the server, use again the old DOM in the server too, we are in the twenty-first century and in the AJAX era where there is no need to rebuild complete pages by any user click. Many years ago this approach had many problems, but these problems are gone; furthermore the problem of the expensive memory use of the DOM can be surpassed using serialization as plain text of the "static subtrees."

 ItsNat Simulates a Java W3C Browser in the Server

I am the author of ItsNat, an open source Java AJAX Component based web application development framework. ItsNat uses the approach described above. This approach is radically new but uses the old tools: the client DOM tree is repeated in the server as a Java W3C DOM tree, exactly the opposite, the client DOM is a clone of the server DOM, if the server DOM changes the client DOM is updated automatically by the framework usually as response of user action, this user action is received as a Java W3C DOM Event transported by AJAX. In short, ItsNat simulates a Java W3C browser in the server.

With this approach the starting page may be defined as a pure HTML template, and exposed to the developer as a DOM tree. With a DOM tree the developer has absolute control of the layout including minor changes as the response of an AJAX event. If an AJAX event requires a big change of the page a pure HTML fragment can be loaded converted to DOM and inserted in the document.

How to build components? Following the Wicket approach but with the DOM side, defining patterns and telling the framework what is the parent element of a list, table, tree etc what is the pattern of a list item, row, cell, tree node... what is the component structure, in short, attaching the developer defined view to the component. Then component will clone the pattern to create new list items, rows, cells and tree nodes.

Conclusion: returning to its roots may be the path to the future in web development.

More Stories By Jose M. Arranz

Jose M. Arranz, the author of ItsNat, is CEO and co-founder of Innowhere Software Services S.L.

Comments (3)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


@CloudExpo Stories
Compute virtualization has been transformational, yet security policy implementation and enforcement has lagged behind in agility and automation. There are a number of key considerations when implementing policy in private and hybrid clouds. In his session at 15th Cloud Expo, Holland Barry, VP of Technology at Catbird, will discuss the impact of this new paradigm and what organizations can do today to safely move to software-defined network and compute architectures, including: How normal ope...
Samsung VP Jacopo Lenzi, who headed the company's recent SmartThings acquisition under the auspices of Samsung's Open Innovaction Center (OIC), answered a few questions we had about the deal. This interview was in conjunction with our interview with SmartThings CEO Alex Hawkinson. IoT Journal: SmartThings was developed in an open, standards-agnostic platform, and will now be part of Samsung's Open Innovation Center. Can you elaborate on your commitment to keep the platform open? Jacopo Lenzi: S...
How do APIs and IoT relate? The answer is not as simple as merely adding an API on top of a dumb device, but rather about understanding the architectural patterns for implementing an IoT fabric. There are typically two or three trends: Exposing the device to a management framework Exposing that management framework to a business centric logic • Exposing that business layer and data to end users. This last trend is the IoT stack, which involves a new shift in the separation of what stuff hap...
SYS-CON Events announced today that SOA Software, an API management leader, will exhibit at SYS-CON's 15th International Cloud Expo®, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. SOA Software is a leading provider of API Management and SOA Governance products that equip business to deliver APIs and SOA together to drive their company to meet its business strategy quickly and effectively. SOA Software’s technology helps businesses to accel...
SYS-CON Events announced today that Utimaco will exhibit at SYS-CON's 15th International Cloud Expo®, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Utimaco is a leading manufacturer of hardware based security solutions that provide the root of trust to keep cryptographic keys safe, secure critical digital infrastructures and protect high value data assets. Only Utimaco delivers a general-purpose hardware security module (HSM) as a customiz...
Almost everyone sees the potential of Internet of Things but how can businesses truly unlock that potential. The key will be in the ability to discover business insight in the midst of an ocean of Big Data generated from billions of embedded devices via Systems of Discover. Businesses will also need to ensure that they can sustain that insight by leveraging the cloud for global reach, scale and elasticity.
SYS-CON Events announced today that ElasticBox is holding a Hackathon at DevOps Summit, November 6 from 12 pm -4 pm at the Santa Clara Convention Center in Santa Clara, CA. You can enter as an individual or team of up to 10 developers. A New Star Is Born Every Month! All completed ElasticBoxes will then be sent to a judging panel - 12 winners will be featured on the ElasticBox website in 2015. All entrants will receive five full enterprise licenses for one year + ElasticBox headphones + Elasti...
Once the decision has been made to move part or all of a workload to the cloud, a methodology for selecting that workload needs to be established. How do you move to the cloud? What does the discovery, assessment and planning look like? What workloads make sense? Which cloud model makes sense for each workload? What are the considerations for how to select the right cloud model? And how does that fit in with the overall IT tranformation? In his session at 15th Cloud Expo, John Hatem, head of V...
Cloud services are the newest tool in the arsenal of IT products in the market today. These cloud services integrate process and tools. In order to use these products effectively, organizations must have a good understanding of themselves and their business requirements. In his session at 15th Cloud Expo, Brian Lewis, Principal Architect at Verizon Cloud, will outline key areas of organizational focus, and how to formalize an actionable plan when migrating applications and internal services to...
SAP is delivering break-through innovation combined with fantastic user experience powered by the market-leading in-memory technology, SAP HANA. In his General Session at 15th Cloud Expo, Thorsten Leiduck, VP ISVs & Digital Commerce, SAP, will discuss how SAP and partners provide cloud and hybrid cloud solutions as well as real-time Big Data offerings that help companies of all sizes and industries run better. SAP launched an application challenge to award the most innovative SAP HANA and SAP ...
Ixia develops amazing products so its customers can connect the world. Ixia helps its customers provide an always-on user experience through fast, secure delivery of dynamic connected technologies and services. Through actionable insights that accelerate and secure application and service delivery, Ixia's customers benefit from faster time to market, optimized application performance and higher-quality deployments.
SYS-CON Events announced today that Calm.io has been named “Bronze Sponsor” of DevOps Summit Silicon Valley, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Calm.io is a cloud orchestration platform for AWS, vCenter, OpenStack, or bare metal, that runs your CL tools puppet, Chef, shell, git, Jenkins, nagios, and will soon support New Relic and Docker. It can run hosted, or on premise and provides VM automation / expiry, self-service portals,...
In her General Session at 15th Cloud Expo, Anne Plese, Senior Consultant, Cloud Product Marketing, at Verizon Enterprise, will focus on finding the right mix of renting vs. buying Oracle capacity to scale to meet business demands, and offer validated Oracle database TCO models for Oracle development and testing environments. Anne Plese is a marketing and technology enthusiast/realist with over 19+ years in high tech. At Verizon Enterprise, she focuses on driving growth for the Verizon Cloud pla...
SYS-CON Events announced today that Aria Systems, the recurring revenue expert, has been named "Bronze Sponsor" of SYS-CON's 15th International Cloud Expo®, which will take place on November 4-6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Aria Systems helps leading businesses connect their customers with the products and services they love. Industry leaders like Pitney Bowes, Experian, AAA NCNU, VMware, HootSuite and many others choose Aria to power their recurring revenue bu...
The Internet of Things (IoT) is going to require a new way of thinking and of developing software for speed, security and innovation. This requires IT leaders to balance business as usual while anticipating for the next market and technology trends. Cloud provides the right IT asset portfolio to help today’s IT leaders manage the old and prepare for the new. Today the cloud conversation is evolving from private and public to hybrid. This session will provide use cases and insights to reinforce t...
As Platform as a Service (PaaS) matures as a category, developers should have the ability to use the programming language of their choice to build applications and have access to a wide array of services. Bluemix is IBM's open cloud development platform that enables users to easily build cloud-based, creative mobile and web applications without having to spend large amounts of time and resources on configuring infrastructure and multiple software licenses. In this track, you will learn about the...
Blue Box has closed a $10 million Series B financing. The round was led by a strategic investor and included participation from prior investors including Voyager Capital and Founders Collective, as well as the Blue Box executive team. This round follows a $4.3 million Series A closed in December of 2012 and led by Voyager Capital. In May of this year, the company announced general availability of its private cloud as a service offering, Blue Box Cloud. Since that release, the company has dem...
SYS-CON Events announced today that Verizon has been named "Gold Sponsor" of SYS-CON's 15th International Cloud Expo®, which will take place on November 4-6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Verizon Enterprise Solutions creates global connections that generate growth, drive business innovation and move society forward. With industry-specific solutions and a full range of global wholesale offerings provided over the company's secure mobility, cloud, strategic network...
SimpleECM is the only platform to offer a powerful combination of enterprise content management (ECM) services, capture solutions, and third-party business services providing simplified integrations and workflow development for solution providers. SimpleECM is opening the market to businesses of all sizes by reinventing the delivery of ECM services. Our APIs make the development of ECM services simple with the use of familiar technologies for a frictionless integration directly into web applicat...
The only place to be June 9-11 is Cloud Expo & @ThingsExpo 2015 East at the Javits Center in New York City. Join us there as delegates from all over the world come to listen to and engage with speakers & sponsors from the leading Cloud Computing, IoT & Big Data companies. Cloud Expo & @ThingsExpo are the leading events covering the booming market of Cloud Computing, IoT & Big Data for the enterprise. Speakers from all over the world will be hand-picked for their ability to explore the economic...