Hacker News new | ask | show | jobs
by dhruvbird 5456 days ago
I guess frameworks have their use cases. For example, now that you mentioned it, the EventEmitter on node.js is a framework-kind of model where your code is invoked when a certain condition is met. They seem to have done it beautifully. In fact the whole runtime (environment) is event driven, so I like to think of my application as a user of the node.js framework. However, many a times when coding higher level requirements or ever-changing business requirements, frameworks tend to lose their way and programmers land up writing around the restrictions.

I guess it makes sense to have a framework when you know the requirements in & out and you know that they are not going to change (like low-level I/O or socket or FS stuff which has remained the same for years now), and a library otherwise.

1 comments

I'd be more interested yet if it were possible to fire your own IO events and such --- so that you could replace the top levels of the framework, and use the remainder as a library. So that instead of spreading your code like jelly on a pre-built slice of bread, you instead layer your code and library/framework code as you see fit, into a delicious cake.