As a developer, one of the most powerful trends I’ve seen in our industry is the move from imperative to declarative programming. Any time you can move your code from an imperative style to a more declarative form, it leads to more readable code and makes you more productive. Moving from imperative to declarative programming is shifting from describing how to do something to describing what you want done.
A great example of this trend can be found in how we code user interfaces. Almost every popular UI programming paradigm these days uses declarative markup to represent the UI elements and their visual design. Going even further, declarative data-binding is the increasingly popular way to get data in and out of those elements.
Not only has software development moved towards declarative languages for special purposes (does anybody remember the hype that surrounded domain-specific languages?), but we have also introduced declarative features into our general purpose languages. Both Java and C#, the bread and butter languages of the enterprise, have attributes which are almost always used to allow you to declare something about your code which is later used to control its execution. Another great example is the inclusion of LINQ in C#. Even using the lambda syntax, a simple LINQ query is easier to read and quickly understand than its procedural brother and the more complex a query becomes, the easier it is to see the advantage LINQ provides.
Which is easier to understand?
This trend doesn’t apply only to programming. I am a longtime fan of Harmony remotes because they take my somewhat overwhelming home theater and make it so that I don’t have to write up a cheat sheet whenever we have a babysitter or our parents come for a visit. What makes a Harmony remote different? It lets you declare “I want to watch TV” and it handles the list of steps that would have been on my cheat sheet for you. The great insight that Harmony had was that you don’t actually care how it does its job; you care what its job is.
I’m hardly the first person to notice this trend, so why am I writing about it? Because the real power of a PaaS is that it lets you be declarative about aspects of your application that have always required writing imperative code before. It’s easy to think that PaaS is all about automation of deployment and infrastructure ignorance, but that’s just the tip of the iceberg.
Dig Deeper for Real Advantages:
Do you want to make users log in before they access your app? Check a box and the same credentials they use to log in to their PC in the morning will be required for your app. Want control over which specific users are allowed to access your app? Check another box and you can grant access to individual users or entire groups of users. Your app needs some persistent file storage space or a NoSQL database? Click a button and it’s reserved and your app is automatically configured with the information needed to access it. You want to be sure there are always at least 3 load balanced instances of your app’s UI available? Set your minimum instance count to 3 and make it so. The list goes on and on.
You’ll notice that all of these features were optional. If you don’t need them or they don’t satisfy your requirements, that’s fine; the platform shouldn’t get in your way. If, however, you do use the functionality provided by your platform, entire aspects of your application become simple declarative configurations. This is a big win not only in the short term, but in the long term as well. When you allow the platform to handle something and company policies change, the platform is on the hook to keep your app in compliance, not you.
It’s clear to me that there’s tremendous power in being declarative, whether you’re writing code or simply living life. The ability to just say “this is what I want” and move on frees you to worry about the more important things, such as your application’s functional requirements (or why you have 1000 channels and there’s nothing to watch). It’s also clear to me that the ability to declaratively add functionality to your application is a huge advantage you get by running that application on a PaaS. The tip of the iceberg is interesting, but it’s time to start digging below the surface to find the real power inside your PaaS.