Web Human Resources Information System development log ③

Source: Internet
Author: User
Tags browser cache composer install

The third stage (May 2017 2 January-June 20th): The main focus of development content to the user business Management layer, the business logic is to use PHP program to call the database table, to meet the needs of business management. Database in addition to installing PDO driver also need to install ODBC corresponding driver, easy to use ODBC data source interface, download MYSQL-CONNECTOR-ODBC stable 5.3 Version 32-bit installation in MySQL official website, and then start->windows file Management- Add the appropriate MySQL driver to the >ODBC Data management program. Subject development can refer to fastphp, ppphp Lightweight development Framework, H-UI front-end framework, agile framework, Medoo database framework to customize the project skeleton, clear the main line of project development, formally began a step-by-step development to complete the entire project body content, for the late-line test to lay a solid foundation.

Development content:

①cookie stored in the encryption of the user number and salt salt, the authentication cookie is AES decryption after the user number to query the user table to get the Salt field content in the cookie with the salt contrast, consistent cookie valid, through authentication, Extract the Stored user information for the background pass parameters, provide in-system page use.

② system initialization configuration and code authoring of the inside page invocation mechanism.

③ loads the common function library, splitting the header, footer, and main menu of the front-end frame's static page with the corresponding function. The utility tool or the solution integrates into the function library or the function.php file, in the project each function module needs the direct reference, lets the tool come and go free, quickly cracked each function module in the difficult diseases, the recruit is coming, the wave is gone.

④ generates a system menu with data table storage or custom constants.

⑤ selects the appropriate front-end development framework and writes the core code of the control layer to ensure the implementation of daily business functions such as organization maintenance, employee's natural condition maintenance, payroll personnel Data Maintenance, report query and data export import.

⑥ data processing and graphical query and save as a Web page or spreadsheet format file.

⑦ODBC data source interface to generate reports, make full use of the company's original VFP database resources.

⑧ combined with the PHP installation operating environment to standardize the use of the appropriate version of the Medoo database framework with the official documentation to quickly resolve the Medel-tier database diversification operation.

Development tips:

① naming conventions. Because the remote virtual host Linux running environment is strictly case-sensitive to the path and file name, in order to run safely and stably, the project folder, database name, data table name, table prefix, field names are uniformly named with lowercase letters or underscores, and the program is carefully case sensitive.

② safe operation. In consideration of security operational issues such as SQL injection, it is necessary to write a complete user registration login encryption verification system with a single entry file.

③ a profound understanding of MVC and structured programming. In the MVC pattern, the controller is a mediator between the model and view, which is responsible for submitting the two processes through the route parsing URL, the model layer is responsible for reading and writing the data, and the View view layer is responsible for the views processing output. To say that MVC is a technology, rather than a kind of art, the concept of MVC originates from work and life, and serves work and life. MVC is not a patent for the development language, nor is it confined to any project, and the idea of MVC is widely used in all kinds of project development of developing languages. The development of MIS with PHP is closely related to the MVC three hierarchical relationship with structured programming ideas to quickly and easily implement business logic processing. Structured programs are easier to write and test because complex programming problems are divided into smaller, simpler tasks. Each task is done by a piece of code or a function, and the code and variables in the function are independent of the rest of the program. By dealing with a simple task each time, the programming target positioning will be faster and more accurate and easy to maintain.

④ multiple browsers for alternate debugging. In order to improve the speed of browsing the page, now the browser cache is more and more powerful, especially in the programming process to be careful to fall into the cache of this pit, the cache is blinded. Must use more than two browser alternate debugging program, and in the obvious know the code is true and false location set breakpoints intentionally change variable or file name repeatedly test program run true and false, bypassing the cache illusion this pit.

⑤ to prevent bulk hotlinking site content by default with a custom constant root in any subdirectory using absolute paths to introduce or include files. In remote virtual host lninux, "." Represents the current directory, "..." To represent the previous level of the directory. "-" indicates the last directory, "~" indicates the current user's home directory, and "PWD" can be used to view the current absolute path. From the point of view of convenient coding and page jump stable operation, common relative path to Include/require file or jump, but on-line security test is modified to absolute path, reduce server search file pressure, improve product performance and application efficiency.

Experience the sentiment:

① rational use of plug-ins to force positive energy. Backstage this piece of difficulty mainly lies in two times development may involve the data the chart display, needs to use the JS plug-in to complete, the data table, the form display, uses the plug-in data table, realizes the order and the search to the form, borrows the extended mind to force the system integration and the development, greatly simplifies the project development workload.

② Custom builds for the development framework.

A framework is a basic conceptual structure used to solve or deal with systemic and complex problems. The frame is the use of the wheels made by others. "Come easy, go easy, get out of the mix, sooner or later". With other people's wheels, always for the inexplicable east to pay too much confused debugging cost. In addition to the large framework is repeated with a bunch of code built on PHP, so the pursuit of extreme performance, it is not recommended to repeat the code to build blocks. In fact, the most elegant framework is PHP itself, the original code framework is not so much used in the framework, it is better to comb out the project development ideas and build a good project structure, more importantly, through their own structure for the project needs of the MVC framework, to integrate their ideas into the frame, not necessarily the best, But you can develop a variety of practical functions in your own way, so that they can understand the MVC development model, and also enable them to quickly improve their skills in the development of business projects, cultivate the ability to think independently, grasp the nature of MVC framework and the application of PHP object-oriented instantiation, and familiarize themselves with the various code optimization methods of PHP. Familiar with most PHP security aspects of the solution and familiar with the basic principles of PHP operating mechanism. Because PHP itself supports the template function, so there is no need to use a third-party template engine is not necessary, and because pdo+sql is already good abstract database operation, with PHP array can easily store and manipulate the query results, with a custom function to encapsulate the project function module, Functional structured programming uses flexibility and ease of maintenance. Since the face of a variety of various frameworks, it is difficult to choose, but rather than the original structure of development, both to reduce the cost of learning and experience high-performance PHP services, the introduction or a large professional framework after the first to put forward. With the rapid development of handheld devices, driving the rapid development of HTML5 industry standards, in order to meet the Web front-end highly flexible development needs to adapt to different browsers, tablets, smartphones a variety of handheld devices, not to use a responsive strategy development framework, Use lightweight front-end frameworks such as h-ui or agile frameworks.

In short, with the PHP primitive object-oriented MVC idea around the noise of many frameworks, not to be kidnapped by the framework, in the simplest way to interpret efficiency is kingly.

③ insists on the core development concept of the avenue to Jane. PHP has always been known as a simple, developed in-cut PHP code to make inscrutable, as long as "the method is desirable, stable operation, to meet demand", every aspect of programming should try to simplify, easy to use, easy to understand, all to simple, the simpler the more happy, the simpler the more powerful.

④ is more likely to pick apples on the shoulders of giants. Composer is an excellent PHP dependency manager, the project dependencies are listed in the Composer.json file, and then through a few simple commands, composer will automatically help you download these dependencies, and configure the automatic loading path. Depending on the project expansion needs, using composer Install/update to declare dependencies, install, Update automatically load third-party class libraries or plug-ins, greatly improving the efficiency and performance of developing Web applications.

⑤ Quick start to break the tide. PHP+MYSQL Development Management Information system has become popular trend, management information system focus on business practicality, difficult in the function and application of the promotion, most of the reason is the program development and business requirements disjointed, understand the technical programmer do not understand the business, business needs of customers do not know the technology, virtually increased communication difficulty, Program maintenance is also very difficult. Endless business requirements, expect a practical and easy-to-use management Information System (MIS), Web apps unstoppable, comply with the call of the Times, not suitable for the era of operating habits and applications will gradually be replaced by MIS, as long as the firm direction leisurely go down, I believe that will always break through various problems.


This article is from the "He Jubi blog hezhubi.com" blog, please be sure to keep this source http://hezhubi.blog.51cto.com/11144083/1945659

Web Human Resources Information System development log ③

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.