Apparch (1): User Interface

Source: Internet
Author: User

User Interface Component functionality

User Interface Components
1. Do not participate in data processing.
2. If you need to display data or change the status on the interface, you must have a corresponding interface information processing component.
3. It can be encapsulated with the Controller and view functions.

When accepting user input, user interface components
1. obtain user input and assist users in this process, including visual reminder (Tool tips), data verification, and appropriate control (data range.
2. capture user input events and notify the Controller to call interface components to change the displayed data. At the same time, initiate an activity on the current user processing process or change the data status of the current user process.
3. restrict user input according to the context (for example, only numbers can be entered in the quantity field ).
4. Data entity verification.
5. Map and convert the information to convert the value of the user control into the information that can be used by the underlying component. (For example, a user interface component may display a product name but pass the product ID to underlying components ).
6. interpret user actions (for example, a drag-and-drop operation or button click) and call the controller.
7. Use cache.
8. Use common paging components.

When rendering data, user interface components
1. Obtain and describe data from business components or Data Access Components.
2. format the data in an understandable way.
3. Solve applicationsProgramLocalization issues.
4. Package Business Entity objects.
5. Provide status information for users.
6. You can customize devices based on user habits and devices used.
7. Provides the function of revoking an operation.
8. The copy and paste function is provided.

Windows desktop user interfaces
1. Window from control.
2. embedded HTML.
3. Other application plug-ins.

When creating a Windows Forms-based application, consider the following recommendations
1. In multi-form applications, Data Binding can be used to avoid complex data synchronization.Code.
2. Avoid hard-coded data synchronization between forms, and use processing components for data synchronization, which facilitates format reuse.
3. Implement custom error handle to display a good exception interface for users.
4. Verify user input.
5. custom controls only set the required properties to public.
6. Implement controllers, encapsulate related logic, and improve maintainability.
For example:
Private void additem_click (Object sender, system. eventargs E)
{
Additemtobasket (selectedproduct, selectedquantity)
}
Public void additemtobasket (INT productid, int quantity)
{
// Code to add the item to the basket
}


Internet browser user interfaces
1. Implement custom Display error pages, and implement a custom global exception handle in global. asax.
2. Verify before submitting the data (without relying on JavaScript ).
3. custom controls only set the required attributes to public.
4. Implement controllers, encapsulate related logic, and improve maintainability.

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.