Comparison of object-oriented and structured methods

Source: Internet
Author: User

I've had clients ask recently. Structured approach (i.e., structural analysis of SA structured analytical and structured design SD structured designs) and object-oriented analysis (OOAD object-oriented Analytics & Design) method of difference, this is a lot of people talk about many times the problem, Google can find a lot of this as the title of the article. OO Technology has developed for many years, now everyone is using, there is no objection, few people will doubt the benefits of this technology. But it's obviously an over gas star, and even model-driven development (MDD), which started a few years ago, has gone through the limelight, and we are now more interested in discussing more fashionable concepts such as SOA, it governance, and compliance.

To understand structured and object-oriented approaches, look at Roger S.pressman's "Software Engineering: A practitioner's approach to research (Software ENGINEERING:A Practitioner's approach)" (this is a very popular book, There is a sale on the internet, there are special chapters to describe the two methods and their differences.

I like to describe the software system as a mapping of the real world, in the real world I went to ATM machine to take 100 yuan, mapped to the software is from my bank account in the database records in the balance (Balance) that field minus 100. The so-called structured method and object-oriented method, is the two different mapping means, the structured method is centered on the processing process, emphasizing first defining the data structure (ER Entity Relationship modeling), then analyzing the processing logic (DFD data flow diagram); The Object-oriented method advocates the natural mapping between the two, in the case of ATM withdrawals , I am mapped to the customer object, and my account is mapped to the Accounts object (a data record in the object-relational mapping that corresponds to the database table account). Because the OO approach uses a natural mapping of the real world, when the business process changes in the real world, the software implementation can also be changed conveniently, and the corresponding modification on the software will be much larger if the mapping of the structured method (or the Oo method is used, but the mapping relation of the business process is improperly established).

It should be explained that the two development methods are not a completely antagonistic relationship, the structure method appears in the former, and obtains the very successful application, the Object-oriented method was born, said that it is from the structural method development and is not too much, it also inherited many structural methods of successful experience such as: Data abstraction, From top down, modular, high cohesion, low coupling, we should consider OO technology as the best practice experience integration of software design methods. Structured methods have been successful in the past, but the size of the software we develop is more and more spoiled, the software system is more and more complex, 20 before the development of a software may be 100% from scratch, now develop a software may only 10~20% code is newly developed, many functions, especially the basic functions can be reused. Java EE Technology is a typical example, it has a lot of basic functions such as session management, transaction (Transaction) Management, Object Relationship mapping (O-r Mapping) has been implemented in the middleware, you can only reuse them. To improve software reusability, it is important to introduce some of the key concepts in the OO approach, such as encapsulation, polymorphism, and abstract hierarchies, which can improve the reusability of software and help us effectively manage the growing complexity of software systems.

In fact, there is no revolutionary change between structured methods and object-oriented methods, I liken them to the difference between "walking" and "running", the primitive people must run to catch prey, the difference between running and walking is not very big, just speed up the pace, and both feet may be off the ground at the same time. While model-driven development (MDD) is a revolutionary change, I liken it to "cycling," because MDD has begun to use automation tools to improve the productivity of software development, but MDD technology is just in the exploratory phase and has not yet become a mature technology for large-scale applications. In response to this analogy, we can see that the development of software development technology is very slow, compared to other industries (such as integrated circuit) technology development, software development technology is still very backward. Most of us are still using the original development tools, until the future we will develop software development technology to "driving cars", "flying" phase, we may have found the "Silver Bullet" software engineering. At that time maybe we just need to tell the computer about the demand, and it will automatically do what we want.
Walk, run, bike, drive, fly, ride a car
A structured approach to object-oriented method model-driven development of future software development technology

I observed that in the practical application of what design methods are often subject to the programming technology and environment, the use of COBOL (host application development), C and other traditional process language developers are generally using a structured approach to design, while using Java, C + + Such object-oriented language developers are more influenced by the concept of objects, and basically turn to object-oriented methods; There are exceptions, and some developers are using C + + to implement process-oriented design because they have not yet grasped the benefits of OO. If you want to move from a structured approach to the ooad approach, I suggest that you start with OOP (object-oriented programming) and use Java, C + +, and these classic OO programming languages to get you up to the beauty of OO technology, It will be easier to turn to OO design, which is bottom-up practice.

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.