31

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?

yannis
  • 39,547
  • 40
  • 183
  • 216
plaureano
  • 1,231
  • 1
  • 11
  • 13

3 Answers3

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

Frank Shearar
  • 16,643
  • 7
  • 48
  • 84
  • 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 '10 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! – Frank Shearar Oct 15 '10 at 15:20
  • I think anytime you use a framework you will certainly experience consequences of the frameworks way of doing things. Not saying this is good or bad but I think inevitable by using a framework. – Chris Jan 05 '12 at 14:56
  • @Chris: The same is true, to a lesser extent, of languages. Some approaches will be more or less difficult in different languages. – David Thornley Jan 05 '12 at 17:15
  • 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 05 '12 at 20:43
  • Is a CRUD generator really a "rails way"? That sounds more like a single purpose tool than a framework. Is there anything more to rails than generating a CRUD app? Everytime someone talks about rails I have a WTF moment. – Lord Tydus Mar 31 '12 at 02:47
  • 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 '12 at 09: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. – Josh Petitt Jan 14 '14 at 02: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.

AShelly
  • 5,793
  • 31
  • 51
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
333kenshin
  • 109
  • 2