Hacker News new | ask | show | jobs
by t0nyh0 4325 days ago
Despite the potential developer productivity costs associated with custom frameworks, I've decided not to use some of the bigger frameworks for the following reasons:

- Performance is a feature. I like less magic, more clarity on how data flows through my system. $digest cycles, ng-repeat will keep me up at night. I sleep better when I know what code is doing exactly what. - Hiring becomes easier, i.e. do not have to screen for certain framework experience. Know JS? Good, that's all you need!

Of course, writing your own custom application framework is no walk in the park, but like the article said, you'll have ultimate flexibility. In my experience, writing your own custom app framework, you have to ensure:

- Proper dependency management, use AMD or CommonJS. The alternative: Spaghetti jquery code.

- Enforcing class responsiblities, e.g. ViewModels are for data transformation and validation only. Views are for DOM management. HTML is for layout only. CSS for styles.

- Proper risk/reward evaluation of third party libraries. Usually, the leaner the library the better imo.

1 comments

Hiring becomes easier, i.e. do not have to screen for certain framework experience. Know JS? Good, that's all you need!

How is training someone on your custom framework any less arduous than training them on an existing framework?

It is true that your own custom framework will need to be taught as well, but the difference between a custom framework and using a pre-existing mammoth one is that of clarity.

I will have a better idea of how data flows through my system so that if the new developer creates a bug, I have a better idea of where the problem may be and be able to isolate it better. Whereas, if you use a heavy pre-existing framework, you run the risk of not knowing. The subtle bugs can be pretty dangerous.

In the case of hiring, if I have a good JS developer, I can show him easily how data flows through the system because it is more clear (if architected properly). If I used a heavy framework, I may have to expect him to know the subtleties of these external frameworks, and may even have to act in the role of an "architect" to dissect it.

It's a balance to achieve between speed and productivity. My personal style is to err on clarity and not magic.