views:

874

answers:

8

I often see people say that certain software is "very opinionated" or that Microsoft tends to write "un-opinionated" frameworks. What does this actually mean?

+21  A: 

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.

altCognito
I wouldn't say "locks you", rather it doesn't make it easy to diverge from the "golden" path. The golden path is usually the best practice, something that should work for most of the people most of the time.
dimitrisp
I agree locks is a bit strong, but I'd take away that negative connotation by noting how successful many opinionated products are.
altCognito
Well, it is obvious that this answer is opinionated ;)
dimitrisp
I find this explanation most clear although I don't like the tone which seems to favor the non-opinionated design. I am personally more in favor of opinionated design. Still, flagging this answer as The One, will reflag if somebody comes up with better wording.
zvolkov
An opinionated framework is one which is designed in such a wayy that it's users will experience the least frinction with that framework when the framework is used in a way that does not violate the assumptions made by the framework designer.
Crippledsmurf
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. 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.
Jared Updike
+6  A: 

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.

Rytmis
+1  A: 

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.

mookid8000
+8  A: 
tvanfosson
+1  A: 

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.

This does mean that if you want to break from the opinion there is often more work to do than if you were working on the vanilla version. This is an 80/20 scenario though. If you chose your opinionated framework correctly you will only want to break from the opinions 20% of the time and you'll be highly productive the other 80% of the time.

Garry Shutler
ASP.NET MVC seems to naturally fit with the ASP.NET AJAX framework, and even includes MVC-specific additions to that library, so I'd disagree that the choice of Ajax implementation is entirely unbiased. Also, the library doesn't specifically mandate or even recommend the ue of jQuery, but it does bundle it, gesturing furtively in that direction while mouthing, "look at this".
Rob
+5  A: 

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.

dimitrisp
+1, Feels like your mentioning enterprise apps. Siebel has a golden path that is not easily broken, although it can be done and I worked on a team that did occasionally. It can make development move along quicker as you don't have to develop UI elements, data storage, and business logic all the time.
sheepsimulator
+2  A: 

Just refer how to Make Opinionated Software

Dhana
+2  A: 

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.

Rob