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?
Reply to discussion (solution)
Use it if you can.
To be object-oriented, develop a new system directly.
Use it if you can.
To be object-oriented, develop a new system directly.
I learned the object-oriented idea, so I used the previous system to do exercises.
I don't know where to start. Please give us some comments.
Step 1: abstract all database operations
Step 2 after the test is completed and passed
Use it if you can.
To be object-oriented, develop a new system directly.
+ 1!
We recommend that you list all the attribute methods and then click OK.
Step 1: abstract all database operations
Step 2 after the test is completed and passed
I don't quite understand the role of doing so. Do you have a foundation for the following design classes?
What do you often hear from your predecessors ?? Do not OO for 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 this case, splitting (in simple words, process) becomes the most common and feasible way of 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.
What does the moderator say ?? Step 1: 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, and send an SQL command to get the returned result ?? Isn't this the case for adding, deleting, modifying, and querying (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.
It looks abstract. Not easy to understand.
It's actually quite simple.
For example, your invoicing system consists of two parts:
1. operated data streams
2. implement management business logic
Therefore, you can use the database class to extract the data operation part, which is nothing more than insert, query, modify, and delete. These actions are public, no matter what system is required (the invoicing system only needs the first two)
It looks abstract. Not easy to understand.
This is abstract once it is described in text. I 'd like to understand it slowly. most people will inevitably spend time on it.
I am afraid to mislead you. my initial understanding is to combine a lot of functions. haha, this understanding has serious problems. please ignore it.
I 'd like to read more books and examples. Together with theory and practice. Thank you for your answers.