About InfoWorld : Advertise : Subscribe : Contact Us : Awards : Events : Store
InfoWorld HomeNewsTest CenterOpinionsProduct GuideTechIndex
 COLUMN ARCHIVE  FORUMS
 

COLUMN

 
The Open Source
Nicholas Petreley

Arcane or not, Enhydra is a dream come true for the Java-loving servlet developer

LAST WEEK I whined about a Python-based object-oriented Web application development environment called Zope. Zope has enough obvious potential that I'll keep working with it until I've learned it well enough to decide if I really love it or hate it. But right now I prefer the Java-based development environment called Lutris Enhydra (www.enhydra.org). For some people the contest between Zope and Enhydra comes down to Python vs. Java.

   ADVERTISEMENT
  

Free IT resource

Virtualization Insights from Top Experts - Learn how virtualization gets real!

Sponsored by Dell

Free IT resource

TechNet: More ways to know it, share it, and keep it running.

Sponsored by Microsoft

RELATED LINKS
»  AT&T buys high-speed wireless spectrum for $2.5 billion
»  Update: Sprint chief Forsee resigns
»  IT trainer offers master's degree for hackers
»  Wireless RSS feed 

IDG ENTERPRISE NETWORK
More Network LAN/WAN News...  (ComputerWorld)
Wireless EV-DO on board  (ComputerWorld)

TOP NEWS 


IT SOLUTION SEARCH

Python fans tend to hate Java, and vice versa. Not so with me. I happen to like both very much, although I have a slight preference for Python. Nevertheless, if you're familiar with Java and like it, you'll probably think Enhydra is a dream come true.

I'm rather unhappy with Zope's lack of refinement when it comes to its Web-based development environment, so you'd think I'd really be upset by Enhydra's almost total lack of visual development tools. But I'm not. I'm perfectly satisfied with the fact that you have to use your own editor and a few command-line utilities to use Enhydra.

Enhydra has one Java-based visual development tool, the Data Object Design Studio (DODS), which you use to build and manage data objects for your applications. To get an idea of what this tool is like, look up the word "arcane" in your dictionary and you'll probably find a screen shot. Enhydra also has a Web-based debugger and administration tool, both of which seem more usable than DODS. A visual application development wizard is in the works.

To be fair, I should mention that you can use external visual development tools to develop Enhydra applications. Enhydra has a tool called Kelp that lets you build Enhydra applications using Inprise JBuilder or Oracle JDeveloper. I haven't tried Kelp, though. I've used Enhydra strictly at the command line along with my favorite text editor, NEdit (www.nedit.org).

All you have to do to start a new Enhydra application is type the command "newapp myApp," substituting your own application name for "myApp." This will create a directory tree for your application, a set of "make" files, and some bare-bones HTML and Java source files. Enhydra expects you to build your applications on a three-tiered model, so it creates separate directories for your presentation layer, business logic, and database code. You can thwart Enhydra and put all your business and database logic into the presentation layer, but I don't recommend it. You'll find it much easier to build and maintain sophisticated applications if you respect the three-tiered design.

You'll spend most of the rest of your development time using your favorite text, HTML editors, and a tool called XMLC (XML Compiler). XMLC converts an HTML or XML file into a compiled Java class that serves up the page as if it were still written in HTML. The important thing to understand is that the Enhydra Java servlets don't actually use the HTML files when the application runs. XMLC simply uses the HTML files as templates to create the Java code to produce the same results.

Although XMLC leaves behind only compiled Java classes by default, you can also have the XMLC utility produce the Java source code. XMLC analyzes the HTML according to the World Wide Web Consortium DOM (Document Object Model). It uses the DOM to create Java-based references to all the HTML document elements. You can then manipulate these Java elements in order to customize how the servlet will serve up the page. The only real complaint I have so far about how XMLC works is the way Enhydra-generated Java code handles things like HTML tables. You have to go through a few contortions to fill a table with data from a database, for example.

The power of Enhydra is that you can design a Web page with your favorite HTML editor, run XMLC to create Java source code based on the HTML page, and then edit the Java source code to add custom behavior to your page. This can be good or bad depending on how well you plan ahead, because you can get yourself into a trap if you want to modify the HTML template after you've written a lot of custom Java code. But I've found it to be an excellent approach so far. Give it a shot and let me know what you think.


Nicholas Petreley is the founding editor of LinuxWorld ( www.linuxworld.com ). Reach him at nicholas_petreley@infoworld.com.




RELATED SUBJECTS

Software Development

Discuss this article in our online forums

MORE >


SPONSORED WHITE PAPERS
EMC - Lower costs and improve reliability-Get the EMC CLARiiON white paper!
Ciphertrust - Are you ready for Sobig.G? Learn how to protect your email systems.
CDW - Personal attention. CDW. The Right Technology. Right Away.
EMC - Explore key performance features and capabilities of EMC ControlCenter 5.1.1.
Intel - Free Intel white paper shows you how to deploy a secure wireless LAN
Cisco - FREE WHITE PAPER: BLUEPRINT to design and implement secure VPNs
Verity, Inc. - "Mass Consolidation Hits the Web-Search Market"
McDATA - Download a FREE storage consolidation white paper from McDATA(R).
Lucent Technologies - Overcoming Common Firewall Limitations
Lucent Technologies - Leverage Your Mobile High Speed Data Access. Download Free White Paper!
Nokia - Get the scoop! Mobilizing business white papers & case studies.
BMC Software - Maximize the Potential of Enterprise Data: Free white paper!
Network Associates - Free white paper - Strategies for Optimizing Network Costs and Benefits
Entrust - Manage identities across applications. Improve productivity.
Stalker Software - CommuniGate Pro - Transform your Email and Calendaring
Remedy - A NEW Gartner Research Note:Producing Quality IT Services

Search the IDG White Paper Library:


SPONSORED LINKS

INFOWORLD MARKETPLACE


» Hot Stock Alert (TMDI)
Telemedicus - Medical Communication Top Telemedicine Technology
» Apply BPM and ITIL at your IT Help Desk
ServiceWise brings BPM to complete IT service while eliminating integration cost. Learn more here.
» EMC delivers high-speed image capture, storage
Learn how you can quickly capture, organize, and deliver information with EMC ApplicationXtender.
» Register for your free VMWare Virtualization kit!
VMware virtualization takes the cost and complexity out of IT  Download this free kit to learn how.
» FREE Sophos Threat Detection Test
Is your AV catching everything it should? Free virus, spyware and adware scan.




 HOME  NEWS  TEST CENTER  OPINIONS  PRODUCT GUIDE  TECHINDEX   About : Advertise : Subscribe : Contact Us : Awards : Events 

Copyright © 2008, Reprints, Permissions, Licensing, IDG Network, Privacy Policy

All Rights reserved. InfoWorld is a leading publisher of technology information and product reviews on topics including viruses, phishing, worms, firewalls, security, servers, storage, networking, wireless, databases, and web services.

Computerworld :: Network World :: CIO :: PC World :: Darwin :: CMO :: CSO
IT Careers :: JavaWorld :: Macworld :: Mac Central :: Playlist :: GamePro :: GameStar :: Gamerhelp
ITWorld Canada :: Computerwoche :: Techworld UK :: tecChannel :: IDG.se :: IDG.no