Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Enterprise Web App. Development (8): Object Ori...

Enterprise Web App. Development (8): Object Oriented Development Methodology (Ver. 3.1)

This is the eighth course of a series of courses for Enterprise Web Application development based on several Open Source products. As we finished all technical courses, we are going to move on to the new part, “Object Oriented Development Methodology”. After taking this course, we can obtain the minimum skills about how to analyze and design a target Enterprise Web Application. This series of course requires the basic skills of Windows 10, Rocky Linux, Eclipse IDE, Java SE (Oracle JDK or OpenJDK), Payara Server and PostgreSQL. Regarding the Payara Server, we can use another Web Application Server conforming to Jakarta EE specification. As for PostgreSQL, we might be able to use another RDBMS product instead. We can also make use of another Linux distribution instead of Rocky Linux.

Koichi NAKAGAWA

January 26, 2021
Tweet

More Decks by Koichi NAKAGAWA

Other Decks in Programming

Transcript

  1. OBJECT ORIENTED DEVELOPMENT METHODOLOGY (VER. 3.1) For Enterprise Web Application

    Development 1 By Koichi NAKAGAWA Enterprise Web Application Development Course (8)
  2. Update Information • Ver. 3: Use Rocky Linux™ instead of

    CentOS™ as a Linux platform and Payara Server 6™ certified as Jakarta EE 9.1 Platform Compatible Products. 2
  3. OO Dev. Methodology Object Oriented Development Methodology 3 Workflow Analysis

    Use Case Analysis Domain Analysis Application Architecture Design Application Component Design
  4. EWA development course curriculum Object Oriented Development Methodology JSF with

    CDI JPA + JTA with CDI JAX-RS Application Architecture Design Patterns Eclipse IDE™ Version Control Tool with Git™ Build Tool with Apache Maven™ Payara Server™ Administration Windows 10™ + Linux (Rocky Linux™) Total EWA Development Exercise Jakarta Batch Java SE (Oracle JDK™/OpenJDK™) Required Skills to take courses Test Tool with JUnit5 PostgreSQL™ Administration 4
  5. Trademarks Notice • Jakarta™ EE and its logo( ) are

    trademarks of the Eclipse Foundation. • PostgreSQL™ and its logo( ) are registered trademarks of the PostgreSQL Community Association of Canada. • Apache Derby™ and its logo ( ) are trademarks of the Apache Software Foundation. • Payara™ Server and their logo( ) are trademarks of Payara Services® LTD. • EclipseLink™, EclipseLink™ logo ( ), Eclipse IDE for Enterprise Java Developer™, the Eclipse IDE for Enterprise Java Developer ™ logo( ), Eclipse M2Eclipse™, M2Eclipse™, Eclipse GitTeam Provider™, Eclipse EGit™, EGit™, Eclipse Java development tools™, Java development tools™, Eclipse JDT™, JDT™ are trademarks of the Eclipse Foundation. • Apache Maven™, Maven™ are trademarks of the Apache Software Foundation (ASF). • Git™ and the Git™ logo( ) are either registered trademarks or trademarks of Software Freedom Conservancy, Inc., corporate home of the Git Project, in the United States and/or other countries. • Java™ is trademark of Oracle Corporation. 5
  6. Assumption for this course • The trainees who take this

    course are required the following skills in advance • PostgreSQL (Version: 13.5) – Basic Administration Operations • Payara Server (Version: 6.2021.1.Alpha1) – Basic Administration Operations • Oracle JDK/OpenJDK (Version: 11) • Eclipse IDE for Enterprise Java Developers (Version: 2021-12 (4.22.0)) • Build Tool Training Course • Version Control Tool Training Course • Test Tool Training Course • JSF with CDI Training Course • JPA + JTA with CDI Training Course • JAX-RS Training Course • JBatch Training Course 6
  7. Objectives This course is aimed to obtain the following skills

    • Basic Object Oriented Development Methodology • Typical Application Development based on the Methodology 7
  8. Object Oriented Development Methodology • Basics of Application Development Process

    • Business Analysis Workflow Analysis Use Case Analysis Domain Analysis • Application Design Application Architecture Design Application Component Design • Exercise 8
  9. Basics of Object Oriented Development Methodology 9 Workflow Analysis Use

    Case Analysis Domain Analysis Application Architecture Design Application Component Design
  10. Basics of OO Dev. Methodology • What’s Object Oriented Development

    Methodology Process 10 Workflow Analysis Use Case Analysis Domain Analysis Application Architecture Design Application Component Design Analyze Business Workflows Analyze System Functionalities Analyze System Domain Model Design Application Architecture Design Application Components Business Analysis Application Design
  11. Basics of OO Dev. Methodology • What’s Object Oriented Development

    Methodology Process 11 Workflow Analysis Use Case Analysis Domain Analysis Application Architecture Design Application Component Design Feedback Feedback Feedback Feedback Feedback Feedback
  12. Business Analysis 12 Workflow Analysis Use Case Analysis Domain Analysis

    Application Architecture Design Application Component Design
  13. Business Analysis • Workflow Analysis – Modeling the Operation Flows

    with Activity Diagrams 13 Retail Shop Fulfillment Operator Warehouse Operator Vendor Place an order Check the Order All Exist? Procure Missing Items Process the Order Order to Ship Arrange Shipment <<Use Case>> Order <<Use Case>> Procure <<Use Case>> Ship Yes No
  14. Business Analysis • Use Case Analysis – Modeling System Functionalities

    with Use Case and Activity Diagrams 14 Fulfillment Operator Fulfillment System Access Procurement Menu Check Authentication OK? <<Use Case>> Authenticate User Show Procurement Menu No Yes Select Operation Use Case: Procure Fulfillment Operator Warehouse Operator Administrator Procure Ship Arrange Shipment Admin Accounts New Order Fulfillment System OK? Order Yes No
  15. Business Analysis • Domain Analysis – Modeling target Domain with

    Class Diagrams (Domain Model) 15 RetailShop - name - tel. Order - orderNumber - date - status OrderItem - seqNumber - price - quantity - status Product - name - model - description ProcureItem - seqNumber - price - quantity - status Inventory - count 1 * 1 1 * * 1 * 1 1 Ship - count - shipping date - status 1 * Arrive - count - arrival date - status Vendor - name - tel. Procure - procNumber - date - status 1 * 1 * 1 * 1 * Warehouse - name - location 1 1 the number of items not exceed max items Address - postal Code - city - street 1 1 1 1
  16. Business Analysis • Review Models –Verifying Models with Object Diagrams

    or Venn Diagrams 16 order_A :Order Item_1 :OrderItem Item_2 :OrderItem Item_3 :OrderItem Order order_A OrderItem Item_1 Item_2 Item_3 Object Diagrams Venn Diagrams
  17. Application Design 17 Workflow Analysis Use Case Analysis Domain Analysis

    Application Architecture Design Application Component Design
  18. Application Design • Application Architecture Design – Objectives of Application

    Architecture 18 Improve Application System Quality Achieve Consistency & Flexibility of Application Designs Availability Reliability Scalability Performance Security Maintainability Application Component Structure Application Process
  19. Application Design • Application Architecture Design – Modeling Overall Application

    Architecture 19 SPA RIA Java FX App. PC/Mobile Mobile Mobile App. External System Client App. Application Server Web/Service Application External System Service App. DB Server RDB App. Integration Business Presentation / Service Interface Data Access Ext. Connection Cloud or On-Premises
  20. Application Design • Application Architecture Design – Adopting Onion Architecture

    based on DDD 20 Data Access O-R Mapper Business Infrastructure Presentation Entity/VO Entity/VO RDB Entity/VO Entity/VO Name: Vendor: ABC XYZ Update Update Results: Name ABC Vendor XYZ DTO DTO Domain Use Case (Application) Entity/VO Entity/VO Entity/VO Entity/VO
  21. Application Design Web Server (Apache 2.4.37-39) Web Server (apache) Jakarta

    EE Container (Payara Server 6.2021.1.Alpha1) Web AP Server #1 (payara) Web AP Server #2 (payara2) DB (PostgreSQL 13.3-1) DB Server (postgresql) B.S. Bean (Session CDI) B.S. Bean (Session CDI) O-R Mapper (JPA) O-R Mapper (JPA) Sticky Session JPA L1 Cache JPA L1 Cache Cache JPA L2 Cache Cache JPA L2 Cache WAS Cluster (Deployment Group: demo-deployment-group) DB Server EclipseLink EclipseLink Hazelcast Hazelcast Cache Coordination Load Balancer Note: (xxx) shows hostname of each server. 21 Jakarta EE Container (Payara Server 6.2021.1.Alpha1) • Application Architecture Design – Applying some useful framework features
  22. Application Design • Application Component Design 22 Application Architecture Design

    Workflow Analysis Use Case Analysis Domain Analysis Application Component Design
  23. Application Design • Application Component Design – Refining Entities and

    Value Objects in Domain Layer 23 <<Aggregate>> Order - orderNumber: String - date: LocalDate - status: OrderState - id: Long - version: Long - maxItems: Integer  setOrderItems(items: List<OrderItem>): void  getOrderItems(): List<OrderItem> OrderItem - seqNumber: Integer - price: Integer - quantity: Integer - status: ItemState - id: Long - version: Long 1 * order items the number of items not exceed max items Domain Layer <<Value Object>> Product - name - model - description 1 1
  24. Application Design • Application Component Design – Adding Repository I/F

    for Aggregate Entities in Domain Layer 24 <<Aggregate>> Order - orderNumber: String - date: LocalDate - status: OrderState - id: Long - version: Long - maxItems: Integer  setOrderItems(items: List<OrderItem>): void  getOrderItems(): List<OrderItem> OrderItem - seqNumber: Integer - price: Integer - quantity: Integer - status: ItemState - id: Long - version: Long 1 * order items the number of items not exceed max items OrderRepository  saveOrder(order: Order): void  delOrder(order: Order): void  getOrder(id): Order Order Repository Interface Class (Work as Repository Interface for Order Aggregate Entity which may have child Entities like OrderItem) 1 1 Domain Layer
  25. Application Design • Application Component Design – Adding Use Case&Query

    Service I/F Classes in Use Case Layer 25 <<Aggregate>> Procure - procNumber: String - quantity: Integer - date: LocalDate - status: OrderState - id: Long - version: Long - maxItems: Integer  setProcureItems(items: List<ProcureItem>): void  getProcurelItems(): List<ProcureItem> ProcureItem - seqNumber: Integer - price: Integer - status: ItemState - id: Long - version: Long 1 * procure items Domain Layer ProcureUseCase  saveProcure(procure: ProcureDTO): ProcureDTO  getProcureById(id: Long): ProcureDTO ProcureRepository  saveProcure(procure: Procure): void  deleteProcure(procure: Procure): void  getProcureById(id: Long): Procure Use Case Layer ProcureQueryService  query(cond: ProcureSearchCond): QueryResultDTO Procure Query Service Interface Class (Work as Query Interface of CQRS spread over several Aggregate Entities) Procure Transactional CDI Class
  26. Application Design • Application Component Design – Adding Repository/Query Service

    Impl. Classes in Infrastructure Layer 26 Domain Layer ProcureRepository  saveProcure(procure: Procure): void  deleteProcure(procure: Procure): void  getProcureById(id): Procure Use Case Layer ProcureQueryService  query(cond: ProcureSearchCond): ProcureDTO Infrastructure Layer ProcureQueryServiceJPA  query(cond: ProcureSearchCond): ProcureDTO ProcureRepositoryJPA  saveProcure(procure: Procure): void  deleteProcure(procure: Procure): void  getProcureById(id): Procure Procure JPA Repository Impl. Class Procure JPA Query Service Impl. Class
  27. Application Design • Application Component Design – Adding View Classes

    in Presentation Layer 27 ProcureProductUseCase  saveProcure(procure: ProcureDTO): ProcureDTO  getProcureById(id: Long): ProcureDTO Use Case Layer ProcureQueryService  query(cond: ProcureSearchCond): ProcureDTO ProcureView  showProcure(id: Long): ProcureDTO  listProcureItems(id: Long): List<ProcureItemDTO>  registerProcure(procure: ProcureDTO): void Presentation Layer Procure View Named CDI Class
  28. Exercise 28 Workflow Analysis Use Case Analysis Domain Analysis Application

    Architecture Design Application Component Design
  29. Exercise: Order Fulfillment System • Analyze and Design the Order

    Fulfillment System for Wholesale Business 29 RetailShop - name - tel. Order - odrNumber - date - status OrderItem - seqNumber - price - quantity - status Product - name - model - description ProcureItem - seqNumber - price - quantity - status Inventory - count 1 * 1 1 * * 1 * 1 1 Ship - count - shipping date - status 1 * Arrive - count - arrival date - status Vendor - name - tel. Procure - procNumber - date - status 1 * 1 * 1 * 1 * Warehouse - name - location 1 1 the number of items not exceed max items Address - postal Code - city - street 1 1 1 1