C # Understanding learning record of core skills in object-oriented programming

Source: Internet
Author: User

Learning perplexity 1. Don't know how to learn
    • Just began to learn to become, read the relevant textbooks, but did not realize what is object-oriented programming, do not know how to learn in depth;
2. Just blindly use
    • Have already worked, will also do some projects, but many times do not understand why this design.
    • Their knowledge points a lot, but there is no systematic, and do not know which direction to go.

I am now in this situation, have some understanding, looking at other people's Project I can write another but many places are difficult to understand, knowledge is very scattered, really, very helpless, here at the beginning of contact with Windows to make a project of their own, not a little bit of C # Foundation, used to do Android, Android has not yet understood, and now is pulled to do windows, it is true that their wings are not hard enough to always be led by the nose to go, oh, it doesn't matter ... Soldiers to will block punches!!! That's the feel~.

3. Input and output garbage
    • Can do projects, and love research skills, self feel very good;
    • Why is it so complicated? Isn't programming just a stack of code? What???
Example

Some of the issues that you see in the project:
The functionality of the project is very good, but the code is very readable in the implementation process. The name of the control is directly 1,,2,3,4,5,6,7 .....
The robustness of the program is poor, late modification is difficult to implement, the code looks very headache.

It is not just the realization of the function, but the robustness and readability of the program are all matters to be considered.

Solution Solutions

About object-oriented programming instead of giving a precise definition, this approach is proposed to make programming easier.

    • Learning object-oriented programming is a comprehensive application of the principles, methods, techniques, experiences and patterns of object-oriented programming.
The OOP principle that the developer must master: the single Responsibility principle (object responsibility clear principle)
    • Requirements: An object to do only one thing, must focus, the responsibility is too easy to cause changes in many reasons, the program is unstable.
Open closure principle (core principle)
    • Requirements: Change the design of the class as little as possible, and do so by extending the class. That is, closed modification, open extension.
Dependency inversion principle (the essence of OOP)
    • Requirements: Based on interface programming, high-level module call interface, the bottom module to implement interface, to prevent the underlying changes directly affect the upper layer.
Interface Isolation principle
    • Requirements: Use a dedicated small interface as much as possible, rather than the total interface, to avoid complex interfaces.
The principle of the Richter replacement
    • Requirements: In the inheritance relationship the subclass can replace the parent class, and the virtual machine can dynamically find the specific subclass object according to the parent class variable, thus realizing polymorphism.

Object-oriented ultimate goal: programs should be "robust", with good scalability and maintainability.

Talk about myself Now, Java is not proficient, so the object-oriented programming is really a mess, just looking at how others write, I imitate the form to complete the required functions, so far I have seen the excellent code may not have, the work of the small partner is a work seven or eight years old driver, But write code really can not see, I am helpless, look at the kind of code without a line of comments, basically is not maintainable, update all rely on reloading, this is our entire company's fault, the system upgrade depends on the re-installation system. Think a bit scary, this if no problem OK, out of the question, a one to the customer in the re-install system?? Or do customers use your product to learn how to burn the kernel?? I can't understand that. So I took over the project is basically a bad project, so that is not too much, my own project is not good where to go.

I think that, the company should consider the long-term development and not just a rush of the pursuit of the implementation of the function, such as the problem, the final customer response is no longer a few, the first two days also received customer feedback phone, all kinds of problems, really can not be remedied. I also have a headache, I want to do a good job, but not enough, so, now say how much is useless, refueling to upgrade themselves, let the technology to prove that your consideration is correct.

C # Understanding learning record of core skills in object-oriented programming

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.