Order
DNN as an excellent portal framework, you can expand the application by installing various functional modules. It is through this excellent function that the DNN framework can be implemented: article Management, picture Management, document management, forums, blogs, stores, surveys, FAQs, and so on a variety of modules to meet the actual needs. With this powerful framework support, we can easily implement these modules. For example: Permission control, multi-language support, multiple database support, search, aggregation, skin and other functions, I can easily through the framework implementation. If it's normal, we need to spend a lot of time just to achieve these basic functions. Now with the support of the DNN framework, we can focus on the business logic and processes of the module, thus greatly improving development efficiency and quality.
"DNN Module Development series of articles" will be developed through a simple article module (Article) as an example, to explain the entire module development process, and modules related to some of the DNN namespace functions, how to implement the module search, aggregation, import and export extension functions, as well as how to maintain and upgrade DNN modules later.
Generally speaking, DNN module Development has the following 6 steps, I will also take each development link, talk about my experience in the DNN module development:
1, analysis and design (determine the module function, determine the data field table structure, determine the data table name, determine the name of the solution, such as several work)
2. Establish the development environment (determine the file structure of the entire module, explain the DLLs and namespaces required for the DNN module, and the functions of these namespaces)
3, programming (design requires several controls to implement, the role of each control name)
4, Program coding (introduction of the use of Codesmith, data access layer, business logic layer and stored procedures encoding)
5, to achieve the expansion of the module functions (such as: Search, aggregation, import and export)
6, build the installation script, packaging program. (explain how to efficiently and correctly write installation scripts and build installation packages)
Analysis and Design
First of all, this article module will implement the function: a simple article module, provide publishing articles (including author, title, content, publishing time), List display (digital paging, need to set paging size), need to provide import export aggregation and DNN search function.
Based on the requirements described above, I have established the following table structure
Article Information table: Mycompany_article
ArticleID Article ID int primary key
ModuleID Module ID INT association module Information Table (Modules)
Title nvarchar (225)
Content ntext
Createdbyuser Author int here save user ID
CreatedDate creation Time datetime
Note: Because DNN can install multiple function modules, in order not to conflict with other modules, it is best to name the company + module function Description of the way to name. If your article Information table is named article it is easy to conflict with other articles.
The solution name is also named after the company name + module feature description, so I'm sure the module solution name is mycompany.article.
Through the above analysis, we have a basic understanding of the module to achieve the function, the following can be hands-on development. The next article is the DNN Module Development Series (2)-Building a module development project that will describe how to build a simple and efficient module development project and organize a clear file structure.