24

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?

29

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.)

  • 4
    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 '10 at 14:52
  • 10
    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! – Frank Shearar Oct 15 '10 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. – Frank Shearar Jan 5 '12 at 20:43
  • 3
    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 '12 at 9:40
  • 2
    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. – Josh Petitt Jan 14 '14 at 2:35
3

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

protected by gnat Jul 27 at 9:18

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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