Sunday, April 19, 2015

Solve (app pattern) a Parking Garage problem

Series:
·        Solve (Design OO model) a Parking Garage problem
·        Solve (UML representation OO model) a Parking Garage problem
·        Solve (app pattern) a Parking Garage problem
·        Solve (cloud & network deployment pattern) a Parking Garage problem

The architecture n-tier pattern in terms of presentation, business, and integration tiers for web application as identified in J2EE patterns could architect the application.

The document is publicly available at http://www.corej2eepatterns.com/

 

We are going to illustrate one Use Case i.e. Customer checking if there is an Available Parking Space. Please note that Customer is going to check the availability via a web app.

 

One could develop the webapp using the J2EE patterns. One could leverage one of the available frameworks such as Struts, Spring MVC, etc.

 

Here is the sequence diagram:

Simplified version.


There are numerous variations of this requirement such as the response type depends on the request content-type. For e.g. output response could be json, xml, etc. based on application/xml, etc. A framework could help already such as Spring’s MVC with Jackson core json package. Adapter pattern handles comes to rescue here.

 

Another scenario is introducing other kind of filters such as authentication. This could be accomplished by chain of responsibilities pattern.

 

Please note that AoP could help the above two scenarios.

 

Start simple there are lot to do.

No comments:

Post a Comment