How to select the most appropriate web development framework

Source: Internet
Author: User

How to select a web development framework

The choice of a development framework is always a matter of benevolence and wisdom. In particular, there are a large number of development frameworks on the web layer, and each has its own characteristics, such as struts, webwork, spring MVC, tapestry, JSF, webpage3.0 ...... And so on.

Next, let's take a look at why the web development framework is used.

I. inevitability of using the framework

Framework. It is actually a semi-finished product of a certain application.ProgramSome common things are extracted and made into a semi-finished program. Such a semi-finished product is called a program framework.

Software systems have become very complex today, especially on-server software, involving too many knowledge, content, and problems. Using someone else's mature framework in some ways is equivalent to letting someone else do some basic work for you. You only need to concentrate on completing the business logic design of the system. In this way, you do not need to start from scratch, but can start to build on this basis.

The biggest benefit of using the framework: reduce repetitive development workload, shorten development time, and reduce development costs. At the same time, there are other benefits, such as making the program design more reasonable and program running more stable. For these reasons, some suitable development frameworks are usually used in development to help develop application systems quickly and efficiently.

I learned the inevitability of using the framework. Let's look at how to choose it. Of course, our topics are concentrated on the development framework at the web layer. Before talking about this, let's take a look at what we need to do in Web development:

2. Web LAYER DEVELOPMENT

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

1: Data Display

The web layer needs to obtain the data to be presented from the logic layer, and then display the data on the page in a reasonable way.

2: Human-Computer Interaction

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

3: collect data and call the logical layer interface

When the web layer receives a user event request, it must call the corresponding logic layer interface for processing. The web layer does not have any logic processing. To call the logical layer interface, you need to pass parameters. In this case, you need to collect the data that you enter on the interface and then organize the data into the data encapsulation form (usually valueobject) required by the logical layer interface ).

4: Re-display the page based on the data in the logic layer

After the logic layer completes processing, data or information needs to be returned to the interface. In this case, the web layer selects the appropriate page based on the returned value and then displays the data or information.

From the above, we can see that the main work of web layer development is focused on the presentation, that is, the graphical user interface. This part is the window for users to intuitively feel the application, and it is also the place where users have the most requirements, and its forms are also the most abundant.

Step 3 of Web LAYER DEVELOPMENT

Next we will summarize the general steps of Web layer development (that is, the work that developers need to do ):

Note: The Web Layer Development discussed here does not use any development framework.

1: write HTML pages. What data needs to be displayed on the interface?

2: The specific manifestation of each data, such as: some need to be shown as drop-down lists, and some need to be represented as single-choice buttons.

3: The logical layout of the interface representation. The so-called logical layout means that some data representations should be put at the front, some should be put at the back, some should be put at the top, and some should be put below. For example, for a business that requires a leave request, the start time and end time of the leave request are clearly at the beginning of the end time. However, the artist is responsible for the appearance of the final page. Generally, the artist cannot change the logical layout of the interface.

4: After completing the previous three steps, the page's presentation will look like a general one. Below We Need To Do Functional Development. The first is the source of these expressed values, for example, where the values displayed in the drop-down list come from. There are many sources of values, such as databases, fixed values, intermediate results of a disconnected program, transmitted from the previous page, and so on. Of course, the typical value is from the database.

Okay. After determining the value source, the developer will writeCodeAnd then assign the values to the corresponding representation.

5: There are some special values, that is, the actual operation is a type of value, but the interface shows another type of value, for example, the database has a user number, the user name must be displayed on the interface, but all operations must be performed on the user number. We divide this situation into two parts: real value and performance value, which have a certain internal relationship. These are all converted and maintained by developers.

6: now we should develop a functional event response. The user clicks a button or triggers an event. The first is the client: Data Detection, client event processing, and then submitted to the server. The server needs to obtain the data submitted by the client, then, call the corresponding logical layer interface to respond. Of course, we will not talk about how to write the implementation of the logic layer 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 the data. Select the 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, for example, some data cannot be displayed, some data cannot be edited, and so on. You also need to consider message configuration and internationalization. These functions originate from the logic layer, but the actual control needs to be implemented on the web layer, which must be controlled by developers.

9: After completing the above development steps, the basic page function development will come to an end. Next, developers need to consider the appearance of the page. You may say, "Isn't there an artist? What do developers need ?". In fact, most of the artists can only produce a beautification template for a static page. Most of the artists have no way to integrate Java code with HTML, not to mention that some content is dynamically generated, and it is even more difficult for the artist to solve the problem. You still have to go into the game and add CSS: Class, ID, style... according to the template provided by the artist ......

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

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

4. Purpose of selecting a web development framework

I learned what we need to do if there is no framework, which is very helpful for selecting a framework.

The framework, simply put, is a semi-finished product that can help us do something.

The framework selection is to see which framework is the most suitable, so as to reduce the development workload, improve the development efficiency and quality, and effectively reduce the maintenance workload, and ultimately reduce the overall development cost, get more benefits.

5. Select the standards of the Web development framework

Statement: the criteria for choosing a web development framework here are just our summary and family statement. It is not a perfect truth. Please look at our summary based on your experience.

In addition, we will discuss more about the web development framework of business functional applications.

1: select a web development framework that provides more and better help to our development process.

2: The Web development framework must be easy to learn and get started quickly. There is no deeper experience than using it. Those frameworks that require half a month or one month of learning cycle are really scary.

3: You must be able to get good technical support. In the application process, problems of one or another may occur. If the problem cannot be solved quickly, it will affect the development of the entire project. Comprehensive costs must be taken into account. In fact, this is the biggest problem with open-source applications. In addition to the dead letter document, you must checkSource codeOr an online search solution, usually a problem will lead to a 1-2 day development pause, serious or even a week or longer, a project has such a few times, the overall development cost of the project is always ready.

4: The Web development framework must be powerful in combination with other technologies. For example, to use spring or ejb3 at the logic layer, the web development framework must be easy, it is very convenient to combine with them.

5: The Web development framework must have strong scalability. Where good frameworks are not powerful enough, it requires that the functions of the Web development framework can be easily extended to meet new business needs. At the same time, pay attention to the simplicity of expansion. If the function of the extension framework is very expensive, it is better not to use it.

6: The Web development framework is better to provide visual development and configuration, and the visual development improves the development efficiency, which has been recognized by the industry.

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

8: The Web development framework must be stable and highly efficient. The stability and operational efficiency of the framework directly affect the stability and efficiency of the entire system.

9: The Web development framework must be well integrated with the company's accumulation. There has been a lot of accumulation in development over the years, and it cannot be used because of the use of web development frameworks. It is not worth the candle.

10: when selecting a development framework, you must note that no development framework can be perfect or adapt to all application scenarios, that is to say, any development framework has its applicability. Therefore, you must determine the application scenario and the applicability of the development framework.

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.