X
dnn.blog.
Back

Rapid Module Development

Over the last months I developed a lot of DNN modules and in this blog I will show you how I do that. I’ll show you some of my tools I’m using and what helps me to do my work in a timely manner.

Database Design with XCase

Every new project starts for me by designing the database. Which entities do I need, how are there relations ? This task is assisted by a tool named XCase written by a guy from Isreal named Elie Muyal. XCase let you visually create your entities, views and relations and generates the needed SQL code to modify the database. Adding a field or constraint and applying the change to the database is easy going. If the module is ready for shipment, Xcase generates the whole needed SQL script for me. Code generation could be customized and I tweaked it for the generation of and placeholders (in 95% of cases. Some small editing after generation is needed). I’m working since over 10 years with XCase now and I think it is worth its money. If you are interested in it please let me know, I can provide some discount to the original price on www.xcase.com !

XCase

Collecting ideas and tasks with Trello

A very important tool for me is Trello which is a free card board system. For every project I have my own board where in make notes, collect ideas or eventually communicate with the customer who has his own Trello account sharing the board with me.

Trello

Module Setup

Module parts

The next step for me is the generation of the module. Here I use a template that is created by myself. If you want to use it for yourself you need to change my default namespace and some other information but feel free to use it by yourself: Bitboxx DNN 7 Template

Beside all needed references, the module template generates the following parts:

  1. ) The controller class ready to use all the DAL2 stuff.
  2. ) The Installation subdirectory. Contains all to create installation + sourcecode packages (see dnntcmsbuild.codeplex.com for further information, made by Ernst Peter Tamminga and myself).  Can handle multiple packages & multiple modules. My XCase generated SQL code goes here
  3. ) Original PetaPoco containes these .tt-Files to generate POCOs from the entities in the database. I tweaked this code a little bit to work inside a DNN module
  4. ) Everything needed to expose your methods as webapi methods is in the services subdir

DAL 2 methods

Writing all this data access stuff is a really annoying task because you have to write the same thing over and over again. Because I’m al lazy bone I sat down and wrote a little tool that generates all I need for a given entity of my database: The “CRUD Generator” :

CRUD Generator

Now I can select my database and the table I want CRUD methods for and hit the “GO” button and the rest is copy and paste. But the CRUD generator does something more. Often I need a standard form to edit some table data. Selecting a record from a grid, clicking on the row to edit this line and the edit form is also something that is manually done a time consuming task. Which fields do I need to show ? What are the datatypes? Which control for this field? The CRUD generator does the main work for me and I only have to do some sorting of fields or tweaking special cases. Even the Resource file for all the labels + header text is generated.

Generated Code result

If you want to use the CRUD generator for yourself, here is the project. Feel free to use for yourself. But if you add interesting generation methods please let me know! Download CRUD-Generator

Re-Using my own controls

For the most common use cases I have build a set of controls. So I don’t have to write the same functionality over and over again. Instead I insert the needed control and a few lines in code to integrate them and thats it! Explaining these in detail goes among the borders of this blog post but will be part of another blog post later:

TabSelectControl

<bb:TabSelectControl ID="urlLigaModulePage" runat="server" Width="200" />

This control is needed to select a page, e.g. if you need to select a target page when clicking on an item in the module

Tab Select Control

FolderSelectControl

<bb:SelectFolderControl runat="server" ID="cboProductGroupImageDir" Permission="admin"/>

Selecting a folder e.g. as “Save folder” for product images. Possibility to add a new folder if not existing.

Folder Select Control

TemplateControl

<bb:TemplateControl ID="tplTemplate" runat="server" Key="Product" ViewMode="View" EditorControl="Texteditor"/>

This control allows me to select or create token replace templates which are implemented in nearly all my modules and allowes the user to select and define templates on host / portal / language level (like resource files). A thumbnail of the template is always generated to allow the user to identify the template easily.

Template Control

LanguageEditorControl

<bb:LanguageEditor ID="lngProducts" runat="server" InternalType="Bitboxx.DNNModules.BBStore.ProductLangInfo"/>

All my modules are multilanguage enabled. Editing the text of different languages (eg. productdetails in english, german if those two languages are enabled in the portal) is easy now because automatically handled by the LanguageEditorControl.

Language Editor Control

There are some other controls I frequently use, like the GMap-Control, the ItemImagesControl, the ImageScrollerControl and more!

Google Maps View Geolocation Edit

PAP-Designer

If an algorithm is more complicated or I need some documentation for my customer, the PAP-Designer (Flow Charts) is a very useful tool. Unfortunately it is only availiable in German language, but it is free for download and easy to use. It helps a lot in visualization and engineering your code.

PAP Designer

JSON-Viewer

Very helpful when working with other API’s (like e.g. the Twitter API) is the JSON Viewer. This tool is also free and helps a lot understanding foreign json data

JSON Viewer

Over the time, I have collecting this toolset and tried to bring the coding effort to some point of perfection. There is still something to do (like always), but in opposite to my module developer beginner times it allows me to write custom build modules in really short time.

I hope some of the hints were useful to you and perhaps you have some additions or good ideas to win some hours of lifetime? Let me know!

Back
Total: 12 Comment(s)
karanpatel
I think the whole Coding of copy table structure you get a kick out of the chance to imparted to us. It's exceptionally easy to utilize and coding make the a ton of work so natural. Notwithstanding, I need to know about https://www.essay-to-go.net and this will be great site for everybody who need to pick up coding.
Sunday, September 30, 2018 · reply ·
Mike Conrad
This module has been properly laid out. Thank you so much. | https://www.knoxvilleconcretepros.com
Thursday, June 20, 2019 · reply ·
horn
It is interesting to read your blog post and I am going to share it with my friends.http://www.republica.com/">republic
Saturday, November 3, 2018 · reply ·
Talk shows
The topic you choose of this article is quite interesting. The daily https://mushahida.com/home">Talk Shows help people to get new ideas and suggestions from each others.
Tuesday, November 13, 2018 · reply ·
pexe jurer
Wednesday, November 14, 2018 · reply ·
pexe jurer
this article is very good. check for check it https://storysaver.pro/apk/
Wednesday, November 14, 2018 · reply ·
Mike
Thank you! I hope to hear more updates from you about https://www.pikbee.com/ this code is what I want too find, it's very helpful.
Tuesday, December 4, 2018 · reply ·
panistefnain
Os doy las gracias por la información! Yo estaba buscando y no podía encontrar. Usted me ayudó! https://192-168-1-1.website/192-168-0-1
Wednesday, December 26, 2018 · reply ·
alanabui
I think you are right to say so. Your share is great, I found a lot of things in your post. https://ww1.mangafox.online
Wednesday, March 13, 2019 · reply ·
Lydia G. Phillips
I’m really happy to say it was an https://awriter.org/best-dissertation-writing-services/ interesting post to read. I learned new information from your article, you are doing a great job. Continue
Sunday, April 7, 2019 · reply ·
Ravi
Tuesday, April 9, 2019 · reply ·
sfdn
因为之前我去看过医生 ,医生说我有乳腺管堵塞和增生 https://1807614030.wixsite.com/fngzmy ,营养吸收不进去 ,才导致胸部发育不起来的 ,现在乳腺管堵塞和增生都改善好了 http://fngzasia.com ,胸部也变得坚挺起来 ,没想到这个酒酿蛋还有疏通乳腺的功能 。现在我的胸部也非常丰满了 https://1807614030.wixsite.com/fngz ,当我那个男朋友再度出现在我眼前的时候 ,你们应该能猜到我鄙视他的表情 ,嘿嘿 。想丰胸的姐妹们 https://1807614030.wixsite.com/fngzmy ,现在真的是可以实现自己梦想的一刻了!
Thursday, July 4, 2019 · reply ·

about.me.

Torsten WeggenMy name is Torsten Weggen and I am CEO of indisoftware GmbH in Hanover, Germany. I'm into DNN since 2008. Before this, I did a lot of desktop stuff mainly coded with Visual Foxpro (see http://www.auktionsbuddy.de). 

I'm programmer, husband, father + born in 1965.

Please feel free to contact me if you have questions.

Latest Posts

DNN module development with Angular 2+ (Part 7)
6/10/2018 1:43 PM | Torsten Weggen
DNN module development with AngularJS (Part 6)
12/16/2016 7:00 AM | Torsten Weggen
DNN module development with AngularJS (Part 5)
12/16/2016 6:00 AM | Torsten Weggen
DNN module development with AngularJS (Part 4)
12/16/2016 5:00 AM | Torsten Weggen
DNN module development with AngularJS (Part 3)
12/16/2016 4:00 AM | Torsten Weggen
DNN module development with AngularJS (Part 2)
12/16/2016 3:00 AM | Torsten Weggen
DNN module development with AngularJS (Part 1)
12/15/2016 7:19 AM | Torsten Weggen
Blogging in DNN with Markdown Monster by Rick Strahl
11/27/2016 1:14 PM | Torsten Weggen
Creating a global token engine
11/18/2016 10:25 AM | Torsten Weggen
DnnImagehandler - Hot or not ?
2/21/2015 11:52 PM | Torsten Weggen

My Twitter

Torsten Weggen 3/17/2019

You can make a real difference in Abir ’s life. Join me on @Kiva https://t.co/NlCTgIAZAN

Torsten Weggen 2/2/2019

As a freelance developer I often get invites from headhunters. This one should be very interesting... https://t.co/CNrEXBTBuJ

Torsten Weggen 10/11/2018

Evernote or OneDrive user and love #markdown #markdownmonster ? Take a look at Joplin! https://t.co/4bzkiD6CHn