How do you build a PHP framework?

Source: Internet
Author: User
Open source code, rapid build station of those I know, but recently there is a project need to build PHP framework to develop, not familiar with the development of PHP, heard what thinkphp, but also the framework of jquery, but the specific what, how to do it requires the advice of the predecessors.


Reply to discussion (solution)

jquery is JS not php
You need to understand the MVC architecture to develop the framework! Many online materials!
I can tell you that the most important place is URL parsing! Is the "routing" that is described in various frameworks.
You will be in your own way, the URL of the user access to resolve the parameters through your own write the driver class to forward the user access address to the corresponding Controller and action!
For example:
Localhost/index.php?c=user&a=sayhello
In my own mode, I will take the user to the SayHello () method of the Usercontroller controller!

jquery is JS not php
You need to understand the MVC architecture to develop the framework! Many online materials!
I can tell you that the most important place is URL parsing! Is the "routing" that is described in various frameworks.
You will be in your own way, the URL of the user access to resolve the parameters through your own write the driver class to forward the user access address to the corresponding Controller and action!
For example:
Localhost/index.php?c=user&a=sayhello
In my own mode, I will take the user to the SayHello () method of the Usercontroller controller!



How should the concrete framework be built? , like the Java EE has the SSH framework, with Eclipse import jar package can build, PHP is not with thinkphp is enough, that front page with what? I hear there are a lot of ready-made pages written in jquery, what do you do?

You don't mean to build a frame for yourself! If you do not write your own, direct use, then you use TP on the line enough you use!
jquery is nothing but a convenience for front-end development!   But you still have to write it yourself! You can't always take someone else off-the-shelf page, which is so coincidence, you want what kind of page on what page!

You don't mean to build a frame for yourself! If you do not write your own, direct use, then you use TP on the line enough you use!
jquery is nothing but a convenience for front-end development!   But you still have to write it yourself! You can't always take someone else off-the-shelf page, which is so coincidence, you want what kind of page on what page!



The front page, originally wanted to be more convenient, but you say so makes sense.


You don't mean to build a frame for yourself! If you do not write your own, direct use, then you use TP on the line enough you use!
jquery is nothing but a convenience for front-end development!   But you still have to write it yourself! You can't always take someone else off-the-shelf page, which is so coincidence, you want what kind of page on what page!



The front page, originally wanted to be more convenient, but you say so makes sense.


If you want to save the hassle, you can use the UI framework jQueryUI ExtJS and so on you search the front-end frame! But you still have to learn how to write! In short, complex features you still have to write your own!

PHP Framework is too convenient to build, thinkphp framework to the official website has detailed documentation, at a glance, each framework has its own official website, manuals, very easy to get started. jquery is the front-end of a JS framework, mainly the front-end aspects of convenience, and PHP is not related

  • 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.