Object-oriented automatic generation of mnemonic code

Source: Internet
Author: User

This is a problem caused by the mother language. With the increasingly sophisticated application of computer technology, which relies on coding to realize the operation of the data is already obsolete, through the way of the mother tongue to achieve a variety of operations is inevitable to achieve the design goals.

4.2.4.1 Proposition

We are based on the Chinese environment, so Chinese is the best way to communicate the results of data representation. The real problem is that the best performance does not coincide with the simplest form of operation. In order to solve this contradiction, the most classic method is to use the Chinese Phonetic Alphabet combination (used to be called "Mnemonic Code", vocabulary will continue this argument) to form a simple way to complete the operation of the data. The question here is: How to automatically generate the standard form of "mnemonic code" data through Chinese characters. This is the Chinese user's most basic specific needs, so it is the first problem to be solved in the encapsulation process.

4.2.4.2 Design Concept

Receives the Chinese character data in a control, obtains "the mnemonic Code" string by a special method and the Chinese pinyin encoding mechanism under the running environment, also needs to solve the memory problem of the mnemonic code. It is customary to store mnemonics in a database field, which can be understood to be bound to another control.

In order to maintain the correspondence between the Chinese character information and the mnemonic code, you can add an attribute to "tb_", which fills in the name of another "Tb_" instance, which is written to the physical table by the dynamically generated mnemonic code.

The Code acquisition program is designed as a special method, so long as the character string can be obtained on the interface, the method can return a "mnemonic code" corresponding to the character string. You can achieve the purpose by invoking the method when you need to get a mnemonic. Although this is a process-oriented conceptual model, it can also solve the problem. If this functionality can be implemented through object-oriented encapsulation, call-level code is no longer needed.

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.