| In today’s era of information technology, the computer has been in people’sdaily life plays an important role. Chinese content on the Internet develop slowlyand gradually play a leading role. The importance of Chinese input has becomeincreasingly prominent. Input method is the basis for the software. Input methodmakes people’s daily work and life more convenient. Especially Pinyin input methodis most familiar one for ordinary users. Pinyin input method for users has a greatersignificance. A simple, practical and convenient input method is very important.Pinyin input method is based on Text Services Framework. Text ServicesFramework provides system application interface. Pinyin input method realize TextServices Framework interfaces, response system messages, and Client process thesemessages in turn to complete the entire input process. I based on high cohesion, lowcoupling rules to module division. I put the platform-independent part of thedivision as a public module. It has nothing to do with the input method framework.And is directly supplied to the input frame. That reduces the development effort.I analyze user habits and summarize the input requirements. I understand theinput method development in the world and further clarify the requirements. In thispaper, the text service module and the common module. Text Service Moduleadaptes Text Services Framework, implements framework interfaces, responds tosystem messages and retrieves data from the system. Data can be provided to thepublic module and display module for the UI service. Common module contains theengine management module, the module configuration tool and the skin threesub-modules. Engine management module manages multiple interfaces inconsistentengine, unifies engine interface, puts different engines provide results for the secondcandidate sort, maintains a local cache of candidate words and finishes flip function.Tool provides a graphical user interface to configure the input method. Skin moduleparse skin data files, to get skin data and draw out the skin. Basic tool module isbased modules and a toolbox for other modules. Each of these classes can solve aspecific function, Public module will be used frequently in the project, reducing thefunctional similarity of the code, so that the whole project is more simple and clear.Finally, I conduct functional testing and compatibility testing to ensure thesystem to meet expectations. This article will provide new ideas for otherdevelopers. |