How to choose enterprise web development framework

How to choose a web development framework

At present, most of the enterprise information integration systems are running on the web, and the choice of building a framework is very important to the development of an enterprise, but its ultimate goal is to conform to the logic of enterprise development and help the implementation of enterprise strategies.

The choice of the framework is a matter of different people. From the bottom of the framework, there are many web layers, and each has its own characteristics, such as: Struts, WebWork, Spring MVC, Tapestry, JSF, WebPage3.0... and many more.

So why use a framework?

The necessity of using the framework

Framework, namely framework, to put it bluntly, is actually a semi-finished product of some applications. Under normal circumstances, in order to facilitate the application, some common things in different applications will be stripped out to make a semi-finished program, such a semi-finished product is the program framework. Of course, these things are free, and there are paid ones. The free ones require more attention in terms of functions and post-maintenance, and the paid ones are usually optimized by some development companies to develop some standard functions, plus certain expansions. Maintenance costs will be lower.

At present, the development of software systems is quite complicated, especially server-side software, which involves too many knowledge, content, and problems. Using someone else's mature framework in some aspects is equivalent to letting someone help you complete some basic work, and you only need to concentrate on completing the business logic design of the system. In this way, you don't have to start from scratch every time you develop, but can quickly build on this basis.

On the one hand, this can reduce repetitive development workload, shorten development time, and reduce development costs. On the other hand, it can also make program design more reasonable, run more stable, and reduce the trouble caused by personnel turnover. For these reasons, basically in the development now, some suitable development framework will be selected to help establish a fast and efficient development application system.

Then with these inevitability, choice is very important. In the development framework of the web layer, some basic ideas are worth noting.

1. Data display

The web layer needs to obtain the data that needs to be displayed from the logic layer, and then display it on the page in a reasonable way. It must be clearly classified, accurate, easy to use, and simple in interface.

2. Human-computer interaction

Human-computer interaction actually refers to software intelligence. For example, if the user wants to input data on the interface and click on the interface, then an event can be triggered, a standard event-driven model can be established, and then data can be exchanged and processed automatically with the background model to complete the establishment of a new interface.

3. Collect data and call the logic layer interface

The triggering of this process is synchronized with the user's operation request. Usually the web layer receives the user's request and needs the corresponding logic layer interface to process, because the web layer itself does not perform any logical processing, which is actually the difference between the front and back ends. To call the logic layer interface, you need to pass parameters. At this time, you need to collect the data entered by the user on the interface, and then organize it into the data encapsulation form required by the logic layer interface. There are many such forms, and ValueObject is commonly used.

4. Redisplay the page according to the data of the logic layer

The logic layer is processed, but the front-end display remains unchanged. At this time, the data or information needs to be returned to the display interface, and the interface assigns the value to a specific location, and the new page is displayed.

In fact, we can also see from the above that the development of the web layer is mainly focused on the display, that is, the graphical user interface. This is the most intuitive window for users to experience the application. It is usually one of the places where users have more requirements. The form of expression is relatively rich.

Web layer development steps

In fact, any project starts from scratch, and the development steps are the same, but qualified enterprises will adopt the synchronous development model to save time. Here, we will take the basic model as an example to briefly describe.

1. Determine the display content and write the page Html

2. The specific manifestation of each data, such as: some needs to be represented as a drop-down list, and some needs to be represented as a radio button.

3. The logical layout of the interface presentation. The so-called logical layout means that the presentation of certain data should be placed in the front, some should be placed in the back; some on the top, and some on the bottom. For example, a business requesting leave application has a start time and an end time for leave. Obviously, the performance of the start time should be ranked before the end time. While the artist is responsible for the beauty of the final page, the general artist cannot move the logical layout of the interface.

4. After completing the first 3 steps, the general appearance of the page is now available, and the functional development is needed below. The first is the source of the values ​​of these manifestations, such as where the values ​​displayed in the drop-down list come from. There are many ways to source values, includingFrom the database, the fixed value, the intermediate result of a certain program running, the previous page passed over, etc., of course, the typical still comes from the database.

Well, after determining the source of the value, the developer has to write code to obtain these values, and then assign these values ​​to the corresponding manifestations.

5. There are also some special ones, that is, the actual operation is one type of value, but another type of value is displayed on the interface, such as: there is a user number in the database, and the user name must be displayed on the interface, but all The operation is to operate the user number. We divide this situation into: true value and performance value, they have a certain internal connection. These are all for developers to transform and maintain.

6. The next step is to develop functional incident response. The user clicks a button or triggers an event, first is the client: data detection, client event processing; then submitted to the server, the server must obtain the data submitted by the client, and then call the corresponding logic layer interface To respond. Of course, how to write the realization of the logic layer will not be discussed here.

7. After the logic layer is executed, the data and information are returned to the Web layer. Developers also need to write code to process, choose which page to display, and how to display the data and information.

8. In the entire interaction process, you must also consider how to control permissions, such as: some data cannot be displayed, some data cannot be edited, etc.; also need to consider the configuration and internationalization of messages, etc. These functions originated in the logic layer, but the actual control must go to the Web layer, which requires developers to control.

9. After completing the above development steps, the basic function development of the page has come to an end. Next, developers need to consider the beauty of the page. You may say: "Isn't there an artist? What else do developers need to do?". In fact, most artists can only produce a beautification template for a static page. Most artists have no way to push a mix of Java code and Html, not to mention that some content is dynamically generated, and it is even more impossible for the artist to get it. Up. Developers still have to go into battle and start adding Css: class, id, style... according to the template given by the artist.

10: After the above development is completed, the development of the basic page is completed. The last step is to organize the various pages organically, develop the overall application navigation framework of the application, usually the menu, and then combine each functional page with the menu To form a complete application.

Here we have omitted the repeated debugging process during the development period and only summarized the development steps.

The purpose of choosing a web development framework

First of all, there is no framework, what is the work we need to do, and understanding these, we can better understand the value of the framework.

The frame, in layman's terms, is a semi-finished product, that is, the parts that make up a machine. Whether the framework we currently use is a basic underlying framework or a fusion-type paid framework, that's all.

The choice of framework depends on the actual needs of the project. The underlying framework is suitable for project construction with ample time, and the integration framework (rapid development framework) is suitable for short-term projects. From the cost point of view, a general-purpose integration framework can reduce the workload of development. Improve work efficiency, because it has integrated a variety of commonly used functions, such as ERP, OA, CRM, BI, and even mobile APP, which is more operability for enterprises.

Criteria for choosing a web development framework

The standard is not set in stone, and here is just a talk of experience, and the main starting point is the business function of the integration framework, so it is only for reference.

1. Choose a Web development framework that can provide more and better help to our development process, with strong functionality and stability.

2. The learning of the web development framework must be simple and quick to get started. After all, no one wants to explore the complex and chaotic framework structure. A mature integration framework. If it takes half a month or even a month of learning cycle, then this The framework does need to be discussed.

3. Good technical support. No matter the framework is good or bad, technical support must be done well, because when you use it, you will understand that no matter how good the framework is, there will be more or less problems in the actual application process. If it cannot be solved in time, it will The entire project development has an impact.

In addition, the overall cost must be considered. In fact, this is the biggest problem in the application of open source software. In addition to the problem, it is to consult the source code or search for solutions on the Internet. Usually, a problem will cause 1-2 days. Development stalls, and in serious cases, it may even take a week or longer. If a project has been used several times, the overall development cost of the project will go up.

4. The web development framework must have a strong ability to combine other technologies, such as using Spring or Ejb3 in the logic layer, and the framework as a whole must be easily integrated with them.

5. Powerful expansion function. As I said just now, no matter how good the framework is, it is impossible to cover everything, and the actual situation of each enterprise is different. Therefore, this requires that the framework's expansion function is strong enough to meet the needs of new businesses. However, we should pay attention to one point here. The extension should be simple. If the overall function of the framework is limited due to the extended function, it is not appropriate to force it.

6. Web development framework is best to provide visual development and configuration. The improvement of development efficiency by visual development has been recognized by the industry. Moreover, this function is relatively mature at present, so I won't repeat it.

7. The design structure of the web development framework must be reasonable, the application will be based on this framework, and the unreasonable framework design will greatly affect the scalability of the entire application.

8. The Web development framework must be able to integrate the current company's accumulation well and have a good project connection. Under normal circumstances, the company has accumulated a lot in years of development, and it can't be used because of the use of the Web development framework. That would not be worth the loss.

9. Don't think of the framework as a god. To be sure, all the frameworks currently on the market cannot be perfect, nor can they be applicable to all application scenarios, so you must understand its scope of application and judge whether it is appropriate before selecting a model.

Here I recommend an agile development framework learun, which is used by our company, as a reference for selection, page address: free experience

 

Guess you like

Origin blog.csdn.net/wx_15323880413/article/details/108557973
Recommended