DNN Community Blog

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact .

The use of the Community Blog is covered by our Community Blog Guidelines - please read before commenting or posting.


Module Development vs. “Modern Module Development”

At this point in our module development series we need to take a step back from the action oriented items in code and talk at a high level about our path forward in this series. Among web developers there has recently been a trend toward more client side development. This “front-end” heavy method of development allows for very rich user experiences, faster page load times, and fewer page refreshes. In case you are not very familiar with the term "client side" development it usually means there is more JavaScript involved and is more HTML, CSS, and JavaScript centric. It’s also common that web apps that are heavy client side apps integrate with web services.

Why Opt for “Modern” – Viewstate, Postbacks, & User Experience
You may wonder why this trend has occurred. The real reason is frustrating user experiences! Though to technically speak about it one reason is that a lot of earlier written .NET applications usually contained a lot of server controls on their pages. These server controls created more and more viewstate on the page and more and more “round trips” (requests) to the server. If you're not familiar with viewstate check here for more info http://en.wikipedia.org/wiki/ASP.NET#View_state .

Viewstate

The more viewstate you have on a page the more "payload" the browser has to download and the slower the page loads. Often times server-control-heavy pages require several "postbacks" to the server. These postbacks equal another round trip to the server consequently causing slower load times resulting in end-users waiting longer for the page to load. Ultimately these factors combine to provide a sub-optimal user experience. Collectively the web found a way to create a better user experience and that way is full of JavaScript & web services.

JavaScript, Back Again!
Over time JavaScript has become so popular and widely used (JQuery, Knockout, & Angular libraries to name a few) that very rich user experiences are now able to be created with mostly HTML, CSS, and JavaScript. Pages load more quickly and end-users get slick and interactive experiences that are more engaging.

Even though apps are now using these front-end libraries they still need to get data from the application’s database, in our case... our module needs to get data from SQL. This is where web services come into play and, more importantly to us, the integration of Microsoft's Web API at the core of the DNN Framework. Microsoft WebAPI is a web services framework that allows us to expose data on end points that we can consume within our module and from anywhere else if we choose! This exposed data can be in many formats, but most commonly it is exposed as XML or JSON.

Sidenote: “JSON” stands for JavaScript Object Notation and if you need more info on it then check out this link http://www.w3schools.com/json.

DNN has wrapped the Microsoft Web API with a DNN wrapper that makes it easy to work with the Web API within DNN meaning that you still have access to all the DNN goodness (API’s, info, etc.) from within your module and you still get the security benefits that DNN provides.

The majority of DNN module development tutorials that you'll find online are based on the way modules were built over the past few years. Though, there are some tutorials on what is known as "modern module development" out there. Check out DotNetNuclear.com for a few examples.

I have discussed all this to let you know that at this point in the series we're going to opt for the "modern" development route in this series. If you remember from the previous blog entry about coding and designing the view I made a mental note that we were using HTML controls versus .NET server controls and this is exactly why we did it that way.

Modern Development

Our module won’t be 100% client-side, but the point is that we’re going to reduce the number of sever controls included in our module to as few as possible all in the name of user experience & faster load times. So we are going to expose our task data via DNN's Web API Services Framework and then we're going to grab it, serialize it to JSON, then use JQuery AJAX to bind each JSON object to dynamically created DIVs in our module (Sounds geeky huh :-) ). Now if you're a front-end developer then we're starting to speak your language and you're probably licking your chops right about now, but if all that sounded like Spanish to you don't worry, we're going to go over all of that in upcoming blogs as well.

Since we're opting for the “modern route” of module development our next step will be to create the Web API Services for our module... and we'll do that in the next blog entry. Hope to see you there!

Go to the Next Blog Entry: "Creating the Web Service Class"

Comments

Francisco Perez Andres
Hey:
What's your trouble with Spanish ;-)

What a great series os posts! Congratulations, and thank you so much.

Francisco (from Spain, LOL)
Francisco Perez Andres Wednesday, October 15, 2014 5:45 AM (link)
Clinton Patterson
Fancisco,

Gracias por tu commento! No tengo problema con mi Espanol :-)

Seriously I did teach high school Spanish for a year back in the day.

Glad you are enjoying the series... and I hope it's helpful. I've still got a few more entries to post yet!
Clinton Patterson Wednesday, October 15, 2014 1:12 PM (link)
James Brown
Link to the series introduction
http://www.dnnsoftware.com/community-blog/cid/155064/module-development-for-non-developers-skinners-dnn-beginners--blog-series-intro

Link to the previous Blog Entry:http://www.dnnsoftware.com/community-blog/cid/155082/creating-the-task-controller-class
James Brown Monday, June 15, 2015 11:42 AM (link)

Comment Form

Only registered users may post comments.

NewsArchives


Aderson Oliveira (15)
Alec Whittington (11)
Alex Shirley (10)
Andrew Nurse (30)
Andy Tryba (1)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (32)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Bogdan Litescu (1)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (209)
Chris Paterra (55)
Clinton Patterson (40)
Cuong Dang (21)
Daniel Bartholomew (2)
Daniel Mettler (154)
Dave Buckner (2)
David Poindexter (4)
David Rodriguez (3)
Dennis Shiao (1)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (74)
Geoff Barlow (10)
George Alatrash (6)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (3)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (274)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matthias Schlomann (15)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Miguel Gatmaytan (3)
Mike Horton (19)
Mitchel Sellers (28)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Peter Donker (54)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott S (11)
Scott Wilkinson (3)
Scott Willhite (97)
Sebastian Leupold (80)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Timo Breumelhof (24)
Tony Henrich (3)
Torsten Weggen (2)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (40)
Will Strohl (165)
William Severance (5)

Content Layout

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out