advertisement
javaboutique
Search Tips
Articles  |   Tutorials  |   Reviews  |   Tools  |   by Category  |   by Date  |   by Name  |   Submit  |   Source  |   Forums  |  
javaboutique
Browse DevX


Partners & Affiliates











advertisement

Tutorials : Streamline Your JSP Management with Enhydra :

An Enhydra Application

An Enhydra application is a Java application that uses the Enhydra application framework and runs on a multiserver. The Java application can be a regular servlet application that uses the J2EE servlet API and runs on an Enhydra multiserver or a super-servlet application that uses the Enhydra application framework.

Typically an Enhydra application consists of presentation objects, business objects, and data objects. Apart from these objects, an Enhydra application also uses a common application object.

Application Objects

The application object is the core of an Enhydra application. The application class contains metadata and configuration information pertaining to the application iteself—the application's name and status, the name and location of the configuration file, and references to the application's session manager, database manager etc. Application level variables that need to be accessible in all parts of the application also can be defined within the application object.

All application objects implement this interface: com.lutris.appserver.server.Application. This interface defines all the basic functionality required of an application object. Instead of implementing the application interface, you can directly extend the StandardApplication class which implements the basic functionality defined in the application interface. You also have the flexibility to override specific functionality defined within StandardApplication for your own use.

Presentation Objects

A presentation object helps you generate dynamic content for each page with which its associated. Every page, or group of similar pages, needs be associated with a presentation object. The presentation object corresponds to a unique URL, which the server uses to redirect requests. Whenever the Web server encounters a request from a URL ending with the extension .po, the Enhydra server locates the corresponding presentation object and instantiates it.

Presentation Objects with XMLC
XMLC creates Java classes that represent the HTML content. The DOM object thus obtained can be used to read and write content into the HTML page. These Java classes are then be used by the presentation object to write the dynamic content into the static HTML page. This reduces the interaction between the programmer and the UI developers.

Presentation Objects Using JOLT
Another way to create presentation objects is to use <JOLT> tags. The .html page is renamed as a .jhtml file and then Java code is added throughout the file using the <JOLT> tags.

During compilation, Enhydra Jolt will read the <JOLT> tags and create a temporary .java file. This Java class also implements the HttpPresentation interface, which makes the resulting Java object a presentation object. The temporary .java file is deleted, but Enhydra uses the resulting presentation object class.

Presentation Objects Using Java
Apart from the above methods, presentation objects can also be hand-coded. In cases where you've got a lot of HTML code, this might not be an efficient solution. But in cases where the HTML is limited and the Java logic surrounding it is large, presentation objects by hand may be a better solution.

Business Objects

Business objects contain the business logic relevant to the business functions for which the application is designed. Business objects can be invoked by presentation objects or by other business objects.

Data Objects

Data objects contain the logic to interact with persistence systems, like databases. Business objects invoke data objects whenever data needs to be retrieved and persisted into the database.

Enhydra's Tools

Enhydra Application Wizard
The Enhydra Application Wizard creates a basic application and allows you to improve on it. You can run the tool both as a command-line application and as a graphical utility.

XMLC
Normally, an XMLC compiler creates a Java object out of a XML schema, but Enhydra uses XMLC with .html pages. XMLC generates template objects from HTML, which you then use to add logic into the presentation object. This allows page designers and developers to work independently on their pieces without adversely affecting each other's work. UI developers will modify work on the predefined HTML template generated by XMLC. Since Java developers work through setter methods generated by XMLC, changes made by the UI developer would not mean rewriting the whole page.

XMLC also supports dynamic recompilation, which allows you to make changes to the HTML layout. As long as the changes are static and don't change the classes and id tags, you don't need to restart the application.

Enhydra DODS
The Data Object Design Studio (DODS) generates SQL scripts used by the Enhydra application. Database operations, like creating tables, dropping tables, and generating data objects, are defined in a .doml file. DODS takes this .doml file and converts the operations into SQL script files, which can be used to execute against a database. Data objects defined in a .doml file correspond to a database table; these objects can have attributes that correspond to table columns for the specific table.

Enhydra Kelp
The Kelp tools help you create Enhydra applications in Eclipse, Jbuilder, NetBeans, and other IDEs. You can integrate Enhydra's Application Wizard into Kelp, thus allowing you to create a Enhydra application within the IDE.

Barracuda
Barracuda is a Model View Controller (MVC)-style framework you use to provide a Web application in java. Unlike other MVC patterns, Enhydra can integrate well with Barracuda since it supports XMLC-based presentation objects. Additionally, Barracuda provides validations based on the XMLC/DOM model.

Enhydra Octopus
Octopus is a Java-based Extraction, Transformation, and Loading (ETL) tool used to transform data according to the rules defined in an Octopus XML file. Octopus retrieves data from any JDBC data source and extracts that data as per the defined rules. The resulting data can be loaded into a new database or new tables. Octopus works with DODS to create SQL scripts, which you can use to extract and load data into the desired database.

Enhydra Director

Enhydra Director is an open source Web server plugin that provides load-balancing capabilities to Enhydra server applications. Director connects to the Enhydra server irrespective of the Web server being used. The configuration is simple on the Enhydra server-side and on the Web server-side it deploys itself as a simple plugin. Director supports load balancing among multiple instances and across multiple server machines. It also provides fail-over support when an application instance in the Enhydra server becomes unavailable or unreachable. Director also supports session affinity, which allows you to connect back to the same Enhydra instance that started the session.

According to the latest release, Enhydra Director is supported on Apache over Linux, Unix and Windows platforms. It is also supported by Microsoft IIS on the Windows platform. Since the source of Enhydra Director is open, versions for more Web servers and platforms versions could become available in the future.

An All-Purpose Application Server

Enhydra is an open source and scalable application server that can do almost all the functions a regular application server can do. It's entirely written in Java and works with a variety of Web servers and platforms. Unlike most application servers, Enhydra has a small memory footprint, which makes it easy to run in any environment. Enhydra also provides convenient tools that can make development and deployment fairly simple and easy. The Enhydra Multiserver provides an administrative console to manage applications and also provides a debugging environment in which to debug applications as they run. All components in the Enhydra architecture have an independent set of APIs, allowing you to manipulate the components as you wish. You can use alternate components in the place of the Enhydra components and still not affect the overall application.

Though the Enhydra server's lack of EJB support is notable, Enhydra does support transactions and database manipulation through data objects.

Enhydra 5.1 is the latest release of the server in the market today. Enhydra 6.0 beta is also available for download from the Enhydra Web site. Additional information about Enhydra and sample applications can be found on the ObjectWeb Web site.

References:
Enhydra Java/XML Application Server Home Page
ObjectWeb Home Page

How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.

 Internet.com eBook Library
 IBM Software Construction Toolbox
 Microsoft RIA Development Center
 Destination .NET
XML error: not well-formed (invalid token) at line 38
advertisement
Receive Articles via our XML/RSS feed
Receive Articles via our XML/RSS feed

JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for Windows 95, 98, ME, NT, 2000 and XP. It's designed to automatically optimize your Windows settings, boosting your Internet connection up to 200%.

Mozilla's Ubquity Mashup: For The Masses?
iPhone Users Just Want to Have Fun
Oops! I Fixed the Linux Kernel
Jim Zemlin: The New Center of Linux Gravity
Microsoft's Novell Investment Tops $340M
Fedora 10 Takes Shape
IBM Gives a Mobile Voice to Developers
Inadequate Tools Send Software Down the Drain
USB 3.0 One Step Closer to Reality
Would-Be Linux Contributors May Get a Leg Up

Book Excerpt: Microsoft Expression Blend Unleashed
Develop a Mobile RSS Feed the Easy Way
State of the Semantic Web: Know Where to Look
A 3D Exploration of the HTML Canvas Element
Setting Up and Running Subversion and Tortoise SVN with Visual Studio and .NET
Java/JRuby Developers, Say Open 'Sesame' to the Semantic Web
Interpreting Images with MRDS Services
DevXtra Editors' Blog: Executives Avoiding Cloud Computing in Droves
Q&A with James Reinders on the Intel Parallel Studio Beta Program
The Pros and Cons of Outsourcing Enterprise Emails

Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers