Software Architecture

JSP is the PHP of Java

Embrace separation of concerns

Separation of concerns

  • Java/Groovy on the server

  • JavaScript, HTML, CSS in the browser

  • Limit scope of changes

  • Maintain optimal testability

Browser/Client

Architecture

View

  • Markup/HTML, CSS, minimal JS

  • Presentation/display

  • No business logic

Browser

Model

  • JavaScript

  • DAOs to communicate w/ server

  • Maintain data used to feed view

Browser

Controller

  • JavaScript

  • Respond to user input & update model

  • Feed model data to view

Browser

Libraries & Frameworks

Smaller is better

Browser

AngularJS

...is a dead end

Browser

Ember.js

Browser

Polymer

Small and focused

Browser

Simple, fast*, elegant, & powerful

Browser

Server

Architecture

API

  • Handle requests from client

  • Stateless

  • Thin

  • REST*

  • Representation POJOs

Server

DAO

  • Communicate w/ DB

  • Stateless

  • SQL, HQL, etc

  • Includes POJO reps of DB/model

Server

Doman Logic

  • Between DAO and API

  • Injectable services

  • Limited state

  • Application-specific behaviors

Server

Model (DB)

  • Relational

  • NoSQL / Key-Value store

Server

Making life easier

Choosing languages, libraries, and frameworks

Server

Java 8

  • Lambda calculus

    • functions

  • Default methods

  • Method references

  • Streams

  • Improved Date/time

  • No more PermGen

Server

Groovy

  • Extends Collections

  • Intuitive closure support

  • Eliminates boilerplate

  • Default param values

  • Includes the kitchen sink

Server

A window to a new world

  • Simpler and more readable code

  • "..." unit tests

  • "..." E2E tests

  • "..." build scripts

Groovy

Spring Boot

Server

Comprehensive

  • IOC/DI

  • REST

  • Apache

  • JPA

  • Build integration

Spring Boot

And best of all...

NO MORE XML!!!

Spring Boot

Software Architecture

By Ray Nicholus

Software Architecture

  • 1,835