Software Model reflection

Source: Internet
Author: User

How do you writeCode?
Start encoding directly after obtaining the requirement? Then a piece of constructor is like this?
Or should we first design a specific model for the software, build the framework, and then start coding?

Software migrant workers write code directly.
The first design type is software developers.
The software engineer who builds the software model and considers the subsequent software version requirements, maintenance, and function expansion before coding.
What are you?

After using reflector to read some snippetcompiler code, I discovered how bad the code I wrote. It is simply an unsightly scum.

How to design software models:
I don't think there are any fixed software models. You only need to focus on the following key points:
1) well-defined interfaces and scalability. (Prepare for future function expansion)
2) minimum coupling. (Help code maintenance and modification)
3) Unified internal management. (Help understand code and manage internal objects)

No! How to Design the model!
We can think and imitate.
I found that snippetcompiler uses a model similar to a TV remote control.

Button = command
Function setting = a command management set
Board = all command Management sets
Channel = interface implementer
TV = Interface Class Construction Factory

The button sends a command to the circuit board, while the transmitter inside the circuit board transmits the signal to the TV, and the TV sorts the command and sends it to the desired part to complete the command.

TV sets do not know what programs are played on each channel and how they are recorded and played. They only need to define a standard interface, and TV stations can provide channels for TV sets to watch.

The model is not fixed. We can observe the construction, principles, and completion methods of any thing in reality.
And then applied to the software model. In this way, you can write better, better, and more robust software.

I think so much about it now. please raise some questions about how to solve the problem...

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.