Latest php3 layer structure development technology _ PHP Tutorial

Source: Internet
Author: User
The latest php3 layer structure development technology. As a popular web development language, Pphp has been widely used for its simple compilation and powerful features. However, at the same time, the application scope of the php language is limited to some such as B P> php, as a popular web development language, which is easy to compile and has powerful features.
It is widely used. However, at the same time, the application scope of the php language is limited to BBS, community,
A simple system, such as a voting station. This is because php lacks a machine for developing large application systems.
. Writing business logic code directly on the page is convenient in the development stage, but the lack of results makes the entire system
The maintainability and scalability of the system become very poor. This is often the case when you need
When you can make a change, you will need to modify many related php programs.
Of course, if there is a good design that will make the situation better, you can use functions or classes
Logical encapsulation will change the situation. However, php has limited support for classes.
The encapsulation of attributes and methods is implemented, but some advanced object-oriented methods used in C ++/Java are not supported.
Hold. In general, the problems in php development are also the problems in the C/S structure.
Gradually evolved into the current three-layer structure or n-layer structure, introducing the concept of intermediate layer.
Currently, the popular J2EE technology is such a three-layer application development model.
Platform Presentation Layer. EJB is used as the intermediate business logic layer, and the database is the information layer. By applying the presentation layer and business logic
The isolation of layers enables the system to have good scalability, maintainability and scalability. Therefore, the J2EE technology is suitable
Development of enterprise-level application systems with varied requirements and complex functions. Php also needs such a structure,
So that php can be applied to a wider field.
Now, we can use the minij2ee application server for this purpose. Minij2ee
The application server is currently the only J2EE application server that supports php. Php uses minij2ee-based 3
The layer development mode can encapsulate the business logic in EJB, and use php to quickly customize the front-end interface.
Taking the online store application system as an example (http://www.minij2ee.com/petstore/), EJB encapsulation
With core business logic such as cargo management, account management, and order processing, php is used to customize the shop interface,
Such as product display mode and counter style. Because the core business logic is encapsulated in EJB
The front-end interface of the store can be customized as needed without modifying the EJB program. In addition, because
With the flexibility and scalability of J2EE technology, even the expansion of business logic will become
It is as convenient as writing new EJBs and integrating them into the original system.
For small and medium-sized enterprise software systems with huge markets, what is needed is not a huge and expensive system.
System, but the need for adequate, practical, cost-effective software. Php + minij2ee and efficient and stable
Linux system and MySQL database, is a good solution to this problem.


Http://www.bkjia.com/PHPjc/445178.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445178.htmlTechArticleP php, as a popular web development language, has been widely used with its simple writing and powerful features. However, at the same time, the application scope of the php language is limited to some applications such as B...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.