Presentation is loading. Please wait.

Presentation is loading. Please wait.

Open Source Java/XML Application Server Building Java/XML Web Applications with Enhydra David H. Young Lutris Technologies &

Similar presentations

Presentation on theme: "Open Source Java/XML Application Server Building Java/XML Web Applications with Enhydra David H. Young Lutris Technologies &"— Presentation transcript:

1 Open Source Java/XML Application Server Building Java/XML Web Applications with Enhydra David H. Young Lutris Technologies & 30 March 2000 Session: Open Source Java

2 My Assumptions You know Java You know the value of an application server strategy for building Web applications You know the value of Open Source strategies You want to see something that solves a problem with building Web applications –e.g., JSP not the best for a real product life cycle

3 Enhydra: #1 Open Source Java Application Server Lutris is sponsor of, an Open Source Java/XML Application Server Enhydra is a true Open Source Java/XML Application Server Over 1000 known developers worldwide J2EE Enhydra available today.

4 Open Source Enhydra Technology Enhydra Multiserver –Servlet runner –Web Server & Web Server Connection Manager –Management console Enhydra Debugger –Graphical Servlet Monitor Enhydra XMLC –XML/DOM Presentations Enhydra Director –Failover/Cluster Support Enhydra Application Framework –Superservlet Strategy Enhydra Application Wizard (Newapp) –Instant application to jumpstart development Enhydra DODS –Graphical Object-to-SQL mapping application

5 Enhydra Architecture

6 for the Enhydra Community Mail lists & Working Groups Mail Archive/Search Case studies, News On-line Demos –Shopping Cart, Chat Room, Poker 3rd party Services and Products Working Groups: EJB Container Web Container I18N Wireless Architecture JMX Rocks/XMLC DODS

7 (The Mall) Deployed Enhydra

8 Wizshop/Earthlink/Mindspring Cisco Local Director Sun E250/2CPU 500M Memory 400Mhz Enhydra Apache/Jserv The Internet Sun E450 Oracle DB Sun E250/2CPU 500M Memory 400Mhz Enhydra Apache/Jserv

9 A Best Practice Leveraging Enhydra XMLC Java Server Pages Enhydra XMLC

10 Embedded Page Languages: Bad Idea! HTML is developed by graphic artists –Authoring programs can break the code –Pages with mocked data is not final mockup –Most graphic artists cannot program Code is developed by programmers –They use source code editors –Code added to HTML is difficult to maintain –Most programmers cannot draw

11 Embedded Page Languages: Bad Idea! Embedded page languages are not legal HTML –Cant parse the pages with standard parsers –Standards are a good thing. Flow-of-control is obscured Little compile-time type checking available Does not integrate well with debuggers, profilers Poor support for I18N

12 JSP Example page language==java imports==com.wombat.JSP.* %> Welcome Today is Day: Year: <% if (Calendar.getInstance().get(Calendar.AM_PM) == Calendar.AM) { %> Good Morning Good Afternoon

13 An HTML Example Name City John Doe Atlanta

14 DOM Representation ID=custNameID=city

15 Adding ID Attributes Name City John Doe Atlanta

16 What is the DOM? Document Object Model A W3C specification ( A standard API to represent a structured document as a tree with branches, nodes, and leaves Each markup element in the document is a node with nested markup elements as child nodes Allows documents to be traversed as a tree where nodes are visited, added, removed, replaced, or cloned

17 Java DOM Package Node: Base class of all DOM tree objects –Contains children and parent links –Provides methods for manipulating the tree Document: Root of tree –Provides factory methods for other DOM classes Element: Interface for XML tag classes –Implements Node –Specific XML applications may define classes that extend element Text: Nodes that contain the document text

18 Java DOM HTML Package org.w3c.dom.html –DOM Interfaces for HTML HTMLDocument - Root of the HTML hierarchy HTMLHeadElement - HTMLBodyElement - HTMLParagraphElement - HTMLAnchorElement - HTMLTableElement - HTMLFontElement - …more…

19 Enhydra XMLC

20 Enhydra XMLC Overview Compiles HTML and XML documents into Java classes An instance of of the XMLC-generated class is a DOM that contains the original document Access methods are generated for elements with ID attributes –Return type of method is DOM class for that element –If the element is deleted from the document, the code will quit compiling –Isolates change in the structure of the document

21 ...Enhydra XMLC Overview Programmer adds dynamic content to the document by adding and manipulating DOM objects Static page URLs can be replaced with dynamic ones Prototype table row can be template for other rows.

22 Simple XMLC Example HTML Hello World Hello, my name is John Doe Generated Class public class HelloHTML extends HTMLObject { public HTMLFontElement getElementHeadFont(); public HTMLElement getElementName(); public void setTextCustName(String text); } Using the Generated Class HelloHTML hello = new HelloHTML(); HTMLFontElement hfont = hello.getElementHeadFont(); hfont.setColor(Green); hello.setTextCustName(Barney Blake); out.println(hello.toDocument());

23 Development with Enhydra XMLC welcome.html xmlc -class myapp.WelcomeHTML welcome.html javac myapp.WelcomeHTML

24 Work Flow using Enhydra XMLC HTML designer creates a working storyboard/demo page The designer tags dynamic elements with HTML 4.0 ID tags, e.g., … and hands off the page to the programmer The programmer compiles the page into a java class which is a DOM tree that can reproduce the document

25 … Work Flow... XMLC generates getElement () methods in the document object, e.g. getElementCustName() for each ID-tagged HTML page element At run-time the programmer instantiates the HTML page as an object and manipulates its properties

26 …Work Flow The programmer can use the XMLC-generated methods like getElementCustName() to manipulate page elements The programmer can also traverse the DOM tree to manipulate its other nodes directly if desired Finally toDocument() is called on the page object to stream the page to the web client as a string

27 Advantages of XMLC Object-oriented control of documents Layout and flow of control are completely separated Page designers and programmers only intersect on defining the dynamic page elements Programmers are largely unaware of page layout

28 ...Advantages HTML storyboard can be demod and changed in parallel with the server-side code Business logic and user interface can be developed and tested completely independently of each other Enhydra XMLC can serve the presentation layer in any multi-tier environment, such as BEA WebLogic

29 XMLC for Skins

30 XMLC for XML XMLC compiles any XML document –Generic DOMs –DTD-specific DOMs XML intended for display XML as data interchange format WML - Wireless Markup Language –HTML-like DTDs for wireless devices –Many companies using Enhydra XMLC for developing WML applications

31 Enhydra Roadmap

32 Toward J2EE Enhydra Other Open Source contributions, including on-going Enhydra evolution JOnAS, BullSoft Jonathan, France Telecom

33 The Enhydra Near-Term Future Enhydra 3.0 (beta: Today, FCS: TBA) –Servlet 2.2 (JSP) Support –Enhydra Director for Cluster/Failover –Enhydra Rocks Enhydra Enterprise (beta: Today, FCS: TBA) –J2EE Enhydra –Jonas/EJB Server –Jonathan/CORBA –JMS, JMX, etc.

34 Open Source Java/XML Application Server

Download ppt "Open Source Java/XML Application Server Building Java/XML Web Applications with Enhydra David H. Young Lutris Technologies &"

Similar presentations

Ads by Google