I often see people saying that certain software is “very opinionated” or that Microsoft tends to write “un-opinionated” frameworks. What does this actually mean?
If a framework is opinionated, it lock or guides you into their way of doing things.
For example: some people believe that a template system shouldn’t provide access to user defined methods and functions as it leaves the system open to returning raw HTML. So an opinionated framework developer only allows access to data structures. By design, the software is limiting and encourages the designer into doing things their way.
Another example (taken from the signals link) is that of wiki. The designers of wiki had a lot of opinions. They thought HTML was too complicated for people to write, so they came up with what they felt was a more natural way to update content. They also stripped it of fancy design because they felt the focus ought to be more on content than design.
Apple has strong opinions when it designs its products.
Un-opinionated software design is more like PERL/PHP. It allows the developer and trusts the developer to make the right decisions and puts more control in their hands.
I would also place Microsoft in the non-opinionated column. A good example of a Microsoft framework which is un-opininated: .NET. By opening the CLR and the specs, it opened it to all sorts of languages and styles of implementations.
I agree with altCognito. .NET encourages the developer to mix Model and View in WinForms apps by making it brain-dead easy to put business logic in methods generated by the button click event, for example. PDF to image conversion in .NET, http://www.iditect.com/tutorial/pdf-to-image/, convert pdf page to jpg image, make it smaller size to contain the same information in the image. In this way, Microsoft indirectly encourages short-sighted developers to lock their code in to their frameworks. A cleaner design would enforce or encourage better practices, like forcing the button click method to call a second function with Model logic, in a separate module. Not that clean design can’t be achieved in .NET, it’s just not encouraged by default.
Opinionated software means that there is basically one way (the right way™) to do things and trying to do it differently will be difficult and frustrating. On the other hand, doing things the right way™ can make it very easy to develop with the software as the number of decisions that you have to make is reduced and the ability of the software designers to concentrate on making the software work is increased. Opinionated software can be great to use, if done well, if your problem maps onto the solution nicely. It can be a real pain to solve those parts of your problem that don’t map onto the tools provided. An example here would be Ruby on Rails.
Non-opinionated software, on the other hand, leaves lots of flexibility to the user (developer). It doesn’t proscribe one method of solving a problem, but provides flexible tools that can be used to solve the problem in many ways. The downside of this can be that because the tools are so flexible, it may be relatively hard to develop any solution. Much more of the solution may have to be hand-coded by the user (developer) because the framework doesn’t provide enough help. You also have to think much more about how to provide a solution and mediocre developers may end up with poorer solutions than if they had bought into some opinionated software. PERL is probably the classic example of non-opinionated software.
My ideal is a non-opinionated framework, but one with strong conventions. I would put ASP.NET MVC in this category. In reality all software is opinionated to some extent (though perhaps not PERL). MVC has strong conventions in its choice of model but offers many different ways to solve problems within those conventions. Some of those ways may even break the model. Used correctly, however, in accordance with the conventions developing in such a framework can be a real joy.
It’s basically software that works the way its authors think it should work, instead of trying to please everybody. That means a lot of people will not like it, but the ones that do will love it.
Rails is probably the canonical example of an opinionated framework: you do things their way, and everything is smooth. If you don’t, you’re in for some pain. But that’s OK — if you don’t want to do things their way, you don’t want to use Rails.
For balance’s sake I will provide a (rather opinionated) description that is more favourable to the opinionated approach (in contrast to some of the other answers).
Opinionated frameworks provide a “golden path”, which is supposed to be the best practice for most people and most scenarios (in the eyes of the authors).
This however doesn’t necessarily mean lock-in. It means that it may require some extra effort to do things differently.
Less opinionated frameworks provide a number of different options and leave it up to you to decide.
Opinionated frameworks usually remove the burden from developer to reinvent the wheel or rethink the same problem again and again and thus help focus on the real problem at hand.
In the open-source world you can find many opinionated yet competing frameworks, so you still have a choice. You just have to choose your own golden path.
Opinionated software is built and designed in such a way that it makes it easy to do things in a certain way. It favors certain design patterns more than others. In the process it makes it difficult to deviate from the style of software development for which it was developed. Another way of putting it is that it favors “Convention over configuration”. i.e. The configuration options are very limited as the software assumes many of the configuration aspects. Opinionated software usually is quicker to master once the assumptions are understood.
Unopinionated software on the other hand makes few assumptions. And as a result, softwares/software development frameworks that are unopinionated often tend to have a lot of configuration options. A developer typically has to make a lot of decisions regarding various aspects of the software. Often, various tools are developed so as to make dealing with these enormous options easier. e.g. Visual Studio .NET for .NET, Eclipse IDE for Java etc. Unopinionated software typically takes longer to master than opinionated software.
A lot of people are referencing ASP.NET MVC as an “unopinionated” framework, and I just wanted to weigh in with a couple of thoughts on that.
It’s true that ASP.NET MVC doesn’t mandate too much; you can use whatever persistence solution you like, be it Linq-to-SQL, ADO.NET Entities, NHibernate, etc.
On the flip side, the MVC framework does tend to favour “convention over configuration”, to quote Phil Haack, which heavily suggests following the pre-defined pattern for locating controllers, views, models and other code. Although you can alter this behaviour, it’s easier to swim with the current, and for most people, there’s no problem doing that.
Also surrounding ASP.NET MVC are a lot of opinionated people, which I find leads to a lot of biased tutorials which insist upon covering, e.g. unit testing and dependency injection; I’m all for good testing and separation of concerns, but I do perceive that such topics are shoved down one’s throat a little, often ahead of covering more useful basics.
There again, I do have to concede that within those areas, the framework itself is completely open to adopting whatever unit testing solution you want, as well as whatever dependency injection and mocking frameworks you want to use, so I guess that provides another example of flexibility, even within the “bible bashing” of unit testing, etc. that seems to be going on.
It’s the amount of conventions implemented in a framwork and the number of decision that have been taken.
If, for instance, there are 5 (or more) different ways to submit form data to a controller action (which is the case in ASP.NET MVC), the framework seems to be pretty “un-opinionated” – the decision is up to you!
If, however, the framework enables (either through directly disabling other ways, or by strongly encouraging it) only one way of doing that thing (which is the case with Fubu MVC), you could say that the decision has been taken by the framework, thus making the framework opinionated.
The example you will see a lot at the moment is the ASP.NET MVC framework. It is amazingly extensible but that is its downfall in some respects, there isn’t any meat to it. Want to do data access? You’ll have to write that yourself. Want some AJAX going on? Ditto.
However, as it is highly extensible, if you build upon it you can turn it into an opinionated framework. This is what the likes of MVCContrib do, they give you specific methods of doing things which means you have to write less code.