EGL/RBD - Initial Project Best Practices Enterprise Generation Language IBM Software Group
by user
Comments
Transcript
EGL/RBD - Initial Project Best Practices Enterprise Generation Language IBM Software Group
IBM Software Group EGL/RBD - Initial Project Best Practices Enterprise Generation Language © 2004 IBM Corporation IBM Software Group Greetings 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 © 2003 IBM Corporation IBM Software Group Agenda Software Architecture and Modeling Project Best Practices and Development Methodology Keys to Success Q&A © 2003 IBM Corporation IBM Software Group EGL/RBD – Software Architecture and Modeling © 2004 IBM Corporation IBM Software Group 10,000 Foot View – Topics 1. Product and project productivity – (general) 2. Modeling – and types of analysis models 3. Architecture – and separation of concerns Development platform Run-time Architecture Separation of Concerns 4. Sample project layout © 2003 IBM Corporation IBM Software Group 1. EGL Development Productivity, Analysis and Design Considerations © 2004 IBM Corporation IBM Software Group 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 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. 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 IBM Software Group Complex (Production) Applications and Productivity Three categories: 1. “Green field” (new) applications 2. Enterprise Modernization – of character-based applications 3. 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) © 2003 IBM Corporation IBM Software Group Obtaining a “Solid Grasp” on the EGL Development Domain – 1 of 2 Tools: • • EGL: • Tutorials: http://www-949.ibm.com/software/rational/cafe/docs/DOC-2412 • EGL Programmer’s Guide – Help System and: http://www949.ibm.com/software/rational/cafe/community/egl/documentation • EGL Language Reference – Help System and: http://www949.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. © 2003 IBM Corporation IBM Software Group 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 © 2003 IBM Corporation IBM Software Group Green Field (New) Applications Considerations 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 of customized, hand-written JavaScript and HTML – Conversely you can design and develop your application using the JSF components as they exist in the tooling: • – Benefits: – Productivity – by at least one magnitude of order – (far) fewer errors – Easier to maintain and enhance – Increased learning on your part – more scales, more practice! Recommendation: • • Introduce the JSF components to: Users, Web designers and graphic artists Explain benefits and R.O.I. of designers doing initial work on .JTPLs and page prototypes using JSF and EGL JSFHandlers (see upcoming topic) 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-73UQN7?OpenDocument&Site=rational&cty=en_us © 2003 IBM Corporation IBM Software Group Enterprise Modernization – Character-Based Applications Considerations: – U.I. bar is set fairly low (relative to GUI apps) • • • • – Other U.I. concerns • • – • 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 • • • – 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: • – Need for user re-training (if deep U.I. re-design) Need for hot-key and PF-Key emulation Often large # of screens • – 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) 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) © 2003 IBM Corporation IBM Software Group Three Ways of Modernizing Applications Wrapping Re-engineering Redeveloping Use of screen-scraping to package "pseudo-services" Business logic is modularized and separated from presentation Business logic of services is redesigned from scratch Data Model Data Model Data Model Mixed Business Logic and Presentation Logic Business Logic Business Logic Wrapper Wrapper Interface Interface Presentation Logic Orchestration Orchestration Orchestration Orchestration Interface Interface Interface Interface Source: Gartner © 2003 IBM Corporation IBM Software Group Enterprise Modernization – GUI (client/server) Applications Considerations: – U.I. bar often set fairly high: • • • • • • • – 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 • – 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 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 IBM Software Group Keys to Success Two Perspectives Overall – Across disciplines U.I. – Specific to EGL/JSF development Overall Keys to Success – Develop with “scaffolding” approach: • • • • – Use the tools you’ve bought – and don’t be afraid to nose around: • – 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 you control over a complex process 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 © 2003 IBM Corporation IBM Software Group RBD/EGL Development and Deployment Usage Models EGL Services Four – currently used by EGL shops world-wide: 1. EGL COBOL Generation EGL COBOL 2. EGL Services Generation 3. EGL for the full Model – View – Controller software architecture EGL MVC EGL/JSF 4. EGL/JSF for View and Controller in software architecture All enabled by core EGL value propositions: – Portability – Abstraction – Simplicity Mutually inclusive (many shops benefiting from several Usage Models) © 2003 IBM Corporation IBM Software Group RBD/EGL EGL COBOL Generation COBOL development skills are not easy to find – these days. Harder still to find, are skills such as: – C.I.C.S. and BMS – IMS DL/1 - IMS DC (™) and MFS – JCL New COBOL development on System z and System i can be done as follows: Which can access EGL generates You code COBOL Batch QSAM File DB2 Batch Reporting VSAM File MQ Online - C.I.C.S. - IMS DC IMS DL/1 Database © 2003 IBM Corporation IBM Software Group RBD/EGL EGL Services Generation Creating WSDL files requires the following language protocol expertise (typically in addition to Java/J2EE): – SOAP, XML, WSDL With EGL, legacy programmers can create and consume complex services EGL - Generates this You code this © 2003 IBM Corporation IBM Software RBD/EGL Group For Complete MVC Software Architecture EGL can be used to consolidate a diverse application portfolio into an elegant, modern software architecture – allowing for reuse © 2003 IBM Corporation IBM Software EGL/JSF for Group a “View and Controller” Software Architecture 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 © 2003 IBM Corporation IBM Software Group 2. Best Practice – Modeling and Analysis Concerns Project Resources and Artifacts - analysis/design perspective: 1. Data 2. U.I. 3. Business Logic and Services Modeling 4. Security 5. State Management 6. Software Development 7. Run-time Architecture © 2003 IBM Corporation IBM Software Group Data (SQL) Modeling - Topics Relational/Non-relational data sources • Access to VSAM/QSAM through serial/indexRecords and COBOLGEN • Access to all relational sources through sqlRecords EGL’s data access functionality: • Choices run the gamut from implicit to explicit and custom SQL • Many trade-offs, some of which are dependent on your development process and how dynamic it is SQL optimization and performance considerations – Indexing “conflicts of interest” – Governing potential run-away queries – Programmatic page logic – Locking and contention (-913, etc.) – Recommendation, build a matrix Synchronizing with production schema changes © 2003 IBM Corporation IBM Software Group U.I. Modeling - Topics Work done in parallel – within development lifecycle Explicit Page Development: • • • Within template page, layout pages using HTML tables and/or DIV tags Drag the JSF components Question on labels (see DataItems below) Prototype pages: • • Controls only/View design-mode Temporary data values, in JSFHandlers Pre-requisites: • • • Design specifications .CSS Template pages Considerations for EGL JSFHandler logic: • • • • Trivial edits DataItems – creates dependency during development cycle Navigation Transaction control Key Concept – Page Designer = “Page Constructor” © 2003 IBM Corporation IBM Software Group Services and Business Logic - Considerations Choices: • Services – Discrete functions – Run locally – or execute remotely as Web Services • Libraries – Same as services, except only local (one machine), and global data persists throughout run-unit • 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 Work in parallel – within development lifecycle • For larger-scaled and longer projects, consider coding to EGL Interfaces Use stub EGL Programs • Testing and debugging • Regression and Q.A. © 2003 IBM Corporation IBM Software Group Security Modeling - Considerations How to Authenticate: – Application authentication (Login) • LDAP/RACF/Single Sign-on, Domino Directory Server, etc. – Use EGL ExternalTypes to call Java custom classes • DB2 table authentication (User-id/Password) – DB2 (SQL access) authentication • Application Server • EAR file • EGL Connect(…) Statement(s) • TablenameVariables Where and How to Authorize: • Store credentials in Session after Login • Validate in: – JSFHandlers, .JTPL (template) pages © 2003 IBM Corporation IBM Software Group State Management Modeling - Considerations Options: – Transactional data maintained in state • Session • Request • Other – Page Beans • Session • Request – scope= in JSFHandler property Considerations: – Page volume/# of concurrent users – Page data requirements • Read/Only • Form/update • Multi-Page sequence © 2003 IBM Corporation IBM Software Group Performance Modeling - Considerations Options: – Transactional data maintained in state • Session • Request • Other – Page Beans • Session • Request – scope= in JSFHandler property Considerations: – Page volume/# of concurrent users – Page data requirements • Read/Only • Form/update • Multi-Page sequence © 2003 IBM Corporation IBM Software Group 3. Project Architecture Modeling © 2004 IBM Corporation IBM Software Group Best Practice – Design Towards 3-Tier Architecture © 2003 IBM Corporation IBM Software Group Architecture Model – To be completed… Client Side Functionality – HTML, JavaScript, AJAX, .CSS Server Side Functionality – JSF Framework – • Validations and business rules EGL Framework • • • Dataitem Validations and business rules JSFHandler “Choreography” – Internationalization – Calls to: > Data Access > Presentation Management – U.I. Logic – Transaction Control – Navigation Control Libraries and Local Services – – – • HTML Pages HTML, JavaScript, .css, AJAX JSF Framework EGL Framework JSFHandler Batch Systems – Printing – Reports – Utility programs Custom .JSP expressions DataItems (Validation, I18N) Page bean scope, Custom Messages I18N, Authentication/Authorization Calls to: Data Access Layer Data Access Layer > Relational DBMS > Sequential or Index Files or .CSV files Business Logic > Presentation Management > Everything else (no small entry Utility Classes External Interfaces – Web Services – XML File Parsing – Custom Java Classes – Calling COBOL, RPG, C/C++ – Logging – Audit – Printing JSP pages, JTPL templates, Presentation Management U.I. Logic Transaction Control Navigation Control SQL Records – default/custom Data Access Layer Data Access functions – default/custom Access to sequential and indexed files Presentation Management Business Logic Layer All other deep business functionality © 2003 IBM Corporation IBM Software Group Separation of Concerns © 2004 IBM Corporation IBM Software Group Separate Concerns by File Type EGL Libraries ~ Local Services – Provide single entry/exit point to granular functions – Promote reuse – Better run-time performance, if called multiple times – Extremely easy to transition Library functions and Local Services to Web Services EGL JSFHandlers used for: – U.I.-Specific Code (trivial edits and business rules) – Navigation – Access Control (typically through template pages) – Transaction Control EGL Programs used for: – Batch processing (standalone, O.S.-callable modules) – Large-grain single applications (complex reports, etc.) – COBOL Generation and Web Service Generation – Testing – provide stub modules for Library and Service calls Multiple EGL Build Files/Per project – Batch…vs… Web – Different Data sources, etc. © 2003 IBM Corporation IBM Software Group EGL Record types – used to “Separate Concerns” View .JSP .HTP L User Interface Client/Side Logic basicRecords Controller sqlRecords (Services) Model PageHandlers Manage user interaction (EGL) Transaction control Business Logic Business process, computations. Access to Services external process, Java, CICS, COBOL etc. (EGL) Data Access Services (EGL) Access to data; DB2, MQ, External files, etc. © 2003 IBM Corporation IBM Software Group Example Workspace and Project Architecture(s) © 2004 IBM Corporation IBM Software Group Workspace Architecture Records, Functions, DataItems Common Source Control Library Workspace Code Services, DataTables, Snippets, Macros, Buildfile(s) Custom (new application) Records, Functions, DataItems Web Project Services, DataTables, Pages, Templates, .css, Snippets, Macros, Buildfile(s) Custom (new application) Programs, Libraries, DataItems Batch Project Rununit.properties, Buildfile(s), Linkage, Resource Associations © 2003 IBM Corporation IBM Software Group Project Architecture – A Simple Example Project Default Properties Default Buildfile \DataPackage\ \Records\ \DataAccessRecords\ \U.I. Records – or could put U.I. Records into PageHandler Custom Project \DataItems\ \Library-or-Services Package\ \DefaultLibraries – from Import application wizard \BusinsessLogicLibraries\ \CustomDataAccessLibraries\ \UtilityLibraries\ \ProgramsPackage\ \Handlers\ \JavaSource\ - generated .Java files and custom .Java source \WebContent\ \theme\ © 2003 IBM Corporation IBM Software Group EGL and Source Code Managers Organization: – Workspace has projects • Projects have packages. – Packages have files. – EGL source is stored in files Source Code Managers manage projects/files • Access/Check out files for changes • Version at the Project Level SCM Plug-ins provide Team functions within workbench – Specific perspectives or context menus to interact with SCM © 2003 IBM Corporation IBM Software Group 4. Project Best Practices and Development Methodology © 2004 IBM Corporation IBM Software Group EGL Project - Roles and Responsibilities- Functions and Tools Database Business Logic Page Templates Web Pages Reusable EGL code Web-Site Editor Page Designer Editor Page Designer Web-Site Navigator Import Records DataItems Programs Services Functions .HTPL .JTPL Snippets JSP Pages Pagehandlers website .cfg © 2003 IBM Corporation IBM Software Group EGL Project Development Web and Online Application Best Practices 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 – Create Web-Site Storyboard – Create/Modify .CSS – Create Page Templates 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 © 2003 IBM Corporation IBM Software Group Project Development Process Setup Infrastructure Definition Iterative Development and Testing Create/Configure Project(s) Note: Typically there will be some infrastructure refactoring, Database Import …once iterative development begins 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 © 2003 IBM Corporation IBM Software Group 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 IBM Software Group 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 Program, Service, Library, ReportHandler, Function camelBack 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 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 Records and DataItems camelBack 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 © 2003 IBM Corporation IBM Software Group Customize 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 © 2003 IBM Corporation IBM Software Group 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 (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) © 2003 IBM Corporation IBM Software Group Refine/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. © 2003 IBM Corporation IBM Software Group Refine DataItems Purpose: Create optimal use of DataItems – throughout project Best Practices pre-requisites: Existing DataItems – most likely from Import 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 IBM Software Group Create EGL DataTables ** Optional Step ** Purpose: Create optimized (esp. performance) static look-up tables and Error message tables Pre-requisites: None 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 © 2003 IBM Corporation IBM Software Group Create External File Records, Functions and Services 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: DataItem definitions - refined 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 © 2003 IBM Corporation IBM Software Group Create User Interface (basic) Records and Functions/Services 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: SQLRecords refined DataItem definitions - refined 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) © 2003 IBM Corporation IBM Software Group Create Web Site Design 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: Site analysis and design If template pages exist, can apply templates to all pages 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 © 2003 IBM Corporation IBM Software Group Create/Modify .CSS File(s) Purpose: Create standard .css (Cascading Style Sheet) files for your pages Best Practices pre-requisites: Corporate standards documentation .css file(s) 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 © 2003 IBM Corporation IBM Software Group Create Template Pages 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: 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: 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: Create from scratch – starting with blank slide, and incorporating .css entries Incorporate dynamic menus, security, screen resolution Recommendation: Use PowerPoint, or FrontPage or DreamWeaver to mock-up page designs, prior to creating the designs using RAD. © 2003 IBM Corporation IBM Software Group Create and Test Business Logic Purpose: Create EGL processes, programs, services, library functions and all other business processing routines for your application Best Practices pre-requisites: SQLRecords and DataItems refined (for database access) Business analysis, requirements and technical design ready 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 IBM Software Group Create Web Pages or Character-based Forms 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: 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: (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 • • • – (If TUI) – create using Forms 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 (if CUI) – code EGL statements to • Create CUI forms and programs, Test by running as a Java application © 2003 IBM Corporation IBM Software Group Create Reports Purpose: Create traditional printed or online reports Best Practices Pre-requisites: SQLRecords and DataItems refined (for database access) Business analysis, requirements and technical design for pages ready 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 © 2003 IBM Corporation IBM Software Group Create Reusable Code ** Optional Step ** Purpose: Create parameterized, reusable EGL code elements, to simplify development, increase productivity and enable a broader-class of users Pre-requisites: None 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 IBM Software Group (6) Keys to Success First Project Common Sense Knowledge Use the Tooling Use the Right Approach Use the Right Process Don’t Be Strangers © 2004 IBM Corporation IBM Software Group Practical (Common Sense) – 1st Project First project profile: – – – – – Technical proof points Productivity Performance Fit with your development process and approach Business value (not throw-away PoC) 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 From our experience – EGL (the language) will not be the problem – Other issues • J2EE and the web application paradigm will be the problem – • • • • JSF web page development techniques Initial project/source management setup SQL Calling external resources DB connections Plan accordingly! © 2003 IBM Corporation IBM Software Group Knowledge (How To) is Everything With RBD/EGL/JSF – If you know how to do what you want to do, the time it takes will be measured in: • • Minutes (at most) Hours – If you do not know what to do, the time it takes can jump to: • • Hours Days So becoming knowledgeable (broad and deep) is the #1 key to success Where can you get information? – Rational Education – RBD/EGL Course – contact [email protected] – The product help • Contents, Search, Tutorials, Cheat Sheets – The EGL forum: • http://www.ibm.com/developerworks/forums/forum.jspa?forumID=435 – The EGL documents (Programmer’s Guide, etc.) online • http://www-128.ibm.com/developerworks/rational/products/egl/ – The EGL Tech Corner (Newsletter) • http://www-128.ibm.com/developerworks/rational/products/egl/ Many questions are not just EGL (JavaScript, etc.) – Google/Wikipedia Or some other internet search engine/info database – IBM Developer Works • http://publib.boulder.ibm.com/infocenter/systems/index.jsp © 2003 IBM Corporation IBM Software Group 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 possible with gobs of customized JavaScript and hand-coding – Also leverage workbench tools and language features Or you can design your application to use the JSF components as they exist in the tooling: – Benefits: • • • • Productivity – by at least one magnitude of order (far) fewer errors Easier to maintain and enhance Increased learning on your part Recommendation: – Introduce the JSF components to: • Users • Web designers • Graphic artists – Explain benefits and R.O.I. © 2003 IBM Corporation IBM Software Group Use the Right Tool (and Language) for the Job (Stop thinking inside the box) Every software language has its strengths and weaknesses There are NO: – Panacea products – Panacea languages (stop waiting for one to arrive) EGL happens to do many things very well, but: – 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 EGL – “surround and replace” • And eventually – and incrementally – build up your EGL business assets? – For things like reporting, what’s the right approach? • • • • EGL fixed record output Jasper BIRT – or EGL Print Forms (some time in 2008) Calling RPG or COBOL JSF is incredibly good at business-U.I. development – But it’s not Macromedia Flash • You can use Flash – It’s not JavaScript • You can (and will) use JavaScript It’s not “cheating” to use the right tools and language for the job – It’s responsible © 2003 IBM Corporation IBM Software Group Use the Process (as described in this presentation) Major implementation motivation(s) – Enjoy the benefits of Ctrl/Space bar development – Avoid Re-factoring How to accomplish? – Develop the database access layer first – based on the Data Access Application Wizard’s output • • Does NOT have to be optimized functionality – just services/libraries/function signatures Test with stub EGL programs – if applicable – Develop the business logic layer • • • Services or Library functions Ditto on the signatures Ditto on the testing strategy – Develop the client (calling) routines last • And enjoy Ctrl/Spacebar – instead of spending hours pouring over typos © 2003 IBM Corporation IBM Software Group Don’t 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 – Don’t spin wheels – Put notes out on the forum – Send eMails to [email protected] – for “How To” questions – Enter issues and problems as PMRs © 2003 IBM Corporation IBM Software Group Summary – Best Practices Separation of Concerns Code Reuse Modularization SOA Optimization © 2004 IBM Corporation IBM Software Group Summary – 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 © 2003 IBM Corporation IBM Software Group Summary – 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) © 2003 IBM Corporation IBM Software Group 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) © 2003 IBM Corporation IBM Software Group 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 © 2003 IBM Corporation IBM Software Group 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) © 2003 IBM Corporation IBM Software Group Version Control and RBD/EGL A presentation by Vijay Katoch © 2004 IBM Corporation IBM Software Group Agenda Introduction High Level Project Structure in RAD Key Steps and artifacts controlled Notes © 2003 IBM Corporation IBM Software Group High 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 © 2003 IBM Corporation IBM Software Group Key Steps and Artifacts Controlled Project folder EGL Source Folder Java Source or Java Resources Folder EGLBin Folder Bin Folder WebContent Folder EAR Content © 2003 IBM Corporation IBM Software Group 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 © 2003 IBM Corporation IBM Software Group EGL Source Folder All folders and EGL Source file .egl – Version controlled EGL build file .eglbld – Version controlled Package folders – Version controlled © 2003 IBM Corporation IBM Software Group 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 © 2003 IBM Corporation IBM Software Group 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. © 2003 IBM Corporation IBM Software Group Bin Folder o Contents of this folder – Not version controlled but archived © 2003 IBM Corporation IBM Software Group 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 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 © 2003 IBM Corporation IBM Software Group EAR Content o All contents of this folder should be version controlled © 2003 IBM Corporation IBM Software Group 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. © 2003 IBM Corporation IBM Software Group Additional Views of Development Environment, Tools and Languages Enterprise Generation Language © 2004 IBM Corporation