32

I've seen a lot of other framework/library developers throw the phrase 'we write opinionated software' around, but in practical terms, what does that really mean? Does it mean that the author of the 'Opinionated Framework X' says that because they write code a certain way, you should be writing the same type of code that they write?

Isn't that a bit pretentious?

1

3 Answers 3

37

The framework imposes a certain way of working on you. Put another way, there's clearly one right way of using the framework which is nice and easy, and any other way of using the framework makes your life difficult.

I'm no Rails expert, but I'm told that it's opinionated because it's awesome for simple CRUD stuff, but when you try deviate from the "Rails way" things get tough. (This isn't necessarily a bad thing; I don't mean it as criticism.)

8
  • 5
    Seems like a misuse of the word 'opinionated' in that case. Maybe 'narrow' or 'targetted' would be more fitting. Either way, software can't literally be opinionated... maybe in the future but not now :p
    – Nobody
    Oct 15, 2010 at 14:52
  • 13
    Yes. It's decidedly anthropomorphic. But then, code also can't have a scent, but that doesn't stop us talking about code smells either! Oct 15, 2010 at 15:20
  • 3
    And in both cases "opinionated" doesn't mean "it's mildly easier to do it this way"; it means "I will make you suffer until you do things this way". Haskell has an opinion about being lazy, for example. Jan 5, 2012 at 20:43
  • 4
    I never saw this as anthropomorphic - I always interpret "opinionated" as "embodying the opinions of the author / community about how things should be done".
    – mikera
    Sep 12, 2012 at 9:40
  • 3
    I think the work "opinionated" is also meant to be startling and edgy. Somewhat to make you think when you use it and to make the developers think when they design it. Having an opinion means not satisfying everybody. So all the "but what about user Y" arguments go out the window. If you aren't user X, then go use something else. Not necessarily a bad philosophy. Jan 14, 2014 at 2:35
5

The framework is saying "I know the one true way to do this thing, and I'll fight you if you try it any other way". Opinionated.

0

You know that expression, "there's more than one way to skin a cat"?

If one way is significantly easier than all the others, it's opinionated.

If all ways require roughly equal level of effort, it's unopinionated.

Note:

  • being opinionated is not necessarily a conscious decision
  • from a certain point of view, "opinions" may look indistinguishable from "just makes sense"
  • opinions make google/stack overflow easier since it's more likely someone else will have encountered the same problems and have a solution that works for you

Not the answer you're looking for? Browse other questions tagged or ask your own question.