Thoughts on the development of web performance layers

zhaozj2021-02-12  180

Thoughts on the development of web performance layers

The web's performance layer has always reflected in the personality of each framework. The genre is complicated, and the secrets are stacked. When we are charming, when we do development processes and technical architecture definition, our most headache is the design, design of the show. What is the principle? How to decide the development process based on project characteristics, and which expression layer frame decides to adopt. Thin and RICH clients and early host and C / S distributed application development models are similar, but only turn the client program into a browser. Personally think that the THIN client is suitable for the site application or the interfacia and data filling work, and the RICH client is more suitable for enterprise applications. Still discussing the performance layer development technology of the Web in accordance with some experience in the project development process. First, Thin Client: In 2001, I divided the Web development into several geography: 1, ASP, PHP, JSP, the HTML class performance code embedded the program language of the business processing code, the main body is the page code dynamic program logic, Taglib, JavaBean technology can basically get into this genre; 2, CGI, servlet, ie dynamic program logic page code processing; most of the frameworks are expanded based on this mode; 3, plugin, ie The ActiveX, Applet is used for business logic and special performance processing; (the way is not necessarily very careful, huh, huh.) The third way, for Java interface programming, I have a fear, :), I have never tried, there is Opportunities are also better to talk about this expert. The first way and the second way is adopted in Thin Client mode, I think it is possible to see how the page person's ability and how to use the frequency of the page, if it is the application development of the site class, using the second Many ways to be good: l Site applications are highly required for the professional requirements of the art, so that the art workers understand the programming, if you have a big website, you will have the same feeling. l Users have a very high-quality requirement of the page. The user's page often changes, it is difficult for users to lock the interface, the template change control, and the development of the development of the big injury, relative to the front desk. Page, the frequency of future business changes is much smaller. l In late maintenance, if the first method is adopted, the user often requires interface change maintenance requirements in the later period, or requires an increase in multi-set template, and uses programmers to do this, which is undoubtedly increasing costs for the company. If an item of the template changes, the interfaces and programmers will suffer. In this case, the technical design of the performance layer should facilitate cooperative development of the front and back, facilitates implementation and maintenance. The first layer we did, is the idea of ​​using the template plus label, or DLEE is done (it is very cattle), putting the page template, defines several tags, constant replacement, cyclic processing, etc., tag syntax The HTML's annotation syntax can basically do pages and program separation. At that time, the programmer used PERL to do the page output was very painful. The page did not understand the programming, and the situation can be done. Everyone is still satisfied. Later, we wanted to use XML and XSL to develop. Dlee analyzed the opinion after Cocoon was a good visualization tool to perform XSL write. The future experience proved that there is no routing in the same time, these are 2000 things. (Dlee left the company in early 2001 to Germany).

From the development of website products to future website products, the design idea of ​​the performance layer is always based on template technology. The design principle is that the template cannot contain any program code, which is very paranoid, huh, huh. Based on this idea, many frameworks of the Apache project group realizes technology to be considered as unsuitable, including Turbine, Velocity, etc. "Page template, not page template embedded in code. From the company's perspective, I like the practical simple framework, and I can't learn costs too much, which is the reason for some frameworks. Mode of template processing, specific implementation can have many ways, such as the data returned by the service processing, define the label with the XSL standard, written on the page in the comment method, and bind output through the engine Of course, it is also possible to consider pre-compiling the template file into the XSL file, and then bind the output. Adopt template technology, since the processing of each performance layer needs to read the disk file through the file call method, the IO operation will be frequent, the improved idea is to refer to the template object, the specific design idea can refer to ENHYDRA, which is not expanded here. . For Thin Client's performance layer technology, my experience is no particularly good lightweight template framework and publishing engine, including the framework of the Apache project group, all, based on: template, label library, custom label, XML, etc. Various ideas, five flowers, watching a headache.

Second, RICH Client: Using Rich Client Properties, I want to use it more appropriate under the development of enterprise application systems. The performance layer of the enterprise application system has the following features: L user interface usage habits, users are accustomed to the application interface of the C / S mode, habits to Windows GUI style, if the page is refreshed, the jump is very unsatisfactory; l The browser is fixed to IE, which means that other browser software can not be considered, technology can be technically locking the MS browser technology; L is wide, and there are many non-considerable considerations, such as JavaScript, if it is a website, need to consider Traffic requirements; L with the desktop and office software such as the integration of Office; 1, IE as the Client side Due to only the performance layer, for other parts of MVC, it is assumed to be this simplified architecture: MODEL layer Returns Vo, Controller layer The VO calls the corresponding UTIL program for XML data package. The data returned after the Server side requests the data, which can be defined according to SOAP format, so that SERVER is completely independent of the server and the client. Based on the above features, we need to reconsider the architecture of the system, which will be all on the front end, and the front desk is not a template production, but the client program development, it is necessary to understand business logic, but use JS. The structure is expanded in the structure, and the client also uses the MVC mode. Each interface program is made as Controller, the component object, event processing, etc. of the master JS, each component object is interactively interacts with the Server end. The relationship between components is also performed by JS, and the performance of component objects achieves similar functions similar to Windows GUI through XSL, HTC, and JS. Since I use XMLHTTP to develop a front program development, for the front desk developers, many technologies need to learn MS, and to put interface XSL, plus a lot of JS code, and the workload is large. In this way, although the user feels similar to the C / S application, there is still differences after all, and the client program is loaded on the server side, and the speed is still slow. 2. Other applications As a CLIENT, we have a project. Customers require Delphi to develop clients (client applications developed by Java, because of performance, appearance, development difficulty, etc., is made by customers), background The service must use J2EE, I don't know if this is not an application method of the RICH Client performance layer?

Third, the assembly interface development There are currently many development frameworks to highlight the idea of ​​laying the layers, the popular frames include Tapestry, Turbine, Echo, JSF, etc., Echo, JSF has no in-depth research, and I don't dare to say. Personally prefer Tapestry, which plans to use TapeStry as the main framework in the workflow application development framework. Later, it has not been concerned about this project. Turbine, April 2003 plans to modify JetSpeed, make a support for drag, web-based portal configuration tools, think more simple, found that this guy is an application system based on Turbine, analyzing these two systems After, it is still given up the original plan, and the time of the two worships, the progress is tight, just simply carry out the Chinese and style transformation, integrate the user's certification section and the company's products. After doing it, everyone said it is not as good as the previous version. The main interface, the last version is the project team to drag the interface configuration tool that dragged by a component made by JS and DHTML, and does not use the portlet standard, and the speed is relatively slow, but it is very beautiful. This thing makes us the impression of Apache, began to become bad, huh, huh. But one of the technologies, if there is a good tool and rich resource library support, it is easy to get started, then it can use and spread quickly. The same is based on the key to the development of interface components. It is the ease of use of the assembly library. If there is such a product, the development efficiency of the web performance layer can be truly improved, and JSF is said to provide visual tool support. And Apache's Jakarta project group has done a lot of JSF and Structs integration, temporarily see, don't know when to have a good development tool. Speaking of development tools, let me think of a thing, that is, when we undertake an e-commerce website, we have hired a project manager, which is said to be very familiar with WebSphere Studio, leadership also requires IBM's WebSphere He demonstrated us a DB rapidly developed example, similar to the PB data window, and the project cannot be used for any reason, this PM has no way, can only be the same as everyone, using JSP edits, the final result is code quality The worst is him, it is terrible. Exterior: 1, Struts has always been a colleague asked me: Why don't Struts do application development framework? It doesn't say that it is not good, there are 2 reasons: many places have "Old", such as Filter and Dispatch, have formed standards in servlet 2.3, becoming the function of servlet container, if so, Struts It seems that modifications should be made to accommodate the Change of the Servlet standard. The performance layer is based on Taglib, extending the company's existing XML and XSL performance layers need to renovate, it is said to be integrated with JSF, or then say it after it is released. Now often talk to colleagues, Apache's things and it is not the same, can't believe.

转载请注明原文地址:https://www.9cbs.com/read-6817.html

New Post(0)