The Velocity Template Engine lets you render data from within applications and servlets. Primarily used to develop dynamic, servlet-based Websites, Velocity's clean separation of template and Java code makes it ideal for Model 2-style Model-View-Controller (MVC) Web development. As a general template engine, Velocity suits many other purposes, such as code generation, XML generation and transformation, and textual stream processing. This article introduces the Velocity Template Language (VTL) and provides examples of how to use the Velocity engine, including how to generate Web content in a Java servlet environment. (3,000 words; December 28, 2001)
WebWork is an open source Web application framework designed to simplify Web application development. This column provides an introduction to WebWork and illustrates the process of login page creation using WebWork and two different view technologies, JavaServer Pages (JSP) and Velocity. (1,000 words; March 7, 2003)
Every Enterprise Java project has the same basic plumbing. By embracing this premise, you can cut project costs and improve software quality in one swoop. Even the lightweight framework outlined in this article can add significant value to your project -- with immediate gains. And it's designed to be extensible and vendor-neutral, which makes it all the more valuable. We'll look at some basic components to demonstrate how you can add new services easily while maintaining a consistent API to developers using the framework, thus ensuring future extensibility. We'll also look at the issues pertaining to cross-application server portability. (3,200 words)
Object caching is an important aspect in the design and development of Web portals. In a typical Web portal application, we need the frequently accessed data in a JVM's memory, but, at the same time, we want the ability to automatically clear the data from memory when it's stale and refresh it with new data. Currently many open source implementations provide object caching in J2EE Web applications. This article describes a reusable object-caching framework created to cache data objects in a Web portal application. This framework can be seamlessly integrated into any Web application. Author Srini Penchikala discusses implementing object caching using three open source caching frameworks: Java Caching System, OSCache, and Java Object Cache. He presents these frameworks' installation and configuration details. Finally, he presents a performance comparison to show the effectiveness of caching objects. (4,800 words; May 31, 2004)
5. Design a simple service-oriented J2EE application framework
Often, a J2EE Web application framework-Struts, for example-doesn't address the Web-tier object references between Action/servlet and other layers, such as a plain old Java object (POJO) business manager, Enterprise JavaBeans (EJB), Web services, and a data access object (DAO), or between a DAO and JDBC (Java Database Connectivity) stored procedures. Thus, Java developers end up with messy code in the Web tier Action/servlet. This article describes in detail the steps for developing a custom framework that addresses those issues. (3,000 words; October 4, 2004)