Object-Oriented Design of the mysql-php website Module

Source: Internet
Author: User
Tags php website
In the work, we need to create a php module, make statistics on the content of each Forum section, and then extract data. Each section has some important topics or content. For example, the car section focuses on security, vehicle maintenance knowledge, and how to select a car. Then, we need to create a php module for all the posts of this car forum..., make statistics on the content of each Forum section, and then extract data. Each section has some important topics or content. For example, the car section focuses on security, vehicle maintenance knowledge, and how to select a car. Then, all the posts in this car Forum are classified, calculated, and counted based on these topics. Finally, some data is obtained for future data mining.
The problem is: there are many sections on the website. The focus topics of each section are different, and the algorithms for calculating the points of each topic are also different. The topic set will change over time, for example, there are many topics about air conditioning maintenance in summer and hot cars in winter.
In this way, we hope to design an object-oriented dynamic module to calculate the statistics of all forums.
My current idea is to design a main class for calculating scores, which includes a topic set class, a score calculation algorithm class, And a score result class. In this way, for each section, we generate an object of the main class for the section calculation, and then enter the specific data for calculation. The calculated results are kept in the mysql database.
How should we design it, for example, the design module and the corresponding interface? We hope to maintain flexibility as much as possible.

Reply content:

In the work, we need to create a php module, make statistics on the content of each Forum section, and then extract data. Each section has some important topics or content. For example, the car section focuses on security, vehicle maintenance knowledge, and how to select a car. Then, all the posts in this car Forum are classified, calculated, and counted based on these topics. Finally, some data is obtained for future data mining.
The problem is: there are many sections on the website. The focus topics of each section are different, and the algorithms for calculating the points of each topic are also different. The topic set will change over time, for example, there are many topics about air conditioning maintenance in summer and hot cars in winter.
In this way, we hope to design an object-oriented dynamic module to calculate the statistics of all forums.
My current idea is to design a main class for calculating scores, which includes a topic set class, a score calculation algorithm class, And a score result class. In this way, for each section, we generate an object of the main class for the section calculation, and then enter the specific data for calculation. The calculated results are kept in the mysql database.
How should we design it, for example, the design module and the corresponding interface? We hope to maintain flexibility as much as possible.

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.