Thinking of design patterns

Source: Internet
Author: User

Recently, I work on design and coding in UI for a database query requirement, I realized that what the design patterns palys It's role in my coding.

First, actions of UI in Windows system, message mapping action and response transactions must be resonable aranged. for example, these are four relative query condition in Ui, two must select from dropdown list, one may select from dropdown list or input by user, and the other one must input by user. user click query for query action. now, how many actions will this compones occupt? What kinds of actions every compones need to response? And how to response? Besides, string input by users must be check for avilable. When check and when update the combo or edit value to the member value?

Second, the UI function shocould not confuse with the transation logical functions, that means you need to create new class for this UI transaction logic handle. this new class may have one or more member values and functions, and which can call by UI Moudle, and which shocould be private use may make me hard to design.

Others, this new class shocould by the only one communicate with the UI function how data construct and destruct still need time to think.

So, I realize the importance of the design Paterns.

 

The book writen by Erich Gamma named <Design Patterns> shocould be a readable book in this field.

Buy it and enjoy it.

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.