In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the example analysis of UML modeling in Web applications. I hope you will get something after reading this article. Let's discuss it together.
UML Modeling in Web Application
By analyzing the architecture pattern of Web application and introducing UML extension mechanism, this paper realizes the modeling of various objects in Web application. This paper discusses the UML modeling and development method of Web application under .NET framework, and applies it to a practical research institute management system. The practical application shows that this method is helpful to reduce the complexity of development, shorten the development cycle, and achieve good results.
1 introduction
Web-based application system generally consists of two parts: server and client browser. The server mainly deals with transactions logically, and the influence of users on the business logic on the server makes Web applications often have the characteristics of complexity and high dynamic. This characteristic makes the development of the system based on Web application more complex and difficult to manage. In order to solve the above problems effectively, shorten the development cycle and reduce the maintenance cost, the main strategy is to model the Web application. UML is the dominant unified modeling language in the field of object-oriented technology. In addition, the .NET Framework provides a complete basic class library, database access technology ADO.NET and network development technology ASP.NET on the basis of the common language runtime CLR, so that developers can quickly build Web applications. Therefore, this paper mainly discusses the UML modeling and development method based on .NET Framework Web application, and applies this method to the research institute management system developed by the author. the practical application shows that this method can effectively reduce the complexity of system development and management and improve economic benefits.
The Architecture pattern of 2Web Application
The basic architecture of Web application includes browser, network and Web server. The browser requests a Web page from the server, and the Web page may include client script interpreted and executed by the browser, and can interact with the browser, page content, and other controls contained in the page (JavaApplet, ActiveX controls, plug-ins, and so on). Users enter information into Web pages or navigate to other Web pages through hyperlinks to interact with the system and change the "business state" of the system.
2.1 thin Web client
It is mainly suitable for Internet-based applications, with little control over client configuration. The client only needs a standard Web browser and can request and display standard HTML pages. All business logic is executed on the server.
The client browser requests page resources from the server through the HTTP protocol, and the server parses the requested URL into files in the file system, or it is processed by the application server and may change the business state to get the requested page and return it to the client.
2.2 Fat Web client
The fat Web client is best suited for Web applications that can determine the client configuration and browser version. The client communicates with the server through HTTP and executes business logic using DHTML, Javaapplet, or ActiveX controls. The connectionless nature of HTTP determines that client script, ActiveX controls, and JavaApplet can only interact with client objects.
When the client displays the received page, it executes embedded scripts, which can usually be executed in different threads and interact with the page content through the DOM interface.
2.3Web transmission
In addition to using HTTP to communicate between client and server, Web transport mode can also use protocols such as IIOP and DCOM to support distributed object systems. The Web page communicates with the remote object server through the remote object stub and the remote object transfer protocol. The server manages the life cycle of the remote business object and provides services to the client object.
A remote object stub is an object that executes on the client side and has the same interface as the remote object. When methods are called through this object, they are encapsulated and sent to the remote object server using the remote object transfer protocol RMI/DCOM, which interprets the request, instantiates, and invokes the methods in the actual object instance.
In practical applications, the above architecture is often used comprehensively according to business needs. In our institute management system, thin Web client and Web transmission architecture are adopted comprehensively. The client uses JavaScript for client authentication and submits the verified data to the server for processing. In the background management of data, the Web transmission architecture is adopted to maintain the open connection between the client and the server in order to have a long and complex session.
Web Application extension of 3UML
UML (UnifiedModelingLanguage) is a general visual modeling language, which is suitable for all kinds of software development methods, all stages of software life cycle, various application fields and various development tools. However, when modeling Web applications, some of its components can not correspond to the standard UML modeling elements one-to-one, so UML must be extended.
The three core extension mechanisms of UML include stereotypes, tag values, and constraints. The most important extension mechanism is stereotype, which can not change the structure of the original model, but can add new semantics to the model elements, which is usually represented by "stereotype name". Constraints are semantic relationships in model elements that define how models are organized together, usually expressed as strings between a pair of "{}". The tag value is an extension of the properties of model elements, and most model elements have properties associated with them, usually represented by parenthesized strings.
3.1Web page modeling
Web pages may contain both client-side and server-side scripts, so they must be modeled separately. Server-side Web pages generally contain scripts executed by the server, which are combined on the server each time they are requested, update the business logic status, and return to the browser. The client-side Web page may contain data, presentation, or even business logic, which is interpreted and executed by the browser and can be associated with client-side components, such as JavaApplet, ActiveX, plug-ins, and so on. The two are related to each other through a directional relationship. The stereotype of this association is «build ».
Hyperlinks in Web applications represent navigation paths and are represented by associations with the stereotype «link ». The tag value is used to define the list of parameters that are passed along with the hyperlink request for use by the server-side Web page.
Most of the .NET Framework builds server-side Web pages, which are compiled to generate HTML code and passed to client browsers. At the same time, in order to improve efficiency, for those Web pages that do not contain business logic, the client-side Web page can be directly established with HTML elements in the .NET Framework, and then the invocation relationship with the corresponding server-side Web page can be established.
3.2 form modeling
In the UML modeling of Web application, the form is the basic input mechanism of the Web page, including, and other input elements, using the "Form" stereotype for modeling. "Form" has no action, and the operation it interacts with is a feature of the Web page that contains the form. It can be associated with an Applet or ActiveX control as an input control, and the form content can be submitted to the server for processing. There is only one form for each page in .NET, which contains all the input elements, usually represented as server-side controls or client-side controls, in which server-side controls are compiled and transferred to the client side by the server-side Web page.
3.3 component modeling
The components in Web applications are divided into server-side components and client-side components. The more complex business logic on the server side is usually completed by the middle tier, including a set of compiled components that encapsulate all the business logic. Therefore, the use of the middle tier can not only improve performance, but also share the business functions of the whole application. The common components in client Web pages are JavaApplet and ActiveX, which are used to access various resources of browsers and clients to achieve functions that can not be achieved by HTML.
The Web application extension defines two abstract component stereotypes, "staticpage" and "dynamicpage". "staticpage" implements the client component. The main task of "dynamicpage" is to provide mapping between the physical files of the runtime system and the logical representation in the logical view.
3.4 Framework modeling
The Web application extension defines the stereotype "frameset" and "target" and the relational stereotype "targetedlink" to model the framework. "frameset" maps directly to the tag of HTML. "target" represents another Web page or frame referenced by the current Web page. "targetedlink" refers to a hyperlink to another Web page, but it can only be provided in a specific target.
After reading this article, I believe you have some understanding of "sample Analysis of UML Modeling in Web applications". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
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.