Layerd arhitecture and modules

Topics: CAB & Smart Client Software Factory
Aug 28, 2005 at 3:27 AM
originally posted by: primozs

I am interested in your opinion on this subject:
Lets say we have these layers:
* Client layer, UI with CAB that uses
* Businss layer, that uses dataaccess layer for direct connection to db OR
* Web services that also usess dataaccess layer and
* Dataaccess layer that can connect with multiple databases

Ok, the question is: If we have multiple modules that need data (crm, bank...) would you make these layers for every module or not?? If not where would you keep entity classes?
If yes, would not this kind of solution get too disperse?
Primoz Susa
Aug 28, 2005 at 7:01 AM
originally posted by: geraldbauer

A curiosity question for you. Why does the client, UI, need to know the data access layer? Is there a performace or business reason? Why not have a class that the client uses to fetch data?

In this class that fetches the data, it would know how to use either the business layer or webservices; thus shielding the UI from knowing anything about how the data was accessed. Fetching the data would be centralized. If you need to change the data access layer or the webservice you have one class to go to make the necessary changes. This approach will reduce your maintenance headaches/costs.

I am not sure what you mean by entity classes. Is this your data point/transfer object?
Aug 28, 2005 at 9:45 AM
originally posted by: primozs

Hello thanks for your post.
Client actually does not see data access layer. He joust see business layer.
Business layer have reference to web services and data access layer. This is for both data access options, ether Web services or direct data access. Web services are right now just serializing what data access layer returns.
On the bottom there is this data access layer which is communicating with the database
I could throw out the business layer right now and replace it with the class since its not doing anything but calling ether web method or directly method in the data access layer.

By entity classes I mean classes like for example product, product collection… for transferring data without dataset. If I have these classes in a module for doing something with products then my web services and data access layer does not know what product and product collection is. That’s why I did this “entity project library” with some other general classes that all the layers and the client could see.
These now does not seem right with modules in mind, specially the one that access data.
Aug 28, 2005 at 10:36 AM
originally posted by: JGlynn

Your entity classes should be in the business layer. The number of modules should be independent of the design of the business layer. In other words the business layer should be designed to satisfy the business requirements, the ui and cab should be designed so the user can make the business layer do its thing.
Aug 28, 2005 at 1:26 PM
originally posted by: primozs

Hello Aha
If i understand modules are ment to make modular development of client , top layer and from business layer down its kind of independent. Hey thanks for your view.
Primoz