One of the ways for web architects to grow-the right way

Source: Internet
Author: User

ViewArticleIndex Via http://www.cnblogs.com/seesea125/archive/2012/04/17/2453256.html

I have been coding for many years. Although it has failed, I have a little bit of experience in failure. However, in China, mostProgramLike me, I have been on a detour. If you want to become an architect, you must take the right path. Otherwise, programmers who are working harder and farther away from the target will have to go, do you have the following feelings?

1. My job is to finish the tasks assigned to me by the leaders on time.CodeI know that there is room for improvement, but I don't have time to improve it. The key is that leaders don't give time.

2. I found that my skills are always unable to keep up with technological advances. I have learned many things that I want to learn. Many people have used jquery recently. I have heard that MVC is quite popular recently, and there are also LINQ, I heard that Microsoft has Silverlight again ......

3. I found that although I have been working for several years, I have become more proficient in coding, CTRL + C, and CTRL + V, but the coding level has not improved yet. I am still a common programmer, but someone has already done it as an architect.

4. I have been working for several years and want to change my job. As a result, the interviewer asked me what data structures, garbage collection, design patterns, and other things I have read, but I don't need it at ordinary times. I forgot to read it and couldn't answer it. The examiner said that my foundation was too poor...

No. If not, you don't need to read it. You must have done it, or you have understood the path.

If yes, congratulations, you have entered a learning misunderstanding. If you want to advance technically, you cannot continue coding. To fulfill your needs, you must work at the same time as coding, our thinking and level are constantly improving.

Writing code goes through the following stages.

1. You must learn basic object-oriented knowledge. If you forget this, your programming path is destined to be a primary repeat!

Many programmers know the concepts of classes, methods, abstract classes, interfaces, and so on. But why is object-oriented, where are the benefits, and what problems should be solved? I just understood the concept, that is, I couldn't express it clearly, and I couldn't use it in my actual work. After a while, the object-oriented things were blurred, as a result, most programmers use object-oriented languages to do process-oriented work. Therefore, to learn object-oriented, first, we should understand the purpose of object-oriented?

What is the purpose of object-oriented?

The development language is constantly evolving, from machine language, to assembly, to advanced language, to the fourth generation language. Software development methods are constantly evolving, from process-oriented and object-oriented, to aspect-oriented. Although these are constantly developing, their goals have not changed. These goals are:
1. Reduce the complexity of software development
2. Improve the efficiency of software development
3. Improve Software Quality: maintainability, scalability, and reusability.

Among them, the development of language and development methods have made great progress in the development of 2 and 2, but for 3rd, we cannot simply rely on the development method itself to solve the problem.

Improve Software Quality: maintainability, scalability, reusability, etc. The specific point is high cohesion and low coupling, and object-oriented is to solve 3rd problems. Therefore, to become a good programmer, the most difficult to get around is object-oriented.

 

2. To learn object-oriented knowledge, you must learn the design model.

Assume that we understand the object-oriented purpose and concept, but we found that our object-oriented knowledge has never been useful in the coding process. In fact, the principle is very simple, it is because we don't know how to use it. Just like swimming, we have understood the advantages of swimming and several swimming postures, such as gouging, backstroke, frog, and freestyle, but we still cannot swim ....

Therefore, with these basic principles, we cannot do this. We must have more detailed principles to understand our design. This gives us a more basic object-oriented five principles, these principles are applied to the actual situation in more detail to solve practical problems. This is the design mode. Therefore, to learn oo well, you must learn the design mode and design mode, in the words of masters, successful solutions in many fields that humans are trying to solve come from various models. An important goal of education is to pass on the knowledge model from generation to generation.

So learning the design pattern is like watching the world's top swimming competitions, and we are crazy about it.

 

3. Learning Design Model

Just as we don't want to watch other people's performances, we need to learn to swim by ourselves. This is our purpose.

After reading several design patterns, we are excited. In the new coding, we always try to use the learned design patterns, but often misuse them, tossing for half a day, I found that my pants were itchy...

After learning the design patterns, we are very confused. We feel that these patterns are so similar that we often cannot tell the differences between them, and I understand a fatal thing in the design process-over-design, because the design model requires us to be highly scalable and reusable, but at the beginning of the demand, we are not God, in addition to relying on past experiences, we do not know where to expand and where to reuse them. Is the past experience correct? Therefore, we do not even dare to easily use the design model, but are still using the process-oriented method to meet our needs.

 

4. Reconstruction of learning

 

How do you think of wonderful code? It is more exciting than seeing wonderful code. So we started to think that these masters don't have to work, and there is a requirement that there is no leader's time to complete it, is the work only carried out based on the design of brilliant code? This kind of work is too cool and impossible. The boss does not want it. Even if he had all these ideal conditions, he was able to design perfect code from the very beginning? It's impossible. unless he is a god, he can predict all future needs from the very beginning. How can they write wonderful code since there are no such conditions?

Joshua kerievsky clearly pointed out in the famous "model and XP" (included in the book "Extreme Programming research: in the early stages of design, the use pattern often leads to over-engineering ). This is a cruel reality. The pursuit of perfection alone cannot write practical code, and "practical" is the overwhelming element of software.

As mentioned in refactoring-improving the design of existing code, refactoring helps you find the balance point of change. You will find that the so-called design is no longer a prerequisite for all actions, but gradually emerges throughout the development process. In the process of building a system, you can learn how to enhance the design. The interaction brought by it allows a program to maintain a good design in the development process.

To sum up, we use the design pattern in the early stage of design, which often leads to excessive design. Therefore, we should constantly rebuild the current code throughout the development process and throughout the entire demand change process, in order to keep the program well designed, it can be seen that the development process needs to be refactored, otherwise no matter how well the original design, as the demand changes, it will become a bunch of bad code, difficult to maintain and expand. The so-called refactoring is a process like this: "modifying the code without changing the external behavior of the Code to improve the internal structure of the program 」. The goal of reconstruction is the design model. In essence, it is to make the program architecture more reasonable, so as to improve Software maintainability, scalability, and reusability.

The book refactoring-improving the design of existing code is also a masterpiece of Martin Fowler and other masters. It is a classic masterpiece in the field of software engineering, with another masterpiece "design patterns" and said "soft work and double master", you can't read it.

 

The way to excellent software designers

 

Through the design pattern and reconstruction, the coding of our learning and our work has finally been combined. We can use the object-oriented thinking in our work to consider the problem and start to learn and reconstruct it, just like swimming, we have watched various top swimming competitions, understood various rules, methods and skills used by celebrities. Now it's time to go home and practice in the river next to the village, exercise also requires a coach. I recommend another classic book called "Reconstruction and mode" and reference his initial introduction, this book ground-breaking reveals the relationship between refactoring and the two key technologies of software development, and explains how to improve the existing design through refactoring implementation mode, which is often better than the early use mode in the new design. This book not only demonstrates an innovative method of application mode and reconstruction, but also helps readers to deeply understand the reconstruction and mode in combination with actual practices.

This book is exactly the coach we need and is worth reading.

 

6. There is no end, but unremitting research and efforts.

After several years of persistence, we finally learned to use various models flexibly. We don't need to think about what models to use and how to reconstruct them. The purpose of a program is maintainability, scalability, and reusability. It has become a programming habit and a kind of thinking habit, just as after a few years of swimming, we don't have to think about how to make ourselves float in the water. The difference between the backstroke and the breaststroke ..... instead, they jumped into the water and naturally swam towards the other side. However, we still have a long way to go to compare with masters, and we may not be masters in the end, but whether we can become masters or not, we are already on the right way to become masters. We are different from other programmers, because no matter how many teenagers they are, their levels will not change, but they are repeating the wheel, the only thing that is faster than you is Ctrl + C and CTRL + v.

On the right side, as long as you stick to it, you will get closer and closer to your goal. In the future, you will surely be a good architect. The difference with a good architect may be just a matter of time.

 

 

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.