Use Templates Dummy
Some of you may already be rolling your eyes, thinking, “Oh man. Just use a template of some kind already!” Many people have released free or open source development templates over the years. Some of them have been okay and they’ve all have very different approaches. From webforms to MVC, MVP, and SPA… But they all only solved part a single challenge.
The biggest issue I had with all of them, is that you were only able to get started quickly with that one module. What’s worse, you usually were expected to build that module in the DesktopModules folder. (This blog isn’t going to go over the numerous downsides of that, but know this… DON’T DO THAT. NEVER EVER.)
The biggest challenges were longer term...
- What about source control?
- Do you have to always check-in your DNN website now?
- What about multiple team members?
- How do you safely make multiple modules talk to and be aware of each other?
- How do you consistently & safely connect the modules to other libraries?
- What if they needed to all use a common library?
There are many more questions when a team environment, multiple deployment environments, and additional dependencies begin to get involved.
Needless to say, until recently, I have not found a template that I liked from either an architectural or implementation perspective. That is, until Matt Rutledge built generator-dnn. I fell in love with his template the very first moment that I used it. There was only one downside… It didn’t follow the development patterns our team use. Despite that, the template itself was comprehensive, clean, generated super-fast, and adding new templates to it is pretty simple.
Introducing Yeoman Generator: upendodnn
Well, if we were going to use this, we had to do something that’s common in open source… We forked
generator-dnn into what we’re calling generator-upendodnn.
At first glance, you may not notice something very important about the naming convention. Sure, our name is in there, and that’s just good branding. But what you may not know is that upendo literally translates to love in Swahili. So, it’s technically, “love DNN!” Pretty cool, huh?
upendodnn: DNN Development Templates
The original generator-dnn includes templates for the persona bar extensions, as well as MVC and SPA modules. We took that and added a few of our own, including templates for:
- Webforms modules
- MVC modules (using a different development pattern... Thanks, Chris Hammond)
- Skin Objects
- Libraries (DLL's)
- Scheduled Jobs
- Hotcakes Commerce extensions
We have several more features pending to add as well, including URL providers, selective scaffolding, and more. You can visit the project’s to review the upcoming features.
The best new feature we added was the
Solution Structure. You’re meant to choose this option first. Once you do, then you can create as many of the other extensions as you want, and they’ll all be in a single solution file, building outside of the website. Did I mention it also includes automatic packaging for installation/upgrades as well as symbol packages for debugging?
This development approach allows you to build and package everything from one place, all at once, without having to check-in or worry about which version of the DNN website you’re in or building against. Mind-blowing, I know!
Enough of my rambling... You can see it in action in the video below. Enjoy!
This video is 25 minutes to change the rest of your DNN development life. I guarantee you’ll save hundreds of hours in development, debugging, and deployment time – if not, more.
Do You Have Any Feedback?
Please let us know what you think in the comments below. You can also help us by adding issues and comments in GitHub.
Oh, and if you like this even a little bit, don’t thank us. Thank Matt Rutledge. He did all of the heavy lifting. We just added stuff.