The Push and Pull of XMLC and JSP
The Push and Pull of XMLC and JSP
Our industry is never short of new terminology to explain the role of emerging technologies. So, let's introduce a new perspective to distinguish the philosophical differences between JSP and Open Source Enhydra XMLC.
JSP puts the pull in a "Pull MVC" strategy. Java logic is embedded inside a markup page in the form of Java scriplets or, more indirectly, JSP taglibs. From the inside looking out, the embedded Java extracts dynamic content from the outside world, pulling it "in situ" into the host markup page.
Conversely, XMLC supports a "Push" model. As a compiler, XMLC generates a W3C DOM template representation of a markup page. Accessor methods, such as getElementCustomerName(), are generated by the detection of id attributes (<TD id="CustomerName">) inserted in the original markup by the designer or developer. Dynamic content is then pushed into the DOM template by Java servlet code with the aid of the XMLC runtime library and the accessor methods.
What does a Pull versus Push perspective mean to you? A push strategy gives Web presentation development a totally object-oriented focus. Java logic is in full command, treating each page of wireless, voice, or good-old HTML markup, as Java resources that are loaded, manipulated, and returned to their markup state. Java and your application dictate the programmatic flow. JSP's pull model enables the markup to dictate flow based on where embedded Java directly or indirectly resides.
Be sure to carefully consider the merits of push versus pull if your Web application will be dealing with a variety of markup pages, representing different locales, skins, or devices.