What do we always do? Let me know how to make everything look exactly the same!

Source: Internet
Author: User
What do we always do? Let me know how to make everything look exactly the same! Preface:

During the two months that I came to Zhongmeng, I worked on the development of several projects. Php development is heavy, and I can take time to think about it from a beginner who is blind to the present.

Body:

After learning the basic php syntax, I learned the symfony framework. this framework is very useful, especially powerful framework tools, routes, and various encapsulated php methods, this makes it easier to develop php programs. When I developed the first program, as a rookie, I was arranged to write the mobile APP interface. Later, with the improvement in capabilities, I implemented the APP, WEB, and background for a project. I did not find it at first, but I gradually felt very troublesome during the writing process. as a developer, I understand that the core functions of the three backend are the same, the only difference is how to interact with the front-end. This means that most of your development work is modifying your code and repeating your previous work. This is not only a torment for program developers, but also a silly thing for the entire software.

If there is a problem, you must solve it, instead of blindly following the big stream. I carefully observe the structure of my background code. A project contains a package. the package contains the entity class used to generate the database and other tool classes. The second is the development method. In fact, we have always been talking about object-oriented development. However, our programs are actually process-oriented function-oriented development that directly writes SQL statements, when has Entity classes been used? let alone inheritance, polymorphism, and encapsulation of these advanced skills.

What is the solution. To solve a problem, you need to know the root of the problem. all of the above are superficial phenomena. the actual problem is that we are not thorough enough in thinking about the software, the surface of the resources that are reused at the underlying layer makes the available domain of the code very small, resulting in a series of troubles.

Now that the problem has been found, the solution is simple, that is, let these small-looking methods return to the desired position and encapsulate them into the underlying layer, then you can call it in different packages.

Permanent Address: http://blog.it985.com/15440.html

This article is from the IT985 blog. please indicate the source and relevant links when reprinting.

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.