Building a Module development project
The development of DNN modules can be done through two development environments:
First, build the module development project under the whole DNN solution.
Advantages: can conveniently reference DNN components, reference to the implementation of other modules, you can at any time through the "Go To Definition" operation to view the definition of the method in Dnn, debugging is also relatively easy.
Disadvantage: Slow speed. It takes a lot of time to open projects and build projects.
Second, in a separate way to establish module solutions.
The pros and cons are exactly the same as the first, but the speed is the key in real-world development, and I'm going to talk about some of the things I've learned in a separate way to build a module development solution.
Building a separate solution for module development needs to address three issues:
1. Where can I build a solution to help you develop side tests?
2, how to reference the original DLL, the resulting DLL into that directory?
3, how to debug?
If you want to be good, its prerequisite. First, we should prepare the following tools for developing DNN modules:
DNN Project Templates: A functional plug-in that is provided by Dnnjungle under Vs.net 2003. Once installed, you can create DNN projects and some DNN items in the VS environment directly through it.
Codesmith templates: A set of Codesmith code generation templates used to generate DNN module business Logic layer code and data access layer code.
Codesmith: Code generation tool, combined with the above module, can greatly speed up the code writing work. (http://www.codesmithtools.com/)
Related URL: http://dnnjungle.vmasanas.net/Development/Templates/tabid/28/Default.aspx
When the above tools are installed, we can start our module development work. The module uses the Vs.net 2003 development environment to DNN3.3.3 as a platform for databases using SQL Server databases.
1, create DNN Module presentation Layer project. Run VS, create DNN Module development project. If you install DNN project templates, when you create a new project, the Visual Basic project for DotNetNuke 3 and Visual C # project for DotNetNuke will appear at the project type. 3 "These two new projects. Here I choose vb.net as the development language, in fact, in C # is the same can develop DNN module. Select the DNN Module template with the project name set to: Article, where the project location selects the Desktopmodules directory of the DNN program's folder, which is beneficial for edge development testing. The following figure:
2, create DNN module data Access Layer project. Click Add "New Item", select "DNN sqldataprovider DAL", the project name is: Article. Project location: Desktopmodules\article\providers\dataproviders. The following figure: