IBM Cúram SPM for Developers (ADE) 7.X Course Guide PDF

Document Details

Uploaded by Deleted User

2017

Tags

IBM Cúram SPM Application Development Environment (ADE) Software Development

Summary

This document is a course guide for IBM Cúram Social Program Management (SPM) Platform. It covers the IBM Cúram SPM Application Development Environment (ADE) for developers. The course includes units on modeling, coding, building, and troubleshooting applications.

Full Transcript

IBM Cúram SPM for Developers (ADE) 7.X 9D73G – Course Book ERC 1.0 Published: 24-Nov-17 © Copyright IBM Corporation 2017 Course materials may not be reproduced in whole or in part without the prior written permission of...

IBM Cúram SPM for Developers (ADE) 7.X 9D73G – Course Book ERC 1.0 Published: 24-Nov-17 © Copyright IBM Corporation 2017 Course materials may not be reproduced in whole or in part without the prior written permission of IBM. Unit 1: IBM Cúram SPM and ADE Overview Table of Contents Unit 1: IBM Cúram SPM and ADE Overview __________________________________ 3 Lesson 1: Course Introduction _________________________________________________ 5 Lesson 2: Cúram SPM Technical Review _________________________________________ 11 Lesson 3: Introduction to the Application Development Environment (ADE) ___________ 31 Unit 2: Implementing CRUDL Features _____________________________________ 54 Lesson 1: Server Fundamentals Part One ________________________________________ 56 Lesson 2: Client Fundamentals Part One ________________________________________ 79 Lesson 3: Adding Create Pages _______________________________________________ 114 Lesson 4: Adding Search Pages _______________________________________________ 131 Lesson 5: Adding Modify Pages_______________________________________________ 152 Unit 3: Enhancing the Application ________________________________________ 167 Lesson 1: Code Tables ______________________________________________________ 169 Lesson 2: Data Manager ____________________________________________________ 188 Lesson 3: Application Navigation _____________________________________________ 199 Unit 4: Implementing Features for Robustness ______________________________ 234 Lesson 1: Exception Handling ________________________________________________ 236 Lesson 2: Validation________________________________________________________ 250 Lesson 3: Testing & Troubleshooting __________________________________________ 272 Unit 5: Additional Server Features________________________________________ 291 Lesson 1: Modeling Operations ______________________________________________ 293 Lesson 2: Modeling Associations _____________________________________________ 311 Lesson 3: Additional Modeling Features _______________________________________ 325 Unit 6: Additional Client Features ________________________________________ 338 Lesson 1: Additional UIM Features ____________________________________________ 340 Lesson 2: Adding Logic to Pages ______________________________________________ 364 Lesson 3: Introduction to Widgets ____________________________________________ 378 Unit 7: Course Conclusion_______________________________________________ 387 Lesson 1: Development Case Study ___________________________________________ 389 Lesson 2: Course Summary __________________________________________________ 391 Appendix ____________________________________________________________ 394 IBM Cúram SPM for Developers (ADE) 7.X 2 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Unit 1: IBM Cúram SPM and ADE Overview Unit 1: IBM Cúram SPM and ADE Overview © Copyright IBM Corp. 2017 2 IBM Cúram SPM for Developers (ADE) 7.X 3 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Unit Contents ▪ This unit contains the following lessons: 1. Course Introduction. 2. Cúram SPM Technical Review. 3. Introduction to the Application Development Environment (ADE). © Copyright IBM Corp. 2017 3 IBM Cúram SPM for Developers (ADE) 7.X 4 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Lesson 1: Course Introduction Lesson 1: Course Introduction © Copyright IBM Corp. 2017 4 IBM Cúram SPM for Developers (ADE) 7.X 5 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Course Objectives ▪ This course is designed to enable you to: Use features and tools in the Cúram SPM Application Development Environment (ADE) for the following tasks: ▪ Model classes and relationships. ▪ Implement server-side features. ▪ Create client pages and navigation. Implement simple, end-to-end solutions using the Cúram SPM model- driven development approach and tools. Access and interpret developer guidelines contained in the Cúram SPM product documentation. © Copyright IBM Corp. 2017 5 Notes: This course provides you with a technical understanding of the IBM Cúram Social Program Management (SPM) Platform Application Development Environment (ADE). A practical grasp of the IBM Cúram SPM ADE is essential for teams wishing to build Cúram SPM- compliant solutions that provide high-quality citizen services. This course provides a solid grounding in the IBM Cúram SPM model-driven development approach and ADE. It presents an architectural overview of the IBM Cúram SPM application and introduces ADE features and tools for modeling, coding, building, and troubleshooting applications. During the course, you will design and implement a simple end-to-end application using many ADE client and server features. IBM Cúram SPM for Developers (ADE) 7.X 6 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Pre-requsites and Further Training ▪ Pre-requisites Learners must have completed IBM Cúram Social Program Management (SPM) Technical Overview. Learners must have a working knowledge of Object-oriented concepts, Java, XML, SQL, N-tier enterprise applications. ▪ Further training Before attempting the certification exam and working on customer projects, learners must complete IBM Cúram SPM for Developers (Customization). IBM offers training for developers who will work on specialized Cúram technologies, including Rules, Workflow, IEG, and REST APIs. ▪ See the Cúram SPM developer course paths on the IBM Training site for details. © Copyright IBM Corp. 2017 6 Notes: IBM offers three technical training paths for Cúram SPM: Product Fundamentals Application Developer Specialized Developer. IBM Cúram Social Program Management (SPM) Technical Overview provides an overview of Cúram SPM in terms of its architecture, technical features, and the support it provides for developing custom solutions. This course will help you to develop a broad understanding of the product and its technologies from a technical perspective. IBM Cúram SPM for Developers (ADE) and IBM Cúram SPM for Developers (Customization) explains in detail how to use the main technical features of the IBM Cúram SPM ADE in a compliant way. Specialized courses explain how to use additional technologies, which are introduced in IBM Cúram Social Program Management (SPM) Technical Overview. Additional technologies include CER Rules, Intelligent Evidence Gathering (IEG), Workflow, REST APIs, and Universal Access. IBM Cúram SPM for Developers (ADE) 7.X 7 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Course Structure and Duration ▪ Structure This course consists of the following units: ▪ IBM Cúram SPM and ADE Overview. ▪ Implementing CRUDL Features. ▪ Enhancing the Application. ▪ Implementing Features for Robustness. ▪ Additional Server Features. ▪ Additional Client Features. ▪ Course Conclusion. Each unit consists of several lessons. ▪ Duration Classroom (ILT): 5 days. Self-paced (SPVC): 40 hours on average. © Copyright IBM Corp. 2017 2 Notes: IBM Cúram SPM for Developers (ADE) 7.X 8 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Course Format and Resources ▪ Format. Several lessons per day. Each lesson contains examples built around a scenario. Each lesson is followed by an exercise. Exercises build up a simple end-to-end solution. Implement a case study at the end of the course. Approximately 70% of the time is spent on exercises. ▪ Resources. Development environment accessible as a remote image. Course manual. Exercise workbook. Product documentation. Exercise Help Guide (self-paced course). Sample solutions for exercises. © Copyright IBM Corp. 2017 2 Notes: IBM Cúram SPM for Developers (ADE) 7.X 9 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Levels of Help – Self-paced Training Exercise Read exercise steps carefully. Steps Refer to examples in the course manual. Exercises are often similar to the Course examples in the course manual. Manual Refer to the product documentation. The documentation contains detailed Product explanations and examples. Doc Refer to the Exercise Help Guide to see the expected output for each Tips exercise and how to correct common errors. Docs Refer to the sample solutions. The sample solutions can be loaded if Sample required (see README). Note that the solutions are cumulative. Solutions ▪ Contact the Help Desk if you are experiencing problems with the image or have exhausted the resources above. © Copyright IBM Corp. 2017 2 Notes: Completing the exercises for this course in a self-paced environment can be challenging depending on the experience of the learner. Use the following resources to help you to complete exercises: Exercise Steps – The exercise steps attempt to provide a balance between providing enough detail for the average learner to complete the exercise and recalling steps you completed previously. Ensure that you read the exercise steps carefully. Refer to previous exercise steps if you cannot recall how to perform a task. Course Manual – Refer to examples in the course manual. Exercises are often similar to the examples in the course manual. Product Documentation – Product documentation provides detailed explanations and samples for the ADE. It is good practice to become familiar with the product documentation. Exercise Help Guide – The Exercise Help Guide provides overall tips and tips for each exercise to see what the output should look like and how to correct common errors. Sample Solutions – Refer to the sample solutions in C:\LearnerResources\References. The password to unzip the archive is in the ReadMe document. If you wish, you can load the sample solution. Refer to the README file for instructions. The sample solutions are cumulative, therefore, solution 11 contains solutions 1-10. This means that you can load a solution at a certain point and continue with the next exercise. IBM Cúram SPM for Developers (ADE) 7.X 10 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Lesson 2: Cúram SPM Technical Review Lesson 2: Cúram SPM Technical Review © Copyright IBM Corp. 2017 10 IBM Cúram SPM for Developers (ADE) 7.X 11 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Lesson Objectives ▪ This lesson is designed to enable you to: Provide an overview of the components of IBM Cúram Social Program Management: ▪ IBM Cúram Social Program Management Platform. ▪ IBM Cúram Application Modules. Outline the runtime architecture used in IBM Cúram SPM for the client and server applications. Describe the product documentation that is provided with the IBM Cúram SPM application. © Copyright IBM Corp. 2017 11 Notes: IBM Cúram SPM for Developers (ADE) 7.X 12 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview The IBM Cúram Approach to SPM Government Agencies NGOs Government Agencies Providers Client SPM Case Management Life Events 3 Needs Who is in need? What are their needs? 2 No 4 Outcome Wrong Management Door Who can help? CARE and SOCIAL and How do you achieve PROTECTION ECONOMIC POTENTIAL sustainable © Copyright IBM Corp.outcomes? 2017 12 1 Notes: This diagram provides a holistic narrative of the IBM Cúram approach to SPM. The narrative begins with the following questions: 1. Who is in need? 2. What are their needs? 3. Who can help? 4. How to achieve sustainable outcomes? These questions establish what the citizen needs, the organizations that can meet these needs, and how these needs can be removed in the medium to long term. In turn, these questions become sequential stages in the SPM cycle that enables the citizen to determine their specific needs, identify relevant services and providers, and work towards positive outcomes for themselves and their families. Although, these steps provide a suggested sequence, they are flexible. In other words, a citizen can enter the SPM narrative at any point. The holistic nature of the IBM Cúram approach to SPM means that citizens can always seek help. As the IBM Cúram SPM model integrates programs, services, and providers, the citizen always receives the help that they need. This approach is because the Cúram SPM model allows SPM agencies, NGOs, and government agencies to work collaboratively to meet client needs. In turn, the client has a unified, at-a-glance view of available products and services, irrespective of when, where, and how their personal circumstances involve them in the SPM narrative. IBM Cúram SPM refers to this approach as needs-to-outcomes. IBM Cúram SPM for Developers (ADE) 7.X 13 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview IBM Cúram Social Program Management (SPM) IBM Cúram Application Modules Appeals Archiving Business Intelligence and Analytics Child Welfare Evidence Broker Identity Intelligence Income Support for Income Support Life Event Management Medical Assistance Outcome Management Provider Management Provider Match with Watson Social Enterprise Collaboration Universal Access Verification Engine IBM Cúram Social Program Management Platform © Copyright IBM Corp. 2017 13 Notes: This diagram is specific to IBM Cúram SPM V7.0. Other versions of Cúram can have different components. The two “tiers” of IBM Cúram Social Program Management (SPM) are as follows: IBM Cúram Application Modules IBM Cúram Social Program Management Platform (SPMP). Child Welfare, Income Support, and Income Support for Medical Assistance are configured with best practices and government programs. These configured, or high-level, Application Modules use features of the SPMP and other Application Modules. For example, Income Support requires Universal Access, Outcome Management, Provider Management, Evidence Broker, and Verifications. BI & Analytics and Social Enterprise Collaboration are optional. All Application Modules use features from the SPM Platform. Previous versions of Cúram SPM referred to the following modules as 'Solution Modules': Child Welfare, Income Support, and Income Support for Medical Assistance. The remaining Application Modules were referred to as 'Enterprise Modules'. IBM Cúram SPM for Developers (ADE) 7.X 14 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview IBM Cúram SPM Platform Components and Processes SPM Platform: Domain-Specific Processes Common Evidence Participant Financial Eligibility and Intake Management Management Management Entitlement Case Multi-Disciplinary Supervisor Decision Assist Management Teams Workspace Business Services Reference Technical Services Model Task Web Rules Code Tables Editors Security Workflow Management Services Word Calendaring Exception Cognitive Search Logging Queuing Integration Scheduling Handling Manager Intelligent Transaction REST API Enterprise Rate Tables Evidence Correspondence Application Management Infrastructure Gathering Integration (EAI) Application Development Administration Suite Knowledge Center Data Dictionary Environment © Copyright IBM Corp. 2017 14 Notes: SPM Platform Functionality The SPM platform houses the foundational infrastructure and functionality that reside at the heart of IBM Cúram SPM products. Domain-specific processes: These processes support the case management lifecycle. Business Services: Includes services to allow end users to manage tasks and queues; and services for generating and managing correspondence. Technical Services: Includes services for enterprise application integration and security. Data (Reference) Model: A social program management data model for storing household- specific data, including participant information and evidence. Administration Suite: Used to dynamically configure items such as system properties, cases, and evidence types. Knowledge Center: Contains product documentation. Application Development Environment (ADE): The ADE allows developers to customize the Platform. The ADE provides tools, such as code generators and build scripts. Data Dictionary: Contains developer information about the product. How the elements are used Applications use functions and services from each of the layers of the SPM product to complete a use case. For example, when a case worker assesses a client, they initiate an assessment from Outcome Management, which uses Decision Assist and IEG to gather data and analyze the answers by using rules. The assessment data is mapped to evidence tables using the data mapping service. Developers use the Administration Suite to configure an assessment in Decision Assist and IEG. Developers might use the ADE to customize parts of Outcome Management. IBM Cúram SPM for Developers (ADE) 7.X 15 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Notes: So, what is involved in implementing an IBM Cúram SPM solution? The core product contains over 10,000 screens and thousands of defined business processes. These artifacts are generalized and attempt to cover the main areas of any SPM agency. IBM Cúram SPM also supplies many modules to meet specific needs, such as IBM Cúram Income Support. Modules need to be customized to meet specific customer requirements. For example, legislation around the world differs greatly. Therefore, client requirements in one country might be irrelevant, or even illegal in another jurisdiction. Therefore, it is usual to customize the base application and Cúram modules. Many aspects of IBM Cúram SPM can be configured dynamically. For example, services and payments are delivered by using products, which are associated with rules (essentially, coded legislation). Rules are executed against evidence. Products, rules, evidence, and associated data, such as rate tables can be configured dynamically, which avoids the need for coding. Extension in IBM Cúram SPM involves the addition or modification of source artifacts, including client and server artifacts and source code. Extension requires a rebuild and redeployment of the application while configuration does not. IBM Cúram SPM for Developers (ADE) 7.X 16 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview IBM Cúram SPM Platform Architecture (SPMP) Overview ▪ IBM Cúram SPM is a distributed multi-tiered JEE application: ▪ Architectural attributes and benefits of the Cúram SPM platform: Industry-standard technologies Scalability Runtime performance Interoperability with external systems SOA compliance User interface elegance Model-driven architecture Maintainability and extensibility © Copyright IBM Corp. 2017 16 Notes: The IBM Cúram SPMP provides the infrastructure and environment to facilitate the development, building, and deployment of Cúram SPM-based applications. The IBM Cúram SPMP online architecture is based on a three-tier model, which is implemented in Java Platform, Enterprise Edition (JEE): The presentation tier generates the user interface. The application tier hosts the business logic. Cúram SPM uses stateless browsing, which means that data is read from the database and committed to the database as the user navigates from screen to screen. The persistence tier interacts with the backend database or with remote systems. Architectural Attributes and Benefits The platform is built by using industry standard technologies and open software standards, such as JEE, UML, and XML. No state is stored in Enterprise JavaBeans (EJBs), which improves performance and scalability. Components can be deployed on multiple servers for high-availability and performance. Interoperability with arbitrary external systems uses several approaches, including Web Services and Enterprise Application Integration (EAI) Connectors. SOA compliance – Supports web service standards. Intuitive user interface for managing multiple layers of information on one page. Model-driven architecture from which 'plumbing' code is generated. Loose coupling between layers allows one layer to be changed or upgraded without affecting another layer. IBM Cúram SPM for Developers (ADE) 7.X 17 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Presentation Tier ▪ Divided into two components. PRESENTATION TIER ▪ Web Server/Container to create the CLIENTS WEB SERVER client screens. Uses standard Java technologies … Internet HTML ▪ JSP, Servlets, Tag Libraries. Client HTML … and Patterns ▪ Model-View-Controller, Front Controller, XML XML Apache Struts. Web Server Client Software ▪ Web Browser to render the client screens for internet clients. Internet SOAP Thinnest of thin clients. Application Easy to scale and maintain. ▪ Note: Mobile Client REST SOAP, REST, and XML clients are also supported. This course concentrates on internet Technologies Used clients. JSP/HTML JavaScript CSS © Copyright IBM Corp. 2017 Web 2.0 17 Notes: Cúram uses a web client for its presentation tier and is divided into two components. What the user actually interacts with on their machine is a web browser, which simply makes HTTP requests to a web server and renders the returned HTML streams into user-friendly pages. So the web server is where the client side of the application really resides. Strictly speaking, what we have is a web (HTTP) server that delegates on to a JEE compliant web container. For simplicity, we’ll use the two terms interchangeably. The client application is a true Java web application. As a result, it uses such technologies as Java Server Pages; servlets; and patterns, for example, the Model View Controller (MVC) pattern from the Apache Struts framework. IBM Cúram SPM for Developers (ADE) 7.X 18 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Application Tier ▪ Based on stateless EJB. APPLICATION TIER ▪ Plain Java code to implement Process WEB SERVER APPLICATION SERVER objects. ▪ Standard database access through Remote Interface objects using JDBC. Layer ▪ Provides a rich set of infrastructure JSP/Java services, including: Beans Business Object Transaction management. Layer Security. Workflow. Data Access ▪ Frees the developer to concentrate on Layer business needs, not technical problems. Technologies Used ▪ Runs inside a JEE Application Server. EJB ▪ Divided into three layers. Java, XML JAAS, JNDI © Copyright IBM Corp. 2017 JTA, JMX 18 Notes: The presentation tier interacts with the server via the Server Access Beans in the web server. These provide a link to the server side of the application and are created by the Cúram generators, based on your UML model. One of the aims of the application architecture is to isolate the different types of code used into more coherent groups. For example, all EJB code will be in one layer, all JDBC data-access code in another, and the standard processing logic in another. The out-of-the-box (OOTB) framework handles various services, such as transaction handling, security checks, error handling, and tracing/logging. This frees the developer to concentrate on the business requirements rather than on the underlying technologies and ‘plumbing’. The completed application needs to be deployed within a JEE application server, which can either be WebSphere or WebLogic. The following JEE technologies are used in the application tier: EJB (Enterprise JavaBean) – Used in the Remote Interface Layer to implement transaction handling and security. JAAS (Java Authentication and Authorization Service) – Used to implement security at login and access to functions. JNDI (Java Naming and Directory Interface) – To look-up services. For example, when the client tries to find the EJBs deployed in the server application. JTA (Java Transaction API) – Used by the objects in the Remote Interface Layer to manage the business transactions of the application. JMX (Java Management Extensions) – Used to monitor the application by instrumenting the code and collecting application operational data. IBM Cúram SPM for Developers (ADE) 7.X 19 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Application Tier Layers ▪ Remote Interface Layer (RIL) Infrastructure services for business object layer including Remote object lifecycle management, authorization, exception Interface handling, and transaction control. Layer ▪ Business Object Layer (BOL) Façade Layer. ▪ Client-visible. Facade Business ▪ Corresponds to user interface specific processing. Object Service ▪ May invoke one or more service or entity layer methods. Layer Service Layer Entity ▪ Not client-visible. ▪ Provides the back end business services. Data Entity Layer ▪ Objects used by developers to access database tables. Access ▪ Interacts with the database via Data Access Layer. Layer ▪ Data Access Layer (DAL) Responsible for the interaction with a relational database. Uses the JDBC API to connect to a range of SQL databases. © Copyright IBM Corp. 2017 19 Notes: Remote Interface Layer (RIL) The services of the Remote Interface Layer are as follows: Business Object Life Cycle Management – Creating/locating appropriate Business Objects to service client requests. Authorization – Checking that a client is entitled to execute a particular server function. Transaction Control – Starting, committing, and rolling back atomic transactions. Argument Marshaling – Translating between different data formats involved in client/server transmission. Last-chance Exception Handling – Dealing with exceptions that are not properly handled by application code and logging them to a central location, as well as performing uniform reporting to client applications. Business Object Layer (BOL) This layer is the most important layer from an application developer’s perspective. This layer contains the handcrafted code that implements the business logic of the application. There are three layers within the BOL containing the following types of objects: Facades define the outside world's view of a Cúram SPM application. They handle requests from the client. Process objects provide the code that decides how these individual database method calls form a more logical business process. For example, registering a person’s details might involve inserting information not only into the Person table, but also the Concern, ConcernRole, and potentially many other tables. IBM Cúram SPM for Developers (ADE) 7.X 20 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Entity objects act as the developer’s view of the database. Each entity maps to a database table. All data access is carried out via the use of the entity’s methods. For clarity, the term entity has a specific meaning in Cúram and does not have any direct correlation with things like Entity EJBs. The Data Access Layer (DAL) The Entity methods described previously do not actually make database calls. Instead, they delegate to the Data Access Layer, which is responsible for interactions with the server application's relational database by using the JDBC API. Cúram generates the required SQL dynamically using metadata about Entity Objects from the Application Model. IBM Cúram SPM for Developers (ADE) 7.X 21 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Persistence Tier ▪ Based on a relational database. PERSISTENCE TIER DB2 or Oracle. APPLICATION DATABASE H2 can be used for development only. SERVER SERVER ▪ Provides connectors for interacting Connectors with other systems. SQL DB2 Oracle JMS- Compliant messaging Legacy and External Web Systems Services Others Technologies Used JDBC SQL JMS ETL WDSL/ SOAP © Copyright IBM Corp. 2017 20 Notes: The choice of database has no effect on the supplied OOTB code. However, the developer needs to know whether their SQL statements will work on a DB2 or Oracle platform. H2 is an open-source, relational database that can be also used for development. However, H2 cannot be used as a production database, unlike DB2 and Oracle. The following technologies are used in the application tier: JDBC (Java Database Connectivity) – API used to access the application database. JMS (Java Message Service) – The standard Java API for implementing asynchronous programming. JMS is used both explicitly within Cúram SPM applications when you execute deferred processes (background process) and implicitly when you create workflows. WDSL/SOAP – Used for Cúram SPM web services. SQL – For database interaction. ETL – Extract-transform-load operations are provided by the Business Intelligence & Analytics Module. IBM Cúram SPM for Developers (ADE) 7.X 22 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Runtime Operation PRESENTATION TIER APPLICATION TIER PERSISTENCE TIER CLIENTS WEB SERVER APPLICATION SERVER DATABASE SERVER 1 Internet HTML Client Remote Connectors HTML 4 Interface 7 Layer DB2 2 3 SQL 10 Oracle XML XML Web Server JSP/Java Client 5 Software Beans Business Object JMS- Layer Compliant Internet SOAP 9 8 messaging Legacy and Application External Data Web Systems Access Services Mobile 6 Layer Client REST Others Cúram SPM is a stateless JEE Application: data is read from the database and committed to the database as the user navigates from screen to screen. © Copyright IBM Corp. 2017 21 Notes: This diagram presents a picture of the runtime architecture that we have discussed so far. The following example illustrates how the architecture is used to handle a client request to register a client: 1. The care worker enters the client data and submits the data. The browser sends an HTTP request to the HTTP server. 2. A servlet (created from a JSP) in the web container delegates the request to the register patient Server Access Bean. 3. The Server Access Beans convert data from HTML forms to an appropriate representation needed for transmission to the server-side EJBs. This stage of processing also includes data validations defined in the application model. The Server Access Bean invokes an EJB in the Remote Interface Layer (RIL). 4. The RIL starts a transaction, ensures that the user has the appropriate authorization, and passes the request to the register client business process object in the Business Object Layer (BOL). 5. The register client business logic processes the request. 6. The business logic calls the Data Access Layer (DAL) to read and write data. 7. The DAL accesses the database through a JDBC connection and executes SQL for the requests. 8. The business logic returns a response to the servlet. The transaction is committed. 9. The servlet generates the response page and forwards an HTTP response to the client. 10. The response is rendered on the care worker's browser. IBM Cúram SPM for Developers (ADE) 7.X 23 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Cúram SPM Deployment – Online Application Typical Deployment Model Internal User Public DMZ DB2 or Oracle Database HTTPS Load Browser/ Mobile Balancer Web Server Cúram JEE Server on App. Server Financial Legacy Systems Phone Enterprise Service Bus IVR/CTI Server Web Services External Systems Firewall Firewall Document Content Management Management © Copyright IBM Corp. 2017 22 Notes: The diagram shows a typical deployment model for the Cúram SPM online application. The demilitarized zone (DMZ) contains the organizations public facing services. A load balancer allocates user requests across several web servers. IBM Cúram SPM for Developers (ADE) 7.X 24 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Deployment Architecture ▪ Cúram SPM can scale to reach Load Balancer the performance required by very large social enterprises. Web Web Server Server Tested by regular benchmarking tests. ▪ Factors affecting dimensioning. Application Application User types and number. Server Server Transaction types and volume. Web EJB Web EJB Quality of service required (level of Container Container Container Container DB Client DB Client availability). Batch window. ▪ Allocate EARs to meet the Database Server expected load and whether internal or external access is required. Scale out – add machines. Scale up – add VMs or CPUs. © Copyright IBM Corp. 2017 23 Notes: Cúram SPM-based solutions can be large. For example, some working solutions cater for more than 10,000 internal users, 25,000 providers, over a million clients, and more than 5,000 portal accesses per day. IBM performs regular benchmarking tests to ensure that the system performs well under very high loads. Several factors influence the deployment architecture including the types of users, expected number of users, types of transactions, and expected volume of transactions. In addition, the desired quality of service in terms of availability and response time affects the deployment architecture also. EAR files are created for the main application, help files, web services, and external portals. The EAR files are replicated and distributed depending on the expected load. Like any JEE application, Cúram SPM solutions can be scaled horizontally (scale out) across multiple low-cost machines or scaled vertically (scale up) across CPUs or virtual machines (VMs) on one machine. Spreading the load also provides high availability by removing single points of failure. IBM Cúram SPM for Developers (ADE) 7.X 25 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Product Reference Information ▪ Sources IBM Knowledge Center. Accelerators. Analysis Documentation. Release notes. API Javadoc. Cúram on developerWorks. IBM Support Portal. RFE (Requests for Enhancements community). IBMRedbooks. ▪ Designed for the implementation or support team, not the end-user. © Copyright IBM Corp. 2017 24 Notes: Cúram SPM applications are customized to suit organizations. Therefore, Cúram SPM documentation is for the implementation or support team, not the end-user. IBM Cúram SPM provides the following sources of information: IBM Knowledge Center – Business, administration, installation, and development guides that cover all aspects of Cúram SPM. Accelerators – Accelerators are sample custom applications, for example, the Adult Social Care product. Cúram SPM provides the sample artifacts and steps to create them. Analysis Documentation – Provides a navigable view of source artifacts and is used for gap and impact analysis. Analysis Documentation can be generated from a customized code base. Release Notes – Detail the changes contained in the release, including new features and fixes. Release Notes also describe the pre- and post-installation steps for the product. API Documentation - Outlines the available interfaces for IBM Cúram SPM components. Provided as Javadoc for each component. developerWorks – Short how-to guides for developers. Support Portal – Lists product notices, reported faults, and provides access to documentation and releases. RFE – Allows customers to submit and review suggestions for product enhancements. IBMRedbooks – Provide details of product implementation on IBM systems. IBM Cúram SPM for Developers (ADE) 7.X 26 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Essential Developer Guides ▪ The following guides are essential for developers new to Cúram SPM: Cúram Server Developer’s Guide. Cúram Server Modeling Guide. Cúram Modeling Reference Guide. Cúram Web Client Reference Manual. Cúram Development Compliancy Guide. ▪ Guides are also available for specialized areas and technologies, for example: Cúram Security Guide. Cúram Web Services Guide. Cúram Workflow Reference Guide. Cúram Express Rules Reference Manual. ▪ Access the essential developer guides frequently during this course to advance your knowledge of product features. © Copyright IBM Corp. 2017 25 Notes: All Cúram SPM product guides are available in the IBM Knowledge Center in HTML and PDF format: https://www.ibm.com/support/knowledgecenter/SS8S5A IBM Cúram SPM provides a large number of guides that describe the components, features, and services provided in the application. IBM Cúram SPM for Developers (ADE) 7.X 27 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Key Takeaways ▪ IBM Cúram Social Program Management (SPM) consists of the following components: SPM Platform – Provides technical services, business services, case management features, and tools. Application Modules – Provide domain-specific features. Some modules provide fully configured solutions. ▪ Developing an IBM Cúram SPM solution involves the extension and configuration of the OOTB application. ▪ Cúram is a JEE application. Uses the three-tier client server model. Presentation tier, Application Tier, Persistence Tier. The server architecture consists of three layers. Remote Interface Layer, Business Object Layer, Data Access Layer. The developer is responsible for the content of the Business Object Layer. IBM Cúram SPM is deployed on an application server. © Copyright IBM Corp. 2017 26 Notes: IBM Cúram SPM for Developers (ADE) 7.X 28 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Exercise ▪ Access the training environment. ▪ Access Cúram SPM product documentation. © Copyright IBM Corp. 2017 27 Notes: IBM Cúram SPM for Developers (ADE) 7.X 29 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Lesson Summary ▪ This lesson was designed to enable you to: Provide an overview of the components of IBM Cúram Social Program Management: ▪ IBM Cúram Social Program Management Platform. ▪ IBM Cúram Application Modules. Outline the runtime architecture used in IBM Cúram SPM for the client and server applications. Describe the product documentation that is provided with the IBM Cúram SPM application. © Copyright IBM Corp. 2017 28 Notes: IBM Cúram SPM for Developers (ADE) 7.X 30 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Lesson 3: Introduction to the Application Development Environment (ADE) Lesson 3: Introduction to the Application Development Environment (ADE) © Copyright IBM Corp. 2017 29 IBM Cúram SPM for Developers (ADE) 7.X 31 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Lesson Objectives ▪ This lesson is designed to enable you to: Outline the model-driven development approach. Describe the elements and supporting tools in the development environment. List the client and sever features. List the outputs from code generators. Describe the project directory structure. List common build commands. © Copyright IBM Corp. 2017 30 Notes: IBM Cúram SPM for Developers (ADE) 7.X 32 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Goals of the Cúram ADE ▪ Model-based development. Application model acts as the basis for the rest of the application. ▪ Platform-specific code generation. Code generators use the model and other inputs to generate as much code as possible on both the client and server. ▪ Business logic focus. Developers can focus on the required business logic of the application and leave the plumbing to the generated code. ▪ Simplified user interface development. XML-based client development reduces the need for specific skills (JSP, Swing, and so on). ▪ Use of recognized architectural patterns. Factory, Proxy, and so on. © Copyright IBM Corp. 2017 31 Notes: The following can be considered the goals of the IBM Cúram ADE: Model-based development – The starting point for all software development in IBM Cúram is a platform-independent application model, which is developed using Unified Modeling Language (UML). Platform-specific code generation – Tools provided with the IBM Cúram framework generate much of the formulaic plumbing of the system. Business logic focus – The ADE frees up developers from some of the more tedious and error- prone aspects of client/server development. As a result, developers can spend more time on activities directly concerned with the business solution. Simplified user interface development – A considerable amount of effort can be expended producing quality user interfaces. With this in mind, IBM Cúram generates user interfaces based on simple platform-independent definitions, which increases developer productivity. Use of recognized architectural patterns – The IBM Cúram architecture makes extensive use of patterns, such as factory and proxy mechanisms. In turn, this increases application maintainability, performance, and portability. IBM Cúram SPM for Developers (ADE) 7.X 33 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview IBM Cúram SPM Development Cycle Modeling Deploy & Test Build Code © Copyright IBM Corp. 2017 32 Notes: Modeling The starting point for all development is the platform-independent application model. The model specifies entities, interfaces (facades), and other processes. Build Scripts are provided to invoke Cúram SPM code generators, which analyze the application model and generate the skeleton of the target application Code Developer implements the business logic in Java. Deploy and Test IBM Cúram SPM online applications are enterprise-scale client/server applications. Production deployment of such applications can be a complex task, involving many configuration options for deployment across multiple network nodes, database tuning, security set-up, and so on. Developers generally require a much simpler deployment configuration in which business objects can be tested as part of the development cycle. As the diagram shows, development is an iterative process. This means coding follows modeling, which might in turn trigger additional modeling. IBM Cúram SPM for Developers (ADE) 7.X 34 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview IBM Cúram Application Development Environment (ADE) ▪ Contains two main elements: Server Development Environment for Java (SDEJ). Client Development Environment for Java (CDEJ). ▪ Makes use of supported tools: Rational Software Architect (RSA) – For modeling. Eclipse – Recommended IDE. Any IDE can be used. Java – JDK and JEE. Apache Ant – For running build scripts. Apache Tomcat – Servlet container. DB2 / Oracle / H2. The complete list of tools and versions can be found in IBM Cúram Social Program Management Supported Prerequisites in the documentation. © Copyright IBM Corp. 2017 33 Notes: The IBM Cúram ADE can be broken into the following components: the Client Development Environment (CDEJ) and Server Development Environment (SDEJ). The presence of the J is to distinguish the current Java solution from pre-V2 C++ versions of Cúram. These components provide the generators that create the various classes and other artifacts used in an IBM Cúram application. However, much of the other work must be done via other IBM and third-party tools: Rational Software Architect (RSA) o Used to customize the UML Application model. o The Cúram profile defines Cúram-stereotyped elements and simplifies modeling. Apache Ant (Another Neat Tool) o Ant is a Java/XML based build tool. o Ant runs the Cúram build scripts that invoke the Cúram generators. Eclipse o Eclipse or Rational Application Developer are the recommended IDEs. However, any IDE can be used. o Provides a Java Editor and compiler, XML Editor, CSS Editor, debugging, and other tools. Tomcat o Lightweight Web Server/Container for use in the development environment. o Eclipse plug-in can start and stop Tomcat. Databases o Cúram SPM includes the lightweight H2 database for development. o DB2 or Oracle can also be used. The complete list of tools and versions can be found in IBM Cúram Social Program Management Supported Prerequisites in the product documentation. IBM Cúram SPM for Developers (ADE) 7.X 35 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Server Features UML stereotypes. To define classes, operations, attributes, and associations. Support for different processing types. Online, timer beans, deferred, event-based, workflow, and batch. Exception handling. Model and server-based validation. Information messages. Message and code table files. Database import and export. Unique ID generation. JUnit support. Tracing and logging. SQL Checker. Support for REST and Web Services. © Copyright IBM Corp. 2017 34 Notes: The Cúram SPM ADE supports a wide range of UML stereotypes that the generators recognize. For example, stereotypes for specifying entities, defining create, read, update, delete, list (CRUDL) operations for entities, aggregation, and indexes. The server development environment (SDEJ) also supports common development tasks, such as exception handling, different processing types, support for model and code-based validations. IBM Cúram SPM for Developers (ADE) 7.X 36 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Server Development Environment ▪ Developers create a UML model to represent the application. ▪ Generators produce significant portions of client/server applications. Server access beans. WEB SERVER APPLICATION SERVER EJB classes for the Remote Connectors Interface Layer. Remote Interface Entity classes for the Business Layer SQL Object Layer. JSP/Java Data Access classes for the Data Beans Business Object JMS- Access Layer. Layer Compliant DDL/SQL to build the database. messaging ▪ Developers write handcrafted Data Web Services Access code for the business process Layer Others logic in the Business Object Layer (BOL). Developers write code for the BOL. © Copyright IBM Corp. 2017 35 Notes: It is worth remembering two key facts about the ADE in general and the server development environment (SDEJ) in particular. Firstly, the model acts as the starting point for any development. Secondly, the generators produce the appropriate Java, XML, and SQL code for use in the various layers of the server architecture. In fact, the only thing it does not generate for you is your business logic code, which developers concentrate on. The generators create the following artifacts from the model: EJB classes for the Remote Interface Layer to provide transaction handling, exception handling, and security. Entity classes for the Business Object Layer Data Access classes for the Data Access Layer to request data via JDBC connector. DDL/SQL to build the database. Server access beans, which are Java classes that allow pages to access server operations. IBM Cúram SPM for Developers (ADE) 7.X 37 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Client Features User Interface Metadata (UIM). Rich schema supports a wide range of features. Can reference JavaScript and embed Java scriptlets. Application navigation. Hierarchy of navigation elements. Dynamic menus. Wizards. Sequence pages together. Online help. Widgets for common functions. Date, frequency selector, address. Custom widget development. Pod development. © Copyright IBM Corp. 2017 36 Notes: The Cúram SPM ADE allows developers to implement a wide variety of client features. The use of UIM and application navigation for developing pages offer the following advantages: Ease of development Increased developer productivity Promotes consistent user interface Significantly reduces the number of client bugs Easy to add different languages. IBM Cúram SPM for Developers (ADE) 7.X 38 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Client Development Environment ▪ Generators use the model to create Server Access Beans (Text Helper Classes). ▪ Developers create XML screen definitions using User Interface Metadata (UIM). ▪ Generators create JSPs from UIM definitions. ▪ CSS files provide the look- and-feel of pages. ▪ JavaScript and JSP scriptlets can be used to provide richer client functionality. © Copyright IBM Corp. 2017 37 Notes: As Cúram SPM development is model-driven, the first input to the generation process on the client side is the XML file that represents the server-side model and ServerAccessBeans XML files. The client generators create Server Access Bean classes, also known as Text Helper classes, that are used in the background of the application. The next stage for the generators is to create the pages that will form the visible part of the application. You’ll remember that one of the goals of the ADE is to facilitate simplified user interface development. With this in mind, client developers do not directly create JSPs, which is not a straightforward task. Instead, client developers create User Interface Metadata (UIM), which is XML that describes the content and layout of Cúram SPM client screens. The generators convert them into JSPs. Modifying the CSS files that control the appearance and layout of screens provides a simple way to customize the look and feel of the application. Optionally, some custom JavaScript code can also be developed and used to provide client-side form validations, amongst other things. IBM Cúram SPM for Developers (ADE) 7.X 39 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Client Code Generation Screen Definition Java Server (UIM) Pages (JSP) Cúram Generator Server Access Model Beans © Copyright IBM Corp. 2017 38 Notes: This diagram shows the two main inputs to the client-side generators, namely, the XML file that represents the application model and the XML files that represent the screens. The diagram also shows the two main outputs, namely, the JSPs and the Server Access Beans. IBM Cúram SPM for Developers (ADE) 7.X 40 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Projects and Directory Structure ▪ IBM provides the ADE and application source files in projects that can imported into your IDE. ▪ The standard projects are as follows: CuramCDEJ. CuramSDEJ. Client project (default name is 'Cúram'). Server project (default name is 'EJBServer'). ▪ Projects consist of the following: Configuration files, such as Bootstrap.properties and Application.prx. Source artifacts for the application such as the UML model and Java code..classpath and bat files. ▪ Curam build scripts expect to find development artifacts in specific folders within a fixed directory structure. © Copyright IBM Corp. 2017 39 Notes: Source artifacts, project configuration files, and files such as environment settings are stored in projects, which you can imported to your IDE. The client and server projects contain the bulk of these artifacts and configuration files. The client and server projects contain configuration files that define the overall options for the organization and options for specific components. For example, Bootstrap.properties defines how to connect to the database, that is, database name, machine address, port, and credentials for access. Application.prx contains application-level options and environmental settings. The Cúram Server Developer’s Guide and Cúram Web Client Reference Manual provides a list of the configuration files. The client and server projects also contain command files for setting environment variables and calling the Ant build scripts. IBM Cúram SPM for Developers (ADE) 7.X 41 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Server Project Structure ▪ The folders are as follows: build – Contains items built by the generator. For example, the generated Java classes are in build\svr\gen. buildlogs – Log files generated from each build. components – Source files reside here. eclipsebuild –.class files built in Eclipse. model – The principal RSA model file is stored here. project – Configuration and properties files for the entire. project ▪ See the Cúram Server Developer’s Guide for the structure of the folders. © Copyright IBM Corp. 2017 40 Notes: The generators expect to find the model in a specific directory. The build tool expects the supporting classes to be in their designated locations, including the generated classes and developer-implemented classes. The.classpath file is built during installation from the individual components. IBM Cúram SPM for Developers (ADE) 7.X 42 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Server Components - Handcrafted Artifacts ▪ Each project is made up of component folders that provide source artifacts for functional areas. The components folder contains at least one folder called core, which is used by all other components. ▪ Within a component folder, developers must place artifacts in specific folders so that the generators can find them, for example: codetable – Contains CTX files. data – Contains test and configuration data. message – Contains XML files. model – Contains fragments of the model. source – Java source files. tab – Contains files for navigating the application. © Copyright IBM Corp. 2017 41 Notes: Cúram SPM contains components for the SPM Platform and for Application Modules. For example, core, Datastore, Editors, Advisor, Appeals, Common Intake, and CPM. The source artifacts required by the component are stored in specific folders so that the generators can find them. In addition to the folders in the graphic, the following folders can also be defined for a component: doc events lib properties rulesets webservices workflow wsdl Note that the folder names must be in lowercase. IBM Cúram SPM for Developers (ADE) 7.X 43 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Client Project Structure ▪ Most important folders are as follows: build – Contains items built by the generator. buildlogs – Log files generated from each build. components – Contains UIM files and other source artifacts. JavaSource – Contains the ApplicationConfiguration.properties file. WebContent – Where most of the content of our web application is created, for example, the JSP files. ▪ See the Cúram Web Client Reference Manual for the structure of the folders. © Copyright IBM Corp. 2017 42 Notes: The generators and the JSP/Servlet engine on which your web application is deployed require specific directory structures. You must maintain this structure when creating projects. Some of the more relevant folders are listed on the slide. The complete list of required folders is as follows: build – Stores the intermediate files created by the Cúram Generator, for example, the ServerAccessBeans.xml file. build/texthelpers stores the Java classes created by the generators to allow us to link to server-side functionality. build/beandoc stores the HMTL that describe the interfaces to the server side. buildlogs – Contains a log file for each attempted build describing what went wrong or right during the build components – Stores the UIM and properties files, Java, images, and other artifacts. Java Source – Contains configuration files and custom Java source code to be included in the application Web Content – The content of your web application, including the JSPs, servlets, and libraries work – Used by Tomcat to store JSP files. IBM Cúram SPM for Developers (ADE) 7.X 44 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Client Components - Handcrafted Artifacts ▪ components folder has at least one sub-folder: core – Contains all of the core reference application pages. ▪ Within a component folder, developers can create their own folder structure for storing UIM pages. ▪ The following folders can be used for additional artifacts so that the generators can find them: Images – Arbitrary custom resources. WebContent – Custom resources to deploy with your application. JavaSource – Java files and property files. © Copyright IBM Corp. 2017 43 Notes: Within a component, you can use an arbitrary folder structure to allow you to organize your artifacts as you see fit. Artifacts in a component must have unique file names and the folder structure does not affect this. IBM Cúram SPM for Developers (ADE) 7.X 45 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Build Files ▪ build.bat Command file that builds your project. Wraps the build.xml files contained in the Cúram SDEJ and CDEJ. Running build.bat file calls the targets described in build.xml. Calls SetEnvironment.bat from the parent folder to set preferences and components. Extract from SetEnvironment.bat © Copyright IBM Corp. 2017 44 Notes: The main Ant targets are as follows: generated – This target generates and compiles the code based on the contents of the model. implemented – This target compiles all hand-crafted source code. server – This target runs the generated target followed by the implemented target. database – This target transforms the database-independent XML files into DDL files and places the contents of these DDL files in the database. client – This target generates a complete web client application. Build targets may contain one or more sub-targets. For example, the target generated consists of the following sub-targets: model – Extracts an XML representation from the Cúram application UML model (modelext). and generates source code from the XML representation of a Cúram application (modelgen). msggen – Generates source code and properties from the message definitions. ctgen – Generates source code from the code table definitions. compile.generated – Compiles and jars generated source code. Build.bat calls SetEnvironment.bat in the parent folder. Note that the name and location of the client and server projects are defined in this file. IBM Cúram SPM for Developers (ADE) 7.X 46 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Common Build Commands ▪ Server build targets. generated. implemented server ▪ This is a combination of generated + implemented. database ▪ Client build targets client beandoc ▪ Common clean ▪ Commands can be concatenated. build clean generated database ▪ buildhelp.bat. Command file that displays all build targets. © Copyright IBM Corp. 2017 45 Notes: build generated – Takes the modeled application and turns it into code. build implemented – Compiles the code base into JAR files ready for deployment into an ear. Not normally needed in a development environment. build database – Creates a database as defined in the model. build clean – Common to server and client. Removes all previously built items. Needed if you remove something from the model. build client - Takes the defined UIM screens and creates JSPs from them. Note that there are many other build targets and sub-targets. Run buildhelp.bat to see a full list. IBM Cúram SPM for Developers (ADE) 7.X 47 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Build Process ▪ Builds are incremental (unless clean is specified). Dependency checks determine which artifacts have changed. Items are generated for changed artifacts and dependent items. ▪ What is built? Builds invoke several Ant targets to generate output from source artifacts. It is not always clear what goes on under the hood. Fortunately, developers need to know the main steps and outputs only. ▪ Example server steps. Extract model. Generate source code and other artifacts, such as DDL. Generate output from message files, code tables, properties, events. Build jars. ▪ References. Server and client guides. See the build logs. © Copyright IBM Corp. 2017 46 Notes: During the course, you will become more familiar with the outputs that are generated for the different source artifacts. IBM Cúram SPM for Developers (ADE) 7.X 48 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview How to Deploy in a Development Environment First time run StartServer. Later start server from favourites or history. Start client from Tomcat toolbar. © Copyright IBM Corp. 2017 47 Notes: So, what's going on here when you start these things? StartServer.java starts up the (Remote Method Invocation) RMI Lookup service, the JMSLite service, and the Transient Naming (Tname) service. The Tname service acts as the Java Naming Directory Interface (JNDI), allowing server- side classes to be correctly located. RMI is a Java API that performs the object-oriented equivalent of remote procedure calls (RPCs). JMSLite is a cut-down version of Java Message Service (JMS), which is used to send messages between two or more clients. Apache Tomcat is an open-source web server and servlet container developed by the Apache Software Foundation (ASF). Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from Oracle Corporation. It also provides a "pure Java" HTTP web server environment for Java code to run. Note that Tomcat is not included with Eclipse. You must download and install the Tomcat plug-in. Note that in a production environment IBM WebSphere Application Server (WAS) or Oracle’s WebLogic Server (WLS) provides JEE services, such as a naming service and JMS. In addition, the EJB Remote Interface is used to interact with the server rather than RMI. IBM Cúram SPM for Developers (ADE) 7.X 49 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Course Workshop ▪ Standard Cúram SPM development environment. Contains thousands of artifacts for the application. Organizations will customize these artifacts and add new artifacts. ▪ For this course we need lightweight server and client projects where we can create artifacts and perform quick builds. ▪ CourseWorkshop. Client and server folders without the artifacts. The CourseWorkshop contains 3 sub-folders. SetEnvironment.bat points to the Workshop folders. ▪ Use the Workshop shortcuts during the course. © Copyright IBM Corp. 2017 48 Notes: The standard Cúram SPM ADE (referred to as 'full Cúram') includes development tools and the client and server artifacts for the Platform and Application Module components. A workshop version consisting of the development tools but not the artifacts is used during this course. The CourseWorkshop folder contains three sub-folders: ServerWorkshop - where all server development files are saved, including the model, Java source files, and resource files for exception messages. CuramClientWorkshop folder - contains all the files associated with client development. This is where you create the XML source files that describe the pages. TomcatSetup – contains batch files that allow switching from the full Cúram SPM application to the CourseWorkshop project. Standard folders and sub-folders, as described in previous slides, are created in the ServerWorkshop and ClientWorkshop folders to enable the generators to locate the artifacts. IBM Cúram SPM for Developers (ADE) 7.X 50 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Key Takeaways ▪ IBM Cúram is a model-driven development environment Developers create the model using RSA. Code generators create as much code as possible. Developers write business logic code. Client developers create XML documents for pages. The client generator creates JSP code. CSS is used to control look and feel of pages. Scripts automate the build process. Cúram projects have separate folders for client and server projects. Both project structures contain a components folder, which houses most of the handcrafted artifacts in named folders. Eclipse and Tomcat allow testing without deploying to a full application server. The Course Workshop provides a lightweight development environment for creating and building artifacts. © Copyright IBM Corp. 2017 49 Notes: IBM Cúram SPM for Developers (ADE) 7.X 51 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Exercise ▪ Access the Cúram SPM product documentation for builds. ▪ Review the folder structure. ▪ Build and run the Workshop. © Copyright IBM Corp. 2017 50 Notes: IBM Cúram SPM for Developers (ADE) 7.X 52 © Copyright IBM Corporation 2017 Unit 1: IBM Cúram SPM and ADE Overview Lesson Summary ▪ This lesson was designed to enable you to: Outline the model-driven development approach Describe the elements and supporting tools in the development environment. List the client and sever features. List the outputs from code generators. Describe the project directory structure. List common build commands. © Copyright IBM Corp. 2017 51 Notes: IBM Cúram SPM for Developers (ADE) 7.X 53 © Copyright IBM Corporation 2017 Unit 2: Implementing CRUDL Features Unit 2: Implementing CRUDL Features Unit 2: Implementing Basic CRUDL Features © Copyright IBM Corp. 2017 1 IBM Cúram SPM for Developers (ADE) 7.X 54 © Copyright IBM Corporation 2017 Unit 2: Implementing CRUDL Features Unit Contents ▪ This unit contains the following lessons: 1. Server Fundamentals Part One. 2. Client Fundamentals Part One. 3. Adding Create Pages. 4. Adding Search Pages. 5. Adding Modify Pages. © Copyright IBM Corp. 2017 2 IBM Cúram SPM for Developers (ADE) 7.X 55 © Copyright IBM Corporation 2017 Unit 2: Implementing CRUDL Features Lesson 1: Server Fundamentals Part One Lesson 1: Server Fundamentals Part One © Copyright IBM Corp. 2017 3 IBM Cúram SPM for Developers (ADE) 7.X 56 © Copyright IBM Corporation 2017 Unit 2: Implementing CRUDL Features Lesson Objectives ▪ This lesson is designed to enable you to: Describe IBM Cúram SPM class types. Describe how UML stereotypes are used in IBM Cúram SPM development. Outline the IBM Cúram-generated class hierarchy. Outline how to model and write server-side code. © Copyright IBM Corp. 2017 4 Notes: IBM Cúram SPM for Developers (ADE) 7.X 57 © Copyright IBM Corporation 2017 Unit 2: Implementing CRUDL Features Model Elements in the Server Application © Copyright IBM Corp. 2017 5 Notes: This diagram shows the IBM Cúram SPM layered architecture. The modeled artifacts are represented in the Application tier. Clients can call façade classes from pages, or web services classes from Web service clients. Some business functionality can be exposed as web services. Web services classes are also modeled in the application tier. This training does not cover web services in IBM Cúram. The entity classes reside at the lower end of the application tier. Each entity maps to a database table. In turn, entity objects interact with the database middleware to read from and write to the database tables. The process classes reside between the façade classes and the entities. These classes perform the business processing required to satisfy requests from the façade. If this processing requires database access, the façade class calls on the appropriate entity class to access the database. IBM Cúram SPM for Developers (ADE) 7.X 58 © Copyright IBM Corporation 2017 Unit 2: Implementing CRUDL Features Class Types in the Application Model ▪ Class types are specified by stereotypes. ▪ A domain is an application-specific data type. ▪ Represent a database table and access. ▪ Represents application business logic. ▪ Client-visible process. ▪ Hold data to pass between methods. ▪ Additional stereotypes will be introduced later in the course. © Copyright IBM Corp. 2017 6 Notes: The type of a class is determined by its stereotype. Classes with no stereotypes or stereotypes not recognized by the IBM Cúram SPM generator will be ignored. Domains - : Application model domains are defined in terms of a fundamental data type or another domain. They have application-specific names, such as SOCIAL_SECURITY_NUMBER or PAYMENT_AMOUNT and collectively form a tree called the domain hierarchy. Entities - : Entities have attributes that are defined as domain types, which can have primary and alternate keys and foreign key relationships. No implementation is required for Create, Read, Update, Delete (CRUD) style operations specified as stereotyped methods in UML. Other business methods can also be used whose signatures are defined in UML. Complex database operations can be specified in SQL. Processes - : Business functions are represented within the IBM Cúram SPM model as methods of process classes. Method parameters are modeled as value objects. The model defines the interface but not the implementation of process objects. This is left to the developer to provide. Façades - : These are client-visible processes. Structs - : Structs are also known as value objects. They represent the data that is passed between one business function and another, or passed from one layer to another in the application. IBM Cúram SPM for Developers (ADE) 7.X 59 © Copyright IBM Corporation 2017 Unit 2: Implementing CRUDL Features Domain Definitions ▪ Simple application-level data type definitions. ▪ Ultimately, they unwind to a fundamental data type. ▪ IBM Cúram SPM concept. ▪ All attributes must be defined in terms of domain definitions. ▪ Global scope within the model. Fundamental data types. © Copyright IBM Corp. 2017 4 Notes: Domain definitions are type definitions that resolve to either a fundamental data type, or a code table. Fourteen fundamental data types are provided, including SVR_DATE, SVR_INT32 and SVR_STRING. A domain definition can be based on one of these fundamental types, or on another domain definition. By working with domain definitions, rather than the underlying data type, Cúram developers need not worry about different representations of data in the various application layers. The use of domain definitions also allows data types to be changed wherever they are used by simply modifying the relevant domain definitions. IBM Cúram SPM also allows validations on each definition, for example, specifying maximum and minimum values, or associating custom validation functions written by the developer. These validations can be run on the client side, thus reducing the server load caused by errors and invalid values. IBM Cúram SPM for Developers (ADE) 7.X 60 © Copyright IBM Corporation 2017 Unit 2: Implementing CRUDL Features Struct ▪ Collection of attributes Never has methods. ▪ Use Used as input parameters and return types for operations of entity, process, and facade classes (All parameters must passed in structs). Used to group parameters to avoid long parameter lists. ▪ A Java class is created for each struct in the model. © Copyright IBM Corp. 2017 8 Notes: A struct class is a meta-model representation of a Java class containing a collection of fields. It is the Java equivalent of a C++ struct. Struct classes are typically used as parameters (value objects) to process or entity operations, or as return types. They can also be aggregated by other structs. For example, in the case of a bank account entity, the parameters to a read operation would consist of a key struct (input) and a details struct (output). The key struct might contain a single field for the account number. The details struct might contain several fields, including name and current balance. IBM Cúram SPM for Developers (ADE) 7.X 61 © Copyright IBM Corporati

Use Quizgecko on...
Browser
Browser