Professional Documents
Culture Documents
Agenda
Software Architecture and Modeling Project Best Practices and Development Methodology
10,000 Foot View Topics 1. Product and project productivity (general) 2. Modeling and types of analysis models
Separation of Concerns
EGL/RBD Productivity
As a declarative development paradigm, becoming productive with EGL is a combination of two things:
1. How to do, what you want to do 2. Doing that enough times that you become facile Where things are Development steps Drag & Drop Eclipse orientation
Consider it like playing a musical instrument What are the notes in an A major scale? What are the fingerings? Okay I got it. Now I have to apply it to this Beethoven sonata
If you are like me (an ex-mainframe developer aka dinosaur) there is a lot to learn. But if youve learned through hands-on tutorials, and get the opportunity to use EGL full-time, you will get there and become productive. Extremely productive. But only if you both know how to do what you want to do and practice, will you learn to think in EGL (Jake Berberich, Xavier Consulting Group) and learn to see in JSF
2003 IBM Corporation
All three Represent significantly different problem-domains Have different keys to success Require different skills and backgrounds
But all three have in common a solid grasp of: EGL language and tools JSF tools and development techniques
and an understanding of (about knowledge): Web Design and development U.I. design principles for the web HTML concepts (you will use the RBD tools in practice) JavaScript how to find and use JavaScript (not write)
2003 IBM Corporation
Web Development Domain: Recommendation to bring in web-design/graphics specialists. If not, consider the following sites: Links to design pattern examples: http://www.welie.com/patterns/ - really excellent, detailed pattern site http://en.wikipedia.org/wiki/User_interface - no list is complete without a wikipedia entry http://en.wikipedia.org/wiki/User_interface_design - or two And of course this, for color-coordination http://www.wellstyled.com/tools/colorscheme2/index-en.html
Many excellent HTML, .CSS and JavaScript tutorials free on the web (just GOOGLE Learn HTML) youll get more hits than you can shake a stick at Attend conferences: http://www-949.ibm.com/software/rational/cafe/docs/DOC-2452 And of course, when all else fails eMail the EGL ECO-system team: Sanjay Chandru, Mark Evans, Vijay Katoch, Jon, etc.
2003 IBM Corporation
Make every attempt to cookie-cut: Template pages for U.I. and consistency DataItems for centralized and non-duplicate effort EGL statement templates, macros and Snippets for business logic/JSFHandler development
Must decide on overall application U.I. page pattern and design approach. Current (du jour) model: Tab page used to roll up 1 n (weve seen as many as 19) character-based screens into one web page view Different tab protocols though we discuss this later in the slides Menu screens become inline JSF menus
Performance Character-based apps typically delivered sub-second response time This can be difficult to achieve with Java/JSP technology We discuss performance later in the slides
Reuse of production RPG/COBOL business logic very attractive But consider need for and cost of mainframe refactor/reengineer of code and processes (see next slide)
Re-engineering
Business logic is modularized and separated from presentation
Redeveloping
Business logic of services is redesigned from scratch
Data Model
Data Model
Data Model
Business Logic
Business Logic
Wrapper Interface
Wrapper Interface
Presentation Logic
Orchestration
Orchestration
Orchestration
Orchestration
Interface
Interface
Interface
Interface
Source: Gartner
Not necessarily a good thing, as the reuse factor for templates, etc. is diminished And the complex screens can be VERY complex: Layout User/event handling
Performance While GUIs typically were not sub-second response time, the fat client application model allowed for enormous #s of rows: 20,000 90,000 rows per/database access not atypical This is not a good model for the web (ya think?)
Reuse of production SQL business logic very attractive Harvest using techniques in Foundation Tutorials
2003 IBM Corporation
Use the tools youve bought and dont be afraid to nose around: Many useful features of EGL/JSF not even covered in the classroom training
EGL MVC
EGL/JSF
New COBOL development on System z and System i can be done as follows: Which can access
EGL generates
QSAM File
DB2
You code
VSAM File
Online
- C.I.C.S. - IMS DC
IMS DL/1 Database
MQ
With EGL, legacy programmers can create and consume complex services
EGL can be used to consolidate a diverse application portfolio into an elegant, modern software architecture allowing for reuse
IBM Software a View and Controller Software Architecture EGL/JSF for Group
EGL can be used for Enterprise Modernization by providing Controller services into an existing EIS (sometimes the springboard to full MVC deployment)
JSF can be used productively by legacy programmers to build leading-edge no-compromise web applications
Easy Productive Intuitive tooling
Prototype pages:
Controls only/View design-mode Temporary data values, in JSFHandlers
Pre-requisites:
Design specifications .CSS Template pages
Programs
One entry/exit point. Primarily used for: > COBOL Generation > Batch Reporting > Creating stub (testing) modules
JSFHandlers
Should contain only: > U.I. logic, Trivial edits, Navigation control, Transaction control
How to Authenticate:
Application authentication
DB2 table authentication (User-id/Password)
(Login)
Page Beans
Session Request scope= in JSFHandler property
Page Beans
Session Request scope= in JSFHandler property
HTML Pages HTML, JavaScript, .css, AJAX JSP pages, JTPL templates, Custom .JSP expressions
JSF Framework
EGL Framework
JSFHandler
Page bean scope, Custom Messages I18N, Authentication/Authorization Calls to: Data Access Layer
Presentation Management
U.I. Logic Transaction Control Navigation Control SQL Records default/custom
External Interfaces Web Services XML File Parsing Custom Java Classes Calling COBOL, RPG, C/C++ Logging Audit Printing
Data Access functions default/custom Access to sequential and indexed files Presentation Management
Separation of Concerns
basicRecords
Controller
sqlRecords
Business Logic Business process, computations. Access to Services external process, Java, CICS, COBOL etc. (EGL)
(Services) Model
Workspace Architecture
Records, Functions, DataItems
Common Code
Workspace
Web
Project
Batch Project
Custom Project
SCM Plug-ins provide Team functions within workbench Specific perspectives or context menus to interact with SCM
2003 IBM Corporation
Database
Business Logic
Page Templates
Editor Import
Page Designer
Editor
Page Designer
Web-Site Navigator
Records DataItems
.HTPL .JTPL
Snippets
website .cfg
One time steps or initial project configuration: Create/Configure Project(s) Note, includes setting up Naming Standards Database Import Create EGL DataTables Refine DataItems Refine Database Access Records and Functions Create External File Records Create User Interface Records
Iterative development:
Infrastructure Definition
Create/Configure Project(s)
Purpose: Create new RAD project or projects for optimal application development Pre-requisites:
Product software installed and configured Naming conventions for project artifacts Understanding of multiple project options and best practices Source Control Management System installed and configured Database JDBC driver installed and Java Path updated (if applicable) Back-up and recovery process in place
Steps:
Open RAD in new project work-space and create new Project (or import existing project if using pre-fab projects for development Configure for EGL, Database Access, JSF and Web Services testing from Windows, Preferences, Capabilities Configure database access connections:
WAS Project EAR file
Create custom EGL Build-Files and entries and buildfiles (if applicable) for:
External file access CICS and mainframe business logic access
Specify custom project Properties (if applicable) example: Add links to other projects, customized Macros, etc. Create sub-directories and folders Import project(s) into Source Control Management System Create separate projects for Web Services
2003 IBM Corporation
Naming Standards
Purpose: Create meaningful and unique naming standards to simplify and enhance development and avoid ambiguous references
Project
camelBack case. Named either by Business Unit, or by functionality. Examples: accounts, accountsBatch, accountsWeb, dataDictionary, buildFiles,
Package (folder)
All lower-case. Under the appropriate high-level folder: (EGLSource, JavaSource, WebContent), Named according to the type of artifact they organize Examples: programs, services, utilities, libraries, data, etc. Note consider organizing your pages under folders, under \WebContent\ - this will simplify issues during that tend to arise in large projects, AND allow for simpler navigation
JSP page
camelBack case name and organized under an appropriate folder under \WebContent\ - Add appropriate suffix Examples: calcShippingPage, calcShippingJSP
Pagehandler
Not applicable as these will be created when creating JSP names, and should match (default)
Form
camelBack case name, and organized under appropriate folder. Add appropriate suffix
Examples: calcShippingFrm, searchCustomersForm
Database Import
Purpose: Create initial libraries of SQLRecords. DataItems and EGL C.R.U.D Functions for database access.
Pre-requisites:
Product successfully installed Project configuration complete Connection information to database available (and correct)
Steps: From \EGLSource\ Select New > Other > (expand EGL) Data Parts Import Create new connection to database Select tables and import options
Steps: From \EGLSource\ create folders for new SQLRecords, and database access functions create the following:
Optimized table accesses Table joins (use SQLRetrieve) Records with complex WHERE clauses Test all new SQLRecords from Data Perspective Create Function for data access in libraries Create any dynamic SQL functions (dynamic search, etc.) Note Utilize try/catch exception handling for database access
Refine DataItems
Purpose: Create optimal use of DataItems throughout project Best Practices pre-requisites:
Steps: From \EGLSource\Data\ open the DataItems file Update existing DataItems: User Interface attributes: examples: Money, column-label, currency-Symbol, numericSeparator, zero-Suppression, etc. Validations: validValues ranges and specific values Validation Routines calls to Java, mainframe, EGL processes Add references to DataTables for: Error handling Validation Add new DataItems Delete DataItems
2003 IBM Corporation
Steps: From \EGLSource\ create a new folder for DataTables. In this folder create EGL DataTables for: Custom error messages Corporate requirements Section 501 Multi-language application Static table look-up and validations Ex. State table, annuities list, extensive values Static Drop-down and Radio-button controls
Steps: From \EGLSource\ create folders for new external file access. In these folders create the following: serialRecords for accessing sequential files indexRecords for accessing VSAM files
Steps: From \EGLSource\ create folders for new U.I. Records, create the following: basicRecord definitions that conform to the U.I. view requirements of pages Move byName or byPosition statements from the SQLRecords to the U.I. Records Design documents or the existing screen can be a good source of U.I. Basic Record definitions
May want to consider a business layer for each Handler that offloads functions such as:
Moving database (SQL) record to U.I. record values and vice versa Processing database updates (as opposed to direct calls to the data access layer)
Steps:
From \WebContent\ double-click (open) web-site.cfg file, create a web-site configuration, and/or specify the following: New pages Links to existing pages in some other system Page templates to be used (applied) to the pages Whether or not links are to include the FACES framework Sitemap Breadcrumbs
Steps: From \WebContent\theme\ create the following (or modify the IBM supplied .css files): Add your .css file to the \theme\ directory Use the .css editor to modify tags and entries
Steps:
From \WebContent\ create folders for new UIRecords Create the following:
.HTPL pages containing static text, graphics, links, etc. .JTPL pages containing static text, graphics, links, etc. + any Faces Components + EGL authorization logic
Recommendation: Use PowerPoint, or FrontPage or DreamWeaver to mock-up page designs, prior to creating the
designs using RAD.
2003 IBM Corporation
Steps:
From \EGLSource\ create folders for programs, services, libraries, etc. In these folders, create the following: Web applications (generate to Java) Programs for remote access Services (EGL and/or Web Services note, test Web Services with Web Service Explorer Libraries and functions Test by Debugging on Server (If batch processing) Programs, libraries and services Test by Debugging libraries and services with EGL stub programs (if generate to COBOL) Programs Test by Debugging
2003 IBM Corporation
Steps:
(optional) From \WebContent\ create folders for pages, in some meaningful organizational manner In these folders, create web pages, or TUI/CUI forms: Web applications create using Page Designer
.JSP pages based on a template page, with additional: JSF components, EGL data and services Test by running on the server CUI forms and programs Create programs that manage the form(s) using the EGL editor Test by running as a Java application Create CUI forms and programs, Test by running as a Java application
Create Reports
Purpose: Create traditional printed or online reports Best Practices Pre-requisites:
Steps: (optional) From \EGLSource\ create folders for reports., in some meaningful organizational manner. In these folders, create: Online reports Using Jasper reports and EGL ReportHandlers. Note includes output as: XML, HTML, PDF, Text files Character-based (print) reports, using either:
Steps: From Windows, open the Snippets view. Create (customize) new Snippets drawers and snippets for any code that is deemed to be of reusable value Recommendations include, but are not limited to:
External database and file access (ex. Dynamic SQL) Common/complex business process routines (ex. Interest calculation, etc.) Common U.I. routines (JSF Component tree access) JavaScript, stored as Snippets Note alternatively or in addition to the above, you can also create/export/import custom Code Templates for use with applications.
2003 IBM Corporation
Do not begin your production work with the mother of all applications
Unless you have committed to having expert consulting resources available Or, unless you have J2EE development skills and experts available in-house and on your team
Plan accordingly!
If you do not know what to do, the time it takes can jump to:
So becoming knowledgeable (broad and deep) is the #1 key to success Where can you get information?
Rational Education RBD/EGL Course contact cgoti@us.ibm.com The product help
The EGL forum: The EGL documents (Programmers Guide, etc.) online
Recommendation:
Introduce the JSF components to:
Users Web designers Graphic artists
JSF is incredibly good at business-U.I. development But its not Macromedia Flash
You can use Flash You can (and will) use JavaScript
Its not JavaScript Its not cheating to use the right tools and language for the job Its responsible
2003 IBM Corporation
How to accomplish?
Develop the database access layer first based on the Data Access Application Wizards
output Does NOT have to be optimized functionality just services/libraries/function signatures Test with stub EGL programs if applicable
Dont Be Strangers
By finishing the EGL Technical Workshops you are ready to begin your real work. That means:
Production specs Users And all the usual baloney that comes with the real world:
Unrealistic deadlines Scope creep Etc.
We (IBM) want you to learn EGL and become completely self-reliant But more than that, we want you to be successful And the only way we learn ourselves, is through contact with you
So Dont spin wheels Put notes out on the forum Send eMails to jsayles@us.ibm.com for How To questions Enter issues and problems as PMRs
2003 IBM Corporation
View
JSF/Rich Client/TUI U.I. page or screen
Controller
Handler mechanism
Business Logic
basicRecord
U.I.
Currently - basicRecord Future - U.I. Record
2003 IBM Corporation
Template Macros
EGL's intelli-sense is extensible, and can be used to capture shop standards, and reuse specific processing logic
Code Snippets
Are used to provide source-level code pattern reuse
Summary SOA
EGL is the first commercial product that we know of, with SERVICE defined as a keyword. Writing Services is as easy as coding simple business logic in EGL, both Web and Local services (i.e. there is no additional tooling or steps) and all of the EGL language and abstraction layer is at the developer's disposal EGL/Web Services can be tested using an interactive testing facility It is possible for services to be declared as local then mapped to external (web) services by simply changing the deployment descriptor properties (no source modifications necessary) It is also easy to change Library functions into Services (copy/paste individual functions... that's all that is necessary)
Summary Modularization
All business logic in EGL is contained in modular processes called Functions. So EGL developers think in terms of discrete Functions - from day one - enforcing/encouraging a modular (functional decomposition) approach to development: Design Coding Testing
Summary Optimization
EGL internal Java and COBOL code generation is done against a finite number of code patterns. With each product release IBM/EGL developers are able to engineer better and tighter generated source for these patterns. Benchmarks going from V5 --> V7 show anywhere from 100% --> 1,000% run-time code efficiency and performance improvements At the current release, for many language constructs, EGL is approaching hand-coded Java efficiency. The above is not generally possible with hand-coded Java, as each class and function is custom-coded manually, for a specific application- not iteratively refined for the purpose of run-time performance (until a problem is seen)
Agenda
Introduction High Level Project Structure in RAD Key Steps and artifacts controlled Notes
Bin Folder
WebContent Folder EAR Content
Project Folder
.classpath file Version controlled .compatibility file Version controlled .eglPath file Version controlled .eglproject file Version controlled .jspPersistence file Version controlled .project file Version controlled .website-config file Version controlled .sqlpage files Version controlled .sql files Version controlled .gph files Version controlled
Java Folders
Sub folders Not version controlled but archived .java file Not version controlled but archived Exception if the source is written by the developer and not generated by EGL then it will require version controlling including package folders it is contained in. rununit.properties Not version controlled but archived Localization .properties Version controlled
EGLBin Folder
o Nothing under this folder should be version controlled. Exception may be made for using third party .ir files and its containing folders only in very strict controlled cases and where third part libs are version controlled.
Bin Folder
o Contents of this folder Not version controlled but archived
WebContent Folder
META-INF folder and its contents Version controlled WEB-INF folder Version controlled All .xml configuration files Version controlled classes folder Version controlled
Contents of classes folder Not version controlled but archived
theme folder Version controlled Most of the test contents should be version controlled including templates (.htpl/.jtpl), .css, However, please see note #3
Most of the items in WebContent folder such as wsdl, jsp, and .js should be version controlled to track change. Please see note #3
EAR Content
o All contents of this folder should be version controlled
Notes
Version control will not eliminate a need of have a setup, build, and checkin process. Some process step will be required to setup a development and build environment. Such as adding third party libraries and modifying classpath to the local machine setup. These processes are out of version control domain, but defiantly part of overall configuration management system. This list is still evolving and not complete yet. However, this should provide enough guidelines for setting up version control for most EGL projects. Care is required with binary objects such as images and libraries. During initial phase of the project, it is important to keep binary objects out of version control system due to large amount of change occurring during this phase (most version control system do not provide benefit of change management with binary objects). Once things have stabilized and contents have been narrow down, binary contents can move to version controlled for sole purpose of simplifying setup and replication of development environment. Ideally, these objects should be managed within configuration management process and out of version control system.