Mind The Gap! Setting Up A Code Structure Building Bridges



Similar documents
How to Build an E-Commerce Application using J2EE. Carol McDonald Code Camp Engineer

Maven or how to automate java builds, tests and version management with open source tools

Continuous Integration Multi-Stage Builds for Quality Assurance

APAC WebLogic Suite Workshop Oracle Parcel Service Overview. Jeffrey West Application Grid Product Management

Hands on exercise for

Software project management. and. Maven

Build management & Continuous integration. with Maven & Hudson

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

Content. Development Tools 2(63)

Rapid Application Development. and Application Generation Tools. Walter Knesel

OpenShift is FanPaaStic For Java EE. By Shekhar Gulati Promo Code JUDCON.IN

Converting Java EE Applications into OSGi Applications

Operations and Monitoring with Spring

Running and Testing Java EE Applications in Embedded Mode with JupEEter Framework

Java Forum Nord Dirk Mahler

The Java EE 6 Platform. Alexis Moussine-Pouchkine GlassFish Team

OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

The Role of the Software Architect

ENGINEER - DEVELOPER ADVANCED JAVA. 28 years old - 7 years of experience

Java in Web 2.0. Alexis Roos Principal Field Technologist, CTO Office OEM SW Sales Sun Microsystems, Inc.

JBoss JEE5 with EJB3.0 on NonStop. JAVA SIG, San Jose

Understanding class paths in Java EE projects with Rational Application Developer Version 8.0

GlassFish v3. Building an ex tensible modular Java EE application server. Jerome Dochez and Ludovic Champenois Sun Microsystems, Inc.

A Model-Driven Approach for Building Customized Distributed Applications

Introduction to Sun ONE Application Server 7

Framework Adoption for Java Enterprise Application Development

A standards-based approach to application integration

Presentation of Enterprise Service Bus(ESB) and. Apache ServiceMix. Håkon Sagehaug

G-Cloud Framework. Service Definition. Oracle Fusion Middleware Design and Implementation

JBS-102: Jboss Application Server Administration. Course Length: 4 days

Service Governance and Virtualization For SOA

This presentation will provide a brief introduction to Rational Application Developer V7.5.

WebLogic Server: Installation and Configuration

FUSE-ESB4 An open-source OSGi based platform for EAI and SOA

Kohsuke Kawaguchi Sun Microsystems, Inc. hk2.dev.java.net, glassfish.dev.java.net. Session ID

Basic Concepts. Software Architecture Lecture 3. Copyright Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved.

RUP Design. Purpose of Analysis & Design. Analysis & Design Workflow. Define Candidate Architecture. Create Initial Architecture Sketch

1Z Oracle Weblogic Server 11g: System Administration I. Version: Demo. Page <<1/7>>

Take full advantage of IBM s IDEs for end- to- end mobile development

Client Overview. Engagement Situation. Key Requirements for Platform Development :

1z0-102 Q&A. DEMO Version

Java EE 6 development with Eclipse, Netbeans, IntelliJ and GlassFish. Ludovic Champenois Oracle Corporation

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

This training is targeted at System Administrators and developers wanting to understand more about administering a WebLogic instance.

Oracle im Open Source Kontext Abgrenzung GlassFish vs. JBoss und wozu noch WebLogic?

This document gives an outline of Tim Ward s work on mobile phone systems

Jenkins User Conference Herzelia, July #jenkinsconf. Testing a Large Support Matrix Using Jenkins. Amir Kibbar HP

CS 389 Software Engineering. Lecture 2 Chapter 2 Software Processes. Adapted from: Chap 1. Sommerville 9 th ed. Chap 1. Pressman 6 th ed.

Continuous Integration The Full Monty Artifactory and Gradle. Yoav Landman & Frederic Simon

Course Name: Course in JSP Course Code: P5

Sonatype CLM Enforcement Points - Continuous Integration (CI) Sonatype CLM Enforcement Points - Continuous Integration (CI)

Learning GlassFish for Tomcat Users

Software Engineering Reference Framework

Reusing Existing * Java EE Applications from Oracle SOA Suite

Learn Oracle WebLogic Server 12c Administration For Middleware Administrators

Building Modern Business Applications with Oracle Cloud s Platform Services

CI/CD Cheatsheet. Lars Fabian Tuchel Date: 18.March 2014 DOC:

<Insert Picture Here> Java EE 7. Linda DeMichiel Java EE Platform Lead

Introduction to the Analysis and Management Framework

Amit Sheth & Ajith Ranabahu, Presented by Mohammad Hossein Danesh

Oracle WebLogic Server 11g Administration

What Is the Java TM 2 Platform, Enterprise Edition?

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

Object-Oriented Systems Analysis and Design

An introduction to creating JSF applications in Rational Application Developer Version 8.0

Software Development In the Cloud Cloud management and ALM

Case Study: Using Jenkins to Build WebSphere Portal Applications for the Enterprise. #jenkinsconf. Jenkins User Conference Boston #jenkinsconf

Developing modular Java applications

Accelerated Java EE Open Source Development with Eclipse CON1905

Developing ASP.NET MVC 4 Web Applications

Unit 2 Research Project. Eddie S. Jackson. Kaplan University. IT530: Computer Networks. Dr. Thomas Watts, PhD, CISSP

Understanding The Brocade SDN Controller Architecture

JSR-303 Bean Validation

Automatic vs. Manual Code Analysis

WEB SERVICES. Revised 9/29/2015

Developing ASP.NET MVC 4 Web Applications MOC 20486

PERFORMANCE COMPARISON OF COMMON OBJECT REQUEST BROKER ARCHITECTURE(CORBA) VS JAVA MESSAGING SERVICE(JMS) BY TEAM SCALABLE

MVC pattern in java web programming

Rapid Server Side Java Development Using Spring Roo. Christian Tzolov Technical Lead, TTSD, TomTom BV 12/05/2010

Framework as a master tool in modern web development

Maven 2 in the real world

API Architecture. for the Data Interoperability at OSU initiative

API Management Introduction and Principles

Oracle EXAM - 1Z Oracle Weblogic Server 11g: System Administration I. Buy Full Product.

Practicing Continuous Delivery using Hudson. Winston Prakash Oracle Corporation

Building Reliable, Scalable AR System Solutions. High-Availability. White Paper

Acknowledgments. p. 55

<Insert Picture Here> GlassFish v3 - A Taste of a Next Generation Application Server

WebSphere Training Outline

Chapter 1 - Web Server Management and Cluster Topology

Smart Shopping- An Android Based Shopping Application

WebSphere Server Administration Course

Oracle EXAM - 1Z Java EE 6 Web Services Developer Certified Expert Exam. Buy Full Product.

E-vote 2011 Version: 1.0 Testing and Approval Date: 26/10/2009. E-vote SSA-U Appendix 5 Testing and Approval Project: E-vote 2011

Magento at the Core of ecommerce. The Magento Experience. Magento Enables Success. The ecommerce Ecosystem. Supplemental Pages

Middleware- Driven Mobile Applications

White Paper: Why Upgrade from WebSphere Application Server (WAS) v7 to v8.x?

IBM WebSphere Process Server V7.0 Deployment Exam.

Project SailFin: Building and Hosting Your Own Communication Server.

Transcription:

Mind The Gap! Setting Up A Code Structure Building Bridges

Representation Of Architectural Concepts In Code Structures

Why do we need architecture? Complex business problems too many details to keep overview Making big problems smaller Separation of higher level aspects and their relations Create abstract views with less details Adds new complexity

Why do we need architecture? Functional view Components Layers Cross-cutting concerns Dependencies Non-Functional view Scalability Robustness Security

Architect s view

Developer s view

Different roles same objects, different views Architect Developer Representation Diagram Code (Text) Scope Broad Narrow Detail level Low (abstract) High (concrete) Reality Blue pill Red pill The Gap Diagram vs. Code Architect vs. Developer

Representation of architecture in code structures Language elements with additional roles Package Layer Class Service But: abstractions are not visible in code How does the developer know about it? Does even the architect know about it?

Representation Of Architectural Concepts In Code Structures

Example Yet Another Web Shop High level functional requirements User management Product catalog Shopping cart Order-/payment Shipping High level non-functional requirements Maintainable Scalable Robust

Technology Java EE Container Shop shop.war Deployable (Artifact)

Deployment vs. Non-Functional Requirements Scalability Availability Maintainability Artifacts Maven

Deployable artifact per component shop/ pom.xml user/ pom.xml catalog/ pom.xml cart/ pom.xml order/ pom.xml shipping/ pom.xml <groupid>com.acme.shop</groupid> <artifactid>parent</artifactid> <packaging>pom</packaging> <version>1.0.0-snapshot</version> <parent> <groupid>com.acme.shop</groupid> <artifactid>parent</artifactid> <version>1.0.0-snapshot</version> </parent> <artifactid>user</artifactid> <packaging>war</packaging>

Layering a component Root package = com.acme.shop.user groupid + artifactid REST API Web UI com.acme.shop.user.rest com.acme.shop.user.web com.acme.shop.user.services.api com.acme.shop.user.services.impl com.acme.shop.persistence.dao com.acme.shop.persistence.model Services Persistence DAO Model Dependencies cannot be validated?!

Class roles in layers com.acme.shop.user.rest JAX-RS resources com.acme.shop.user.web Models, views, controllers Validators, converters com.acme.shop.user.services EJB com.acme.shop.persistence.dao DAOs com.acme.shop.persistence.model JPA entities Rules developers should know about Concepts architects should beaware about

External dependencies of a component JAX-RS REST API Web UI JSF EJB JMS Services CDI JPA DAO Persistence Model

External dependencies <parent> <groupid>com.acme.shop</groupid> <artifactid>user</artifactid> <version>1.0.0-snapshot</version> </parent> <packaging>war</packaging> Valid for all components <dependencies> <dependency> <groupid>javax.faces</groupid> <artifactid>faces-api</artifact> <version>2.2</version> <scope>provided</scope> </dependency> </dependencies> Provided by container

Dependency Management <groupid>com.acme.shop</groupid> <artifactid>parent</artifactid> <version>1.0.0-snapshot</version> <packaging>pom</packaging> <dependencymanagement> <dependencies> <dependency> <groupid>javax.faces</groupid> <artifactid>faces-api</artifact> <version>2.2</version> <scope>provided</scope> </dependency> </dependencies> </dependencymanagement>

Using managed dependencies <parent> <groupid>com.acme.shop</groupid> <artifactid>user</artifactid> <version>1.0.0-snapshot</version> </parent> <packaging>war</packaging> <dependencies> <dependency> <groupid>javax.faces</groupid> <artifactid>faces-api</artifact> </dependency> </dependencies>

Dependencies between components cart catalog user order Synchronuous - REST Asynchronuous - JMS shipping

Dependencies between components Communication via remote protocols REST over HTTP JMS Compile time dependencies not explicitly required but convenient! Re-use code Shared artifacts, i.e. libraries APIs, domain models

Splitting up a component shop/ pom.xml user/ pom.xml api/ app/ Visibilities pom.xml pom.xml api public app private <parent> <groupid>com.acme.shop</groupid> <artifactid>shop</artifactid> <version>1.0.0-snapshot</version> </parent> <artifactid>user</artifactid> <packaging>pom</packaging> <parent> <groupid>com.acme.shop</groupid> <artifactid>user</artifactid> <version>1.0.0-snapshot</version> </parent> <artifactid>user.api</artifactid> <parent> <groupid>com.acme.shop</groupid> <artifactid>user</artifactid> <version>1.0.0-snapshot</version> </parent> <artifactid>user.app</artifactid> <packaging>war</packaging>

Splitting up a component <parent> <groupid>com.acme.shop</groupid> <artifactid>user</artifactid> <version>1.0.0-snapshot</version> </parent> <artifactid>user.app</artifactid> <packaging>war</packaging> <dependency> <groupid>com.acme.shop</groupid> </artifactid>user.api</artifactid> </dependency> compile scope

Use API of another component <parent> <groupid>com.acme.shop</groupid> <artifactid>cart</artifactid> <version>1.0.0-snapshot</version> </parent> <artifactid>cart.app</artifactid> <packaging>war</packaging> <dependency> <groupid>com.acme.shop</groupid> </artifactid>user.api</artifactid> </dependency> compile scope

Deployment of libraries user.app.war cart.app.war cart.api.jar user.api.jar user.api.jar Option: API versioning Cart 2.1.0 Application User 1.0 API Requires further component separation

Common functionality common-core-shared-util-helper Big balls of mud Cover mostly technical aspects layers shop/ common/ user/ pom.xml rest/ web/ pom.xml pom.xml services/ pom.xml persistence/ pom.xml <parent> <groupid>com.acme.shop</groupid> <artifactid>common</artifactid> <version>1.0.0-snapshot</version> </parent> <artifactid>common.web</artifactid> <dependencies> <dependency> <groupid>javax.faces</groupid> <artifactid>faces-api</artifactid> </dependency> </dependencies>

Component configuration Artifacts that need to bedelivered with deployables Property-, XML, YAML-files, etc... Migration scripts user/ pom.xml api/ pom.xml app/ pom.xml config/ pom.xml Deliverable artifacts (JAR, ZIP)

Test code Part of architecture shop/ test *ST.java Components user/test *CT.java Mockito Component stubs user/app *Test.java Mockito System Component Unit

Component stubs Component tests require API and implementation of own component APIs of other components Stubs for other components Stubs can be provided per owning component user/test src/main/java com.acme.shop.user.test.usermanagementstub.java Test module may depend on other test modules

Structural overview shop/ common rest web services persistence test user api app config test Libraries Components with similar structures public vs. private artifacts

Structural overview (continued) cart api com.acme.shop.api app com.acme.shop.rest com.acme.shop.ui com.acme.shop.services com.acme.shop.persistence config test test Layering in component with defined content & dependencies Component test System test

Some Observations It s an evolution Neither architecture nor code structures are static Deployment is the starting point Separate following requirements Architecture is not only about packages Build system defines core dependencies Different roles different views Architect vs. Developer vs. Build-/Integrationmanager

Representation Of Architectural Concepts In Code Structures

The Gap Architecture Different Roles Different Views Different Interests Development Code Build-/Integration -management Test

Spread The Knowledge Mr. Project Lead: Tear down these walls! Cross-functional teams Architect!= Architect Project vs. Enterprise Work together Pair Programming Reviews Establish rules Who is allowed to change POM files?

Spread The Knowledge Documentation Word Documents UML Diagrams Wiki... Keep documentation as close as possible to code! Store in version control system Generate from code

Challenges Structures and rules are dynamic Documentation is always out-of-date Teams change Difficult to avoid gaps in the long term

Spread The Knowledge! Static code analysis Define structural rules Break build on violations Provide reasonable feedback to developers Which Tool? SonarGraph Degraph jqassistant

jqassistant Open Source http://jqassistant.org Based on Neo4j Scan software structures during the build Packages, Classes, Fields, Methods Maven artifacts and dependencies Analyze Apply concepts Package com.acme.shop.cart = Component Cart Verify constraints Report Component Cart can only depend on components User, Catalog and Order

buschmais.de facebook.com/buschmais twitter.com/buschmais