NTiering A guide to N-Tier application design
NTiering A guide to N-Tier application design Badly Drawn Bob, NTiering logo
The Good Old Days An application typically used command line Performed only one function Used by trained operators
Nowadays ! Complex GUI's Multiple functions in one application Apps expect little or no user training
What is N-Tier? The practice of breaking an application into well defined regions. Each region has high cohesion Well defined paths into each regions
Advantages Lower TOC (total cost of ownership) Less “code rot” Looser coupling
What does it look like? Typically 3 layers (or tiers) UI Service Data
What does it look like? Typically 3 layers (or tiers) UI Service Data
What does it look like? Common Mistakes ! UI Service Data DTO / Common Classes
What does it look like? Common Mistakes ! UI Service Data DTO / Common Classes Using a common class to Move data means the UI  Layer is coupled to the data layer
What does it look like? Common Mistakes ! UI Service Data Validation Validation Validation
What does it look like? Common Mistakes ! UI Service Data Validation Validation Validation Repeated validation is the single most  common mistake in n-tier apps. Not only does this duplicate effort, but What happens if the validation  changes on the data layer but not in the UI
How does NTiering fix this? Enforces clear separation of tiers Encapsulates  validation (business rules) in the service layer Provides tools to produce “boiler plate” code
What does NTiering look like? 3 Tier application UI Service Data
What does NTiering look like? 3 Tier application UI Ntiering. UIExample Service Ntierning. Service Data Ntierning. Data
What does NTiering look like? 3 Tier application UI Ntiering. UIExample Service Ntierning. Service Data Ntierning. Data Models DTO's Customer Service Order Service
What does NTiering look like? 3 Tier application UI Ntiering. UIExample Service Ntierning. Service Data NTierning.Data Models DTO's Customer Service Order Service Models invoke validation using Services, allowing new UI's To be developed Add new services without impact  to existing application No longer tied to one database provider Change UI easily.  Business logic is in the service layer
What does it cost ? Free (as in beer!). Use it anyway you see fit. See Licence.txt Need help ? Mail me simonsmith.uk@gmail.com

N Tiering

  • 1.
    NTiering A guideto N-Tier application design
  • 2.
    NTiering A guideto N-Tier application design Badly Drawn Bob, NTiering logo
  • 3.
    The Good OldDays An application typically used command line Performed only one function Used by trained operators
  • 4.
    Nowadays ! ComplexGUI's Multiple functions in one application Apps expect little or no user training
  • 5.
    What is N-Tier?The practice of breaking an application into well defined regions. Each region has high cohesion Well defined paths into each regions
  • 6.
    Advantages Lower TOC(total cost of ownership) Less “code rot” Looser coupling
  • 7.
    What does itlook like? Typically 3 layers (or tiers) UI Service Data
  • 8.
    What does itlook like? Typically 3 layers (or tiers) UI Service Data
  • 9.
    What does itlook like? Common Mistakes ! UI Service Data DTO / Common Classes
  • 10.
    What does itlook like? Common Mistakes ! UI Service Data DTO / Common Classes Using a common class to Move data means the UI Layer is coupled to the data layer
  • 11.
    What does itlook like? Common Mistakes ! UI Service Data Validation Validation Validation
  • 12.
    What does itlook like? Common Mistakes ! UI Service Data Validation Validation Validation Repeated validation is the single most common mistake in n-tier apps. Not only does this duplicate effort, but What happens if the validation changes on the data layer but not in the UI
  • 13.
    How does NTieringfix this? Enforces clear separation of tiers Encapsulates validation (business rules) in the service layer Provides tools to produce “boiler plate” code
  • 14.
    What does NTieringlook like? 3 Tier application UI Service Data
  • 15.
    What does NTieringlook like? 3 Tier application UI Ntiering. UIExample Service Ntierning. Service Data Ntierning. Data
  • 16.
    What does NTieringlook like? 3 Tier application UI Ntiering. UIExample Service Ntierning. Service Data Ntierning. Data Models DTO's Customer Service Order Service
  • 17.
    What does NTieringlook like? 3 Tier application UI Ntiering. UIExample Service Ntierning. Service Data NTierning.Data Models DTO's Customer Service Order Service Models invoke validation using Services, allowing new UI's To be developed Add new services without impact to existing application No longer tied to one database provider Change UI easily. Business logic is in the service layer
  • 18.
    What does itcost ? Free (as in beer!). Use it anyway you see fit. See Licence.txt Need help ? Mail me simonsmith.uk@gmail.com