Patterns of Enterprise Application Architecture – notes

Basic

  • Gateway – represent access to some system or resource
  • Registry
  • Value object

Domain logic

  • Transaction script – simple function between request arrived and data persisted
  • Domain model – contains both: behaviour and data
  • Service layer – wraps model with secondary operations like security, logging, etc

Datasource

  • Table Data gateway – one instance per table – for all rows
  • Row Data gateway – one instance per row
  • ActiveRecord – one per row or view, contains domain logic too
  • Data Mapper – maps between business objects and stored rows

Object relation behaviour

  • Unit of work – contains set of object affect by common operation or transaction to persist them correctly
  • Identity map – keeps any object loaded from database only once
  • Lazy load – loads a data when is really required/used

Structural

  • Identity field – uniq identifier of a row
  • Foreign key mapping
  • Association table mapping
  • Embedded value
  • Inheritance models – single table (all classes within the same table), class table (each has own table), concrete table (only concrete classes have own tables)
  • Query object
  • Repository

WEB representational

  • MVC
  • Page controller
  • Front controller
  • Template view
  • Transform view
  • Application controller – dedicated object that manages flow of application usage
  • Distribution patterns
  • Remote facade
  • Data Transfer Object

Concurrent access

  • Optimistic lock – versioning and conflicts handling
  • Pessimistic lock – prevents conflicts
  • Coarse-grained lock
  • Implicit lock

Session – client/server/database

Advertisements

Enterprise Integration Patterns extract

Basic:

  • Message
  • Message channel
  • Pipes and filters
  • Message routers
  • Message translator
  • Message Endpoint

Channels

  • Point-To-Point
  • Publish-Subscribe
  • Datatype channel – for particular type of message
  • Invalid message channel – used if a receiver cant proceed the message obtained
  • Dead letter channel – if a message could not be delivered
  • Guaranteed delivery – persist message on both ends of channel
  • Channel adapter – message endpoint
  • Message bridge – connection between different messaging systems
  • Message bus – message queue

Construction

  • Command message – command to execute, invoke a procedure
  • Document message – message with data
  • Event message – message with changed state
  • Request-Replay – two message through two different channels
  • Return Address – message contains a channel for replay
  • Correlation identifier – ID obtained at response message to match the request method sent
  • Message sequence – sequence identifier, position identifier, size or end indicator
  • Message expiration
  • Format indicator

Routing

  • Content based router
  • Message filter
  • Dynamic router
  • Splitter+Aggregator
  • Resequencer – reorder a sequence of messages
  • Scatter-Gather
  • Message broker – contain a logic of message flow

Transformation

  • Envelop
  • Content enricher / filter
  • Normalizer – cast all message to common format

Endpoints

  • Gateway – connects application and messaging system
  • Mapper – maps messages and business objects
  • Poling consumer
  • Competing consumers – a few consumers are listening the same channel, but only one will obtain each message

System management

  • Control Bus – channel that delivers command/controlling messages to all parties to manage their work
  • Detour
  • Wire tape – T-component, to log messages out
  • Message history – message is appended by information of each component passed
  • Message Store – all messages are stored at some database
  • Test message
  • Channel purger

Sale’s notes for softskills

  • Be enthusiastic, act enthusiastic
  • Make records and statistics
  • Train public speaking
  • Plan your activity ahead
  • Find what someone wants and give it to him
  • Help someone to recognize what he wants, and then give it to him
  • There are always two reasons to do something – exposed one and real one
  • Ask “why” question deeper and deeper
  • Tell the truth
  • Keep learning
  • Be respectful regarding your competitors
  • Look good
  • Be a good listener
  • Express your thoughts short
  • Do an appointment
  • Do  not afraid to fail