Building Complex Java Applications with Oracle 9 i
Building Complex Java Applications with Oracle 9 i JDeveloper Dr. Paul Dorsey Dulcian, Inc. www. dulcian. com
Survey u Who is using Oracle JDeveloper for anything? Ø in test Ø in production u Who is doing web development? Ø JDev § § § JSP UIX Web services Ø. net Ø Other
u Oracle bought some code for Borland’s JBuilder in 1997. u JDeveloper 1. 0 (1998) Ø More or less useless u JDeveloper Ø 2. 0 (1999) Still useless JDeveloper History u JDeveloper 3. 0 (2000) Ø BC 4 J & DAC Ø Finally the right idea! u JDeveloper 3. 2 (2001) Ø Bug fixes Ø First useful version u JDeveloper Ø First 9 i (2002) good version Ø Big rewrite Ø Change in direction
Where Does JDeveloper Fit? u. A Java development tool Ø JDeveloper § § § has lots of market competition Visual Café - Symantec JBuilder Forte u. A Java development tool that works with Oracle Ø No real competition
Where JDeveloper fits today u Good tool for building Java applications u Best tool for building Oracle-based Java applications u Most of the solution for building JSPs or UIXs
u Weaknesses Ø Ø JDeveloper in the Development World Inefficient for application development Evolving support for JSP development u Strengths Ø Ø Ø Good IDE Extensible - wizards, property inspectors (customizers), toolbars, code generators Excellent Oracle database connectivity Supports all Java development Good user interface § Rated high by reviewers, much better than 3. 2 release Extremely important!
JDeveloper’s Short-Term Vision u Close the gap with Form Builder on development efficiency for Web Development - JSP/UIX Ø 6 -12 months u Support full enterprise-level data modeling Ø 1 -2 years u Java client support is “mature. ” u Add other UML pieces Ø Use cases
Is Java all you need to deploy on the Web? u NO!!!! u Java Deployment Ø JSP - Web Ø Applet – Web internal Ø Applications – Client/Server u Each alternative requires different tools and languages
Using Form Builder (the good old days) Forms Client/Server Required Tools u Forms u TOAD Required Languages u SQL u PL/SQL
Java Applications u. Client-server u. Java program runs on PCs JVM Required Tools u JDeveloper u TOAD Required Languages u Java u XML u JDBC u SQLJ u SQL, PL/SQL
Java Applets Java applications running over a browser u u u Required Tools JDeveloper TOAD Apache or IAS u u u. Other problems - Security ØFirewalls ØSecure Sockets Required Languages Java XML JDBC SQLJ SQL, PL/SQL
Web Module (JSPs) v. Sell over the Internet v. Java back end, HTML front end Required Tools u u JDeveloper TOAD Apache or IAS Dream. Weaver or Front. Page u u u u. Other problems - Security ØFirewalls ØSecure Sockets u Required Languages Java XML – a little JDBC SQLJ SQL, PL/SQL HTML Java. Script
Using Java u For PL/SQL programmers wanting to move to Java, there are some important conceptual differences to understand. u Learning Java is more than just learning a new syntax. u You need to take an object-oriented approach. u Get Martin Fowler’s book: Refactoring: Improving the Design of Existing Code (Addison-Wesley Pub Co, 1999)
JDeveloper’s Long-Term Vision u. A fully integrated design and development environment Ø Centralized repository u Full UML integration u The vision of what Designer and Developer never fully achieved u Probably never integrate into Designer…. maybe u JSP is the main development direction.
Is JDeveloper ready for production use? u Client/Server Ø Yes u Web (but it will take time) development Ø Probably u UIX style application development (but it will take a LONG time) support Ø Faster JSPs Ø 9. 05 end of year
BC 4 J - Overview u Main advantage over other development tools u Primary way of handling database DML operations u Overcomes hurdle of complex database interface to handle web-based applications u BC 4 J features: Ø Ø Builds a set of Java classes that wrap the DML commands and reference an XML document that stores the data structure Classes make JDBC calls to the database to take over insert, update, delete and lock functions.
BC 4 J - Advantages u BC 4 J Ø classes can implement complex validation. Need to think carefully about whether this is the appropriate place for this function u Reduced development time u Can cache data to be shared among multiple users Ø Allows for tuning capabilities
Three areas of BC 4 J u 1. Entities and Associations Ø Cached copy of a portion of the database Ø An entity is linked to, at most, 1 table Ø Not needed for query-only objects u 2. View objects and view link objects Ø View u 3. objects that sit on top of entities (or nothing) Data model Ø Collection of views Ø What the UI applications interact with
Default Generator DBMS Tables Emp FK Data Model Dept Emp 1 Emp 2 Entities & Associations Dept Emp * Dept 1 Views & view links Emp * filtered view Dept 1
BC 4 J Files u XML – redundantly stores data structure of relational database u Java classes – contain complex logic and application calls used by other parts of application u Java library – provided by Oracle to handle JDBC generation
Now 100% Java u Slightly faster IDE u Some compilation is faster. u All in all – a little faster. u Much nicer user interface
JDeveloper Class Diagram
UML Modeling u Java Ø Ø classes Quite good Useful? u BC 4 J Ø Only entity objects (not view objects) u EJBs, Ø Not sure I care u Data Ø Web Services Modeling Use Dulcian’s BRIM™
JDeveloper Activity Modeler u u Swim lanes and activities Vaguely familiar if you know Designer Workflow BRIM™ generates more code.
Model-View-Controller (MVC) u. View Ø Output u. Controller page Ø JClient § Swing Ø J 2 EE HTML § Servlet § JSP § XML § Ø Business Rules Ø Navigation Ø Controls content Ø Always JAVA (mostly)
Model u Model Ø Ø Ø Connect UI to the database BC 4 J EJB u But Ø Ø u Model it gets messy… Controller functions can be anywhere View § JClient § § Java in the application J 2 EE § Java. Script Ø Ø BC 4 J explicitly supports business rules EJBs are Java so they support anything u Database Ø Triggers
JDeveloper is 2 products (actually more) u JClient Ø Ø Ø Very complex Client/Server Can do anything u J 2 EE Ø Ø JSP Framework § § Struts UIX
JClient u Swing components u Java u BC 4 J u Lots of coding u Needed for very complex applications u Less to learn than J 2 EE
J 2 EE (You’re not in Kansas anymore) u The Ø world is getting simpler, but less flexible Unless you work hard u Fully open architecture
J 2 EE – The path to enlightenment u Build Ø Ø Using the JDeveloper Wizards By hand u Build Ø Ø basic JSP basic UIX application Using the JDeveloper Wizards By hand
References u u u Oracle 9 i JDeveloper Handbook, Koletzke, Dorsey & Faderman, (Oracle Press, 2002) ISBN: 0072223847 Oracle 9 i. AS: Building J 2 EE Applications, Morrisseau-Leroy (Oracle Press, 2002) ISBN: 0072226145 Oracle 9 i Application Server Portal Handbook, Vandivier & Cox (Oracle Press, 2001) ISBN: 0072222492 Oracle 9 i JDBC Programming, Jason Price, (Oracle Press, 2002) ISBN: 0072222549 (not needed if you use BC 4 J) Java 2: The Complete Reference (5 th Edition), Herbert Schildt, (Mc. Graw-Hill, 2002) ISBN: 0072224207 u u u Struts Kick Start, Turner & Bedell, (SAMS, 2002) ISBN: 0672324725 Oracle 9 i XML Handbook, Chang, Scardina & Kiritzov, (Oracle Press, 2001) ISBN: 007213495 X Refactoring: Improving the Design of Existing Code, Martin Fowler (Addison-Wesley, 1999) ISBN: 0201485672 Oracle 9 i Web Development, Bradley D. Brown (Oracle Press, 2001) ISBN: 0072193883 The Java Class Libraries – Volumes 1, 2, 3, Chan & Lee, (Addison. Wesley) The Java Tutorial (series), Campione, et. al (Addison-Wesley)
JSP/Java Extensions u Look Ø for third party resources. Type “Java chart” into any web search engine u Don’t reinvent the wheel.
More Information about JDev 9 i u otn. oracle. com Ø Products area Ø The discussion forums are quite active. u ODTUG u Oracle lists support
Share your Knowledge: Call for Articles for the SELECT Journal u Help contribute your knowledge to the larger Oracle community: Ø Ø Ø Make the SELECT Journal an even more valuable resource. Articles wanted on topics of interest to the Oracle community. Sign up to be a reviewer of articles. u Submit articles, questions, … to select@ioug. org.
Contact Information u Dr. Paul Dorsey – paul_dorsey@dulcian. com u Dulcian website - www. dulcian. com Developer Advanced Forms & Reports Design Using UML Object Modeling Designer Handbook
- Slides: 35