locked
Solution Architecture Layering RRS feed

  • Question

  • I'm now a developer in a team working on a new system being built and I have questions regarding the proposed architecture. Some of the proposed ideas seem counter intuitive to the technologies that are out there. So here goes.

    My understanding of a typical web based system using dependency injection goes like this. DataInterface, DataLogic, BusinessInterface, BusinessLogic, DomainModels (Persistence Model), ViewModels and for argument sake a MVC web project. Configure UnityDI in your MVC project to say what interfaces and their implementations are being used. In this instance all your DLLs are part of the entire web solution and run in a single web server. 

    Another alternative is to use WCF and configure DI for your business and data layers. Then have an MVC project that has a service reference to your WCF. I'm purposefully mentioning WCF (SOAP) as opposed to REST services. When creating a service reference to a WCF this must presumably defeat the purpose of having loosely coupled code? Anyway, in principle I don't mind this idea as it separates the processing load of the web project from the business logic, assuming the WCF is hosted somewhere else.

    The possible proposed idea is to have separate WCF services for your datalayer and a separate WCF for your business layer. Your MVC project will call the WCF business logic and your WCF business logic will call the WCF Datalayer. I'm asking why the hell would anyone do this? To me there is no genuine benefit for this and in fact adds unwarranted complexity. In addition to this the plan is to use Entity Framework (which I like) but the sql data structure is to be separated over dozens of databases. For example Customer tables in one database and bookings in another etc etc In principle it seems like a nice idea to spread load over numerous databases but then ORM becomes awkward to work with as there are no linkages between models and referential integrity is imaginary.

    If I'm being daft I'd like to know, maybe my understanding of the technology is floored? But I think I have genuine concerns and would like opinions.


    • Edited by Voodovo Wednesday, January 11, 2017 11:12 PM
    Wednesday, January 11, 2017 11:09 PM

Answers

  • There is quite a few discussion points there so I'll give my opinion on a couple of them. I don't think you're concerned with WCF per se, so I think you're wondering why you might have the physical separation of the tiers? A couple of reasons for doing this; 1) Security, in some situations the database is the systems crown jewels. Having a physical separation allows for more security gateways, break into the web server it will be harder to access the next tier. 2) Security/Reuse - Your web layer is one presentation channel to your services, by separating out the tiers you can more easily re-use those layers for different channels, e.g. mobile, business-to-business, etc. Now having said all that it's pretty rare you need to do all of that and often it's just someone reading a text-book on how to architect a system rather than looking at the actual problem. So yes, it could be and over-engineered solution.

    My second point is SQL Server. You mention that performance could be an advantage. That could be true, or not if it will require cross server joins. However, it could be that the solution is calling for a Service Orientated Architecture where isolating the data by systems is a clear advantage, you cannot and should not join across the servers. That would also include any ORM requests.

    Third point, is why are you using Entity Manager (EM)? If it's just for ORM then there are smaller-footprint solutions. EM is great for managing identity of objects but I've rarely seen that as an advantage for a stateless solution (web).


    http://pauliom.com

    Sunday, January 22, 2017 9:23 AM
  • The technologies from Microsoft, as u know that there are some many technologies , you need to understand the cost of software project development.  In simple terms , you need to understand the software requirements in use cases in object oriented design. When the software requirements comes you need to understand , how to use the technologies from Microsoft, to develop customized software development. You also need to understand the cost associated with the software from starting up to final testing of the software project. 

    You please contact Microsoft , before you contact Microsoft , please make sure the software requirements in fixed.

    Friday, February 3, 2017 4:19 AM

All replies

  • There is quite a few discussion points there so I'll give my opinion on a couple of them. I don't think you're concerned with WCF per se, so I think you're wondering why you might have the physical separation of the tiers? A couple of reasons for doing this; 1) Security, in some situations the database is the systems crown jewels. Having a physical separation allows for more security gateways, break into the web server it will be harder to access the next tier. 2) Security/Reuse - Your web layer is one presentation channel to your services, by separating out the tiers you can more easily re-use those layers for different channels, e.g. mobile, business-to-business, etc. Now having said all that it's pretty rare you need to do all of that and often it's just someone reading a text-book on how to architect a system rather than looking at the actual problem. So yes, it could be and over-engineered solution.

    My second point is SQL Server. You mention that performance could be an advantage. That could be true, or not if it will require cross server joins. However, it could be that the solution is calling for a Service Orientated Architecture where isolating the data by systems is a clear advantage, you cannot and should not join across the servers. That would also include any ORM requests.

    Third point, is why are you using Entity Manager (EM)? If it's just for ORM then there are smaller-footprint solutions. EM is great for managing identity of objects but I've rarely seen that as an advantage for a stateless solution (web).


    http://pauliom.com

    Sunday, January 22, 2017 9:23 AM
  • The technologies from Microsoft, as u know that there are some many technologies , you need to understand the cost of software project development.  In simple terms , you need to understand the software requirements in use cases in object oriented design. When the software requirements comes you need to understand , how to use the technologies from Microsoft, to develop customized software development. You also need to understand the cost associated with the software from starting up to final testing of the software project. 

    You please contact Microsoft , before you contact Microsoft , please make sure the software requirements in fixed.

    Friday, February 3, 2017 4:19 AM