
seen from Germany
seen from Tunisia
seen from Malaysia

seen from Algeria
seen from China
seen from United States
seen from Netherlands

seen from United States
seen from Netherlands
seen from United States
seen from Malaysia

seen from United States
seen from United States
seen from United States

seen from United States

seen from United States
seen from United Kingdom
seen from China
seen from Russia
seen from United States
Layered Architecture
This post is part of The Software Architecture Chronicles, a series of posts about Software Architecture. In them, I write about what I’ve learned on Software Architecture, how I think of it, and how I use that knowledge. The contents of this post might make more sense if you read the previous posts in this series.
Layering is a common practice to separate and organise code units by their…
View On WordPress
2-Layer and 3-Layer Architecture
If the application was all about the display and simple update of relational data, then the client-server systems worked very well. The problem came with domain logic: business rules, validations, calculations, and the like. Usually, people would write these on the client, but thiswas awkard and usually done by embedding the loic directly into the UI screens. As the domain logic got more complex, this code became very difficult to work with. Futhermore, embedding logic in screens made it easy to duplicate code, which meant that simple changes resulted in hunting down similar code in many screens. An alternative was to put the domain logic in the database as stored procedures. However, stored procedures gave limited structuring mechanisms, which again led to awkward code. Also, many people liked relational databases because SQL was a standard that would allow them to change their database vendor. Despite the fact that few people actually did this, many liked having the option to change vendors without too high a porting cost. Because they are all proprietary, stored procedures removed that option. At the same time that client-server was gaining popularity, the object-oriented world was rising. The object community had an answer to the problem of domain logic: Move to a three-layer system. In this approach you have a presentation layer for your UI, a domain layer for your domain logic, and a data source. This way you could move all of that intricate domain logic out of the UI and put it into a layer where you could structure it properly with objects. [src: cut from Patterns Of Enterprise Application Book]