Latest PHP 3-layer structure development technology

zhaozj2021-02-17  50

PHP as a popular web development language, with its simple, powerful features

Wide application. However, at the same time, the application range of PHP languages ​​is limited to some such as BBS, community,

Simple system such as polling station. The reason for this is that PHP lacks a machine for developing large application systems

system. Write the business logic code directly in the page in the development phase, which is convenient, but the result is missing

The maintenanceability and scalability of the system becomes very poor. Often encounter such situations, when users need to work

When you make a change, you will need to modify many related PHP programs.

Of course, if there is a good design to make the situation better, through function or class will business

Logic encapsulation will make the situation change. However, the support for classes in PHP is limited, and PHP is only true.

At present, the package of the property and method is now unbounded for some other-oriented "

hold. In general, the problems in PHP development are also the problems of the C / S structure, so the C / S structure is gradually

The progressive three-layer structure or N layer structure is gradually evolved, introducing the concept of the intermediate layer.

At present, popular J2EE technology is such a 3-layer structure application development model, JSP as before

Table represents the layer, EJB as an intermediate business logic layer, the database is the information layer. By will represent layer and business logic

The isolation of the layer makes the system have good scalability, maintainable and scalability. Therefore, J2EE technology is

Development of enterprise-level applications that require multiple changes in demand and complex function. PHP also needs such a structure,

Make PHP to be applied to a wider area.

Now we can use the MiniJ2EE application server to achieve this. Minij2ee

Application Server is the only J2EE application server product that supports PHP. PHP uses MINIJ2EE-based 3

Layer development mode, you can encapsulate business logic in EJB, and use PHP to quickly customize the front interface.

Take the online store application system as an example (http://www.minij2ee.com/petstore/), EJB package

Cargo management, account management, order processing and other core business logic, and PHP is used to customize the interface of the store.

If the product is displayed, the style of the counter, etc. Since the core business logic is encapsulated in EJB, online

The front end interface of the store can be customized according to customer needs without changing the EJB program. In addition, due to

J2EE technology flexibility and scalability, even if the extension of business logic will also become Plug & Play

As convenient, just write new EJB integration into the original system.

For market huge SME software systems, it is not a huge intensive department.

System, but it is necessary to use and practical, cost-effective software. It is used to use PHP minij2ee to add efficient and stable

The Linux system and the MySQL database are a good solution to this problem.

转载请注明原文地址:https://www.9cbs.com/read-29251.html

New Post(0)