n tiering
DESCRIPTION
What is NTier ?TRANSCRIPT
![Page 1: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/1.jpg)
NTiering
A guide to N-Tier application design
![Page 2: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/2.jpg)
NTiering
A guide to N-Tier application design
Badly Drawn Bob, NTiering logo
![Page 3: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/3.jpg)
The Good Old Days
An application typically used command line Performed only one function Used by trained operators
![Page 4: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/4.jpg)
Nowadays !
Complex GUI's Multiple functions in one application Apps expect little or no user training
![Page 5: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/5.jpg)
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
![Page 6: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/6.jpg)
Advantages
Lower TOC (total cost of ownership) Less “code rot” Looser coupling
![Page 7: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/7.jpg)
What does it look like?
Typically 3 layers (or tiers)
UI ServiceData
![Page 8: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/8.jpg)
What does it look like?
Typically 3 layers (or tiers)
UI ServiceData
![Page 9: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/9.jpg)
What does it look like?
Common Mistakes !
UI ServiceData
DTO / Common Classes
![Page 10: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/10.jpg)
What does it look like?
Common Mistakes !
UI ServiceData
DTO / Common Classes
Using a common class toMove data means the UI
Layer is coupled to the data layer
![Page 11: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/11.jpg)
What does it look like?
Common Mistakes !
UI ServiceData
ValidationValidation
Validation
![Page 12: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/12.jpg)
What does it look like?
Common Mistakes !
UI ServiceData
ValidationValidation
Validation
Repeated validation is the single most common mistake in n-tier apps.
Not only does this duplicate effort, butWhat happens if the validation
changes on the data layer but not in the UI
![Page 13: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/13.jpg)
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
![Page 14: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/14.jpg)
What does NTiering look like?
3 Tier application
UI ServiceData
![Page 15: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/15.jpg)
What does NTiering look like?
3 Tier application
UINtiering.UIExample
ServiceNtierning.Service
DataNtierning.Data
![Page 16: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/16.jpg)
What does NTiering look like?
3 Tier application
UINtiering.
UIExample
ServiceNtierning.Service
DataNtierning.
DataModels
DTO's
Customer Service Order Service
![Page 17: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/17.jpg)
What does NTiering look like?
3 Tier application
UINtiering.
UIExample
ServiceNtierning.Service
DataNTierning.Data
Models
DTO's
Customer Service Order Service
Models invoke validation usingServices, allowing new UI's
To be developed
Add new services without impact to existing application
No longer tied to one databaseprovider
Change UI easily. Business logic is in the service layer
![Page 18: N Tiering](https://reader033.vdocuments.mx/reader033/viewer/2022061220/54bbf3de4a7959df088b46af/html5/thumbnails/18.jpg)
What does it cost ?
Free (as in beer!). Use it anyway you see fit. See Licence.txt Need help ? Mail me