Alcatel-Lucent CDC Workshop, Coaching & Knowledge Transfer Architecture
Layered Architecture
Multi layered application Logical separation
Layered Architecture Multi tiered application Physical separation
Presentation Layer ASP.NET 3.5 with AjaxToolkit Model – View – Controller Model: System data Business logic (through the service layer) View: Displays data to the user Asks for input Controller: Client side logic Generates requests, and handles responses using the Dispatcher
Service Layer Distributable Reusable Exposes business logic to clients Using Windows Communication Foundation Other communication frameworks are possible as well
Service Layer Components Request Processor Processes all requests, calls specific handlers and returns results Request Handler Handles requests, calls actions and/or validators in the business layer and returns a response
Business Layer Business Action Perform some specific business logic Validator Validates input Calls the repositories to get / persist data Converts the full blown entities to flat Data Transfer Objects
Data Access Layer Repositories Single access point to the database Entity Framework for Object Relational Mapping Tables are mapped Difficult database interaction using mapping Stored Procedures Returns full blown entities
Entity Framework ORM from Microsoft Layer on top of ADO.NET Generated model Full blow entity model Easy extendable: Partial classes Extension methods
Technology
ASP.NET ASP.NET used for front end Ajax used for interactive web pages Only default ASP.NET controls and custom controls No 3rd party
C# All code written in C# 3.5 SP1 Project done with Visual Studio 2008
WCF Windows Communication Foundation for service communication Used HTTP binding
Core Ideas
Level Of Abstraction Enables Loosely Coupled code Communicating through interfaces or base classes makes it possible to modify behavior without changing client code. Increases testability Enables Dynamic Aspect Oriented Programming
Separation Of Concerns Each class does one thing, and only one thing A class should have only one reason to change Behavior should overlap as little as possible
Hands On!
Contact Item Solutions Plantin en Moretuslei Borgerhout Speaker Kristof Rennen