often I give sessions to customers on the infrastructure the company I work for developed (my team), when I get to talk on the importance of every layer and how it is crucial that the Business Logic layer should not know the GUI layer many of the customer says “sure, that’s how we do it” but when you come to see the sources , the facts are different.
a part of the problem is lack of designing, because on many occasions the same developer is responsible for the GUI as for the business logic. he builds the business logic to respond only the gui. the developer doesn’t think in terms of Services, then when the company wants to upgrade their system to talk with other systems they have to go to the drawing board and re-architect the whole application.
the Business logic is responsible for giving SERVICES to the gui layers, those services needs to be defined and enforced all the time. if a programmer gets to a point where he take into consideration the buttons the user presses on the gui when implementing the Business logic then SOMETHING IS WRONG. The Business logic must be totally separated from having to know about buttons and gui elements. when you’ll come to think about it , you could use the same code from different GUI technogies like ASP.NET , WINFORM and even web services. on many occasions I consider web services as another gui technology.
in Spl Software we’ve built the biggest .net project in Israel (around 100 men years). we’ve implemented the Business logic in such a way that the programmer doesn’t even know if the code he writes will run under a batch process / Web Service/ GUI. let’s face it the Business logic is almost all about validations.
I’m sure that many will say this fits only on large scale system, I disagree , small projects can benefit the same from this approach. anyway just look up SOA in Google and move on…..