Java: How to choose the most appropriate Web development framework

Source: Internet
Author: User

Excerpt from: http://www.shangxueba.com/jingyan/87054.html

How to choose a Web development framework

The choice of development framework is always a matter of benevolent see. In particular, the Web Layer development framework, the number of very many, and each has its own characteristics, such as: Struts, WebWork, Spring MVC, Tapestry, JSF, WebPage3.0 ... Wait a minute.

Let's take a look at why you should use the Web development framework

The inevitability of a use frame

Framework, which is the frame. is actually an application of semi-finished products, different applications have common in some of the things extracted, made a semi-finished program, such semi-finished products is called the program framework.

The development of software systems to today is already very complex, especially server-side software, involving the knowledge, content, too many problems. Using other people's mature frameworks in some ways is tantamount to letting others do some basic work for you, and you just need to focus on the business logic design of your system. So each development will not have to start from scratch, but can be built on this basis.

The biggest benefits of using frameworks: reducing repetitive development effort, shortening development time, and reducing development costs. At the same time there are other advantages, such as: To make the program design more reasonable, more stable program operation. For these reasons, some of the appropriate development frameworks are used in development today to help develop applications quickly and efficiently.

Understanding the inevitability of using frames, let's look at how to choose, and of course our topic focuses on the development framework of the web layer. Before we talk about this, let's take a look at what we need to do in web development:

The work of two web layer development

In the development of Java EE, layering is the basic idea, 3-tier architecture or multi-layered architecture has long been popular, here we focus on the web layer, to see exactly what the Web layer development did those things:

1: Data show

The web layer needs to get the data that needs to be presented from the logical layer, and then display it in a reasonable manner on the page

2: Man-Machine interaction

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

3: Collect data, invoke logical layer interface

The Web layer receives the user's event request, needs to call the corresponding logical layer interface to handle, the Web layer does not have any logic processing. Invoking the logical-layer interface requires passing parameters, collecting the data that the user enters on the interface, then organizing it, and organizing it into a form of data encapsulation (usually valueobject) required by the logical layer interface.

4: Re-display pages based on data from the logical layer

The logic layer is finished and needs to return data or information to the interface. At this point the web layer needs to select the appropriate page based on the value returned, and then present the data or information.

As can be seen from the above, the main work of web layer development focus on the display, that is, the graphical user interface. This section is the user's intuitive experience of the application window, but also the user's most demanding place, its expression is also the richest.

Three web-tier development steps

Let's summarize the general steps of Web-layer development (that is, the work that needs to be done by developers):

Note: The Web-tier development discussed here is not developed when using any development framework.

1: Write page HTML, exactly what data needs to be displayed on the interface

2: The specific manifestation of each data, such as: some need to appear as a drop-down list, and some need to show up as a radio button.

3: The logical layout of the interface representation, the so-called logical layout is that some data should be represented in the form of the front, some should be placed in the back; such as: a leave to apply for the business, there are leave start time and end time, it is clear that the start time performance should be ranked in front of the end time. and art is responsible for the final page of aesthetics, general art can not move the logical layout of the interface.

4: Complete the previous 3 steps, the appearance of the form of the page has a general appearance, the following need to do functional development. The first is the source of the values of these representations, such as the drop-down list where the values are displayed. The source of the value of many ways, there is a database, fixed value, a broken program run intermediate results, the previous page passed over and so on, of course, typical or from the database.

OK, the source of the value is determined, and the developer is going to write code to get the values and assign the values to the corresponding representation.

5: There are some more special, that is, the real operation is a class of values, but the interface shows a different type of value, such as: The database has a user number, to the interface to display the user name, but all operations are to operate the user number. We divide this situation into: real values and performance values, they have a certain intrinsic relationship. These are to be transformed and maintained by the developer.

6: The next step is to develop a functional incident response. The user clicks on a button or triggers an event, first the client: Data detection, client event processing, and then commits to the server, the server to obtain the data submitted to the client, and then invoke the corresponding logical layer interface to respond. Of course, how to write the implementation of the logical layer is not discussed here.

7: After the logical layer executes, return data and information to the Web layer, developers also need to write code to process, choose which page to display, how to display the data and information, and so on.

8: Throughout the interaction process, you must also consider how to control permissions, such as: Some data can not be displayed, some data can not be edited and so on, also need to consider the configuration and internationalization of messages and so on. These functions originate from the logical layer, but the actual control is going to the Web tier, which needs to be controlled by developers.

9: Completed the above development steps, the page basic function development is over, the next developers need to consider the page beautiful problem. You might say, "Isn't there a graphic artist, what do you need a developer to do?". In fact, most of the art can only be a static page of the beautification of the template, art for a push Java code and HTML of the mixture, mostly there is no way, not to mention that there are some content is dynamic generation, art is even more impossible to fix. Or developers to go to the battle, according to the template to the artist, began to add Css:class, ID, style ...

10: Complete the above development, the basic page of the development work is completed, the final step is to organize the various pages organically, the development of the application of the overall application of the navigation framework, usually the menu, and then the various functions of the page and the menu together to form a complete application.

Here we omit the debugging process of the development period, only summarize the development steps.

The purpose of the four-choice Web development Framework

Knowing that if there is no framework, we need to do the work, which is very helpful for the selection framework.

The frame, straightforward point, is a semi-finished product that can help us do some things.

The choice of frame is to see which frame is most suitable, so as to reduce the workload of development, improve the efficiency and quality of development, and effectively reduce the workload of maintenance, and finally achieve the savings of comprehensive development costs and obtain more revenue.

Five criteria for choosing a Web development framework

Statement: Here the choice of web development framework standards, just our summary and opinion, not the truth of universal, please according to your experience objectively look at our summary.

In addition: Here we discuss more about the Web development framework for business functional applications.

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

2:web Development framework of learning must be simple, get started must be quick, there is nothing more than the use can get deeper experience. It's a little scary to have a framework that's about half a month or a one-month study cycle.

3: Must be able to get a good technical support, in the application process, more or less will appear such or such problems, if not quickly and well resolved, will affect the whole project development. Must consider the comprehensive cost, in fact, this is the current application of open source software is the biggest problem, encounter problems in addition to the dead Ken document is to consult the source code, or online search solutions, usually a problem will lead to 1-2 days of development, serious or even need one weeks or more, a project on so many times, The overall development cost of the project went up in a swish.

The ability of the 4:web development framework to combine other technologies must be strong, such as: in the logical layer to use spring or EJB3, then the Web development framework must be very easy, very convenient to combine with them.

The 5:web development framework must be strong in its ability to expand. Where good frameworks are not strong enough, this requires the ability to easily extend the Web development framework to meet new business needs. Also pay attention to the simplicity of the extension, if the function of the extension framework is very expensive, it is not necessary.

6:web Development Framework is best able to provide visual development and configuration, visual development of development efficiency improvement, has been recognized by the industry.

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

The 8:web development framework must be stable and run efficiently. The stability and efficiency of the framework directly affect the stability and effectiveness of the whole system.

9:web Development framework must be a good combination of the current company's accumulation. In the years of development has been a lot of accumulation, not because the use of the Web development framework can no longer be used, it is not worth the candle.

10: Select a development framework another point to note is that any development framework cannot be perfect or adaptable to all scenarios, meaning that any development framework has a scope for its application. Therefore, the choice should pay attention to determine the application scenario and the applicability of the development framework.

Java: How to choose the most appropriate Web development framework

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.