Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

An example Analysis of the Evolution History of Winform Development Framework

2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the example analysis of the evolution history of Winform development framework, which has a certain reference value, and interested friends can refer to it. I hope you will gain a lot after reading this article.

1. Traditional Winform development framework

The traditional Winform development framework I refer to here is an application framework that uses database middleware to access the database directly. According to the location where the database management system is deployed, it may be divided into stand-alone version (such as Access database, Sqlite database, etc.), LAN network version (such as SqlServer, Oracle, etc.), LAN network version, generally requires the deployment of the database on another computer in the local area network. In this way, the application is separated from the database, which is also conducive to the improvement of performance and data sharing.

This development mode, in dotnet, is to use ado.net-based operations to achieve direct access to data, which is a relatively conventional development mode. However, the problem is that data cannot be accessed through the Internet, and business management systems can only be deployed and used in a stand-alone or local area network environment. Compared with many current distributed applications, it has certain limitations.

However, this method is also a very common mode, which is often used in the maintenance of some internal business management systems or some workflow systems. Because the experience of Winform is good, the data can be managed and controlled effectively, the cost of development and deployment is relatively low, and the system development efficiency and application performance are also relatively high, so it is a common framework performance model.

Such as below my Winform development framework interface, is a relatively standard, traditional interface, this kind of interface is generally more common.

This Winform development framework is through the data access layer to access a variety of specified databases, such as SqlServer or Oracle, etc., generally encapsulated at the bottom of the framework, basically will support a variety of databases, easy to use in different businesses. The architectural design diagram of my traditional Winform development framework is shown below.

2. Traditional WCF development framework

In addition to the above traditional WInform development framework, based on WInform technology and WCF distributed technology, formed another Winform development framework, that is, WCF development framework. My introduction of this WCF development framework is also more, most of which come from real project applications. In fact, WCF technology can be used on both Winform and Web. WCF technology can be used in many fields, such as Web development, instant messaging applications similar to Socket messaging, and so on. The WCF development framework introduced here is a WCF development framework based on Winform.

The traditional WCF development framework defined here refers to the use of the pattern of the WInform framework to load the WInform S way to obtain data for display, and the data is not stored locally. Is to take the data directly and display it on a list control or other underlying control.

Because the WCF framework applies many new technologies and is based on distributed network environment, it is necessary to consider the deployment of services, the security of data access (user name and password access, X509 certificate encryption, other authorized access), data response and error handling, etc. If it is * contact, there is no good guidance and case study, it is possible to digest the relevant concepts and understand It takes a long process.

The traditional WCF development framework, because it is not caching data locally, requests data from WCF service in real time through WCF service proxy, and then displays the data. The development idea is relatively simple, so this method is relatively common in many WCF applications.

The traditional Winform-based WCF development framework, the interface can be the same as the above Winform development framework interface, but its data acquisition mechanism is different, it is not through the data access class to access the local database, but through the server to publish WCF services to obtain different data objects, and then show in Winform, such as the following is a schematic diagram of its access mechanism.

For the architecture of this traditional WCF development framework, it actually communicates with the WCF service of the remote server through the client-side WCF proxy class of Winform, which is generally based on the XML format of the Soap protocol. Of course, you can well configure the encryption mechanism, such as X509 certificate encryption, so that the data transmission is more secure, and for WCF services. The authentication method based on custom user name and password can also be used to effectively improve the security of the WCF service interface. The following is the architecture design diagram of the WCF development framework, from which we can see that the interface presentation layer of its application is associated with the WCF service client proxy layer, while the proxy layer is associated with the WCF service layer, which isolates the disadvantages of the application program accessing the database directly, improves data security, and enables the application to achieve distributed development and application.

3. Offline WCF development framework

Compared with the traditional WCF development framework described above, this offline WCF development framework combines the data access methods of the traditional Winform development framework, and also makes use of the characteristics of WCF distributed data acquisition, so that the data can be used offline, which is more suitable in an application system scenario that requires centralization and does not affect normal business operations, such as my network version of water supply management software. Using this model, branches can maintain data independently and operate normally without a network, but when the network is unblocked, they can send branch data to the head office or obtain public data from the store.

The WCF development framework of this offline mode is a mode that does not require a high network environment and can not only be used independently, but also have business data exchanges with headquarters. In this scenario, it is a traditional Winform development framework pattern without considering data synchronization and upload.

Considering data synchronization may make the entire offline system more complex, requiring you to record possible data changes (add, modify, delete) and frequent synchronization of system common data. if the synchronization interval is relatively short, then we need to consider more factors.

Offline WCF development framework, data storage we generally choose a stand-alone version, easy to deploy replicated Sqlite database, or Access database, in some special cases, we will choose a larger SQLServer database or Mysql database. Because the WCF development framework application client and server version of the database is different, if there is no more flexible, multi-database WCF development framework, this development model It will be more laborious and cumbersome.

Offline WCF development framework, a feature is basically display, and save and other operations of the database, are local databases, not remote server database, so that you need to record all changes to the database operations, including write, delete, modify, etc., so that in the case of unblocked network, you can upload data to the server.

With the traditional WCF development framework introduced in the second point above, this is the addition of a local database, which can improve the network dependence of data and the response of other daily operations, which can play a good role in some places where the network environment is not often connected, and the offline synchronization of data can be realized by exporting the data that need to be updated to a file. Can basically be completely independent of the Internet.

The WCF framework architecture diagram of this pattern combines the characteristics of Winform development framework architecture design diagram and WCF framework architecture design diagram. There are not only modules for accessing local database, but also modules for accessing and operating WCF services, which play different roles in different places.

4. Hybrid WCF development framework

In addition to the above, there is another kind that can freely switch between traditional winform development framework and WCF development framework, which can be solved by its practical traditional WCF development framework or offline WCF development framework. However, some people think that accessing WCF services in the local area network is a bit of a mountain out of a molehill, and there is also a certain loss of performance, so you can encapsulate one more layer when the interface calls specific operation data classes. It is also possible to configure to point to a WCF proxy class or a business access class in the Winform framework.

In another case, the system is divided into many modules (suitable for both WInform integration and WCF integration), switching on light in different situations, and only a jump of conditional statements can achieve specific switching, which is very conducive to the integrated encapsulation of the module.

To sum up, my own selection of framework applications for various projects is based on the most suitable customer scenarios, such as general small business management systems, which can be quickly developed for customers with Winform development framework; while for distributed business management systems, where the network is not a problem at work, I generally choose the traditional WCF development framework. For the complex ones that cannot be guaranteed by the network, which require distributed applications and centralized data management, the offline WCF development framework is generally adopted. In order to better develop the integration module and adapt to the integration of various scenarios, then the module may be required to have the characteristics of a hybrid WCF development framework.

Thank you for reading this article carefully. I hope the article "sample Analysis of the Evolution History of Winform Development Framework" shared by the editor will be helpful to you. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report