tinkphp Framework Learning

Source: Internet
Author: User

    • Learning tinkphp (hereinafter referred to as TP) has been almost two weeks, the progress is very slow, the main reason is that the front and back end of the content is not proficient, directly with the framework is not modified, while tinkphp more introductory content, practice scheduling time is not enough. When looking at the TP document found that there are many error content, but also there are many ambiguous content, I hope it can improve. However, this template is still very suitable for our web beginners, it can let you have a fundamental leap.
    • Modular, Views view
    1. Before doing the Web page, just a simple document from beginning to end, TP took me to an object-oriented world! The idea of TP is to modularize the content, using the MVC pattern, similar to Java's encapsulation inheritance, and try not to duplicate the code snippet. However, due to the many aspects of web contact, there are HTML, JavaScript, JQ, CSS and so on, leading to real practice will be more troublesome, the various grammars will be more messy.
    2. After we set up the environment, the first thing to do is to imitate! When we get the complete website of others to imitate, we encounter the first problem, is how to split an interface accurately and properly, it is broken into some modules, this is the view of the content, very intuitive display, the main is: header, top menu, Main menu, slider, content, footer ... We can break up these fragments of an interface first and then continue to subdivide as needed. Each code fragment is a submodule that is put into the main module by using the include. For a website, there is bound to be roughly the same page, we only need to inherit extend a module in each interface. For those different chunks, just write in the interface code, the question is not the same HTML code in which specific location? TP There is a convenient way to solve this problem easily, the principle is very simple, like a picture frame, we can first put the picture frame, decorate very nice, inside photos, we can change at any time. The block tag provided by TP is doing so, in the module, we can add <block name= "text" in any suitable position ></block>,name is a name we give to this position, conveniently located in the real interface, such as: <block name= "Text" > News </block>.
    • Controller controllers (to be continued)
    • Model

tinkphp Framework Learning

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.