Layer? Why is software development layered?

Source: Internet
Author: User

Layer? Why is software development layered?

I. Reasons
Recently, I have been conducting preliminary research on the project, and the general design scheme has come out. When talking with another engineer of the partner company, he suddenly said: why do you need to use architecture and hierarchical development for simple projects!

That engineer has been working on software for many years. In the age of VB and ASP, he is now focusing on the general engineer and responsible for project management and coordination. Our company is responsible for some of the software projects, some time ago, I told him about our development methods, mainly multi-layer development and team cooperation. After taking the research results this time, he said that if ASP and the like were used for a few days, it would take six months to program the project scale. On the one hand, as a partner, he wants to belittle our work and facilitate business negotiation. On the other hand, he does have questions in this regard. I want to analyze their problems and talk about their own ideas. Sorted out his questions:
1. Why layer?
2. If the layer is for division of labor, isn't it a good job for everyone to divide a module?
3. How to improve project efficiency by hierarchy? Do small projects still use hierarchy?

Ii. Experience
The following is my personal opinion and reference. Let me introduce my experiences first:
I started with the development of single-chip microcomputer, and later developed wince, which was basically done by myself and rarely communicated with others.Program It is a piece of writing, and there are very few operations on the database. There are only some sqlce database development on wince.
Later, I participated in the software development of the team's project. The Delphi Program was composed of several people and each person divided into a functional module. The project owner told me how to draw interfaces, write programs, connect to databases, and use controls, it takes a long time to master these skills. Many experiences need to be learned by yourself in addition to being taught by others.
Later, I implemented a project that was developed in Java and used a multi-layer development method. It not only encapsulated the data layer, but also encapsulated the page, at that time, it was ridiculous that software implementation started after only half a day of training, and the customer had no idea about the program, however, the gains are huge. One is familiar with how to communicate with the customer, and there is a strong interest in multi-layer development.
Later, I began to write it myself. net's data access layer architecture, which organizes data from the network. Now this architecture has been applied to several projects and should be successful, much better than expected, it also basically meets the requirements of friends on the network for the data access layer.
The architecture name is framecountry's data access layer architecture. It is mainly used for the data access layer function in the multi-layer architecture under the. NET platform. It can be:
1. The same development and configuration methods for different databases are used to minimize database operation differences;
2. Rapid Development and various encapsulation of functions at the data layer. Developers focus mainly on business implementation, making database data operations very convenient;
3. Have a detailed record of the program process, and record the correct, abnormal, wrong, and transaction information of the operation data;
If you are interested, you can download the latest framecountry architecture:
Http://blog.csdn.net/lizheng82/archive/2007/06/18/1656140.aspx

based on my experience, I took the following four steps:
1. independent programming and simple software
the project scale is small, the entire software system is completed by itself, and seldom communicates with partners.
2. cooperative Development, non-multi-layer division of labor
Software development is completed by multiple people, and each person allocates different functional modules for development.
3. project implementation and multi-layer access
begin to understand the structure of multi-layer software development;
4. multi-layer application development
completes the data access layer architecture and project development.
there are several development methods and some experiences.

III. Architecture understanding
let's get down to the truth and give a basic introduction to my situation. Now let's get started with the topic. I understand that the multi-layer architecture is based on four layers. The layers are as follows:
1. presentation layer
implements the user operation interface to display the data required by the user.
2. business layer
completes business processes, processes data requests submitted by the presentation layer, and uses the data access layer to operate data.
3. data access layer
receives database operation requests from the business layer, completes database operations, and Records log information.
4. database
the relational database that stores data.
This may be abstract. For example, assume that you need to modify the database table, after the data is modified, save the modifier, modification time, and modification value to the database. See:


Now I think again as an example to describe the application description at each layer:
1. Presentation layer (user page)
When the page is initialized, the initialization data is loaded. The modified number and name value are displayed. After you modify the value, click "modify" to submit a modification request to the business layer, and pass the modified value to the business layer;
2. Business Layer (implementing business processes)
After passing the values to be modified on the user interface, submit a modification application to the data access layer, and then submit the modification time and modifier information to the data access layer for the insert modification record operation;
3. Data access layer
Database Operation requests put forward by the business layer are combined into SQL statements identified by the database, and operations are submitted to the database, and the results are fed back to the business layer;
4. Database
Relational databases that store data;

Iv. Problems
After talking so much about these questions, I will answer them together.
First, is hierarchical software development necessary! The answer is yes, just like asking if it is necessary for a computer to work now, the trend is that everyone else has done so and done well. Of course it is necessary. I think the advantages of multi-layer development:
1. Convenient team Division
In the past, by function module, several people divided the functional modules of the project, and each person had to complete the operations from the database, business logic to the implementation interface, of course, the design of the database can be completed by one person. Such development obviously has disadvantages. First, each developer must master most of the technologies and have a strong understanding of the business logic, secondly, everyone's Development habits are different. Code The complexity and readability are poor, and the final improvement and maintenance will cause troubles. I believe many people will understand this painful experience. Can multi-layer development solve the above problems? If it is a reasonable multi-layer development mode, it can be completely solved.
The software development hierarchy can be simply understood as the type of work hierarchy and standard code. The work can basically be divided into interface designers, business implementers, and database designers. Interface Designer The job is to draw a program interface and submit the information to the business layer, without considering the logical relationship of the business layer, Business implementers The job is to process the data requests submitted on the interface to complete the logical process. Combined with the data access layer, you do not need to consider the style and style of the interface design, or the format of the database, Data access layer Generally, it is a well-designed architecture system, which basically does not require staff to work. It mainly shields the differences between databases and provides convenient operation functions for the business layer, Database Designer Design and plan databases. Obviously, a team can use multi-layer development to rationally allocate staff and place each person in a suitable position, while the main technical personnel focus on the development of key parts, repeat simple work, and you can arrange for new users to complete the picturesque interface.
2. Other features
It has the following features:
Standard Code: the code at each layer can be standardized during the development process, and the style of the development language can be fixed;
Ignore database differences: A good data access layer can completely block database differences. developers can only perform the same data operations, or even quickly convert databases;
Basically, I think of this, and some other things will be sorted out later.
Now, let's go back to the question and determine whether the hierarchy is necessary. In fact, we can answer the question in a negative way, and we can also give a set of reasons. Therefore, we still need to look at the actual needs. The above is my opinion, for reference only.

Related Article

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.