Implementing business logic in a 3-tier architecture

I have a web application I'm working on, and so far I have completed the level of data access. Each table has its own class, which creates row objects of this table, so each object represents a row of the table. The functions that each object has are basically CRUD operations.

The question I have is the best way to implement business logic for an application? I do this in PHP, so I can only have the file that I include that contains a lot of functions, but I want it to be better organized. The data access layer already uses the OO approach, so I would like to continue this.

+3
source share
2 answers

Do not use php for business logic.

If you are running WinTel with SQL Server DB, I would use C # or another language in the .NET framework.

If you use something like Linux / Oracle / Solaris, with Oracle / PostgreSQL / MySql DB, I would use Java, but many of the SOs would probably push Python.

You can leave with different combinations, but the two that I have listed usually make it easier. There are various methods of interacting with the database through the abstraction layer, and it will also make it easier for you to reveal the functionality of your business layer as REST or SOAP web services. You can use them in your PHP web interface.

+3
source

Java .Net n-tierd -. , Data Layer, .

+2

Source: https://habr.com/ru/post/1720371/


All Articles