In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How to choose the development framework on the Web side
At present, most of the enterprise information integration systems run 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 strategy.
And in the choice of framework is a matter of opinion, from the underlying framework, the web layer is very many, and each has its own characteristics, such as: Struts, WebWork, Spring MVC, Tapestry, JSF, WebPage3.0. Wait.
So why use frameworks?
The inevitability of using a framework
Framework, or framework, is, to put it bluntly, a semi-finished product of some applications. Usually, in order to facilitate the application, some common things in different applications will be stripped out to make a semi-finished program, which is the program framework. Of course, these things are free and paid for, and they require more attention in terms of function and later maintenance, while those that are paid are usually optimized by some development enterprises to develop some standard functions, coupled with some expansion. The maintenance cost will be lower.
At present, the development of software system has been quite complex, especially the server-side software, which involves too much knowledge, content and problems. Using someone else's mature framework in some ways is tantamount to asking others to do some basic work for you, and you only need to focus on the business logic design of the system. In this way, each development does not have to start from scratch, but can be quickly built on this basis.
On the one hand, it can reduce the repeated development workload, shorten the development time, reduce the development cost, on the other hand, it can make the program design more reasonable, run more stably, and reduce the trouble caused by personnel flow. For these reasons, basically now in the development, we will choose some appropriate development framework to help establish a fast and efficient development application system.
So with these inevitability, choice is very important, and in the development framework of the web layer, there are some basic ideas that deserve attention.
1. Data presentation
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, with clear classification, accurate capture, easy to use and simple interface.
two。 Human-computer interaction
Human-computer interaction actually means that the software is intelligent. For example, if users want to enter data on the interface and click on it, they can trigger events, establish a standard event-driven model, and then automatically exchange data with the background model to complete the establishment of a new interface.
3. Collect data and call logic layer interface
The trigger of this process is synchronized with the user's operation request. Usually, when the web layer receives the user's request, it needs the corresponding logic layer interface to deal with, because the web layer itself will not carry out any logical processing, which is actually the difference between the front and back ends. When you call the logical layer interface, you need to transfer parameters, then you need to collect the data entered by the user on the interface, and then organize it into the data encapsulation form needed by the logical layer interface. There are many forms, commonly used is ValueObject.
4. Redisplay the page according to the data of the logical layer
The logic layer is finished, 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 values to a specific location, and the new page is displayed.
In fact, from the above we can also see that the development work of the web layer is mainly focused on the display, that is, the graphical user interface, which is the most intuitive window for users to feel the application, and is usually one of the places where users require more, and its forms of expression are relatively rich.
Web layer development steps
In fact, any project from scratch, the development steps are more or less the same, but conditional enterprises will adopt synchronous development mode, in order to save time, here take the basic mode as an example, briefly.
1. Determine the content of the display and write the page Html
two。 The specific form of each data, such as: some need to be represented as a drop-down list, some need to be represented as a radio button, and so on.
3. The logical layout of the form of interface expression, the so-called logical layout means that the expression of some data should be put in front, some should be put behind, some should be put on the top, and some on the bottom. For example, for a business applying for leave, there is a start time and an end time, so it is obvious that the performance of the start time should be ahead of the end time. The artist is responsible for the beauty of the final page, the general art can not move the logical layout of the interface.
4. After completing the first three steps, you will have the general appearance of the presentation of the page, and the following needs to do functional development. The first is the source of the values in these representations, such as where the values displayed in the drop-down list come from. There are many sources of values, such as coming from the database, fixed values, the intermediate results of a broken program running, passing the previous page, and so on, of course, typically from the database.
Well, once the source of the values is determined, the developer has to write code to get the values and then assign them to the corresponding representation.
5. There are also some special, that is, the real operation is one kind of value, but another kind of value is displayed on the interface, for example: there is a user number in the database, and the user name must be displayed on the interface, but all operations have to manipulate the user number. We divide this situation into: real value and performance value, they have a certain internal relationship. These are for developers to transform and maintain.
6. Next it's time to develop a functional event response. The user clicks a button or triggers an event, first of all, the client: data detection, client event processing; then submit to the server, the server to obtain the data submitted by the client, and then call the corresponding logic layer interface to respond. Of course, how to write the implementation 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, and the developer also needs to write code to deal with it, choose which page to display, how to display the data and information, and so on.
8. In the whole process of interaction, we must also consider how to control permissions, such as: some data cannot be displayed, some data cannot be edited, and so on; we also need to consider the configuration and internationalization of messages, and so on. These functions originate from the logical layer, but the actual control goes to the Web layer, which needs to be controlled by developers.
9. After completing the above development steps, the basic functional development of the page is over, and then the developer needs to consider the aesthetics of the page. People may say, "if there are artists, what do you need developers for?" In fact, most artists can only produce a static page beautification template, artists for a push of Java code and Html miscellaneous, mostly there is no way, not to mention some content is dynamically generated, the artist is even more impossible to fix. Or developers have to fight, according to the template given by the artist, start to add Css:class, id, style.
10: with the completion of the above development, the development of the basic page is completed. the last step is to organically organize each page and develop the overall application navigation framework of the application, usually the menu. then combine each functional page with the menu to form a complete application.
Here we omit the repeated debugging process during the development period and only summarize the development steps.
The purpose of choosing the Web development framework
First of all, there is no framework, what we need to do, understand this, we can better understand the value of the framework.
A frame, in popular terms, is a semi-finished product, that is, the parts that make up a machine. The same is true of the framework we use at present, whether it is a basic underlying framework or a converged type of paid framework.
The choice of framework depends on the actual needs of the project, the underlying framework is suitable for the construction of projects with plenty of time, and the fusion framework (rapid development framework) is suitable for short-term projects. in terms of cost, the general fusion framework can reduce the workload of development and improve work efficiency, because it has integrated a variety of common functions, such as ERP, OA, CRM, BI, and even mobile APP.
Select the standard of Web development framework
The standard is not immutable, it is only a rule of thumb, and the main starting point is the business functions of the integration framework, so it is only for reference.
1. Choose the Web development framework that can provide more and better help to our development process, with strong functionality and stability.
2.Web development framework learning must be simple, start must be fast, after all, no one is willing to explore in the complex and chaotic framework, a mature integration framework, if it takes half a month or even a month of learning cycle, then this framework really needs to be discussed.
3. Good technical support. Whether 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, and if it cannot be solved in time, it will have an impact on the development of the whole project.
In addition, we must consider the comprehensive cost, in fact, this is the biggest problem in the application of open source software, in addition to the problem is to consult the source code, or online search for solutions, usually a problem will lead to 1-2 days of development pause, serious or even a week or more, a project has so many times, the overall development cost of the project swished up.
The 4.Web development framework must have the ability to integrate other technologies, such as using Spring or Ejb3 at the logical layer, and the framework as a whole should be easy to integrate with them.
5. Powerful expansion function. As I just said, no matter how good the framework is, it is impossible to cover everything, and the actual situation of each enterprise is different, so the expansion function of the framework is strong enough to meet the needs of new business. However, it should be noted here that the extension is simple, and it is not appropriate to force it if the overall functionality of the framework is limited because of the extension.
6.Web development framework had better provide visual development and configuration, visual development to improve the efficiency of development, has been recognized by the industry, and this function has been relatively mature, not much detail.
The design structure of the 7.Web development framework must be reasonable, the application will be based on this framework, and the unreasonable design of the framework will greatly affect the scalability of the whole application.
8.Web development framework must be a good combination of the current company's accumulation, can have a good project docking. In general, the company has accumulated a lot over the years of development, and it can no longer be used just because of using the Web development framework, which may outweigh the gain.
9. Don't think too much about the frame. To be sure, all the frameworks on the market can not be perfect, nor can they be suitable for all application scenarios, so we must understand its scope of application and judge whether it is appropriate or not before selecting the model.
Here we recommend an agile development framework learun, which is used by our company. We would like to make a reference for selection. Free experience address: http://www.learun.cn/Home/VerificationForm
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.