Slide 1

Slide 1 text

OBJECT ORIENTED DEVELOPMENT METHODOLOGY (VER. 3.1) For Enterprise Web Application Development 1 By Koichi NAKAGAWA Enterprise Web Application Development Course (8)

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

OO Dev. Methodology Object Oriented Development Methodology 3 Workflow Analysis Use Case Analysis Domain Analysis Application Architecture Design Application Component Design

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

Objectives This course is aimed to obtain the following skills • Basic Object Oriented Development Methodology • Typical Application Development based on the Methodology 7

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

Basics of Object Oriented Development Methodology 9 Workflow Analysis Use Case Analysis Domain Analysis Application Architecture Design Application Component Design

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

Business Analysis 12 Workflow Analysis Use Case Analysis Domain Analysis Application Architecture Design Application Component Design

Slide 13

Slide 13 text

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 <> Order <> Procure <> Ship Yes No

Slide 14

Slide 14 text

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? <> 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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

Application Design 17 Workflow Analysis Use Case Analysis Domain Analysis Application Architecture Design Application Component Design

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

Application Design • Application Component Design 22 Application Architecture Design Workflow Analysis Use Case Analysis Domain Analysis Application Component Design

Slide 23

Slide 23 text

Application Design • Application Component Design – Refining Entities and Value Objects in Domain Layer 23 <> Order - orderNumber: String - date: LocalDate - status: OrderState - id: Long - version: Long - maxItems: Integer  setOrderItems(items: List): void  getOrderItems(): List 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 <> Product - name - model - description 1 1

Slide 24

Slide 24 text

Application Design • Application Component Design – Adding Repository I/F for Aggregate Entities in Domain Layer 24 <> Order - orderNumber: String - date: LocalDate - status: OrderState - id: Long - version: Long - maxItems: Integer  setOrderItems(items: List): void  getOrderItems(): List 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

Slide 25

Slide 25 text

Application Design • Application Component Design – Adding Use Case&Query Service I/F Classes in Use Case Layer 25 <> Procure - procNumber: String - quantity: Integer - date: LocalDate - status: OrderState - id: Long - version: Long - maxItems: Integer  setProcureItems(items: List): void  getProcurelItems(): List 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

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

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  registerProcure(procure: ProcureDTO): void Presentation Layer Procure View Named CDI Class

Slide 28

Slide 28 text

Exercise 28 Workflow Analysis Use Case Analysis Domain Analysis Application Architecture Design Application Component Design

Slide 29

Slide 29 text

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