Adaptive Architecture


Published on

A presentation outlining my current thoughts on the ideal software architecture to streamline time to market, maximize stability, and make resilient to future changes.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Adaptive Architecture

  1. 1. ADAPTIVE ARCHITECTURE FOR DOT NET Preparing the Way Forward
  2. 2. Architecture Goals <ul><li>Streamlined development for faster time to market </li></ul><ul><li>Facilitate adherence to standards and Best Practices </li></ul><ul><li>Improved consistency to simplify maintenance </li></ul><ul><li>Enhanced stability </li></ul>
  3. 3. Architecture Stack Architecture Component Designed Component Generated Component SQLClient Table Interfaces User Process Interfaces SQL Server Oracle ODP OracleClient Enterprise Library Floating Ships Data Security Caching Exception Business Entities Data Proxy Methods Presentation Controller Web Client Windows Client Mobile Client
  4. 4. <ul><li>Define all possible relationships </li></ul><ul><li>Consistent Naming Conventions to Support Standards </li></ul><ul><ul><li><TableName>ID </li></ul></ul><ul><ul><li><TableName>Name </li></ul></ul><ul><li>Upfront design work in the database saves time </li></ul>SQL Server Oracle
  5. 5. Database (contd) <ul><li>Consistency </li></ul><ul><li>Predictability </li></ul><ul><li>Standards </li></ul><ul><li>Repeatability </li></ul><ul><li>Stability </li></ul><ul><li>Primary Keys should be structured as Identity columns </li></ul><ul><li>Foreign key columns should match the name of the corresponding primary key </li></ul><ul><li>“ Name” columns facilitate decoding foreign keys </li></ul><ul><li>Standardizing column data types simplify mapping back to DotNet data types </li></ul>
  6. 6. Database DataTypes <ul><li>bit </li></ul><ul><li>CHAR </li></ul><ul><li>datetime </li></ul><ul><li>int </li></ul><ul><li>ntext </li></ul><ul><li>NUMBER </li></ul><ul><li>numeric </li></ul><ul><li>nvarchar </li></ul><ul><li>text </li></ul><ul><li>uniqueidentifier </li></ul><ul><li>varchar </li></ul><ul><li>System.Boolean </li></ul><ul><li>System.String </li></ul><ul><li>System.DateTime </li></ul><ul><li>System.Int32 </li></ul><ul><li>System.String </li></ul><ul><li>System.Double </li></ul><ul><li>System.Double </li></ul><ul><li>System.String </li></ul><ul><li>System.String </li></ul><ul><li>System.Guid </li></ul><ul><li>System.String </li></ul><ul><li>Database </li></ul><ul><li>DotNet </li></ul>
  7. 7. <ul><li>Built on best practices in the Enterprise Library </li></ul><ul><li>Incorporates the FloatigShip library to encompass a customization / adaption layer. </li></ul><ul><li>Floating Ship library provides protection from future changes to the Enterprise Library. Only this library needs to adapt to future version of the Enterprise Library not every application written </li></ul>ODP OracleClient Enterprise Library Floating Ships Data Security Caching Exception
  8. 8. <ul><li>Table Interfaces require a read/write property for every column in the base table </li></ul><ul><li>Table Interfaces implemented by the corresponding Business Entity object </li></ul><ul><li>User Process Interfaces derived from Table Interfaces </li></ul><ul><li>User Process Interfaces define the methods and events needed to orchestrate the user interaction </li></ul><ul><li>Separation By Interfaces Improves Stability </li></ul>Table Interfaces User Process Interfaces
  9. 9. <ul><li>Data Proxy methods are static methods that handle all interaction with the underlying database. These methods are not called directly through client code </li></ul><ul><li>Business Entities are smart objects that know how to initialize themselves, persist changed data back to the database, access related objects, and instantiate collections of themselves filtering by defined foreign keys. </li></ul>Business Entities Data Proxy Methods
  10. 10. Business Entities (contd) <ul><li>Business Entity objects form a central repository for encapsulating validation logic </li></ul><ul><li>Business Entity objects form a central repository for encapsulating type conversion logic </li></ul><ul><li>Business Entity objects shield application code from changes to the underlying data store </li></ul><ul><li>Business Logic implemented in classes derived from the Business Entities </li></ul><ul><li>Business Entities add Structure to a Chaotic World </li></ul>
  11. 11. <ul><li>Each UI component should implement both the Table Interface and the User Process interface </li></ul><ul><li>Each UI component can leverage the rest of the architecture stack </li></ul><ul><li>Presentation Controller should isolate the workflow from the UI layer </li></ul><ul><li>Presentation Controller should encapsulate the business logic </li></ul>Presentation Controller Web Client Windows Client Mobile Client
  12. 12. Model View Presenter (MVP) <ul><li>The Model is the Business Entity object </li></ul><ul><li>The View is the UI element such as UserControl, ServerControl, etc. </li></ul><ul><li>The View is responsible for displaying the Model’s data to the user </li></ul><ul><li>The Presenter is responsible for manipulating the Model based on user events raised by the View </li></ul><ul><li>The Presenter implements the business logic </li></ul><ul><li>Separation of Responsibilities Limits Scope of Change </li></ul>