Welcome to DNN Sharp Blog


... Our fun way to keep you on top of what's happening in our world

Friday, June 20, 2014

Building Enterprise Solutions with DNN Sharp

Part 1 - Introduction and Background

The purpose of this series of blog articles is to discuss various methods and techniques of using the DNN Sharp tools to build business solutions that rely heavily on displaying and maintaining data on SQL Server databases.

My name is Jeron Coolman, I'm the lead developer on a project to rewrite a ten year old large enterprise .NET web-based system. I am not an employee of DNN Sharp and they are not paying me, so keep that in mind when I share my opinions... they are mine and not necessarily DNN Sharp's. My goal is just to share with the community, the type of information I wish I had been able to find, in the format I like, when I was new to DNN and DNN Sharp tools.

Using DNN as the CMS platform started off as an R&D proof of concept project. Most people were telling us the "correct" way to do this would be to start from scratch using C#, .NET using MVC patterns, so that was the path we started down. What we found out very quickly was that our designs included things like, social media tools and CMS. It started to feel like half the project would be creating tools that already existed. When we looked into these tools, we kept landing on DNN.

That basically left us with the glaring question of "How do we get data in and out of the database?". We knew we could do everything we wanted by writing our own custom modules. We have a lot of great programmers and quickly realized that it would take some time working with DNN architecture to feel experienced enough with it that we writing quality modules.

Also, most of us have been working with Microsoft's Visual Studio for decades, so we really wanted to work with new tools and technologies. We all were excited about working with jQuery and JSON. We wanted to get away from checking out code, editing, compiling, testing, checking it back in and deploying/publishing it on Windows development machines.

We still have a couple people working with creating custom modules. We know we will have some components that require us to write our own modules, but for that 70% of the solution that handles simple CRUD behavior from a database, we wanted a third party tool for easily reading and writing data from a stored procedure in a SQL Server database.

We have a very strict requirement that all database access happen through stored procedures. We have many reasons for that from security, to performance, to logging activities for auditing, testing, tuning and debugging. This greatly reduced our list of available tools. The tool needed to support retrieving the data in JSON format for the jQuery and it needed to support interacting with the database via stored procedures. 

After evaluating every third party database tool, I found only two (DNN Sharp being one of those two) that would actually provide me with the functionality that I needed, since most didn't support stored procedures and a lot didn't support accessing a database that wasn't the DNN database. I have to admit that there were a couple tools with user interfaces and documentation that I could only describe as a "hot mess". Those tools may have been able to provide us with the functionality we needed, but I figured if I didn't understand their UI and documentation, that wouldn't matter.

We ended up landing on My Tokens. It took no time at all to take interest in Action Form. We had also acquired two jQuery UI libraries. Wijmo and Ignite UI. The issues of jQuery libraries playing nice with each other and DNN, can take up an entire series of articles all themselves. We realized we needed two jQuery libraries, since it was crap shoot when a new version of either library or DNN was released if something would break. When working with jQuery selectors, you quickly form a love/hate relationship with them :)

Another very important requirement we had to have in order to fulfill the "Enterprise" aspect of the system was, it had to be able to scale. We had no problems using a RAD tool to quickly and easily create the MVP of the system that ran with the minimum feature set, but we had to feel confident that we could scale it as it needed, once users started pounding the system.

For instance, using stored procedures helps us scale within the database engine. Creating forms with jQuery controls that consumed JSON provided by a My Tokens Razor script running on the same IIS server would allow us to easily introduce a web services tier that could provide that JSON to the controls. We also want to keep the solution open to make it as easy as possible to replace the jQuery code with a different technology like Bootstrap and AngularJS.

This probably is more background and introduction than is needed. With such subjective topics like "Which tool is best?", "What architecture is the correct one?" and "What is the best way of using this tool or implementing that architecture?"; I thought a detailed introduction would be helpful for the reader to understand our decisions.

Here is an overview of the DNN Sharp modules we ended up using in our solution with a focus on getting data to the DNN pages, allowing the users to edit it and write it back to the database...

A. My Tokens - used for retrieving data from the database and for "text reuse" pretty much everywhere; from other tokens, to other DNN modules, to the HTML we put in the HTML Pro module. Honestly, I can't imagine anyone working with DNN without using My Tokens. Every single one of our pages has more than one token in it.

B. Action Form - used for quickly building forms with a focus on stored procedures. I will discuss how we use My Tokens along with the Action Form to make life easier; e.g. populating a Multiple Choice dropdown from a stored procedure. Other topics covered will be, when we use an Action Form as opposed to jQuery UI controls in an HTML Pro module.

C. DNN API Endpoint - used for writing data to the database from the jQuery UI controls. This is a new product, so some of you may be hearing about it for the first time right now. This was essential for being able to call a stored procedure to write data from outside of an Action Form.

...I will discuss the use of each of these DNN Sharp modules in detail in later articles. The next article, I will delve into My Tokens, since it is at the heart of everything. I welcome all comments and questions. I am by no means a DNN power user or even a DNN Sharp expert, but I would be more than happy to answer questions and offer advice. I'm sure we can get someone from DNN Sharp to jump into a conversation to help answer questions or correct me if I offer bad advice.


Print
0 Comments
Rate this article:
5.0
Jeron Coolman

Jeron CoolmanJeron Coolman

When Jeron isn't creating software, he is studying Chinese martial arts. He enjoys being able to apply the concepts of martial arts into the process of software development and vice versa.

Other posts by Jeron Coolman

Contact author

x

About Us

DNN Sharp is a leading provider with a proven track record in defining, designing and developing DNN Modules catering for a passionate community of thousands of users.

While our core focus is on DNN modules, our mission is to provide top quality products complemented by fast and reliable Customer support. We listen to our Customers and produce a variety of solutions to meet the complex needs of our global audience.







«November 2024»
MonTueWedThuFriSatSun
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678


Our latest news and gossips, must-reads, tutorials and how-tos, as well as other random awesomeness from across the DNN world...

Stay in the loop subscribing to our newsletter!