Académique Documents
Professionnel Documents
Culture Documents
Ohioedge
Enterprise Java Solutions Provider Since 1996
Assumptions
Audience Background
Elementary knowledge of J2EE Currently planning or in the process of building Web applications with J2EE
Assumptions
Audience Expectations
Want to learn or verify essential concepts of Web application development with J2EE Want to see live demonstrations of
sample applications deploying sample applications in J2EE-compliant application server how a proper implementation of these concepts results in robustness, quality, and improved productivity
Todays Agenda
Origin of J2EE Mindset for building Web applications Generalization: J2EE Patterns Three-tier component: EJB-JavaBean-JSP XML schema-driven applications Directory structure: Effective organization of java, jsp, xml, sql and bat script files Package structure: Effective grouping of Java and JSP source code Live Demonstration of J2eeBuilder Framework & component plug-in
J2EE Facts
J2EE is not a programming language. J2EE is a specification for writing enterprise applications (distributed computing) J2EE specification compliant code is portable between J2EE-compliant application servers.
1985-1992
One programming language for building distributed (client-server) applications
1990+
VB brings client-server (distributed) application development environment to desktops Procedural programming GUI development is more user-friendly
1995+
Java, an OS independent, pure Objectoriented, programming language starts gaining ground Object-oriented programming is more user friendly
Java Remote Method Invocation (RMI) is made available for distributed computing
1997+
Apache Web Server becomes de-facto web server
Java RMI is further strengthened by a specification - J2EE specification - on how to write an RMI server. Developing distributed applications is made more user friendly.
1999+
Servlet/JSP makes HTML-based Web GUI a real thing for enterprise applications
Object-oriented programming is further extended into XML definition driven object-oriented programming J2EE incorporates XML as the way to specify data
2000+
Enthusiastic software developers start using J2EE.
2001+
Various articles, papers, and books on J2EE Patterns, Practices, and Strategies are published and presented Jboss an open-source J2EE 1.3-compliant application server is used by more than 1 Million developers world-wide J2EE is free. J2EE is open. J2EE is here to stay.
Application Server
Think in terms of Servicing a request For example, a click on a create button on a customer page in a browser is a request. Building a Web application requires an approach of handling and processing http requests and sending appropriate responses back to the requesters
Generalization of Services
Generalization of how http requests are serviced by presentation-tier, middle-tier, and data-tier results in a generic, intertier dependent, reusable library of source code - J2EE patterns
Generalization of Services
For an example, the application processing customer-create request needs to verify if the requester is valid, requesters session is valid, and license to use application itself is valid. These validation steps are independent of customer-create request and are applicable to any requests such as, customer-delete, contact-find, etc. This requires that every time a request is received it should be first passed-on to a generic validation service that would either permit or deny further servicing of the request.
Typically, validation service would get categorized under presentation services. Depending upon the layer where the services are called, they would be categorized under either presentation, business, or data services.
Servicing a request
Http request originates in a browser
URL
Presentation-tier Business-tier
Http response ends in the browser
View Helper: Encapsulates logic that is not related to presentation formatting into Helper components
Service To Worker: Combines a Dispatcher component with the Front Controller and View Helper patterns - Dispatcher plays moderate to large role in view management. Dispatcher is more sophisticated. The dispatcher may invoke a business service to determine the appropriate view to display.
For example: http://my.server.com/myContextRoot/Customer.ctrl?submit=Set
Service To Worker
URL
Business-tier
Value Object
Business Delegate
Requests EJB/Business Service
EJB
Service Locator
Business-tier
Business Delegate Value Object Session Faade
Data-tier
Service Activator Data Access Object
Service To Worker Composite Entity Dispatcher View Value Object Assembler Value List Handler Service Locator
Directory Structure
Source Code Scripts J2EE Specification Code
ejb.xml web.xml application.xml jboss.xml jboss-web.xml manifest.mf
Package Structure
Business Functionality code
extends framework code
Framework code
implementation of patterns
J2eeBuilder Framework
Demonstration of a framework
Implementation of patterns Session Management
User Management
License Management j2eebuilder-config.xml
Summary
J2EE is Java, EJB specification, Servlet, JSP, Html, and XML Use open-source software such JDOM, LOG4J, Apache Web Server, Tomcat Servlet Container, and JBoss Application Server Document your architecture, data-structure, functional scope, directory structure, and package structure, before launching a fullscale development Understand key concepts. Learn to do-it by hand using simple TextPad before using IDEs.
Keep it J2EE compliant. Avoid getting locked into any vendor specific technology.
You build a generic framework and robustness, quality and productivity will come.
Q&A