An example of smartclient anatomy: issuevision

Source: Internet
Author: User

After a rough anatomy of issuevision over the weekend, I found that some areas are similar to the practices of my current project.

Threadhelper. dll: Provides thread-related components
Splash Screen
Singletonapp unique Program The second instance does not act.
Safelabel-label that can be operated securely under multiple threads
Backgroundworker background worker
Runworkeransy () starts background work
Doworkeventhandler background execution start event execution asynchronous task
Runworkercompletedeventhandler
Reportprogress () Reports background progress
Progresschangedeventhandler progress change event is used to draw progress bars
Cancelansync () cancels background tasks

Issuevisionweb:
Issuevisionwebservices. asmx:
Ivdata: component. Call dataadapter to perform data operations, including business logic.
Securityhelper: encapsulates security authentication operations
Common: Read configurations
Eventloghelper: assists in EventLog operations

Issuevision:
Webservicelayer: provides an intermediary for ws access. The URL is read from the configuration file. credencialheader is obtained from the login user.
Usersettings: local cache of the current user's status and status
Serializationhelper: Encrypted storage of data to files
Dataprotection: encryption and decryption implemented by calling WIN32API
Loginform: Login. Called by mainform. The form fades in and out.
Issuesubject: isubject business model
Saveissuedata () saves business data to a local file
Loadissuedata () Load business data
Appupdator: Key to smartclient. Automatically maintain version updates.

Data is stored and transmitted using dataset, regardless of the client or web server.
Data Access uses the automatically generated dataadapter.

As the business model of the entire program, issuesubject provides external actions such as data, data time, storage, and update.
The display controls in the form listen to data change events, and adjust the desired part when there is a change.

Conflict Detection:
The client obtains modified data from dataset. getchanges () and submits the data to the server through the web service.
When submitting user changes, the Web service listens to the updateerror event of the datatadapter and puts conflicting data in the conflict table and returns it to the client.
In fact, the dataadapter is not used for conflict detection.

Why:
1. Why does the client not use isolatedstorageobject to save temporary data?
2. The conflict table created in dataset is used to save conflicting data. If n Business tables need to check concurrency conflicts, 2n tables are required in DS. Can it still be placed in the original table, just setting a rowerror?
3. Can appupdater be registered to windowsupdate and completed by the system together? Duplicate function, bad smell!

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.