Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Clarify software architecture and data structure

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

It is believed that most software engineers will immediately think of data structure (data structure) when talking about software architecture (software architecture), which is a normal reaction. However, some engineers mistakenly think that software architecture is all about data structures, which is wrong. The reason why software architecture and data structure are discussed in this article is to give us a clearer understanding of it. Readers will understand later that this clear understanding is beneficial to our work. Data structures are defined on Wikipedia as specific ways to store and organize data on a computer in order to use it effectively. This definition explains why we call it an algorithm. Also on Wikipedia, we can find the definition of software architecture: a collection of structures required by a system, including software elements (element), relationships between elements, and attributes. The "element" in the definition is a very broad term, which can refer to either a software component (component) or a separate sub-device.

From the definition alone, software architecture and data structure have different levels of abstraction, the former is more focused on function, the latter is more focused on efficiency. In order for readers to better understand the difference between these levels, let's take two key steps in the software development process as examples. There are two steps in the design stage of software development: summary design and detailed design. Outline design should focus on the software architecture, while detailed design should focus on explaining the data structure. As we all know, in the development process, summary design precedes detailed design, so we can infer that the software architecture is at a higher level of abstraction. I have seen many software outline design documents talk about data structure as soon as they come up, which is because the author of the document does not have a clear understanding of the software architecture and data structure.

The first thing to bear the brunt of software design is not data structure design, but architecture design, which is correct no matter what the size of the software. Architectural design emphasizes the design concept (I sometimes call it a model), that is, what the software "looks like". For software modules that achieve the same function, the data structures designed with and without concepts will be very different. Even if the algorithm is the same, naming is likely to be different, and conceptual naming is more readable. Therefore, the "structure before structure" approach helps to write more maintainable code. In reality, there is a lot of code that is difficult to maintain precisely because the designer omits the step of concept shaping.

Another point to point out is that software architecture design and data structure design do not have the same capability requirements for engineers. Software architecture design needs more conceptual ability, that is, the ability to abstract and generalize the details. The ability required for data structure design is the mastery of computer architecture, programming languages and various algorithms.

The significance of distinguishing between software architecture and data structure lies in: 1) facilitate communication. Not that when others talk about software architecture, we only think about data structures. 2) understand the importance of architectural design. Architecture design is used to guide data structure design, and data structure design is used to express architecture. 3) understand the difference between the capabilities required for architecture design and data structure design, rather than thinking that "data structures are everything to software".

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report