HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Why I Hate Frameworks(benjismith.net)

16 points·by iamelgringo·19 lat temu·18 comments
benjismith.net
Why I Hate Frameworks

http://benjismith.net/index.php/2005/09/30/hate-frameworks/?repost

19 comments

dang·3 lata temu
http://web.archive.org/web/20080609170037/http://benjismith....
axod·19 lat temu
Completely agree. This is why I wrote my own java webserver 'framework' for my current project.
mrtron·19 lat temu
Been there, done that, regretted it.

I think it depends on the scope of your project. Small to mid-sized project? You must use a framework, or you will end up with a bug-filled half implemented version of a framework that exists. Large project? Perhaps you can write a framework, but perhaps consider extending a current framework to your likings.

Why the hell would you write your own framework and reproduce all the features of an existing framework (if such a framework exists, which it does for Java, Ruby, Python, etc.)
bsaunder·19 lat temu
"Why the hell would you write your own framework and reproduce all the features of an existing framework"

For fun. To learn a new language. Because you have a new idea to explore. Because sometimes people do invent better wheels (I love the irony in this phrase, given this: http://en.wikipedia.org/wiki/Mecanum_wheel )

So you are saying for a large project it might be justifiable to implement your own framework?

I would think for a smaller project you could quickly put something together in less time that the learning curve for some of the frameworks.

Bug-filled/half implemented seems to be more a comment on programming ability than the decision to write a framework.

Fortunately for many people, others have decided they would rather write a new framework than use something that exists.
mrtron·19 lat temu
I am sorry, I disagree with

   >Bug-filled/half implemented seems to be more a comment on programming ability than the decision to write a framework.
How you can write a fully featured, bug free framework better than an entire web community? Sure writing your own framework is interesting, but I feel my skills are lesser than a huge community of people working together.

A smaller project you would not build a large framework, you would build a tiny subsection of features, however then you cannot easily add caching, internationalization, etc if needed.

Many programmers will write their own framework. Most of these programmers will jump on a common framework afterwords.

I fully agree with

   >For fun. To learn a new language. Because you have a new idea to explore.
axod·19 lat temu
"How you can write a fully featured, bug free framework better than an entire web community?"

How can a small startup team write software better than an entire corporation? Sorry, but bigger+more developers isn't necessarily better.
mrtron·19 lat temu


   >How can a small startup team write software better than an entire corporation? Sorry, but bigger+more developers isn't necessarily better.
In a startup I would suggest your efforts would be better working on your core competency. For many people, publishing to the web is just a tiny piece of their startup.
bsaunder·19 lat temu
I think to be one of the principle developers at a start-up, you need to do better than feeling like your "skills are lesser than a huge community of people working together".

IMHO, the two/three primary developers at a start-up should be able to code up a new framework that better meets their needs (though possibly less total features) in less time and with fewer bugs than a huge community. It shouldn't even be a close race. Also, by developing their own framework they will know exactly what parts suck and still need work and be better able to support it at launch.
mrtron·19 lat temu
Sure, but what if publishing to the web is about ~10% of your business, and not your competitive advantage?

Do you really want your primary developers coding up a new framework?
cstejerean·19 lat temu
I disagree. Often if you write your own framework you end up with small, maintainable code that you fully understand and that does exactly what you need.

Different reasons for writing a new framework:

1. sometimes you disagree with the general direction of the available frameworks. Different people can think differently (think for a second about the different TYPES of frameworks available for web development)

2. a lot of times you don't need 100% of someone else's framework.

3. sometimes it's faster to write something than to research available frameworks and read their documentation.

Don't get me wrong, I'm not against code reuse. For tedious work (like re-implementing a protocol with a nasty spec) you want to use a library that someone else has developed and tested. For doing crypto you probably want algorithms and libraries that have been well studied and tested.

I look at frameworks (not libraries) as examples of how to integrate various libraries and an approach to solving the particular problem. This is good. Take a look at many frameworks and get inspiration. But then feel free to write something that works for you, reusing code where necessary. That's the beauty of open source.
axod·19 lat temu
Most existing frameworks are designed to cover a million use-cases. Which makes them non-optimal, and overly complex.
chaostheory·19 lat temu
this may be relevant for some languages but I don't think the whole essay applies for all languages
tlrobinson·19 lat temu
"I'm currently in the planning stages of building a hosted Java web application"

Errr... why am I not surprised?
tlrobinson·19 lat temu
After trying to build and serialize an XML document in Java, I'm even less surprised. Check out this snippet:

    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    DOMImplementation impl = builder.getDOMImplementation();
nikolaj·19 lat temu
blah blah, if he wants a hammer for a spice rack he can use php.

If he wants to build something a bit bigger, and actually maintain it and grow it over time (e.g. cabinets for his kitchen), he would be wiser to spend time standardizing the parts and dimensions so that he can buy in bulk and speed production time (roll your own framework), or buy a pre-built set of cabinets and customize them to his kitchen and desired layout (existing framework).
Tichy·19 lat temu
I thought the article would have been more interesting if it had been more about frameworks and less about hammers.

Thinking further, it also seems odd that there actually are different hammers, not just an universal hammer. Maybe for good reason? So maybe the analogy was not that great.
[deleted]·19 lat temu
gojomo·19 lat temu
This article reminds me Why I Hate Woodworking Conceits.
edw519·19 lat temu
If my app is ideal at 24,173 bytes, shame on me if I deploy it using 24,174 bytes.

Some may call that "anal", but I call it "precise".

The only framework that supports this philosophy is my own.