Uncoupling Java Applications O’Reilly Conference on Java Brett McLaughlin.

Slides:



Advertisements
Similar presentations
SIP Servlets. SIP Summit SIP Servlets Problem Statement Want to enable construction of a wide variety of IP telephony.
Advertisements

Apache Struts Technology
Using JavaServer Pages Harry R. Erwin, PhD CIT304/CSE301.
CSIS0402 System Architecture K.P. Chow University of Hong Kong.
Sergio Ferreira MoreData I16 Thursday, October 12, :30 a.m. – 11:30 a.m. Platform: Informix How to call Informix 4gl code from J2EE.
An architecture for webb applications, J2EE
EJB Design. Server-side components Perform –complex algorithms –high volume transactions Run in –highly available environment (365 days/year) –fault tolerant.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
Object-Oriented Enterprise Application Development J2EE Blueprints.
Java 2 – Enterprise Edition Kevin J. LaFata April 21, 2003 UM – St. Louis.
Software Engineering Module 1 -Components Teaching unit 3 – Advanced development Ernesto Damiani Free University of Bozen - Bolzano Lesson 2 – Components.
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
Apache Struts Technology A MVC Framework for Java Web Applications.
TimeTracker 2, Take 1  Servlets Web Interface (jsp) Servlet (business logic and processing) App Engine Datastore Form Submit R/W.
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Struts. Agenda Preface Struts and its components An example The architecture required for Struts Applications.
UNIT-V The MVC architecture and Struts Framework.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
JDBC Session 5 Tonight: Data Access Patterns 1.J2EE Architecture & Design Patterns 2.The Data Access Tier 3.Data Access Patterns –DataAccessObject (DAO)
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Chapter 4: Core Web Technologies
Glink: GCOS e-business in an application server architecture Summit 2000, Jim Gallagher.
What is Architecture  Architecture is a subjective thing, a shared understanding of a system’s design by the expert developers on a project  In the.
Using JavaBeans and Custom Tags in JSP Lesson 3B / Slide 1 of 37 J2EE Web Components Pre-assessment Questions 1.The _____________ attribute of a JSP page.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
Objectives Java Servlet Web Components
Design Patterns Phil Smith 28 th November Design Patterns There are many ways to produce content via Servlets and JSPs Understanding the good, the.
1 Stateful Session Beans Stateless Session Beans Michael Brockway Sajjad Shami Northumbria University School of Computing, Engineering & Information Sciences.
第十四章 J2EE 入门 Introduction What is J2EE ?
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
Adaptive Hypermedia Tutorial System Based on AHA Jing Zhai Dublin City University.
Putting it all together Dynamic Data Base Access Norman White Stern School of Business.
Webcommerce Computer Networks Webcommerce by Linnea Reppa Douglas Martindale Lev Shalevich.
Copyright © PASS Consulting Corp., Miami 2001 XX/1 XML Application Server.
Ch 2 – Application Assembly and Deployment COSC 617 Jeff Schmitt September 14, 2006.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Core Indigo Patterns Ted Neward
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
آرمان حسين‌زاده آذر  Access to data varies depending on the source of the data.  Access to persistent storage, such as to a database, varies greatly.
Introduction to Enterprise JavaBeans Topics In Systems Architecture Barry Herbold
Java EE Patterns Dan Bugariu.  What is Java EE ?  What is a Pattern ?
Assignment of JAVA id : BSSE-F10-M-10-JAVA1 Overview of J2EE/Session 2/Slide 1 of 38.
1 Introduction to Servlets. Topics Web Applications and the Java Server. HTTP protocol. Servlets 2.
JS (Java Servlets). Internet evolution [1] The internet Internet started of as a static content dispersal and delivery mechanism, where files residing.
Module 4: Creating a Web Application with Web Forms
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
Rack Wizard LECC 2003 Frank Glege. LECC Frank Glege - CERN2/12 Content CMS databases - overview The equipment database The Rack Wizard.
1 Distributed System using J2EE. 2 What is J2EE?  J2EE (Java2 Enterprise Edition) offers a suite of software specification to design, develop, assemble.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
Chapter 9 Web Application Design. Objectives Describe the MVC design pattern as used with Web applications Explain the role and responsibilities of each.
Bayu Priyambadha, S.Kom. Static content  Web Server delivers contents of a file (html) 1. Browser sends request to Web Server 3. Web Server sends HTML.
EJB Enterprise Java Beans JAVA Enterprise Edition
Glink for Java: applet, application and an API for integrating access to Bull, IBM, UNIX and Minitel systems with your Java based e-business applications.
Apache Struts Technology A MVC Framework for Java Web Applications.
Apache Cocoon – XML Publishing Framework 데이터베이스 연구실 박사 1 학기 이 세영.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
J2EE Platform Overview (Application Architecture)
Java Servlets By: Tejashri Udavant..
Distribution and components
Creating Novell Portal Services Gadgets: An Architectural Overview
Model-View-Controller Patterns and Frameworks
Lecture 1: Multi-tier Architecture Overview
The Model Layer What is Model?
Developing and testing enterprise Java applications
Presentation transcript:

Uncoupling Java Applications O’Reilly Conference on Java Brett McLaughlin

Roadmap – the Meat Introduction Engines User Store Validators Actions Screens

Introduction JSP + Servlets + EJB + XML + JDBC + JNDI =

Hype, Hype, and More Hype When do I use JDBC and when do I use EJB? Does JSP truly provide a separation of content and logic? Is XML right for my application? One engine? Two engines? (Red engine? Blue engine?) Am I asking the right Questions? The Grab Bag of APIs The “Use It or Lost It” Mentality Your Responsibility

All the Abbreviations != Solid Application The truth about: JSP XML (XSL, XSLT, XSP, and all the rest…) JDBC EJB You dictate technology; Technology does not dictate you! Management doesn’t know or care about how “cool” your use of technology is.

Management, Maintenance, and Modularity Management: Delivery Focused Maintenance: Stability Focused Modularity: A Marriage of the Two MaintenanceManagement Functionality “Graph” LessMore

Engines Request  Engine  Response

Building a Generic Engine HTTP and the Request/Response Model The Servlet API Abstracts Details of Network Communication Access to Session Variables and Objects Responsiveness to a Variety of Responses Easy Interface with other Java Specifications (EJB, JDBC, RMI) Why JSP Doesn’t Work

Using a Central Controller Single Point for all Requests Request Parameters and POST Disguises Request Information Allows use of Hidden Fields and Variables Additional Security Mechanism Provides Continuity in Application Requests Request generates Response, which generates Request… and on…

User Store userData = UserData(req); userData.setParam(“myParam”, myValue);... userData.clearVolatile();

A Flexible Data “Connector” How to handle data across contractual objects Code Tying Objects Together (tight coupling) Specific Object Types for Specific Implementations (semi-tight coupling) Generic Data “Connector” Across All Implementations (loose coupling) Also Adds Persistence of Data Across Requests

Loading at Request Time The User Store is Always Created/Loaded Load From the Session, Update from the Request Create from the Request Request Parameters Available No Differentiation Between Original and Added Request Parameters Generic Object Allows Generic Contracts Results in Logical Groupings, Not Code-Based Ones.

Storing at Response Time The User Store is Always Stored Purge Request and Volatile Data Store in the Session Object Allows Process Lifecycle Continuity Preserves Persistent Data Authentication Credentials Application Preferences Complex Derived Data Remote References (Persistence Load-Balancing)

Validators 4 20

Balancing the Teeter Totter Coarse Grained Validation (+) Allows Generic Interfaces and Implementations (-) Never Provides Sufficient Validation for Business Rules Fine Grained Validation (+) Very Specific and Ensures Correct Business Information is Present (-) Requires Specific Implementation for Every Possible Request

Coarse Grained Validation Configuration File Based Properties Files, ala Java Hierarchical Files, ala XML Single Implementation Set Handles All Requests Provides “first-run” Error and Mistake Catching Allows Short-Circuit of Complex Business Logic if General Rules Not Followed

Fine-Grained Validation Code Based Sometimes Within Java Code Sometimes Within Configuration Files Tied to a Specific Business Process (Action) 1:1 Mapping Between Implementation and Task Provides Complex Error Handling Business Logic Inherent to Process, so no Short-Circuiting Occurs

Actions action = ActionLoader.getInstance().load(actionName); action.init(userData); action.execute();

What are Actions? Contract Based Request Handlers Business Logic Assemblers Do Not Replace EJB, JDBC, etc. Do Replace Spaghetti Code Abstraction of Interface to Business Components Engine has no Information about Communication Mechanisms (JNDI, RMI, etc.) Logic Changes without Engine Calls Changing

Use of Actions Loading Generic Loader from Action Name Name  Action Mapping in Files or Database Initializing One Application Engine always uses Same Initializing Object Type (UserData) Isolates Execution from Application Logic Execution Return Result Based on Application Logic, not Business Logic Loads any Screen-relevant Information to UserData

Screens screen = ScreenLoader.getInstance().load(screenName); screen.init(userData); screen.output();

What are Screens? Contract Based Response Handlers Display Logic Assemblers Do Not Replace XML, HTML, etc. Do Replace Hard-Coded Markup Language Abstraction of Interface to Visual Components Engine has no Information about Markup Language(s) (HTML, XML, WML, etc.) Output Changes without Engine Calls Changing

Use of Screens Loading Generic Loader from Screen Name Name  Action Mapping in Files or Database Initializing One Application Engine always uses Same Initializing Object Type (UserData) Isolates Output from Application Logic Display/Output Return Based on Use of Output (e.g. Cocoon) Retrieves Needed Information from UserData

Q & A