문제

나는 종종 사람들이 특정 소프트웨어가 "매우 의견이 많다"고 말하거나 Microsoft가 "Un-incinionated"프레임 워크를 작성하는 경향이 있다고 말합니다. 이것이 실제로 무엇을 의미합니까?

도움이 되었습니까?

해결책

프레임 워크가 의견을 제시하면 일을하는 방식으로 잠그거나 안내합니다.

예를 들어, 일부 사람들은 템플릿 시스템이 시스템이 원시 HTML을 반환 할 수 있도록 사용자 정의 된 메소드와 기능에 액세스해서는 안된다고 생각합니다. 따라서 의견이 많은 프레임 워크 개발자는 데이터 구조에만 액세스 할 수 있습니다. 디자인으로 소프트웨어는 제한하고 디자이너가 자신의 방식으로 일을하도록 장려합니다.

또 다른 예 (신호 링크에서 가져옵니다)의 것입니다 위키. 위키의 디자이너들은 많은 의견을 가지고있었습니다. 그들은 HTML이 사람들이 글을 쓰기에는 너무 복잡하다고 생각했기 때문에 컨텐츠를 업데이트하는 더 자연스러운 방법이라고 생각한 것을 생각해 냈습니다. 그들은 또한 디자인보다 콘텐츠에 더 집중해야한다고 느꼈기 때문에 멋진 디자인을 제거했습니다.

애플은 제품을 설계 할 때 강력한 의견을 가지고있다.

비확산되지 않은 소프트웨어 설계 Perl/PHP와 비슷합니다. 이를 통해 개발자와 개발자가 올바른 결정을 내리고 더 많은 통제력을 발휘할 수 있습니다.

또한 Microsoft를 비중의 열에 배치 할 것입니다. Un-in-in-in-in-apinated의 Microsoft 프레임 워크의 좋은 예 : .NET. CLR과 사양을 열어서 모든 종류의 언어와 구현 스타일로 열었습니다.

다른 팁

의견이있는 소프트웨어는 기본적으로 한 가지 방법이 있음을 의미합니다 ( 올바른 방법™) 일을하고 다르게 노력하는 것은 어렵고 실망 스러울 것입니다. 반면에, 일을하고 있습니다 올바른 방법™는 소프트웨어를 사용하여 결정해야 할 결정의 수가 줄어들고 소프트웨어 디자이너가 소프트웨어 작업에 집중할 수있는 능력이 향상되므로 소프트웨어를 쉽게 개발할 수 있습니다. 문제가 완료되면 문제가 해결되면 솔루션에 잘 감소하는 경우 사용하기에 좋습니다. 제공된 도구에 매핑되지 않는 문제의 일부를 해결하는 것은 진정한 고통 일 수 있습니다. 예를 들어 Ruby on Rails입니다.

반면에 비 생체 소프트웨어는 사용자 (개발자)에게 많은 유연성을 남깁니다. 문제를 해결하는 방법 중 하나를 용도하지는 않지만 여러 가지 방법으로 문제를 해결하는 데 사용할 수있는 유연한 도구를 제공합니다. 이것의 단점은 도구가 매우 유연하기 때문에 모든 솔루션을 개발하기가 상대적으로 어려울 수 있다는 것입니다. 프레임 워크가 충분한 도움을 제공하지 않기 때문에 훨씬 더 많은 솔루션이 사용자 (개발자)에 의해 손으로 코딩되어야 할 수도 있습니다. 또한 솔루션을 제공하는 방법에 대해 훨씬 더 많이 생각해야하며 평범한 개발자는 의견이 많은 소프트웨어에 구매 한 것보다 솔루션이 나빠질 수 있습니다. Perl은 아마도 비수분되지 않은 소프트웨어의 전형적인 예일 것입니다.

나의 이상은 비 선택적 프레임 워크이지만 강한 규칙이있는 프레임 워크입니다. 이 범주에 ASP.NET MVC를 넣을 것입니다. 실제로 모든 소프트웨어는 어느 정도까지 의견이 있습니다 (아마도 Perl은 아닐 수도 있음). MVC는 모델 선택에 강력한 규칙을 가지고 있지만 이러한 규칙 내에서 문제를 해결하는 다양한 방법을 제공합니다. 이러한 방법 중 일부는 모델을 깨뜨릴 수도 있습니다. 그러나 그러한 틀에서 발전하는 규칙에 따라 올바르게 사용되는 것은 진정한 기쁨이 될 수 있습니다.

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.

tl;dr:

  • Opinionated: e.g. Ruby on Rails. There is one particularly preferred way to do things, and you get a lot of support in doing things that way. Doing things other ways is hard, or for some systems impossible (Cassandra comes to mind).
  • Un-opinionated: e.g. Perl 5. You can do anything you like, any way you like, in any style. All styles are equally open, valid and supported.

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.

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top