Current location - Loan Platform Complete Network - Big data management - Big data css creation
Big data css creation
How to choose a Web development framework

There are always different opinions on the choice of development framework. In particular, there are many development frameworks of the Web layer, each with its own characteristics, such as Struts, WebWork, Spring MVC, Tapestry, JSF, WebPage 3.0, and so on.

Let's see why we use the Web development framework.

Inevitability of using framework

A frame is a frame. It is actually a semi-finished product of an application. Extract some things in different applications to make a semi-finished program. Such a semi-finished product is the so-called program framework.

Nowadays, the development of software system is very complicated, especially the server-side software, which involves too much knowledge, content and problems. Using someone else's mature framework in some aspects is equivalent to asking someone else to help you with some basic work. You just need to focus on the business logic design of the system. This way, you don't have to start from scratch every time you develop, but you can start building on this basis.

The biggest benefits of using the framework are: reducing the repetitive development workload, shortening the development time and reducing the development cost. At the same time, there are other benefits, such as making the program design more reasonable and the program running more stable. For these reasons, some suitable development frameworks are basically selected to help develop application systems quickly and efficiently.

Knowing the inevitability of using a framework, let's look at how to choose. Of course, our topic focuses on the development framework of the Web layer. Before talking about this problem, let's take a look at what Web development needs to do:

Second, the Web layer development work

In J2EE development, layering is the basic idea, and three-tier architecture or multi-tier architecture has long been deeply rooted in people's hearts. Here, we will focus on the Web layer and see what the Web layer development has done:

1: data display

The Web layer needs to get the data that needs to be displayed from the logical layer, and then display it on the page in a reasonable way.

2. Human-computer interaction

Users need to input data from the interface, click the button on the interface, then trigger events, the standard event-driven model, and then exchange data with the background, and a new interface appears.

3. Collect data and call the logical layer interface.

When the Web layer receives the user's event request, it needs to call the corresponding logical layer interface for processing, and the Web layer will not have any logical processing. When calling the logical layer interface, you need to pass parameters. At this point, it is necessary to collect the data input by the user on the interface, and then organize it into the data encapsulation form (usually ValueObject) required by the logical layer interface.

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

When the logic layer finishes processing, it needs to return data or information to the interface. At this point, the Web layer needs to select the appropriate page according to the return value, and then display the data or information.

As can be seen from the above, the main work of Web layer development focuses on presentation, that is, graphical user interface. This part is the window for users to intuitively feel the application, and it is also the place where users need the most, and its manifestations are also the richest.

Three steps of Web layer development

Let's summarize the general steps of Web tier development (that is, the work that developers need to do):

Note: The Web tier development discussed here is the development without any development framework.

1: What data should be displayed on the interface when writing page Html?

2. The specific form of each data, such as: some need to be displayed as a drop-down list, and some need to be displayed as radio buttons.

3. Logical layout of interface display. The so-called logical layout means that some data presentation forms should be put in front and some should be put behind; Some are above, some are below. For example, the business of applying for leave includes leave start time and leave end time. Obviously, the performance of start time should precede the end time. The artist is responsible for the beauty of the final page, and the general artist can't move the logical layout of the interface.

4. After completing the first three steps, the general appearance of the page will be available, and then functional development is needed. The first is the source of the values of these expressions, such as where the values displayed in the drop-down list come from. There are many sources of values, such as from the database, fixed values, intermediate results of interrupting programs, passing from the previous page, and so on. Typically from a database, of course.

Well, once the source of the values is determined, the developer will write code to get these values and then assign them to the corresponding expressions.

There are some special things, that is, the real operation is one value, but another value is displayed on the interface. For example, if there is a user number in the database, the user name will be displayed on the interface, but all operations are based on the user number. We divide this situation into real value and performance value, and they have certain internal relations. These are all things that developers need to transform and maintain.

6. Next, we should develop functional event response. The user clicks a button or triggers an event. 1. Client: data detection and client event handling; Then submit it to the server, and the server will get the data submitted by the client, and then call the corresponding logical layer interface to respond. Of course, how to write the implementation of the logic layer is not discussed here.

7. After the execution of the logic layer, the data and information return to the Web layer, and developers need to write code to deal with it, choose which page to display and how to display these data and information.

8. In the whole interaction process, we should also consider how to control permissions, such as: some data can not be displayed, some data can not be edited, and so on; You also need to consider the configuration and internationalization of messages and so on. These functions originated from the logical layer, but the actual control needs to be controlled by the developer to go to the Web layer.

9. After completing the above development steps, the basic function development of the page will come to an end, and then the developer needs to consider the beautiful page. You might say, "Are there no artists? Why do you need a developer? " . In fact, most artists will only make a static page beautification template, and most artists can't do anything about pushing Java code and Html, not to mention that some content is dynamically generated, which is even more impossible for artists to fix. Developers still have to go into battle and start adding CSS according to the template given by the artist: class, id, style…… ... ...

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

Here we omit the repeated debugging process during development and only summarize the development steps.

Fourthly, the purpose of choosing the Web development framework.

Knowing what we need to do without a framework is very helpful for choosing a framework.

A framework, to put it bluntly, is a semi-finished product, which can help us do something.

The choice of framework is to see which framework is the most suitable, so as to reduce the workload of development, improve the efficiency and quality of development, effectively reduce the workload of maintenance, and finally achieve the goal of saving comprehensive development costs and obtaining more benefits.

Five criteria for selecting Web development framework

Disclaimer: The criteria for choosing a Web development framework mentioned here are only our summary and opinions, and are not universally applicable. Please look at our summary objectively according to your experience.

In addition, we discuss more about the Web development framework of business function applications here.

1: Choose a Web development framework that can provide more and better help for our development process.

2.2. The learning of Web development framework must be simple, and you must get started quickly. Nothing can be more deeply understood than using it. Frames that take half a month or a month to study are really scary.

3. Must be able to get good technical support, in the process of application, there will be more or less problems of one kind or another, if not solved quickly and well, it will have an impact on the development of the whole project. We must consider the comprehensive cost. In fact, this is the biggest problem of open source software application at present. If we encounter problems, we will consult the source code or search for solutions on the Internet. Usually, a problem will stop the development of 1-2 days, or even a week or more. If a project is used so many times, the overall development cost of the project will go up.

4.Web development framework must have a strong ability to combine with other technologies, such as using Spring or Ejb3 in the logical layer, so the Web development framework must be able to combine with them easily and conveniently.

5.Web development framework must have strong expansibility. When a good framework is beyond its power, it requires that the functions of the Web development framework can be easily extended to meet the new business requirements. At the same time, we should pay attention to the simplicity of expansion. If the function of the extension framework is expensive, we might as well not use it.

6.6: It is best for the Web development framework to provide visual development and configuration, and the improvement of development efficiency by visual development has been recognized by the industry.

7.7: The design structure of the Web development framework must be reasonable, and the application will be based on this framework. The unreasonable framework design greatly affects the scalability of the whole application.

8.Web development framework must be stable and efficient. The stability and efficiency of the framework directly affect the stability and efficiency of the whole system.

9.Web development framework must be well combined with the company's current accumulation. After years of development, we have accumulated a lot. Just because the Web development framework is used, it can no longer be used, which is not worth the loss.

10: Another point to note when choosing a development framework is that no development framework can be perfect or suitable for all application scenarios, which means that any development framework has its scope of application. Therefore, we should pay attention to judge the applicability of application scenarios and development frameworks when choosing.