CN109446454A - A kind of high performance PHPWeb system framework of lightweight and working method - Google Patents
A kind of high performance PHPWeb system framework of lightweight and working method Download PDFInfo
- Publication number
- CN109446454A CN109446454A CN201811018895.6A CN201811018895A CN109446454A CN 109446454 A CN109446454 A CN 109446454A CN 201811018895 A CN201811018895 A CN 201811018895A CN 109446454 A CN109446454 A CN 109446454A
- Authority
- CN
- China
- Prior art keywords
- class
- configuration file
- file
- frame
- controller
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The present invention relates to web framework technology fields, more particularly to a kind of high performance PHPWeb system framework of lightweight, class is generated including application program, route class, frame base class, building project core configuration file, MVC module, MVC module includes model, view, controller, also disclose a kind of working method of frame, including loading common inlet file, create WEB instance objects, initialization WEB application simultaneously executes application, project precompile is simultaneously loaded into, it checks and loads plug-in unit, URL analysis and scheduling, obtain currently performed controller and movement, load controller configuration file, language inspection simultaneously reads corresponding language file, pattern checking simultaneously defines relevant model variable, generate view file.Present invention adds MVC modules, realize the architecture mode of the multilayer separation of PHP technology, use the architecture mode of " kernel+extension " to carry out the exploitation of PHP Web project, compensate for blank of the PHP development technique in this mode.
Description
Technical field
The present invention relates to web framework technology fields, and in particular to a kind of high performance PHPWeb system framework of lightweight and
Working method.
Background technique
In Web field of software development, unquestionably, Web framework technology has been obtained the development advanced by leaps and bounds and popularizes,
In the past few years, framework technology generally experienced bigger process of improving, and can greatly be attributed to
RubyonRails, and the MVC frame thought betrayed in other programming languages.
The framework of kernel+extension function " is that countless Linux releases is laid a good foundation, and makes Linux suitable
It freely operates in various hardware environment, this is inconceivable in conventional architectures software.So even being that Windows 7 is also suitable
Development trend is answered, using similar framework.
In Web application development framework, the world Java has already popularized the architecture mode of multilayer separation.Drawn with quick exploitation
The Ruby on Rails frame of neck Web world revolution is also merged in the third edition and Merb, is also " kernel+expansion after merging
The architecture mode of exhibition ".
Summary of the invention
It is an object of the invention to overcome problems of the prior art, a kind of high performance PHPWeb of lightweight is provided
System framework and working method, it may be implemented to provide a kind of architecture mode of the multilayer separation of PHP technology, use " kernel+expansion
The architecture mode of exhibition " carries out the exploitation of PHP Web project, to make up blank of the PHP development technique in this mode, also
The working method of this frame is provided, quickly and easily can develop and dispose WEB application by the method.
To realize above-mentioned technical purpose and the technique effect, the present invention is achieved by the following technical solutions:
A kind of high performance PHPWeb system framework of lightweight, comprising:
Application program generates class, and the application program generates class for completing loading frame startup file, instantiation website
Application example, application initialization and follow-up work;
Class is routed, the routing class is for completing routing rewriting, starting routing resolution;
Frame base class, the frame base class are located in frame system core catalogue class comprising required for frame operation
Core class libraries and common tool class for website and project development, and the frame base class is able to carry out extension;
Building project core configuration file, the building project core configuration file include frame core configuration file and answer
With program example configuration file;
Further include: MVC module, the MVC module include:
Model, the model is for encapsulating code related with service logic and data;
The result that program is run is returned to browser and shown by view, the view;
Controller, the controller is for receiving user's input, and then calling model is handled and obtained to input data
Processing result is obtained, result is finally transmitted to view, the routing class can transfer controller after passing through routing resolution.
Further, the common tool class include core class libraries packet, it is database class libraries packet, system tool class libraries packet, different
Often processing class libraries packet.
Further, the frame core configuration file includes framework initialization inc configuration file and frame language packet
Lang configuration file.
Further, the Application Instance configuration file is the system operation generated after Application Instance
When environment and parameter, constant configuration file, including inc configuration file, lang configuration file, common configuration file and
Local locally develops configuration file.
A kind of working method of PHPWeb system framework comprising following steps:
Step 1, load common inlet file;
Step 2, creation WEB instance objects, initialize WEB application and execute application;
Step 3, project precompile are simultaneously loaded into;
Step 4 checks and loads plug-in unit;
Step 5, URL analysis and scheduling;
Step 6 obtains currently performed controller and movement;
Step 7, load controller configuration file;
Step 8, language inspection simultaneously read corresponding language file;
Step 9, pattern checking simultaneously define relevant model variable;
Step 10 generates view file.
Beneficial effects of the present invention: 1, joined MVC module in this frame, realize the framework of the multilayer separation of PHP technology
Mode uses the architecture mode of " kernel+extension " to carry out the exploitation of PHP Web project, compensates for PHP development technique in this mould
Blank in formula;The effect of MVC module is exactly to separate logic and performance, so that application program is clearly divided into solely by this frame
Vertical part, business logic codes can be reused very easily in many places, developer facilitated to share out the work and help one another, can be convenient
Developer tests the code of application program various pieces.
2, in this frame work method, due to using common inlet file, that is, single entry file, development efficiency are higher;
It is analyzed and is dispatched by URL, so that all controller and movement is all accessed and is executed by the parameter of URL, make development process
It is more succinct;URL is rewritten and parsed by routing, can more accurately call controller, so that the output of model and view is carried out,
Improve development efficiency.
Specific embodiment
In order to be easy to understand the technical means, the creative features, the aims and the efficiencies achieved by the present invention, below will
Technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only the present invention
A part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not having
All other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
A kind of high performance PHPWeb system framework of lightweight, comprising:
Application program generates class, and the application program generates class for completing loading frame startup file, instantiation website
Application example, application initialization and follow-up work;
Class is routed, the routing class is for completing routing rewriting, starting routing resolution;
Frame base class, the frame base class are located in frame system core catalogue class comprising required for frame operation
Core class libraries and common tool class for website and project development, and the frame base class is able to carry out extension;
Building project core configuration file, the building project core configuration file include frame core configuration file and answer
With program example configuration file;
It further include MVC module, the MVC module includes:
Model, the model are used to encapsulate code related with service logic and data, such as to order model, commodity mould
Type encapsulates data and service logic to order and commodity respectively;
The result that program is run is returned to browser and shown by view, the view, and content is to user for rendering, also
It is that the result of program operation is returned to browser and shows, such as the items list page, backstage login page;
Controller, the controller is for receiving user's input, that is, then the request that user is initiated by browser is adjusted
Processing result is handled input data and obtained with model, result is finally transmitted to view, so that user can see
To the result of oneself operation.Such as user clicks after deleting article button, the model of controller call operation article deletes finger
Determine article, shows that the prompt information for successfully deleting article, the routing class can be adjusted after passing through routing resolution finally by view
Controller, the parameter sets such as acquisition movement and post, get are taken, router calls controller, then specifies corresponding model and view
Figure.
The common tool class includes core class libraries packet, database class libraries packet, system tool class libraries packet, abnormality processing class libraries
Packet.
The frame core configuration file includes framework initialization inc configuration file and frame language packet lang configuration text
Part.
The Application Instance configuration file be the system runtime environment that is generated after Application Instance and
The configuration file of parameter, constant, including inc configuration file, lang configuration file, common configuration file and local are locally opened
Send out configuration file.
A kind of working method of PHPWeb system framework comprising following steps:
Step 1, load common inlet file, all requests of user, that is, the request inputted by browser can all be sent out
It is sent in a special PHP script file, this file is referred to as " entrance ", has one in the application catalog newly built up
The file of entitled index.php, this file are exactly " entry file ";
Step 2, creation WEB instance objects, in the index.php entry file of application class in step 1, construct item
Application Instance configuration file in mesh core configuration file constructs web instance by using the method for calling of new app ()
Object, this object are exactly application object, and are defined in frame core configuration file, and application object encapsulates whole
Some public services that a application program needs, application class initialize weblication and executing application;
Step 3, project precompile are simultaneously loaded into, in application program project carry out precompile, that is, pretreatment, and by its
Precompile result is loaded into application class;
Step 4 checks and loads plug-in unit, and application class checks precompile result, and the scope of examination is to check it
Integrality, after inspection, load routing class plug-in unit;
Step 5, URL analysis and scheduling, routing class parse the URL parameter of application object precompile result,
The parameter value of controller and movement is formulated by routing the scheduling effect of class again and whether inspection parameter value is legal, re-inspection
User has access to formulate the permission of controller and movement, finally checks that corresponding controller and movement are implicitly present in;
Step 6 obtains currently performed controller and movement, checks that corresponding controller and movement are certain in above-mentioned steps
In the presence of routing class is to start to obtain the controller and action parameter needed for current application program executes;
Step 7, load controller configuration file, in above-mentioned steps, after routing class obtains controller and action parameter,
That is, the controller and action parameter are loaded into the controller of MVC module, configured by controller according to parameter,
Obtain corresponding configuration file;
Step 8, language inspection simultaneously read corresponding language file, and frame core configuration file in above-mentioned steps to obtaining
Configuration file carries out language inspection, reads the corresponding language file in configuration file;
Step 9, pattern checking simultaneously define relevant model variable, and controller carries out model to the language file of above-mentioned steps
It calls, and the variable of the model called out is defined;
Step 10 generates view file, and the view of MVC module carries out URL solution to model variable defined in above-mentioned steps
Analysis generates HTML code and is sent at user, that is, browser is carried out generating the page and be shown by user to HTML code.
Present invention disclosed above preferred embodiment is only intended to help to illustrate the present invention.There is no detailed for preferred embodiment
All details are described, are not limited the invention to the specific embodiments described.Obviously, according to the content of this specification,
It can make many modifications and variations.These embodiments are chosen and specifically described to this specification, is in order to better explain the present invention
Principle and practical application, so that skilled artisan be enable to better understand and utilize the present invention.The present invention is only
It is limited by claims and its full scope and equivalent.
Claims (5)
1. a kind of high performance PHPWeb system framework of lightweight characterized by comprising
Application program generates class, and the application program generates class for completing loading frame startup file, the application of instantiation website
Example, application initialization and follow-up work;
Class is routed, the routing class is for completing routing rewriting, starting routing resolution;
Frame base class, the frame base class are located in frame system core catalogue class comprising core required for frame is run
Heart class libraries and common tool class for website and project development, and the frame base class is able to carry out extension;
Building project core configuration file, the building project core configuration file include frame core configuration file and using journey
Sequence exemplary configuration file;
MVC module, the MVC module include:
Model, the model is for encapsulating code related with service logic and data;
The result that program is run is returned to browser and shown by view, the view;
Controller, the controller is for receiving user's input, and then calling model is handled and located to input data
For reason as a result, result is finally transmitted to view, the routing class can transfer controller after passing through routing resolution.
2. the high performance PHPWeb system framework of a kind of lightweight according to claim 1, which is characterized in that described common
Tool-class includes core class libraries packet, database class libraries packet, system tool class libraries packet, abnormality processing class libraries packet.
3. the high performance PHPWeb system framework of a kind of lightweight according to claim 1, which is characterized in that the frame
Core configuration file includes framework initialization inc configuration file and frame language packet lang configuration file.
4. the high performance PHPWeb system framework of a kind of lightweight according to claim 1, which is characterized in that the application
Program example configuration file is the configuration text of the system runtime environment generated after Application Instance and parameter, constant
Part, including inc configuration file, lang configuration file, common configuration file and local locally develop configuration file.
5. a kind of working method of PHPWeb system framework according to claim 1, which is characterized in that it includes following step
It is rapid:
Step 1, load common inlet file;
Step 2, creation WEB instance objects, initialize WEB application and execute application;
Step 3, project precompile are simultaneously loaded into;
Step 4 checks and loads plug-in unit;
Step 5, URL analysis and scheduling;
Step 6 obtains currently performed controller and movement;
Step 7, load controller configuration file;
Step 8, language inspection simultaneously read corresponding language file;
Step 9, pattern checking simultaneously define relevant model variable;
Step 10 generates view file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811018895.6A CN109446454A (en) | 2018-09-03 | 2018-09-03 | A kind of high performance PHPWeb system framework of lightweight and working method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811018895.6A CN109446454A (en) | 2018-09-03 | 2018-09-03 | A kind of high performance PHPWeb system framework of lightweight and working method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109446454A true CN109446454A (en) | 2019-03-08 |
Family
ID=65533213
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811018895.6A Pending CN109446454A (en) | 2018-09-03 | 2018-09-03 | A kind of high performance PHPWeb system framework of lightweight and working method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109446454A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110543294A (en) * | 2019-08-16 | 2019-12-06 | 上海易点时空网络有限公司 | MVC framework system |
CN110837359A (en) * | 2019-11-06 | 2020-02-25 | 北京小狗智能机器人技术有限公司 | MVC Web framework realized by GOLANG language |
CN115934043A (en) * | 2023-01-04 | 2023-04-07 | 广州佰瑞医药有限公司 | PHP-based high-efficiency MVC framework |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103279343A (en) * | 2013-05-16 | 2013-09-04 | 北京互动阳光科技有限公司 | Technical framework system based on distributed large website development |
CN104866327A (en) * | 2015-06-19 | 2015-08-26 | 上海斐讯数据通信技术有限公司 | PHP development method and frame |
US20150248445A1 (en) * | 2012-11-30 | 2015-09-03 | Facebook, Inc. | Method and system for implementing an array using different data structures |
CN107329755A (en) * | 2017-06-29 | 2017-11-07 | 青岛华正信息技术有限公司 | A kind of HZPHP frameworks |
-
2018
- 2018-09-03 CN CN201811018895.6A patent/CN109446454A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150248445A1 (en) * | 2012-11-30 | 2015-09-03 | Facebook, Inc. | Method and system for implementing an array using different data structures |
CN103279343A (en) * | 2013-05-16 | 2013-09-04 | 北京互动阳光科技有限公司 | Technical framework system based on distributed large website development |
CN104866327A (en) * | 2015-06-19 | 2015-08-26 | 上海斐讯数据通信技术有限公司 | PHP development method and frame |
CN107329755A (en) * | 2017-06-29 | 2017-11-07 | 青岛华正信息技术有限公司 | A kind of HZPHP frameworks |
Non-Patent Citations (1)
Title |
---|
TOMADELSTEIN 等: "《LINUX系统管理》", 31 January 2009 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110543294A (en) * | 2019-08-16 | 2019-12-06 | 上海易点时空网络有限公司 | MVC framework system |
CN110837359A (en) * | 2019-11-06 | 2020-02-25 | 北京小狗智能机器人技术有限公司 | MVC Web framework realized by GOLANG language |
CN115934043A (en) * | 2023-01-04 | 2023-04-07 | 广州佰瑞医药有限公司 | PHP-based high-efficiency MVC framework |
CN115934043B (en) * | 2023-01-04 | 2024-03-15 | 广州佰瑞医药有限公司 | PHP-based high-efficiency MVC framework |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA2915619C (en) | Method and apparatus for customized software development kit (sdk) generation | |
US10853108B2 (en) | Method and apparatus for code virtualization and remote process call generation | |
CN105022630B (en) | A kind of assembly management system and assembly management method | |
CN103019928B (en) | A kind of automated testing method and system | |
CN103577168A (en) | Test case creation system and method | |
CN109446454A (en) | A kind of high performance PHPWeb system framework of lightweight and working method | |
CN101382893B (en) | On-line assembling method for component based on Web service | |
CN102541732A (en) | Method for constructing Web automatic testing framework | |
CN113268239B (en) | View construction method, device, equipment and storage medium of desktop application | |
Khaliluzzaman et al. | Pre and post controller based MVC architecture for web application | |
CN106412080A (en) | Method for realizing software localization and internationalization based on network service | |
CN111580821A (en) | Script binding method and device, electronic equipment and computer readable storage medium | |
CN105426424A (en) | Directional paging type acquisition method for network data | |
CN110674355B (en) | DSL application system for describing data labeling task and method thereof | |
CN105511996B (en) | A kind of embedded programmable stainer verification platform of graphics processor | |
CN111367802B (en) | Web automatic test method, device and computer readable storage medium | |
CN118151933A (en) | Applet generation method, device, electronic equipment and computer readable storage medium | |
CN116166270A (en) | XAML file correction method, XAML file correction device, computer equipment and storage medium | |
CN114625377A (en) | Frame item conversion method, frame item conversion device, equipment and storage medium | |
CN117195239A (en) | Micro-application resource package generation method, device, computer equipment and storage medium | |
CN116048524A (en) | Page analysis method, device, equipment and storage medium | |
CN115587036A (en) | Test system and test case generation method | |
Zhang et al. | Research on Cross Platform Development Model Based on Quick QT | |
Ardiles et al. | A Client-Server Architecture for Distributed and Scalable Multimedia Content Analysis: An Android App for Assisting Phone Users in Shooting Aesthetically Valuable Pictures | |
Zhu et al. | Developing Software Using A Novel Event-Condition-State Pattern Framework: Taking Mobile Input Method System As A Case Study. |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190308 |
|
RJ01 | Rejection of invention patent application after publication |