83
IBM Software Group © 2004 IBM Corporation EGL/RBD EGL/RBD - Initial Project Best - Initial Project Best Practices Practices Enterprise Generation Language

EGL Project Best Practice-December

Embed Size (px)

Citation preview

Page 1: EGL Project Best Practice-December

IBM Software Group

© 2004 IBM Corporation

EGL/RBDEGL/RBD

- Initial Project Best Practices- Initial Project Best Practices

Enterprise Generation Language

Page 2: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Greetings and AnnouncementsGreetings and Announcements Welcome to this Seminar

– Informal – not true methodology – approach to your first production EGL project

– Moderate to Large-Scale Project emphasis

– Assumptions about participant background:• You’ve done the EGL Distance Learning…or…You’ve used EGL for at least 6 months

– More “What” – than “How To”• Actually – more like “to do” lists – even than “How To”

– Assumes business requirements finished• Some analysis• Some design• Mostly project development and process

Please stay in touch! It helps if we know your EGL/RBD Project(s) Status – please eMail: [email protected]. To allow us to provide:

• ECO-Team Assistance• Follow-up RBD/EGL notes and offerings

Distance Learning – 2008, for Version 7.1 – May 19th Class – filled up after 2 weeks– June 9th Class – just got posted on Developer Works– August 25th Class – also available

Page 3: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

AgendaAgenda

Software Architecture and ModelingSoftware Architecture and Modeling

Project Best Practices and Development Project Best Practices and Development MethodologyMethodology

Keys to SuccessKeys to Success

Q&AQ&A

Page 4: EGL Project Best Practice-December

IBM Software Group

© 2004 IBM Corporation

EGL/RBD – Software Architecture and EGL/RBD – Software Architecture and ModelingModeling

Page 5: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

10,000 Foot View – Topics 10,000 Foot View – Topics

1.1. Product and project productivity – (general)Product and project productivity – (general)

2.2. Modeling – and types of analysis modelsModeling – and types of analysis models

3.3. Architecture – and separation of concernsArchitecture – and separation of concerns

Development platformDevelopment platform

Run-time ArchitectureRun-time Architecture

Separation of ConcernsSeparation of Concerns

4.4. Sample project layoutSample project layout

Page 6: EGL Project Best Practice-December

IBM Software Group

© 2004 IBM Corporation

1. EGL Development Productivity, Analysis and Design Considerations

Page 7: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

As a “declarative development paradigm”, becoming productive with EGL is a combination of two things:

1. How to do, what you want to do2. 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 you’ve learned through hands-on tutorials, and get the opportunity to use EGL full-time, you will get there – and become productive. Extremely productive.

ButBut 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”

EGL/RBD Productivity

Page 8: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Complex (Production) Applications and Productivity

Three categories:1. “Green field” (new) applications2. Enterprise Modernization – of character-based applications3. Enterprise Modernization of GUI (PowerBuilder, VB, SQL*Forms, etc.) applications

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)

Page 9: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Obtaining a “Solid Grasp” on the EGL Development Domain – 1 of 2Tools:

• EGL:• Tutorials: http://www-949.ibm.com/software/rational/cafe/docs/DOC-2412 • EGL Programmer’s Guide – Help System and:

http://www-949.ibm.com/software/rational/cafe/community/egl/documentation • EGL Language Reference – Help System and:

http://www-949.ibm.com/software/rational/cafe/community/egl/documentation • EGL Forum: http://www-949.ibm.com/software/rational/cafe/community/egl?view=discussions

• JSF:• Tutorials:http://www-949.ibm.com/software/rational/cafe/docs/DOC-2412 • JSF Forum: http://www.ibm.com/developerworks/forums/forum.jspa?forumID=378

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”) – you’ll 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.

Page 10: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Mastering the Tools and Development Domain – 2 of 2

Also check out other resources on the EGL Café – and make connections to Business Partners and experts in EGL

Page 11: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Green Field (New) Applications ConsiderationsConsiderations Use the out-of-the-box tooling and techniques:Use the out-of-the-box tooling and techniques:

– You can – spend endless hours and days trying to make JSF do things that are only possible with gobs You can – spend endless hours and days trying to make JSF do things that are only possible with gobs of customized, hand-written JavaScript and HTMLof customized, hand-written JavaScript and HTML

– Conversely you can design and develop your application using the JSF components as they exist in the Conversely you can design and develop your application using the JSF components as they exist in the tooling:tooling:

• Benefits:Benefits:

– Productivity – by at least one magnitude of orderProductivity – by at least one magnitude of order

– (far) fewer errors(far) fewer errors

– Easier to maintain and enhanceEasier to maintain and enhance

– Increased learning on your part – more scales, more practice!Increased learning on your part – more scales, more practice!

– Recommendation:Recommendation:

• Introduce the JSF components to: Introduce the JSF components to: Users, Web designers and graphic artistsUsers, Web designers and graphic artists• Explain benefits and R.O.I. of designers doing initial work on .JTPLs and page prototypes using JSF Explain benefits and R.O.I. of designers doing initial work on .JTPLs and page prototypes using JSF

and EGL JSFHandlers (see upcoming topic) and EGL JSFHandlers (see upcoming topic)

Some of those who’ve gone this route:Some of those who’ve gone this route:

– http://www-01.ibm.com/software/success/cssdb.nsf/CS/WJBN-7DPR5T?OpenDocument&Site=rational&cty=en_us http://www-01.ibm.com/software/success/cssdb.nsf/CS/WJBN-7DPR5T?OpenDocument&Site=rational&cty=en_us

– http://www-01.ibm.com/software/success/cssdb.nsf/CS/WJBN-73UQN7?OpenDocument&Site=rational&cty=en_ushttp://www-01.ibm.com/software/success/cssdb.nsf/CS/WJBN-73UQN7?OpenDocument&Site=rational&cty=en_us

Page 12: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Enterprise Modernization – Character-Based Applications

ConsiderationsConsiderations::

– U.I. bar is set fairly low (relative to GUI apps)

• Small # of fields per/screen – consistent with mainframe high-transaction systems• Small amount of data sent/received• Same stateless model as the web• Simple controls and page design starting point (literals/input/output fields)

– Other U.I. concerns

• Need for user re-training (if deep U.I. re-design)• Need for hot-key and PF-Key emulation

– Often large # of screens

• 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 (we’ve 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)

Page 13: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Three Ways of Modernizing Applications

Wrapper Wrapper

Mixed Business Logic

andPresentation Logic

Wrapping Use of screen-scraping to

package "pseudo-services"

Re-engineeringBusiness logic is modularized

and separated from presentation

Orchestration

Interface

Orchestration

Interface

RedevelopingBusiness logic of services is

redesigned from scratch

Source: Gartner

PresentationLogic

DataModel

DataModel

DataModel

Business Logic

Orchestration

Interface

Orchestration

InterfaceInterface Interface

Business Logic

Page 14: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Enterprise Modernization – GUI (client/server) Applications Considerations:Considerations:

– U.I. bar often set fairly high:

• Large # of fields/screen• Complex layout – we will be covering this later in the session• Complex controls:

– Tree controls• Complex user-event model• Large amount of data• Stateful …vs… Stateless model – often transaction management becomes an issue• Often requirement to realize the existing production U.I. VERY CLOSELY

– This can be difficult or even impossible some times, with any Web/HTML-based technology

– Often small # of custom (and complex) screens

• 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

Page 15: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Keys to Success Two Perspectives OverallOverall

– Across disciplinesAcross disciplines

U.I.U.I.

– Specific to EGL/JSF developmentSpecific to EGL/JSF development

Overall Keys to SuccessOverall Keys to Success – Develop with “scaffolding” approach:

• Build from the bottom up– Start with Business object and Data Access Layer– Test library/service functions with EGL programs– Then interface to client (“handler”) resources

• Test at each level:– Cause …and… Effect– Simplifies problem determination

• Scaffolding approach allows/encourages:– Functional decomposition (aka “Divide and Conquer”)– Reuse – of all project elements

• Most importantly – Development using the scaffolding approach gives youyou control over a complex process

– Use the tools you’ve bought – and don’t be afraid to nose around:

• Many useful features of EGL/JSF – not even covered in the classroom training

– Use the techniques in the EGL Best Practices PowerPoint:

• http://www-949.ibm.com/software/rational/cafe/docs/DOC-2482

Page 16: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

RBD/EGL Development and Deployment RBD/EGL Development and Deployment Usage ModelsUsage Models

Four – currently used by EGL shops world-wide:Four – currently used by EGL shops world-wide:

1.1. EGL EGL COBOL Generation COBOL Generation

2.2. EGL EGL Services Generation Services Generation

3.3. EGL EGL for the full Model – View – for the full Model – View – Controller software architectureController software architecture

4.4. EGL/JSF EGL/JSF for View and Controller in for View and Controller in software architecturesoftware architecture

All enabled by core EGL value propositions:All enabled by core EGL value propositions:– PortabilityPortability

– AbstractionAbstraction

– SimplicitySimplicity

Mutually Mutually ininclusive (many shops benefiting from clusive (many shops benefiting from several Usage Models)several Usage Models)

EGL COBOLEGL COBOL

EGL ServicesEGL Services

EGL MVCEGL MVCEGL/JSF EGL/JSF

Page 17: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

COBOL BatchCOBOL Batch

RBD/EGL EGL RBD/EGL EGL COBOL Generation COBOL Generation COBOL development skills are not easy to find – these days. Harder still to find, are COBOL development skills are not easy to find – these days. Harder still to find, are

skills such as:skills such as:– C.I.C.S. and BMSC.I.C.S. and BMS

– IMS DL/1 - IMS DC (™) and MFSIMS DL/1 - IMS DC (™) and MFS

– JCLJCL

New COBOL development on System z and System i can be done as follows:New COBOL development on System z and System i can be done as follows:

BatchBatchReportingReporting

OnlineOnline- C.I.C.S.- C.I.C.S.- IMS DC- IMS DC

QSAMQSAMFileFile

VSAMVSAMFileFile

IMS DL/1 DatabaseIMS DL/1 Database

DB2DB2

EGL generates

MQMQ

You code

Which can access

Page 18: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

RBD/EGL EGL RBD/EGL EGL Services Generation Services Generation Creating WSDL files requires the following language protocol expertise Creating WSDL files requires the following language protocol expertise (typically in

addition to Java/J2EE):– SOAP, XML, WSDLSOAP, XML, WSDL

With EGL, legacy programmers can create and consume complex servicesWith EGL, legacy programmers can create and consume complex services

You code this

EGL - Generates this

Page 19: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

RBD/EGL RBD/EGL For Complete MVC Software Architecture For Complete MVC Software Architecture EGL can be used to consolidate a diverse application portfolio EGL can be used to consolidate a diverse application portfolio

into an elegant, modern software architecture – allowing for into an elegant, modern software architecture – allowing for reusereuse

Page 20: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

EGL/JSF EGL/JSF for a “View and Controller” Software Architecture for a “View and Controller” Software Architecture

EGL can be used for Enterprise Modernization by providing Controller services into an EGL can be used for Enterprise Modernization by providing Controller services into an existing EIS existing EIS (sometimes the springboard to full MVC deployment)

JSF can be used productively by legacy programmers to build leading-edge JSF can be used productively by legacy programmers to build leading-edge “no-compromise” web applications“no-compromise” web applications

– EasyEasy

– ProductiveProductive

– Intuitive toolingIntuitive tooling

Page 21: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

2. Best Practice – Modeling and Analysis Concerns2. Best Practice – Modeling and Analysis Concerns

Project Resources and Artifacts - analysis/design Project Resources and Artifacts - analysis/design perspective:perspective:

1.1. DataData

2.2. U.I.U.I.

3.3. Business Logic and Services ModelingBusiness Logic and Services Modeling

4.4. SecuritySecurity

5.5. State ManagementState Management

6.6. Software Development Software Development

7.7. Run-time ArchitectureRun-time Architecture

Page 22: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Data (SQL) Modeling - TopicsData (SQL) Modeling - Topics

Relational/Non-relational data sourcesRelational/Non-relational data sources• Access to VSAM/QSAM through serial/indexRecords and COBOLGENAccess to VSAM/QSAM through serial/indexRecords and COBOLGEN• Access to all relational sources through sqlRecordsAccess to all relational sources through sqlRecords

EGL’s data access functionality:EGL’s data access functionality:• Choices run the gamut from implicit to explicit and custom SQLChoices run the gamut from implicit to explicit and custom SQL• Many trade-offs, some of which are dependent on your development process and how Many trade-offs, some of which are dependent on your development process and how

dynamic it isdynamic it is

SQL optimization and performance considerationsSQL optimization and performance considerations– Indexing “conflicts of interest”Indexing “conflicts of interest”

– Governing potential run-away queriesGoverning potential run-away queries

– Programmatic page logicProgrammatic page logic

– Locking and contention (-913, etc.)Locking and contention (-913, etc.)

– Recommendation, build a matrix Recommendation, build a matrix

Synchronizing with production schema changesSynchronizing with production schema changes

Page 23: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

U.I. Modeling - TopicsU.I. Modeling - Topics Work done in parallel – within development lifecycleWork done in parallel – within development lifecycle

Explicit Page Development:Explicit Page Development:• Within template page, layout pages using Within template page, layout pages using HTMLHTML tables and/or tables and/or DIVDIV tags tags• Drag the JSF componentsDrag the JSF components• Question on labels (see DataItems below)Question on labels (see DataItems below)

Prototype pages:Prototype pages:• Controls only/View design-modeControls only/View design-mode• Temporary data values, in JSFHandlersTemporary data values, in JSFHandlers

Pre-requisites:Pre-requisites:• Design specificationsDesign specifications• .CSS.CSS• Template pagesTemplate pages

Considerations for EGL JSFHandler logic:Considerations for EGL JSFHandler logic:• Trivial editsTrivial edits• DataItems – creates dependency during development cycleDataItems – creates dependency during development cycle• NavigationNavigation• Transaction controlTransaction control

Key Concept – Page Designer = “Key Concept – Page Designer = “Page ConstructorPage Constructor””

Page 24: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Services and Business Logic - ConsiderationsServices and Business Logic - Considerations Choices:Choices:

• ServicesServices– Discrete functionsDiscrete functions– Run locally – or execute remotely as Web ServicesRun locally – or execute remotely as Web Services

• LibrariesLibraries– Same as services, except only local (one machine), and global data persists throughout run-unitSame as services, except only local (one machine), and global data persists throughout run-unit

• ProgramsPrograms– One entry/exit point. Primarily used for:One entry/exit point. Primarily used for:

> COBOL GenerationCOBOL Generation> Batch ReportingBatch Reporting> Creating stub (testing) modules Creating stub (testing) modules

• JSFHandlersJSFHandlers– Should contain only: Should contain only:

> U.I. logic, Trivial edits, Navigation control, Transaction controlU.I. logic, Trivial edits, Navigation control, Transaction control

Work in parallel – within development lifecycleWork in parallel – within development lifecycle• For larger-scaled and longer projects, consider coding to EGL InterfacesFor larger-scaled and longer projects, consider coding to EGL Interfaces

Use stub EGL ProgramsUse stub EGL Programs• Testing and debugging• Regression and Q.A.

Page 25: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Security Modeling - ConsiderationsSecurity Modeling - Considerations

How toHow to Authenticate: Authenticate:

– Application authentication Application authentication (Login)

• LDAP/RACF/Single Sign-on, Domino Directory Server, etc.LDAP/RACF/Single Sign-on, Domino Directory Server, etc.– Use EGL ExternalTypes to call Java custom classesUse EGL ExternalTypes to call Java custom classes

• DB2 table authentication (User-id/Password)DB2 table authentication (User-id/Password)

– DB2 DB2 (SQL access) authentication authentication• Application ServerApplication Server• EAR fileEAR file

• EGL EGL Connect(…)Connect(…) Statement(s) Statement(s)

• TablenameVariablesTablenameVariables

Where and How toWhere and How to Authorize: Authorize:• Store credentials in Session after Login• Validate in:

– JSFHandlers, .JTPL (template) pages

Page 26: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

State Management Modeling - ConsiderationsState Management Modeling - Considerations Options:Options:

– Transactional dataTransactional data maintained in state maintained in state• SessionSession• RequestRequest• OtherOther

– Page BeansPage Beans• SessionSession• Request – scope= in JSFHandler propertyRequest – scope= in JSFHandler property

Considerations:Considerations:

– Page volume/# of concurrent usersPage volume/# of concurrent users

– Page data requirementsPage data requirements• Read/OnlyRead/Only• Form/updateForm/update• Multi-Page sequenceMulti-Page sequence

Page 27: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Performance Modeling - ConsiderationsPerformance Modeling - Considerations Options:Options:

– Transactional dataTransactional data maintained in state maintained in state• SessionSession• RequestRequest• OtherOther

– Page BeansPage Beans• SessionSession• Request – scope= in JSFHandler propertyRequest – scope= in JSFHandler property

Considerations:Considerations:

– Page volume/# of concurrent usersPage volume/# of concurrent users

– Page data requirementsPage data requirements• Read/OnlyRead/Only• Form/updateForm/update• Multi-Page sequenceMulti-Page sequence

Page 28: EGL Project Best Practice-December

IBM Software Group

© 2004 IBM Corporation

3. Project Architecture Modeling3. Project Architecture Modeling

Page 29: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Best Practice – Design Towards 3-Tier ArchitectureBest Practice – Design Towards 3-Tier Architecture

Page 30: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Architecture Model – To be completed…Architecture Model – To be completed…

HTMLHTML

PagesPages

JSF FrameworkJSF Framework

Client Side FunctionalityClient Side Functionality

– HTML, JavaScript, AJAX, .CSSHTML, JavaScript, AJAX, .CSS

Server Side FunctionalityServer Side Functionality

– JSF FrameworkJSF Framework

• Validations and business rulesValidations and business rules– EGL FrameworkEGL Framework

• Dataitem Validations and business rulesDataitem Validations and business rules• JSFHandler “Choreography”JSFHandler “Choreography”

– InternationalizationInternationalization– Calls to:Calls to:

> Data AccessData Access> Presentation ManagementPresentation Management

– U.I. LogicU.I. Logic– Transaction ControlTransaction Control– Navigation ControlNavigation Control

• Libraries and Local ServicesLibraries and Local Services– Data Access LayerData Access Layer

> Relational DBMSRelational DBMS> Sequential or Index Files or .CSV filesSequential or Index Files or .CSV files

– Business LogicBusiness Logic> Presentation ManagementPresentation Management> Everything else (no small entry Everything else (no small entry

– Utility ClassesUtility Classes

• External InterfacesExternal Interfaces– Web ServicesWeb Services– XML File ParsingXML File Parsing– Custom Java ClassesCustom Java Classes– Calling COBOL, RPG, C/C++Calling COBOL, RPG, C/C++– LoggingLogging– AuditAudit– PrintingPrinting

Batch SystemsBatch Systems

– PrintingPrinting

– ReportsReports

– Utility programsUtility programs

HTML, JavaScript, .css, AJAX

EGL FrameworkEGL Framework

JSP pages, JTPL templates,

Custom .JSP expressions

JSFHandlerJSFHandler

DataItems (Validation, I18N)

Page bean scope, Custom Messages

I18N, Authentication/Authorization

Calls to:

Data Access Layer

Presentation Management

U.I. Logic

Transaction Control

Navigation Control

Data Access LayerData Access Layer SQL Records – default/custom

Data Access functions – default/custom

Access to sequential and indexed files

Business Logic LayerBusiness Logic Layer Presentation Management

All other deep business functionality

Page 31: EGL Project Best Practice-December

IBM Software Group

© 2004 IBM Corporation

Separation of ConcernsSeparation of Concerns

Page 32: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Separate Concerns by File TypeSeparate Concerns by File Type EGL Libraries ~ Local ServicesEGL Libraries ~ Local Services

– Provide single entry/exit point to granular functionsProvide single entry/exit point to granular functions– Promote reusePromote reuse– Better run-time performance, if called multiple timesBetter run-time performance, if called multiple times– Extremely easy to transition Library functions and Local Services to Web ServicesExtremely easy to transition Library functions and Local Services to Web Services

EGL JSFHandlers used for:EGL JSFHandlers used for:– U.I.-Specific Code (trivial edits and business rules)U.I.-Specific Code (trivial edits and business rules)– NavigationNavigation– Access Control (typically through template pages)Access Control (typically through template pages)– Transaction ControlTransaction Control

EGL Programs used for:EGL Programs used for:– Batch processing (standalone, O.S.-callable modules)Batch processing (standalone, O.S.-callable modules)– Large-grain single applications (complex reports, etc.)Large-grain single applications (complex reports, etc.)– COBOL Generation and Web Service GenerationCOBOL Generation and Web Service Generation– Testing – provide stub modules for Library and Service callsTesting – provide stub modules for Library and Service calls

Multiple EGL Build Files/Per projectMultiple EGL Build Files/Per project– Batch…vs… WebBatch…vs… Web– Different Data sources, etc.Different Data sources, etc.

Page 33: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Manage user interactionTransaction control

Access to data; DB2, MQ, External files, etc.

Business process, computations. Access toexternal process, Java, CICS, COBOL etc.

User InterfaceClient/Side Logic

EGL Record types – used to “Separate Concerns”EGL Record types – used to “Separate Concerns”

.JSP

.HTPL

.JSP

.HTPL

PageHandlersPageHandlers(EGL)(EGL)

Data AccessData AccessServicesServices

(EGL)(EGL)

ViewView

Business LogicBusiness LogicServicesServices

(EGL)(EGL)

ControllerController

(Services)ModelModel

basicRecordsbasicRecords

sqlRecordssqlRecords

Page 34: EGL Project Best Practice-December

IBM Software Group

© 2004 IBM Corporation

Example Workspace and Project Example Workspace and Project Architecture(s)Architecture(s)

Page 35: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Workspace ArchitectureWorkspace Architecture

SourceSource

ControlControl

LibraryLibrary

CommonCommon

CodeCode

Work

sp

ace

Work

sp

ace

WebWeb

ProjectProject

BatchBatch

ProjectProject

Records, Functions, DataItemsRecords, Functions, DataItems

Services, DataTables,Services, DataTables,

Snippets, Macros, Buildfile(s)Snippets, Macros, Buildfile(s)

CustomCustom (new application) (new application)

Records, Functions, DataItemsRecords, Functions, DataItems

Services, DataTables,Services, DataTables,

Pages, Templates, .css, Pages, Templates, .css,

Snippets, Macros, Buildfile(s)Snippets, Macros, Buildfile(s)

Custom (new application)Custom (new application)

Programs, Libraries, DataItemsPrograms, Libraries, DataItems

Rununit.properties,Rununit.properties,Buildfile(s), Linkage, Buildfile(s), Linkage,

Resource AssociationsResource Associations

Page 36: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Project Architecture – A Simple ExampleProject Architecture – A Simple Example

CustomCustom

ProjectProject

ProjectProject Default PropertiesDefault Properties

Default BuildfileDefault Buildfile

\DataPackage\\DataPackage\

\Records\\Records\

\DataAccessRecords\\DataAccessRecords\

\U.I. Records – or could put U.I. Records into PageHandler\U.I. Records – or could put U.I. Records into PageHandler

\DataItems\\DataItems\

\Library-or-Services Package\\Library-or-Services Package\

\DefaultLibraries – from Import application wizard\DefaultLibraries – from Import application wizard

\BusinsessLogicLibraries\\BusinsessLogicLibraries\

\CustomDataAccessLibraries\\CustomDataAccessLibraries\

\UtilityLibraries\\UtilityLibraries\

\ProgramsPackage\\ProgramsPackage\

\Handlers\\Handlers\

\JavaSource\ - generated .Java files and custom .Java source\JavaSource\ - generated .Java files and custom .Java source

\WebContent\\WebContent\

\theme\\theme\

Page 37: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

EGL and Source Code ManagersEGL and Source Code Managers

Organization: Organization:

– WorkspaceWorkspace has has projectsprojects

• Projects have packages.Projects have packages.– Packages have files.Packages have files.

– EGL source is stored in filesEGL source is stored in files

Source Code Managers manage Source Code Managers manage projects/filesprojects/files

• Access/Check out filesAccess/Check out files for changes for changes• VersionVersion at the at the ProjectProject Level Level

SCM Plug-ins provide Team functions SCM Plug-ins provide Team functions within workbenchwithin workbench

– Specific perspectives or context menus Specific perspectives or context menus to interact with SCMto interact with SCM

Page 38: EGL Project Best Practice-December

IBM Software Group

© 2004 IBM Corporation

4. Project Best Practices and 4. Project Best Practices and Development MethodologyDevelopment Methodology

Page 39: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

EGL Project - Roles and Responsibilities- Functions and ToolsEGL Project - Roles and Responsibilities- Functions and Tools

DatabaseDatabase BusinessBusinessLogicLogic

PagePageTemplateTemplate

ss

PagePageTemplateTemplate

ss

WebWebPagesPages

WebWebPagesPages

ReusableReusableEGL codeEGL code

Web-SiteWeb-Site

RecordsRecordsDataItemsDataItems

ImportImport

EditorEditor

PagePageDesignerDesigner

EditorEditor

PagePageDesignerDesigner

Web-SiteWeb-SiteNavigatorNavigator

ProgramsProgramsServicesServices

FunctionsFunctions

SnippetsSnippets.HTPL.HTPL.JTPL.JTPL JSP PagesJSP Pages

PagehandlersPagehandlers

websitewebsite.cfg.cfg

Page 40: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

EGL Project Development Web and Online Application Best PracticesEGL Project Development Web and Online Application Best Practices

OneOne time steps or initial project configuration: 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

– Create Web-Site Storyboard

– Create/Modify .CSS

– Create Page Templates

Iterative development:Iterative development:

– Create and Test Business Logic

– Create and Test User Interface Pages and Forms

– Create Reports and Batch Processing

– Create Reusable EGL Code Assets

Page 41: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Project Development ProcessProject Development Process

Create/Configure Project(s)

Database Import

Refine DataItems

Refine Database Access

Create EGL DataTables

Create External File Records

Create User Interface Records

Create Web-Site Storyboard

Create/Modify .CSS

Create Page Templates

Create/Test Business Logic

Create/Test User Interface Pages/Forms

Create/Test Reports and Batch Processing

Create/Test Reusable EGL Code Assets

Setup Infrastructure Definition Iterative Development and Testing

Note: Typically there will be some infrastructure refactoring,

…once iterative development begins

Page 42: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Create/Configure Project(s)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

Page 43: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Naming StandardsNaming Standards

Purpose: Create meaningful and unique naming standards – to simplify and enhance development and avoid ambiguous references

ProjectcamelBack 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

Program, Service, Library, ReportHandler, FunctioncamelBack case name and organized under appropriate folder and project. Add appropriate suffix. Examples

EGL Programs: calcShippingPgm, getVinNumberProgram,

EGL Services: calcShippingSrv, calcShippingService, databaseAccessService

EGL Libraries: CustomerLibrary, OrdersLib, calcShippingLib, calcShippingLibrary

EGL Functions: getEmployeesFunc, updateCustomerFunc, calcShippingFunction

JSP pagecamelBack case name and organized under an appropriate folder under \WebContent\ - Add appropriate suffix

Examples: calcShippingPage, calcShippingJSP

PagehandlerNot applicable – as these will be created when creating JSP names, and should match (default)

FormcamelBack case name, and organized under appropriate folder. Add appropriate suffix

Examples: calcShippingFrm, searchCustomersForm

Records and DataItemscamelBack case name, and organized under appropriate data library. Add appropriate suffix based on Record type.

SQL Records: customersSQLRec, customerOrderJoinRec

Basic Records: customersUIRec, searchCustomersBasicRecord

Serial Records: customersSeqRec, payrollOutSeqRecord

DataItems: lastNameType, lastNameInpDI, SSN_type, SSN_Item

Page 44: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Customize Statement TemplatesCustomize Statement Templates

Purpose: Improve:

Productivity

Consistency

Maintain-ability

From Window > Preferences > EGL > Editor

Select the Templates option and customize:

Handler

Program

Library

Service

Add common:

References

Imports

Functions

Remove old statement prototypes

Export/Import – among project team

Page 45: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Database ImportDatabase 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

(if not primary keys) Specify Primary keys

(optional) Specify any custom SQL clauses

Import into libraries within project

Adjust files to match project software architecture (move to different directories)

Page 46: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Refine/Customize SQLRecords and Database Access FunctionsRefine/Customize SQLRecords and Database Access Functions

Purpose: Create SQL records for optimally-efficient database access

Pre-requisites: Database connection (for testing with Data Perspective)

Import library record definitions (copy/paste/modify from previous step)

DataItem definitions

Authentication to access database

Note: Will reuse as many records as possible with #SQL function

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

Recommendation: Any additions/deletions to the SQLRecords or Database access functions should be stored in libraries in a different directory, as Import operations drop and re-create the default <tableNames>.egl library files.

Page 47: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Refine DataItemsRefine DataItems

Purpose:Purpose: Create optimal use of DataItems – throughout project

Best Practices pre-requisites:Best Practices pre-requisites:

Existing DataItems – most likely from Import

Steps:Steps:

From \EGLSource\Data\ open the DataItems file– Update existing DataItems:

• User Interface attributes: examples: Money, column-label, currency-Symbol, numeric-Separator, 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

Page 48: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Create EGL DataTablesCreate EGL DataTables

** Optional Step **

Purpose:Purpose: Create optimized (esp. performance) static look-up tables and Error message tables

Pre-requisites:Pre-requisites:

None

Steps: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

Page 49: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Create External File Records, Functions and ServicesCreate External File Records, Functions and Services

Purpose:Purpose: Create index/serial/MQ and DL/I Records for accessing external files and databases, including WebSphere MQ messaging. Optionally create functions to access the files and map to U.I. Records

Best Practices pre-requisites:Best Practices pre-requisites:

DataItem definitions - refined

Steps: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

– mqRecords for accessing WebSphere MQ

– Functions for accessing (Read/Write the above)

– Move byName or byPosition statements from the various external file access records to U.I. Records

– Note – Utilize try/catch exception handling for database access

Page 50: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Create User Interface (basic) Records and Functions/ServicesCreate User Interface (basic) Records and Functions/Services

Purpose:Purpose: Create basicRecords for specific page views (to simplify page development). Optionally create functions to map SQLRecords to U.I. Records

Best Practices pre-requisites:Best Practices pre-requisites:

SQLRecords refined

DataItem definitions - refined

Steps: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)

Page 51: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Create Web Site DesignCreate Web Site Design

Purpose:Purpose: Create web site storyboard, that depicts the “user experience” and navigational rules of your site. Note that this also provides a high-level way of doing web page development, and can provide page “bread crumbs” – automated links to/from pages

Best Practices pre-requisites:Best Practices pre-requisites:

Site analysis and design

If template pages exist, can apply templates to all pages

Steps: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 FACESFACES framework– Sitemap– Breadcrumbs

Page 52: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Create/Modify .CSS File(s)Create/Modify .CSS File(s)

Purpose:Purpose: Create standard .css (Cascading Style Sheet) files for your pages

Best Practices pre-requisites:Best Practices pre-requisites:

Corporate standards documentation

.css file(s)

Steps: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

Page 53: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Create Template PagesCreate Template Pages

Purpose:Purpose: Create customized .JTPL/.HTPL files, that conform to the corporate web page standards for your application, and simplify page development, while maintaining consistency of look & feel.

Best Practices pre-requisites:Best Practices pre-requisites: Corporate standards documentation

.css file(s)

Static: Text, Graphics, Links, etc.

JavaScript or dynamic HTML

Model with correct browser/monitor resolution

Develop @ high-resolution

Steps: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

Options for development are:Options for development are: Create from scratch – starting with blank slide, and incorporating .css entries

Incorporate dynamic menus, security, screen resolution

Recommendation:Recommendation: Use PowerPoint, or FrontPage or DreamWeaver to mock-up page designs, prior to creating the designs using RAD.

Page 54: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Create and Test Business LogicCreate and Test Business Logic

PurposePurpose: Create EGL processes, programs, services, library functions and all other business processing routines for your application

Best Practices pre-requisites:Best Practices pre-requisites: SQLRecords and DataItems refined (for database access)

Business analysis, requirements and technical design ready

Steps: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

Page 55: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Create Web Pages or Character-based FormsCreate Web Pages or Character-based Forms

Purpose:Purpose: Create User Interface portion of your application. If doing a web application, you will create .JSP pages, from JSF components and EGL data/service elements. If doing a character based application you will create a TUI (Terminal User Interface), or CUI (Console User Interface)

Best Practices Pre-requisites:Best Practices Pre-requisites: SQLRecords and DataItems refined (for database access)

U.I. Records complete

Template page(s) complete

.CSS complete

Web-Site Navigator view used as entry-point into application

Use Design tab/view to model

Steps: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

– (If TUI) – create using Forms Designer• CUI forms and programs• Create programs that manage the form(s) using the EGL editor• Test by running as a Java application

– (if CUI) – code EGL statements to• Create CUI forms and programs, Test by running as a Java application

Page 56: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Create ReportsCreate Reports

Purpose:Purpose: Create traditional printed or online reports

Best Practices Pre-requisites:Best Practices Pre-requisites:

SQLRecords and DataItems refined (for database access)

Business analysis, requirements and technical design for pages ready

Steps: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:

• TUI report designer• EGL fixed-records - char(xx), etc – like COBOL

Page 57: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Create Reusable CodeCreate Reusable Code

** Optional Step **** Optional Step **

Purpose:Purpose: Create parameterized, reusable EGL code elements, to simplify development, increase productivity and enable a broader-class of users

Pre-requisites:Pre-requisites:

None

Steps: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.

Page 58: EGL Project Best Practice-December

IBM Software Group

© 2004 IBM Corporation

(6) Keys to Success(6) Keys to Success First Project Common SenseFirst Project Common Sense KnowledgeKnowledge Use the ToolingUse the Tooling Use the Right ApproachUse the Right Approach Use the Right ProcessUse the Right Process Don’t Be StrangersDon’t Be Strangers

Page 59: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Practical (Common Sense) – 1Practical (Common Sense) – 1stst Project Project

First project profile:First project profile:– Technical proof pointsTechnical proof points

– ProductivityProductivity

– PerformancePerformance

– Fit with your development process and approachFit with your development process and approach

– Business value (not throw-away PoC)Business value (not throw-away PoC)

Do not begin your production work with the “mother of all applications”Do not begin your production work with the “mother of all applications”– Unless you have committed to having expert consulting resources availableUnless you have committed to having expert consulting resources available– Or, unless you have J2EE development skills and experts available in-house and on your teamOr, unless you have J2EE development skills and experts available in-house and on your team

From our experienceFrom our experience– EGL (the language) will not be the problemEGL (the language) will not be the problem

– Other issuesOther issues• J2EE and the web application paradigm will be the problemJ2EE and the web application paradigm will be the problem

– JSF web page development techniquesJSF web page development techniques• Initial project/source management setupInitial project/source management setup• SQLSQL• Calling external resourcesCalling external resources• DB connectionsDB connections

Plan accordingly! Plan accordingly!

Page 60: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Knowledge (How To) is EverythingKnowledge (How To) is Everything With RBD/EGL/JSFWith RBD/EGL/JSF

– If you know how to do what you want to do, the time it takes will be measured in:If you know how to do what you want to do, the time it takes will be measured in:• Minutes Minutes • (at most) Hours(at most) Hours

– If you do If you do notnot know what to do, the time it takes can jump to: know what to do, the time it takes can jump to:• HoursHours• DaysDays

So becoming knowledgeable (broad and deep) is the #1 key to successSo becoming knowledgeable (broad and deep) is the #1 key to success

Where can you get information?Where can you get information?– Rational Education – RBD/EGL Course – contact Rational Education – RBD/EGL Course – contact [email protected] – The product helpThe product help

• Contents, Search, Tutorials, Cheat SheetsContents, Search, Tutorials, Cheat Sheets– The EGL forum:The EGL forum:

• http://www.ibm.com/developerworks/forums/forum.jspa?forumID=435

– The EGL documents (Programmer’s Guide, etc.) onlineThe EGL documents (Programmer’s Guide, etc.) online• http://www-128.ibm.com/developerworks/rational/products/egl/

– The EGL Tech Corner (Newsletter)The EGL Tech Corner (Newsletter)• http://www-128.ibm.com/developerworks/rational/products/egl/

Many questions are not just EGL (JavaScript, etc.)Many questions are not just EGL (JavaScript, etc.)– Google/Wikipedia Or some other internet search engine/info databaseGoogle/Wikipedia Or some other internet search engine/info database– IBM Developer WorksIBM Developer Works

• http://publib.boulder.ibm.com/infocenter/systems/index.jsp

Page 61: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Use the Tooling (as it’s meant to be used)Use the Tooling (as it’s meant to be used) You can – spend endless hours and days trying to make JSF do things that are only You can – spend endless hours and days trying to make JSF do things that are only

possible with gobs of customized JavaScript and hand-codingpossible with gobs of customized JavaScript and hand-coding– Also leverage workbench tools and language featuresAlso leverage workbench tools and language features

Or you can design your application to use the JSF components as they exist in the Or you can design your application to use the JSF components as they exist in the tooling:tooling:– Benefits:Benefits:

• Productivity – by at least one magnitude of orderProductivity – by at least one magnitude of order• (far) fewer errors(far) fewer errors• Easier to maintain and enhanceEasier to maintain and enhance• Increased learning on your partIncreased learning on your part

Recommendation:Recommendation:– Introduce the JSF components to:Introduce the JSF components to:

• UsersUsers• Web designersWeb designers• Graphic artistsGraphic artists

– Explain benefits and R.O.I.Explain benefits and R.O.I.

Page 62: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Use the Right Tool (and Language) for the JobUse the Right Tool (and Language) for the Job (Stop thinking inside the box) Every software language has its strengths and (Stop thinking inside the box) Every software language has its strengths and

weaknessesweaknesses

There are NO:There are NO:– Panacea productsPanacea products– Panacea languages (stop waiting for one to arrive)Panacea languages (stop waiting for one to arrive)

EGL happens to do many things very well, but:EGL happens to do many things very well, but:– Are you ready to replace 100,000,000 lines of legacy COBOL with EGL .. today?Are you ready to replace 100,000,000 lines of legacy COBOL with EGL .. today?– Or would a better business value-proposition be to modernize certain business functions using Or would a better business value-proposition be to modernize certain business functions using

EGL – “surround and replace”EGL – “surround and replace”• And eventually – and incrementally – build up your EGL business assets?And eventually – and incrementally – build up your EGL business assets?

– For things like reporting, what’s the right approach?For things like reporting, what’s the right approach?• EGL fixed record outputEGL fixed record output• JasperJasper• BIRT – or EGL Print Forms (some time in 2008)BIRT – or EGL Print Forms (some time in 2008)• Calling RPG or COBOLCalling RPG or COBOL

JSF is incredibly good at business-U.I. developmentJSF is incredibly good at business-U.I. development– But it’s not Macromedia FlashBut it’s not Macromedia Flash

• You can use FlashYou can use Flash

– It’s not JavaScriptIt’s not JavaScript• You can (and will) use JavaScriptYou can (and will) use JavaScript

It’s not “cheating” to use the right tools and language for the jobIt’s not “cheating” to use the right tools and language for the job– It’s responsibleIt’s responsible

Page 63: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Use the Process (as described in this presentation)Use the Process (as described in this presentation)

Major implementation motivation(s) Major implementation motivation(s) – Enjoy the benefits of Ctrl/Space bar developmentEnjoy the benefits of Ctrl/Space bar development– Avoid Re-factoringAvoid Re-factoring

How to accomplish?How to accomplish?– Develop the database access layerDevelop the database access layer first first – based on the Data Access Application Wizard’s – based on the Data Access Application Wizard’s

outputoutput• Does NOT have to be optimized functionality – just services/libraries/function signaturesDoes NOT have to be optimized functionality – just services/libraries/function signatures• Test with stub EGL programs – if applicableTest with stub EGL programs – if applicable

– Develop the business logic layerDevelop the business logic layer• Services or Library functionsServices or Library functions• Ditto on the signaturesDitto on the signatures• Ditto on the testing strategyDitto on the testing strategy

– Develop the client (calling) routines lastDevelop the client (calling) routines last• And enjoy Ctrl/Spacebar – instead of spending And enjoy Ctrl/Spacebar – instead of spending

hours pouring over typos hours pouring over typos

Page 64: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Don’t Be StrangersDon’t Be Strangers

By finishing the EGL Technical Workshops you are ready to begin your “real work”. That By finishing the EGL Technical Workshops you are ready to begin your “real work”. That means:means:

– Production specsProduction specs– UsersUsers– And all the usual baloney that comes with the real world:And all the usual baloney that comes with the real world:

• Unrealistic deadlinesUnrealistic deadlines• Scope creepScope creep• Etc.Etc.

We (IBM) want you to learn EGL and become completely self-reliantWe (IBM) want you to learn EGL and become completely self-reliant

But more than that, we want you to be successfulBut more than that, we want you to be successful

And – the only way we learn ourselves, is through contact with youAnd – the only way we learn ourselves, is through contact with you

So – Don’t spin wheelsSo – Don’t spin wheels– Put notes out on the forumPut notes out on the forum– Send eMails to Send eMails to [email protected] – for “How To” questions – for “How To” questions– Enter issues and problems as PMRsEnter issues and problems as PMRs

Page 65: EGL Project Best Practice-December

IBM Software Group

© 2004 IBM Corporation

Summary – Best PracticesSummary – Best Practices Separation of ConcernsSeparation of Concerns Code ReuseCode Reuse ModularizationModularization SOASOA OptimizationOptimization

Page 66: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Summary – Separation of ConcernsSummary – Separation of Concerns

n-tier architecture enabled/enforced through:• Model:

– Library, Service, Program• View

– JSF/Rich Client/TUI U.I. page or screen• Controller

– Handler mechanism

Record type/structures enable and can enforce separation of:

• Data Access Logic;– SQLrecord/Serial Record/MQrecord

• Business Logic– basicRecord

• U.I.– Currently - basicRecord– Future - U.I. Record

Page 67: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Summary – Code ReuseSummary – Code Reuse

Code Reuse is encouraged and enabled using:– EGL "Parts" language construct

• Every validated EGL Library, Function, Service, Program, Handler, Record and DataItem becomes a reusable logic part - stored in a "parts dictionary" and available for reuse within a project and within multiple projects (see Project Architecture). "Parts" are the essence of the EGL language - and we doubt that there is a more proven and systemic reuse mechanism in any product or tooling on the market.

– EGL's internal Parts Dictionary:• Provides intelli-sense development for all validated parts - making development productive

and risk-reduced, through reuse of tested code– EGL's Project Architecture

• In an eclipse workspace, customers create and import reusable projects of common:– Records/DataItems/Functions (optimized Data Access, etc.)

– 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

– JSF Template Pages • Provide consistent and reusable U.I. sub-structures

– EGL DataItems provide single-source and reuse of business semantic• Code once/use throughout project(s)

Page 68: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Summary – 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)

Page 69: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Summary – 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

Functions are analogous to Java methods can be small-medium and large-grained

All EGL Part types (Libraries, Services, Handlers, Programs) support functions

– EGL Part types are analogous to java classes, except that they contain meta-data used in code generation, greatly enhancing productivity

Page 70: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Summary – 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)

Page 71: EGL Project Best Practice-December

IBM Software Group

© 2004 IBM Corporation

Version Control and RBD/EGLVersion Control and RBD/EGL

A presentation by Vijay Katoch

Page 72: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

AgendaAgenda

Introduction

High Level Project Structure in RAD

Key Steps and artifacts controlled

Notes

Page 73: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

High Level Project Structure in RADHigh Level Project Structure in RAD

Typical Web Project and EAR file is used for illustrating version control of assets

Similar rules can be used for EGL Batch projects

Page 74: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Key Steps and Artifacts ControlledKey Steps and Artifacts Controlled

Project folder

EGL Source Folder

Java Source or Java Resources Folder

EGLBin Folder

Bin Folder

WebContent Folder

EAR Content

Page 75: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Project FolderProject 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

Page 76: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

EGL Source FolderEGL Source Folder

All folders and EGL Source file .egl – Version controlled

EGL build file .eglbld – Version controlled

Package folders – Version controlled

Page 77: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Java FoldersJava 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

Page 78: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

EGLBin FolderEGLBin Folder

oNothing 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.

Page 79: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

Bin FolderBin Folder

oContents of this folder – Not version controlled but archived

Page 80: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

WebContent FolderWebContent 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

lib folder – Version controlled

– Please see note #3

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

Page 81: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

EAR ContentEAR Content

oAll contents of this folder should be version controlled

Page 82: EGL Project Best Practice-December

IBM Software Group

© 2003 IBM Corporation

NotesNotes

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.

Page 83: EGL Project Best Practice-December

IBM Software Group

© 2004 IBM Corporation

Additional Views of Development Additional Views of Development Environment, Tools and LanguagesEnvironment, Tools and Languages

Enterprise Generation Language