Categories
programming Technology

Building Kentico CMS for Azure

When you’re putting a Kentico CMS site together, and you’re deploying to Azure, the one thing that doesn’t work too well is the emulator. It works, it’s just really intensive and slow-going. Especially if you want to run through small features or logic and need to do relatively frequent (and normal) build updates.

Enter build configurations and preprocessors. Under the hood, a KCMS web app for Azure is not that much different to a regular web application, with the exception of the AzureInit class. For local testing and running my app as a regular web application, I simply created a new build configuration (copied from the default ‘Debug’) calling it ‘Local’. In the other configurations, I added an extra pre-processor definition “FOR_AZURE” and then in the AzureInit class (in the web app project), I added:


public void ApplicationStartInit()
{
#if FOR_AZURE
AzureHelper.OnGetApplicationSettings += AzureHelper_GetApplicationSettings;
...
#endif
}

That way, when I’m building for local testing, I skip all the Azure goodness, and then if I need to package and deploy, let the project settings take over. Sure, there some specific things that you won’t be able to work through- but you can still get a near-perfect resemblance on a straightforward deploy.

Categories
Business programming Technology

Opensource is not Free

Opensource, love it or hate it, has a definite place in our software ecosystem. I use opensource all the time, and i put a lot of projects up on opensource too. I don’t have any issue with it at all, on the contrary, opensource, by-and-large, has helped shape me as a developer. So, for the record, i love opensource. But then there’s also free software…

Free software is software you can download and use, for free, to do *something*. There is a lot of it. In fact, there is so much free software, some folk don’t even like paying a single penny for *any* software. I’m not going to touch on piracy- that’s a completely different issue. Chances are, if you look hard enough, you’ll more than likely find a free piece of software out there to do whatever you need to do. Even if you end up using two or three different free software apps to accomplish one task…

Now the proliferation of free and opensource has had an interesting side-effect. I hear a lot of “wtf?!” in response to actually paying for software. For example, I mention a licence fee of USD$300 to do a relatively complex task and I often hear: “why pay $300 when you can download and use some opensource component to do the same thing?” Or even better: “but you’re a developer, can’t you just build the same thing for me?”

*sigh*

The same thing.

It’s never the same thing. And often, to build the “same thing” would probably cost 3 times as much, if not more. And it has nothign to do with how good or bad a developer I am. Sure, I could use an opensource component. But I still need to vet the code, integrate the libraries, write a test suite for it (if there’s nothing attached) and make sure it does everything and that the “same thing” is exactly what is needed.

Sometimes that works. Sometimes that doesn’t. You can spend hours working with a “free” or “opensource” project only to discover some weird edge case that you need to cover or you end up trying to extend it (or trim it down) and find out the architecture is a real mess. Either way, your free component is now costing you, and more, putting __your__ product at risk.

On the contrary, a paid-for product has (usually) been built, tested in a standard QA environment, released with support options and comes with a warranty of sorts. I say usually because, as in life, you get software lemons too. But mostly, there is a system of connected people behind a paid-for product. An opensource project on the other hand, is (again) usually a smaller team more focused on *other things* (or next delivery milestone) that they don’t, can’t, won’t fix *your* problems with the codebase -for free-.

Again, there are always exceptions.

Bottom line, there’s a real business, with real people who need real money, behind the product. And yes, there are some opensource projects that are also a business- those actually fall more into a product offering than “free as in free beer” code.

Free beer code works when your dev team integrating it groks the codebase. It’s no different than having a regular team member contribution. Everyone needs to know what that code is doing: they can read it, can debug it, can modify it. If your team can’t (for whatever reason) then leave that code alone, or be happy to run the risk of bleeding later, which is usually when you really don’t want to.

And don’t be so scrooge about paying for software. Often, the licences are well-priced because the spend has already been done- and the model is in place to make a business of selling. Again, due diligence is required, as you would any other purchase. But you cannot run on the default strategy that opensource = free = cheaper.