Blog

The St. Louis DotNetNuke Blog

Ian Robinson
11.29.11

Last night's presentation slide deck is now available. Thanks to Mr. Phil Speth for sharing all the knowledge on Social & Mobile he picked up at DNN World!

The slide deck:

Social Resources:

Progressive Enhancement Resources:

 

 

Conference Resources:

Phil Thanks:

Ian Robinson
05.24.11

Last night Brian Dukes from Engage Software presented at the St. Louis DotNetNuke User Group meeting. His presentation was "JavaScript Fundamentals: The Language" and in it, he talked about the key characteristics of the language, common differences between other c-style languages, how to avoid common pitfalls and several best practices and standard conventions. It was a great presentation and you should check out the presentation slide deck, making sure to pay special attention to the resources slide at the end.

You can read more from Brian at his Engage Sofware blog, or his asp.net webblog, and of course find him on twitter as well.

Ian Robinson
03.28.11

This evening I gave a presentation at the St. Louis DotNetNuke user group. What follows is a summary of that talk. It is intended to be a high level introduction to Razor. I want to provide a bit of history, point out all of the moving pieces, and relay enough information so that those unfamiliar could jump in and get started with Razor in DNN.

The Story of Razor

Is Razor a view engine? A scripting language? A templating syntax? Well it depends on how you use it - it’s all of those things in different contexts. Razor was introduced as a new view engine for ASP.NET MVC in July 2010. It is also incorporated into Web Matrix with its cshtml and vbhtml Web Pages. More recently, it has been within third party applications built on .NET, most notably DotNetNuke and Umbraco.

Razor Itself

Putting your code in HTML

Razor is a simpler and smarter way to embed code in HTML. The act of writing code and embedding it in HTML is debatable itself, but that aside, if you’re going to do it, you’d be better of using the Razor syntax than that of ASPX Web Forms – simply because it was built from the ground up (quite recently) to do just that.

HTML Encoding

Razor comes with smart defaults to help users be successful. Data being rendered on the page is automatically HTML encoded for you – because that’s what you want. With Razor - you don’t have to write code to “do the right thing” – it knows the right thing to do already.

Helpers

Even though you’re writing code in your html, you’d probably best serve yourself by keeping it as clean and readable as possible. Razor makes it easy for developers to create helper methods, so that they can embed less code in their html. You can define a simple helper method once, and re-use it in several places.

Uses of Razor

As a View Engine

In the MVC world – the view is pretty dumb. It knows how to render html on the screen and perform minimal dynamic tasks in order to accomplish that task. So in the world of ASP.NET MVC, Razor acts (mostly) as a templating engine – allowing you to display your dynamic content. Of course you can get crazy and write as much code in your views as you would like, but that’s not the intended use case.

As a Scripting Language

In the context of Web Matrix, DotNetNuke or Umbraco, Razor acts as a scripting language. It serves as both a templating mechanism to display dynamic content and the way you build dynamic functionality. While you can certainly leverage libraries and API methods, the strength of Razor as a scripting language is to act as the glue that binds those external resources (web requests, DNN API methods, database calls) to your markup.

Razor in DotNetNuke

Getting going with Razor in DNN isn’t hard, but you do need to make sure your environment is set up properly.

Prerequisites:

  • Web Matrix installed (download Web Matrix)
  • Using DNN 5.6.1 or greater (download DotNetNuke)
  • Running as ASP.NET 4.0
  • Razor Host Module installed (Find under “Install Available Extensions”)

Razor Host Module Usage

After you’re set up, you can start using the pre-installed Razor scripts found in the DesktopModules/RazorModules/RazorHost/Scripts folder. You can also create your own. Use them by placing the Razor Host module on a page, navigating to “Edit Scripts” and selecting the script you would like the module to render.

Packaging as a DNN module

You also have the option of registering a user control that inherits from RazorModuleBase with DotNetNuke as a module – and therefore creating your own DNN module that is really a Razor script. All you would need to do is make sure the Razor script file is named appropriately.

To set this up – the razor file should have the same name as the user control, only with a leading underscore. For example: MyUserControl.ascx would have a _MyUserControl.cshtml file next to it in the file system. Because the user control inherits from RazorModuleBase, it will look for and invoke that razor script when the control is rendered on the page.

Summary

Razor is a lot of different things to a lot of different people. To ASP.NET MVC developers, it’s a view engine used to simply and cleanly render their data. To those that are new to the Microsoft Technology stack, it’s a scripting language that allows them to make their web pages dynamic and render it as html. To a DotNetNuke developer, I believe it’s another tool in the toolbox. It’s another approach to create dynamic functionality – one that naturally lends itself to quickly building out small(ish) modules where the “traditional” development process may be considered overkill.

Further Reading

This post is intended to provide a brief introduction, for further research and insight, I suggest the following:

Ian Robinson
03.08.10

 This month we have a special speaker for our monthly St. Louis DotNetNuke User Group meeting.

This months speaker is Brandon Haynes, who I had the pleasure of meeting at last year's DotNetNuke Connections event in Las Vegas. He is an excellent speaker and an active, knowledgeable member of the community, so I hope you will be able to attend.

Of note this month, we're planning to make available a higher quality broadcast of the meeting. We'll be streaming from Brandon's computer (showing his slides,demos etc directly) with a "picture in picture" of Brandon speaking in the corner of the video.

This will be the first attempt at this arrangement for an actual meeting, but we've done some testing and are excited about the results so far. I believe this will bring our online viewers much nearer to a first class experience.

Help show your support for DotNetNuke in St. Louis and around the world by participating online! You'll be able to find our stream on our Bambuser channel and if you check the website the day of the meeting you can find our GoTo Webinar information.

About Brandon:

Brandon Haynes is a member of the DotNetNuke core team, and serves primarily by providing security-related and organizational guidance. He is the chief executive officer at Everysport.net Inc., which delivers enterprise resource planning, web-presence, e-commerce, and integration-related functionality to recreational organizations. With more than twenty years of experience in software development, Brandon’s professional interests are currently focused on the nexus between intellectual property law, technology, and business. He is currently pursuing a graduate degree at Harvard University.

 

 

Ian Robinson
02.20.10

The February 2010 meeting of the St. Louis DotNetNuke User Group featured Scott Allender of Tricor Braun who spoke about the Form and List module.

"The presentation focuses on how to use the Forms & List module to create common threads of a DotNetNuke web site. The presentation covers creating a contact form, building a catalog of items, and styling portions of the forms & list module. This presentation is a must if you are thinking of using DotNetNuke to power your web site's dynamic content."

 

Alternative presentation download: Form and List Module.pptx

I also want to formally thank Scott for graciously volunteering the meeting space for our group! Thanks Scott! 

Ian Robinson
12.08.09

The goal of our next meeting is to address widgets as extensions to the DotNetNuke framework. It seems the community at large, including myself, know little of widgets or their intended purpose. In our upcoming meeting on December 21st, we intend to address this topic collaboratively. This is a new approach to our meetings where several of our members will each be bringing a little slice of knowledge so that we can gather different perspectives on the topic. I think DotNetNuke widgets is a great topic to start with – as they are very concise by nature and therefore easy to demo/discuss.

Topics for the Meeting

Keeping in mind the fact that we’re going to be collaborating together on this month’s topic – I’ve added a module to our home page that will allow everyone to submit a topic that they would like to talk about. I envision us each spending 10-15 minutes with each topic (of course this may vary based on number of topics submitted and the exact content of each, but…).

I’ll use the first portion of the meeting to provide a level playing field talking about the What? Why? How? of Widgets in DotNetNuke. I’ll cover:

  • What is a widget?
  • Why do we care?
  • How does it work?

Next, I’ll turn it over to our group to talk about individual (more specific) topics. So, use the module to tell everyone what you’d like to talk about, knowing that I’ll already have covered the fundamentals. I’ll also organize the submitted topics as best I can into some sort of logical order.

Here are some general thoughts in the form of questions to help you think about what you might want to research and share:

  • How could creating a particular widget help minimize style/markup variations between a skin, module and the core framework?
  • What does a widget provide that a skin object does not? For what use is a widget better suited?
  • What widgets come with the DotNetNuke core? What widgets are actively used by a default installation of DotNetNuke?

Join the Fun

I think there is a large tendency to look at a user group located in a different city and only have an “outside looking in” perspective. In fact, that pretty much sums up my position in regards to DNN groups in other parts of the country & world. But – if you think about it – remote participation is not only possible, but downright easy. We’ve been streaming live and hosting an online meeting for the past several months and it has worked out really well – more frequently people are jumping in and are not just spectators but are actually participating remotely and we’ve found this to be of great value.

With that in mind – consider this your official invitation to join us for our next meeting and share what you know about Widgets. If you prefer to watch – no worries, that’s fine to – I just want to make sure you know we welcome your participation in our group.

If you would like us to carve out a few minutes for you to give a Widget demo or explain a particular concept/approach with Widgets – please feel free to submit a topic on our home page.

Existing Resources (Hi Will!)

Here are some existing DotNetNuke Widget related resources on the web. Please feel free to add any other public resources in the comments to this blog post.

Ian Robinson
10.24.09

 

The October 2009 St. Louis DotNetNuke User Group meeting featured Phil Speth, who outlined some exciting DotNetNuke work he had done in implementing a web site for the city of East Lansing in Michicagan. The presentation Phil gave is entitled “The Goals, Challenges & Implementation of a Modern Municipal Website with DotNetNuke.”

 
RSS URL