Title: JHeadstart The Next Generation Lucas Jellema, AMIS Services OTDUG 2004
1JHeadstart The Next Generation Lucas Jellema,
AMIS Services OTDUG 2004
2Agenda
- How to approach Java/J2EE Web Development
- Early and Major Decisions
- Analysis
- Development Environment setup
- Application Configuration
- Overview JHeadstart 10g
- Supported Frameworks
- Main functionality and benefits
- Real life project experiences
- Extending JHeadstart applications with
- PDF report generation
- SVG based graphics
3Early and Major decisions
- Tools and Technology
- First round
- Persistent Data storage RDBMS
- Application middle tier Java
- Client HTML (and PDF, Email, XML)
- Choose the Database, Java IDE and J2EE
Application Server - For example Oracle RDBMS, JDeveloper, OC4J
- MVC Architecture
- Second Round
- Model implementation (OO/R mapping framework)
- View implementation (HTML render engine)
- Controller implementation
- Reusable libraries, code generators, supporting
tools
4The RDBMS
- Role of Database what is your primary concern?
- Be truly J2EE theory compliant
- Prevent vendor lock-in at all costs
- Use the RDBMS as simply as you can
- Bring data processing to the Java middle tier
- vs.
- Benefit from RDBMS functionality as much as you
can - Use your organizations skills to the fullest
- Cater for different applications and/or
technologies accessing the database
5Model implementation OO/R Mapping Framework
- Model implementation
- Turns Objects into persistent Database Records
- Retrieves data from the RDBMS and instantiates it
into Object - Provides services for querying, inserting,
updating and deleting, locking, caching data - based on JDBC
- All based on a mapping description between
Objects and Tables/Views, Properties and Columns - Most prominent OO/R Mapping Frameworks
- Toplink, Hibernate, JDO, Castor, ORJ, BC4J/ADF
Business Components, DIY
6JHeadstart supports Toplink and ADF Business
Components
- Official support for Toplink recently added
- As of JHeadstart 10g (9.0.5.1) (June 2004)
- Inofficially available since September 2003
- As far as JHeadstart is concerned, it is
transparent whether you use Toplink or ADF BC - JHeadstart uses ADF BC for its Meta Data
- Generally speaking
- ADF BC is much more Database aware
- More productive for SQL skilled developers
- Toplink is much more OO
- Will be acceptable to J2EE people
- JHeadstart can best be used with ADF BC
- However a mix of the two is also an option
7(No Transcript)
8View implementation Render Engine
- HTML
- Java Server Pages (JSP)
- Including JSTL (JSP Standard Tag Library)
- Oracle UIX (User Interface XML)
- Implements Oracle Browser Look Feel guidelines
- Soon to be an Java Server Faces (JSF)
implementation - Other output formats rendered to client
- Email using utl_mail or JavaMail
- XML using Oracle XDK, XSLT transformation
- PDF using XML, XSL-FO and Apache FOP
9Controller Implementation
10JHeadstart supported frameworks and technologies
Browser
View (UIX and/or JSP)
Controller (Struts)
JHeadstart Runtime Framework
Model (ADF Business Components and/or Toplink)
(Oracle) RDBMS
11Other decisions
- Analysis and Design
- UML
- ERD
- Screen Design and Prototyping/Mockup
- Database Design and Development
- Oracle Designer
- JDeveloper
- Generation vs. Coding
- Tasks and Roles in the project team
- required skills
- Business Logic implementation
- Where (and how) do you implement business rules
12Consolidate Business Rules in Database
Browser
Client
Application server
Server Side (Data Oriented) Business Logic
Database
Data
13Beware.
- Try to only build application logic that is
specific to your business - Do not spend
- large portion of the budget
- substantial period of time
- your best resources
- on building generic infrastructure
- Reuse infrastructure!!!
- Compare Oracle Forms and what the Forms Runtime
engine does for your application - You run the risk of building your own Java/J2EE
Forms Runtime engine!!!
14Analysis
- Interfaces
- Incoming and Outgoing
- Client tier, Middle tier, Database
- Synchronous and Asynchronous
- Performance, Security, Responsibility
- Complex, Non generatable UI constructs
- Reporting
- Metrics
- Average and Peak numbers of (concurrent, active
users) and what does an active user do? - Required response times
- Security
15Environment Setup
- File based vs. Repository Based
- Implement a system for Version Control
- Look out for bottle-neck files
struts-config.xml, application structure.xml, ADF
BC - Set up incident management system
- Bugzilla
- Implement automated unit testing
- JUnit and HttpUnit
- Learn how to remote debug the web application
- Define, publish and enforce Coding Standards
16Example Coding Standards
- No Java Code in JSPs (use Custom Tags)
- No hard-coded values in Java code (or
JavaScript) use a Constants class or (for
strictly private values) use private final
members at the beginning of a class. - Text that is presented to the user must be
included in ResourceBundles, either Struts-style
server-side or in a JavaScript library. No
boilerplate may directly be included in a JSP or
Java Class only keys to entries in
ResourceBundles are allowed - Every public and protected method must have
JavaDoc style comments - Every public and protected method must have an
automated (J)Unit-test - No style definitions in a JSP that also applies
to the style attribute in HTML elements all
styles must be defined in external CSS-files - No JavaScript (except for event-handlers) in a
JSP all JavaScript code must be defined in
external JavaScript libraries
17Environment Setup (2)
- Make use of automated build and task execution
- Ant
- Synchronize all filesystems with SCM, Nightly
build, JavaDoc generation, regression testing - Set up Performance Testing tools
- Microsoft Web Application Stress (WAS) tool
- Apache JMeter
- Ensure internet access for all developers
- Google is your best friend
- Assemble knowledge, expertise and experience
- Early on! You make or break the project with the
earliest decisions
18Application Configuration
- Which versions and edition of the technologies
- For example JSP with JSTL? Oracle 10g EE
database features? - Extend framework classes
- To provide hooks you may later need
- Stylesheets and templates
- Consider Struts Tiles for highly customizable
look feel - Text presented to the end user
- Language, Type of User, Role
- boilerplate, data, messages, on line help
- Logging
- Authorization and Security
19JHeadstart 10g Overview
- JHeadstart provides
- An easy entrance into Java/J2EE development of
OLTP-like (data intensive) applications - High productivity for development of common and
complex constructs - Through generation and reusable components
- Infrastructure around standard technologies
- Glue between Controller/View and Model
- JHeadstart supports key technologies
- BC4J/ADF Business Components and Toplink
- JSP and Oracle UIX
- Struts (and the Oracle MVC Framework/Cleveland)
- JHeadstart comes with source code
- and can be extended
20De Europeesche Travel Insurance for Consumers
21Joint Aviation AuthoritiesAirplane Audits
22University of AmsterdamCourse Management and
Publication
23TMITracking and Tracing
24AMIS Library System
25Adding PDF report and SVG Graphicsgeneration to
JHeadstart applications
- Many web-applications require some form of
reporting, either through Excel or PDF - The foundation for both is XML
- Using Apache POI you can generate Excel from XML
- Using Apache FOP you can generate PDF from XML
- You can produce Scalable Vector Graphics from XML
- JHeadstart can easily be extended to cater for
these types of output - These are alternative View implementations
- Driven from the same Model implementation the
JSPs work from
26How to produce PDF output?
OutputDocument
PDF, PS, SVG RTF, XML, (XHTML)
27Extending JHeadstart with PDF and SVG generation
Browser
html, PDF, SVG
View
Controller (Struts)
JSP
FOP
JHeadstart Runtime Framework
XDK
2XML
Model (ADF Business Components and/or Toplink)
(Oracle) RDBMS
28Oracle 10g JDeveloper ADF Application
Development Framework
- ADF promises Productivity with Choice
- Choice several different technologies for M, V
and C - Productivity visual editors, wizards, click
drag drop, generate - Oracle has proposed a JSR to standardize the
concept of ADFs Data Binding - 1.0 Release of ADF April 2004
- JHeadstart ADF release end of Summer 2004
- Considerations surrounding ADF
- How stable/mature/complete?
- What happens when click drag drop are not
enough? - Is ADF an Oracle specific venture apart from the
main stream of Java/J2EE offerings?
29Discussion and Conclusions
- J2EE Development
- Major Decisions
- Analysis
- Environment
- Application Configuration
- JHeadstart
- Easy entrance, productivity, infrastructure
- Source code is provided
- JHeadstart is very extendible, e.g. PDF SVG
- Future
- ADF? JSF? Struts 2.0? JDO?
30The End
- For questions send an email to jellema_at_amis.nl
- For more information, scripts and examples go to
www.amis.nl/technology