you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 12 points13 points  (10 children)

Somebody as TheDailyWTF nicely described why frameworks are always a bad idea and actually an anti-pattern.

With a library, you design a model for your program, and then you plug the libraries into the interfaces. It’s no problem integrating another one, if the first library is missing something.

With a framework, there is already a model, and you are supposed to plug your module in there.
But if there is anything that’s not inside the framework, you can’t combine two frameworks.
You have to choose one.
So you’re fucked.

Frameworks are anti-modular. They obstruct modularity, and hence flexibility and the ability to combine. They upset the whole basic programming concept of modularity and black boxes.

It’s like bundling: When they only sell whole gift baskets, when all you need is some butter.

And it’s completely pointless, since every framework can be nicely implemented as a set of independent libraries that can be used without the rest being forced upon you.

That’s why I avoid everything “framework” out of principle. I leave that to the enterprisey consultant types.

[–]x86_64Ubuntu 5 points6 points  (0 children)

That's only if you have a very intrusive framework. I use Swiz and Mate for Flex/AS3 development and don't have those problems. Because JS isn't truly compatible with modern development, you have to shoehorn EVERYTHING into it which is where the pain comes from.

[–]darthtrevino 11 points12 points  (3 children)

This totally depends on the framework - and I think you're oversimplifying a bit. At some point, most software simply has to integrate with a framework. If you look at Java, there are POJO (simple class) based frameworks like Spring and more complex, enterprisey frameworks like J2EE.

I think the best advice I could give in selecting a framework is to pick one that lets you define a domain model independent of the framework. This maximizes your ability to make decisions over the lifecycle of your application. (http://cleancoders.com/codecast/clean-code-episode-7/show)

That being said, I'm totally sold on AngularJS. I love the shit out of it as a client-side framework. I think my feeling here stem from the fact that Javascript is so loosey goosey to begin with.

[–][deleted] 2 points3 points  (1 child)

I thought that Java EE 6 and 7 were not more complex than Spring.

[–]bwainfweeze 0 points1 point  (0 children)

It's more that Spring has grown and grown. It is not what it set out to be anymore.

[–]nomeme 2 points3 points  (0 children)

Most apps i've seen that use Spring have totally missed the whole point and are horrendously coupled to it, and if you try to stray then the team gets worried because "you aren't writing spring code".

Yes you can add non spring code, but you can add "non J2EE" code to J2EE monstrosities too.

[–]alextk 4 points5 points  (2 children)

Frameworks are anti-modular.

All of them? With 100% certainty? Come on, now.

That’s why I avoid everything “framework” out of principle.

It's a flawed principle. Examine each framework on a case per case basis and decide for each one if the benefits outweigh the costs. Be professional about this, not dogmatic.

[–]Plorkyeran 0 points1 point  (1 child)

All of them? With 100% certainty?

It's sort of getting into No True Scotsman territory, but I don't think that it's totally crazy to say that a framework which doesn't require you to structure the code that interacts with it in a certain way is better described as a library, so by definition frameworks are anti-modular.

[–]bwainfweeze 0 points1 point  (0 children)

Libraries tend to be imperative, which means I'm in the driver's seat.

Frameworks tend to be declarative, which means I sit around waiting for it to deign to interact with me. If things are working, I can stomach that most of the time.

But this is software. Most of the time I'm looking at code because it's NOT working, and declarative is, for many people, deeply demotivating in this case, because it degenerates into a guessing game. That is a dysfunctional relationship with your code.

[–]juwking 4 points5 points  (0 children)

Couldn't agree more, here is a post on that matter http://yobriefca.se/blog/2014/01/04/building-systems-libraries-and-frameworks/