Why it is good to separate the presentation Layer from business domain logic?

Let's start the Article By example and say :If you working in ERP System and you made the web services and you are consuming these web services by React for example and also by ios and also by Android Then if you want to make Logic in the react app or Android You will repeat what you make in both for every time you consume the APIs

ex: If your Web service return employees at each department so you are in front of two things:


1-TO get all employees with relation with the department and let Your presentation layer let's say React to fetch the department employees and filter them depend on every select of option you select in presentation then most of business done  on the front-end side and then you will make that for every presentation layer for mobile apps ,web and the cost of change will be very expensive. 


2-to make all the logic from one Side that is Web-services and the presentation just preview what it fetched and cost of change will be more less and then when you want to make any change just depend on domain app which handled on APIs and the presentation will not affected (Very amazing right).


--and so the most important benefit that if you want to integrate your web-services with another Apps but if you was using the first point you will see you are loosing many things because most of business done in presentation layer then you will pay extra effort to right the business again in business logic or the business will be not ready for integration 

要查看或添加评论,请登录

Mahmoud Afifi的更多文章

  • What is the benefit of Microservices in deployment and tracking errors?

    What is the benefit of Microservices in deployment and tracking errors?

    Microservices enforced itself in the software architecture today and being main factor when designing the software in…

    1 条评论
  • When SaaS or Product?

    When SaaS or Product?

    You probably have a lot of thinking when you plan to enter the market with a software ,andone of you thinking is does i…

社区洞察

其他会员也浏览了