"UML"--Why use UML

Source: Internet
Author: User

  When I mentioned UML before, I thought of the complicated flowchart. I admire the people who think about the UML diagram of the whole system, because they have the blueprint of the whole software architecture in their mind, so that when writing the implementation, they will know where to change and where to expand.

And to be an architect, UML is also an essential skill. Here is a summary of some of the study notes based on the Elephant--thinking in UML.

Always say what is object-oriented and what is process-oriented .

  process-oriented , is the typical C language of this, a main function, from the beginning to the foot, the middle may involve some methods of invocation, but the entire code is completely pipelined. This can lead to a problem, although the code flow is clear, but not easy to extend, I need to modify a certain calculation process, it is possible to cause all the code needs to be rewritten.

and object-oriented , is to write a program in the perspective of an object, design a program, each object has its own life characteristics. Each object has some complex variables and methods that are externally available or public methods to invoke, which is encapsulation . and objects can be mutually related inheritance, for reference to the existence of methods, this is inheritance . Objects of the same type can extract the public parts and form a new parent class object, which is abstract . There may be different methods between each sub-object of the same type, which is polymorphic .

Thus, through the way the object to see the world, the whole process becomes decoupled, once the need to expand or modify a place, simply modify the corresponding object can be.

The difficulty is how to transform from a real-world business scenario to an abstract object model, and how to represent a business scenario through a complex object model .

  

With this step, you can abstract a model from the real world to represent a business scenario.

First, by modeling, the real world needs to model some of the data to build the corresponding models.

Then, according to these models to design some related concepts, such as control classes, entity classes, as well as the boundary of the presentation class.

Finally, these conceptual models are designed to implement code-level implementations.

Design ideas have, then there is a unified modeling process called RUP model, through this modeling model, can be a complete and stable display software life cycle of a software.

Through these four stages, 9 cores, the perfect interpretation of the traditional software life activities, but modern software development, most of the extreme programming, agile development, want to through the rapid iterative update, to adapt quickly to meet the rapid demand changes. But for some 10-year-old systems, stability is the most important, so this unification process is often the best choice.

For UML, the hardest part of us is how to model it!

  First of all, what is the purpose of modeling? What business scenarios need to be met! Secondly, the model is abstracted according to various scenes.

The traditional way can be done by top-down, or bottom-up way.

Bottom-up, is the first to establish a model of the underlying small object, and then through the combination, and so on, pieced together a complete business scenario.

Top-down, is the first to make a general description of the scene, and then slowly subdivide the function.

These are generally the two ways in which the iteration is repeated to find the right solution.

"UML"--Why use UML

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.