Could you tell me how to change the existing system to object-oriented?-php Tutorial

Source: Internet
Author: User
I want to change the existing system to an object-oriented approach. I want to change the current invoicing system to an object-oriented approach. Where can I start, can you give me a thought? Shared to: could you tell me how to change the existing system to object-oriented?
I am studying object-oriented development. I want to change the current invoicing system to an object-oriented form. could you give me a thought on where to start?

Share:


------ Solution --------------------
Step 1: abstract all database operations
Step 2 after the test is completed and passed
------ Solution --------------------
It is estimated that you often hear what the predecessors say-not for OO or OO

What does this mean? it means that OO should have OO logic thinking.
Something other than the original
People cannot do things without hours, places, people, things, and things (w a h in English)
The process orientation is actually "object-oriented", but this object is time, and time cannot be abstracted in the program, so it looks like there is no object
Object-oriented means that we can abstract things as objects.
Since most people at work are in a non-differentiated state (think about why), they often take things and things as objects.

In reality, things (in programming, data) are changing and production purposes. it is also difficult to split things into objects.
In short, splitting a task becomes the most common and feasible way of human thinking. the social division of labor is like this.
After all, how can we understand everyone's thinking (not necessarily everyone's)

Back to specific topics
Object-oriented means to combine the same process into a process, split different processes into objects, and then combine the processes to form a production line through the design mode.
Said by the moderator -- the first step is to abstract all database operations
It is to extract the database read/write process to form a refined object, because it is easier to start with learning object-oriented.
Excluding thinking form, write the same part as unchanged content
Connect to, select a database, send SQL commands, and obtain the returned results -- add, delete, modify, and query operations (the same process)
What is different is what Database, what command, and what is returned ...... Then we can use different parts as parameters or variable attributes.

There are also file directory processing, format conversion, APIs, and so on.
In fact, if you are familiar with the processing process, you can first use the opening tool to write the class, not necessarily the database. The moderator is talking about generic examples, and most people start to access classes and objects from the database, this is because I encountered a lot of problems. I started to learn php classes from xml format processing, because I used to process a lot of XML files.

Javascript/dom objects take things (dom elements or document controls) as objects, and events as methods.
Javascript is mostly triggered by events, unlike php.

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.