three layer architecture why bother with the middle layer?
TRANSCRIPT
![Page 1: Three Layer Architecture Why Bother with the Middle Layer?](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649f3f5503460f94c602c8/html5/thumbnails/1.jpg)
![Page 2: Three Layer Architecture Why Bother with the Middle Layer?](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649f3f5503460f94c602c8/html5/thumbnails/2.jpg)
Three Layer Architecture
![Page 3: Three Layer Architecture Why Bother with the Middle Layer?](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649f3f5503460f94c602c8/html5/thumbnails/3.jpg)
Why Bother with the Middle Layer?
![Page 4: Three Layer Architecture Why Bother with the Middle Layer?](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649f3f5503460f94c602c8/html5/thumbnails/4.jpg)
Consider Facebook
PC
Phone
Tablet
![Page 5: Three Layer Architecture Why Bother with the Middle Layer?](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649f3f5503460f94c602c8/html5/thumbnails/5.jpg)
Without a Middle Layer…
Web browser(Add Update etc.)
Android device(Add Update etc.)
Apple device(Add Update etc.)
Presentation Layer Middle Layer Data Layer
![Page 6: Three Layer Architecture Why Bother with the Middle Layer?](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649f3f5503460f94c602c8/html5/thumbnails/6.jpg)
Include the Middle Layer…
Web browser
Android device
Apple device
Presentation Layers
Middle Layer(Add
UpdateDelete
ValidateQuery Results)
Data Layer
![Page 7: Three Layer Architecture Why Bother with the Middle Layer?](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649f3f5503460f94c602c8/html5/thumbnails/7.jpg)
Designing Classes
![Page 8: Three Layer Architecture Why Bother with the Middle Layer?](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649f3f5503460f94c602c8/html5/thumbnails/8.jpg)
The SpecificationYou are required to create a web based
application that allows a user to store address details. The user should be able to add, edit and delete addresses. Each address should be validated to capture any errors in the data. A typical address should consist of house no, house name, street, town, post code, county code, date added and a flag for active. All addresses will be stored in a suitable database.
![Page 9: Three Layer Architecture Why Bother with the Middle Layer?](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649f3f5503460f94c602c8/html5/thumbnails/9.jpg)
Identify the NounsApplicationAddressAddressesUserDataDatabase
![Page 10: Three Layer Architecture Why Bother with the Middle Layer?](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649f3f5503460f94c602c8/html5/thumbnails/10.jpg)
List the MethodsAddEditDeleteValidate
![Page 11: Three Layer Architecture Why Bother with the Middle Layer?](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649f3f5503460f94c602c8/html5/thumbnails/11.jpg)
Find the Propertieshouse nohouse namestreettownpost codecounty codedate added active
![Page 12: Three Layer Architecture Why Bother with the Middle Layer?](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649f3f5503460f94c602c8/html5/thumbnails/12.jpg)
Draw the Class
Addresshouse no : stringhouse name : stringstreet : stringtown : stringpost code : stringcounty code : integerdate added : dateactive : BooleanAdd() : BooleanEdit() : BooleanDelete() : BooleanValidate() : String
![Page 13: Three Layer Architecture Why Bother with the Middle Layer?](https://reader035.vdocuments.mx/reader035/viewer/2022062421/56649f3f5503460f94c602c8/html5/thumbnails/13.jpg)
Now we write the code…