Open source-> step-by-step implementation of cnblogs blog collection tools-> detailed design

Source: Internet
Author: User

 

Welcome to the cnblogsfan open-source project. If you see this project for the first time, click here to view details about this project.

 

After completing the overview design of the project, you can gradually refine the components of the project according to the content of the overview design, that is, the detailed design we call. Detailed design is an important step in the entire project development step. A good design is the prerequisite for successful projects, the detailed design directly determines the software quality and the difficulty of the software in the future maintenance process. For more details about the design, click here.

 

As described in the overview design, because the project focuses on the analysis of function implementation, the detailed design here is also a simple version, and does not involve a specific functionAlgorithmThese are necessary in the detailed design of the specification. The specific algorithms of the functional module will be used in the next encoding process.CodeIn the form of a document.

 

Here, we mainly introduce the structure and workflow of each module of the project, as well as the identifier naming protocol, annotation protocol, and the description protocol of the Development document during the coding process. At the same time, describes the references that may be used during development.

 

I. module structure

1>. UI Module

User Interface (UI) is the most intuitive module. The quality of UI module design determines the difficulty of software operation and the first impression of the software. In this project, the preliminary design of the UI module is as follows:

1>. Single Document Interface (SDI, Single Document Interface );

2> the window size can be adjusted with the minimum size limit;

3>. Minimize the window to the system tray.

 

The UI module structure is shown as follows:

 

The preliminary design sketch of the cnblogsfan main interface is as follows:

 

2>. Random acquisition module

The essay collection module is a process for collecting webpage information, the entire essay collection module is a combination of the essay Filtering module, information collection module, data analysis module, copyright notice module, and data storage module. The following figure describes the minimum units of a collection:

 

3>. Data Analysis and Processing Module

The data analysis and processing module is used to process the casual information on the web page and sort and process the content to meet the requirements stipulated in the requirements. The data analysis and processing process is,Obtain web pages from a collection-compliant task queue--> Analyze the text format and links to related resources --> Obtain collection results--> Call the copyright notice module to copyright the collection result.-->Write locally. The figure is as follows:

 

4>. Configuration Management Module

The configuration storage of cnblogsfan configuration management is implemented using the data storage module of Python. The configuration management diagram is as follows:

 

5>. initialization module

The initialization module is used to initialize the software by reading the software configuration information from the configuration management module. This process is relatively simple and no longer illustrated.

 

 

Ii. identifier naming Protocol

1>. Local variable naming

Use the * Java * style naming method: The first word is lowercase, And the other words are capitalized.

> Editblack

Badclock

Isfile

 

2>. global variable naming

Use the * Windows type * naming method that removes the type Prefix: the first letter of the word is capitalized.

> Appname

Timercount

Isgamestarted

 

3>. member variable name

①. Static member variables

Use the ** global variable name ** method.

 

②. Common member variables

Use ** local variable name ** to start with an underscore.

> _ Editblack

_ Isfile

_ Give

 

4>. control variable name

The control variable name uses the control abbreviation as the prefix.

Abbreviations of each control:

Widget Abbreviations
Button BTN
Text Box Txt
Label (statictext) LBL
List box LST
Combo box CBO
Check box Chk
Single region Rdo
List controls Lstctl
Tree Control Tree
Box Box
Progress bar (gauge) GUE
Animation Control Ani

 

5>. method/function naming

①. Independent Functions

Use the * traditional C style * name.

> Get_files ()

Set_global_text ()

 

②. Member Methods

Use * Java-like * naming.

> Getfiles ()

Setglobaltext ()

 

③. Event Response Methods

The same as the member method, with 'on' added before '.

> Onclick ()

Ondocumentcomplete ()

 

6>. type name

The name is in uppercase.

> Class directui:

Class effecactbase:

 

7>. Module name/file name

The name is in uppercase.

> Searchingdlg

Kumquatroot

Maindlg

 

 

III,Comment Protocol

Because the project implementation process is analyzed, the comments should be as detailed as possible, and the general comments should be followed in terms of specifications, which is not repeated here.

 

 

Iv. Development Document Description Protocol

Follow the markdown syntax.

 

 

5. Possible references

1>. Basic Python tutorial (version 2nd)

By magnusliehetland)

 

2>. wxpython in action

By Harri pasanen and Robin Dunn

 

3>. Python v2.6 documentation

 

4>. wxpython reference

 

 

After detailed design steps, the next step is to enter the coding stage of the project. You are welcome to continue to pay attention to the latest development of the cnblogsfan open-source project.

 

 

Project address:Https://github.com/mrwid/CnblogsFan

 

-------------------

 

WID, 2012.10.12


Next article: Open Source-step-by-step implementation of cnblogs blog collection tools-Implementation of the main interface Layout

Previous Article: open-source> step-by-step implementation of cnblogs blog collection tools-> Outline Design

 

 

 

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.