My New Blog: Why Orchard as the Engine & Azure as the Host?

Site change prompts questions about Orchard engine choice, while Azure selection deemed a no brainer compared to SharePoint & WordPress options

Ever since the original post when I said I was going to make the changes to my site , the number one question I kept hearing was “why Orchard” as the engine for the new site. Of course the next question I got is “why not SharePoint” and of course “why not Wordpress.” I found it interesting was that no one asked “why Azure?” I guess that was the no brainer…

Why Orchard?

I was very impressed with this engine. A good friend, Wictor Wilen , relaunched his site using the same Orchard engine a while back. That move by Wictor made me aware of Orchard as I hadn’t heard about it before. I went into my research thinking this was a blog engine but I quickly realized it was a full blown CMS. Over the Christmas holiday the flu savaged our house one by one (I was in the emergency room on Christmas Day getting a chest x-ray for pneumonia). While I was stuck in bed I watched a bunch of videos from the Orchard Fundamentals course in the Pluralsight catalog. It was then where I was very impressed.

I could go on and on about why I like it, but a few things stood out. First, I didn’t write a single line of .NET code in the implementation of the site. Orchard, an ASP.NET MVC application, is built on the concept of modules that create many things. One of the things is a content type which consists of fields and parts. A part could be something as simple as a field or something complex. You then create content based off a content type, similar to how SharePoint works. When pages are rendered, the Orchard engine assembles the page requested and builds a shape tree. The layout of the page is divided into zones and a special placement file dictates what shapes should appear on the page and where they should go. Then each shape is rendered from an ASP.NET MVC view defined in a *.cshtml file.

To build a custom theme, which I did, you essentially create your own *.cshtml views which replace the ones that ship with the Orchard codebase or the 3rd party modules you acquire from the Orchard Gallery . I didn’t have a write a single like of .NET code. The only think I did was tweak a few MVC views (when you create one for a shape, it creates a copy from the base one so you have a starting point), and write a little bit of jQuery and CSS to handle some special styles. That’s right… I didn’t build a single DLL!

The more I dug into Orchard the more I not only liked it, but I was impressed with it. These guys have done a fantastic job and I’m looking forward to giving back by working on some of the documentation and a few customizations.

So Why not SharePoint / WordPress?

It was really more of a question of why vs. a why not. First, the reason I didn’t use WordPress is because I wanted to stick with something that I knew I could customize and understand. WordPress is on PHP and I have zero interest in learning that. Yes, there are tons of modules, but I’d like something I know I can poke around in.

Why not SharePoint? If I was going to use SharePoint, I’d want to do a full-blown Web Content Management (WCM) site with SharePoint 2013. The best parts of WCM aren’t available in Office 365 which means I’d have to host it myself. That’s a very expensive proposition for someone like me to stomach. Plus, I wanted to have my site be different than from what I traditionally do day in and day out.

As you see… these aren’t negative things… I just had different goals. A good friend of mine, Dan Holme , has a great saying “SharePoint doesn’t matter. Business matters”. Couldn’t agree more!

Why Azure?

For the last 9 years I’ve been hosting my blog at various providers. All have been pretty good, but they are your classic shared website hosting providers. With these you get FTP access to your site and a minimalistic web control panel to do basic operations like permissions, manage virtual directories and manage the default files. If you want to restart your app pool, you need a service request. If you want a backup of your database, you have to issue a service request.

I wanted to have my site 100% in the cloud and have enough control over it to be comfortable. Naturally I looked to Azure. With Azure I get everything I need plus more stuff and some great insight into how the server is doing. Plus, if necessary I can scale the site up & out very quickly and easily.

While I have an Azure subscription with my MSDN subscription, I set up a commercial subscription because I didn’t want to hit any quota limits that are put on the MSDN subscriptions. At first I was trying to use the a Web Role which worked fine, but right before I went live I switched over to the Azure Web Sites. My site is running in Reserved mode on a single Medium sized instance (2 CPU cores, 3.5GB memory). I am going to play around with this in a week or two and try to see if I can get away with a single or pair of small instances, but for now I’m seeing a spike in traffic from people checking out the new site and from Google & Bing hammering away. With Azure Web Sites I have FTP access to the site and can even restart the site if I want to ensure the cache is completely flushed out. From my experience, the site is back up and responsive within 30-60 seconds.

The database is hosted as a SQL Azure database. I can easily connect to it from my laptop using the SQL Server Management Studio if I wanted. One thing I absolutely love is I can export / import the database as a data tier application (*.dacpak). The backup file is put in one of your Windows Azure Storage accounts where you can download & restore it locally… very slick and great for local testing of some new stuff.

In the past I’ve stored images & assets referenced in my blog in various places from Flickr to a folder off the root of my site to different folders in public Skydrive folders. I’m sick of that so now I’m putting these within an Azure Storage account as blobs. Only a few posts and articles are using this so far as I need to go back and move everything over. This is going to take time but no images should be broken since everything is currently pulled from other cloud services.

Last but not least is the email solution. I needed an email service for the contact form on my site. For this I’m using the free version of SendGrid , a Windows Azure offering that allows up to 25,000 emails for free per month. In Orchard I set up a rule that when the contact form is submitted, a copy is sent to me and the sender. That means I can do up to 12,500 emails per month for free. Let me be honest… if that much mail is coming through my site, I’m shutting that form off :)

So there you go… now you know why I selected OrchardCMS as the engine as well as the why and what I’m using in Windows Azure for hosting. In future posts I’ll write more about Orchard.

Andrew Connell
Developer & Chief Course Artisan, Voitanos LLC. | Microsoft MVP
Written by Andrew Connell

Andrew Connell is a web & cloud developer with a focus on Microsoft Azure & Microsoft 365. He’s received Microsoft’s MVP award every year since 2005 and has helped thousands of developers through the various courses he’s authored & taught. Andrew’s the founder of Voitanos and is dedicated to helping you be the best Microsoft 365 web & cloud developer. He lives with his wife & two kids in Florida.

Share & Comment