250 likes | 330 Views
c6mini Adina, R é ka, Marius 11 th of June, 2009. The Challenge. Software application used by: Human Resources department: track information about company’s offices and employees Sales department: track information about orders
E N D
c6miniAdina, Réka, Marius11th of June, 2009 Patterns Of Enterprise Application Architecture
The Challenge • Software application used by: • Human Resources department: track information about company’s offices and employees • Sales department: track information about orders • Based on a given relational schema, develop a multi-layer architecture which: • to use a given combinations of patterns • to process a given set of business rules • to result in a multi-user application with simultaneous user actions C6: Transform/Template View, Page Controller, Domain Model, Data Mapper, Unit of Work, Identity Map Patterns Of Enterprise Application Architecture
Project Overview • Main technology: Java Web • Project Setup: • Communication protocol: • Skype conferences • Face-to-face meetings • Software Analysis, Architecture & Design: • MS Visio • Development Environments &Tools: • Eclipse • ANT • Apache Tomcat • Source Control: SVN – Google Code Project Hosting Patterns Of Enterprise Application Architecture
SVN Repository Patterns Of Enterprise Application Architecture
Application Architecture Patterns Of Enterprise Application Architecture
Presentation Layer • Model – View – Controller architectural pattern: • [Page Controller]Controller: • Requests controller: Struts • the Controller receives the request from the browser, and makes the decision where to send the request • Dynamic behavior: Strutsservlet and actions • [Template View] View: • Visual Styles: CSS • Layout: SiteMeshdecorators • Presentation: JSP Patterns Of Enterprise Application Architecture
Presentation Package Patterns Of Enterprise Application Architecture
Domain Layer • [Domain Model] • incorporates both behavior and data (e.g class Employee) • Simple Domain Model: similar to database design (domain object <–> DB table) Patterns Of Enterprise Application Architecture
Business Packages Patterns Of Enterprise Application Architecture
Persistence Layer • Mapping to Relational Database • Architectural patterns: Data Mapper • Behavioral Problems: • ensure that the DB state remains consistent Unit of Work - object registration: clean/dirty flags • load each object once Identity Map Patterns Of Enterprise Application Architecture
Persistence Package Patterns Of Enterprise Application Architecture
General Business Rules • RBG 1: Adaugare angajat nou • RBG 2: Avansarea unui angajat pe un alt tip de job • RBG 3: Afisarea departamentelor cu numarul de angajati si salarul mediu • RBG 4‘: Afisarea cu verde a angajatilor cu salarul cu cel putin XX% mai mare decat salarul mediu • RBG 4‘‘: Afisarea cu rosu a angajatilor cu salarul cu cel putin YY% mai mic decat salarul mediu Patterns Of Enterprise Application Architecture
General Business Rules • RBG 1: Adaugare angajat nou Patterns Of Enterprise Application Architecture
General Business Rules • RBG 2: Avansarea unui angajat pe un alt tip de job Patterns Of Enterprise Application Architecture
General Business Rules • RBG 3: Afisarea departamentelor cu numarul de angajati si salarul mediu Patterns Of Enterprise Application Architecture
General Business Rules • RBG 4‘: Afisarea cu verde a angajatilor cu salarul cu cel putin XX% mai mare decat salarul mediu • RBG 4‘‘: Afisarea cu rosu a angajatilor cu salarul cu cel putin YY% mai mic decat salarul mediu Patterns Of Enterprise Application Architecture
Special Business Rules RBS 1: Cresterea comisionului pentru angajatii care au avut un numar de comenzi mai mare YY in ultimele ZZ zile. RBS 2: Clientii din regiunea KK primesc o reducere cu GG% a pretului de lista, pretul final nefiind insa mai mic decat cel minim acceptat. RBS 3: Angajatii cu vechime in firma mai mare de ZZ ani primesc o crestere a salarului cu KK%. Patterns Of Enterprise Application Architecture
Observed issues • Concurrency Control Mechanism needed – it could be handled by Unit of Work Patterns Of Enterprise Application Architecture
Lessons Learned • Technical: • Work with SVN - Google Code Project Hosting • Struts & SiteMesh • Unit of Work & Identity Map • Patterns Combination: • Page Controller – Template View • Domain Model - Data Mapper – Identity Map • Team work – remote Reka Patterns Of Enterprise Application Architecture
Lessons learned • Cum safaci o arhitectura in Doodle: Patterns Of Enterprise Application Architecture
To Be Continued… Patterns Of Enterprise Application Architecture