logoalt Hacker News

austin-cheney • yesterday at 11:16 PM • 1 reply • view on HN

It sounds like you are trying to force framework insanity onto the vanilla APIs. That is insanity, but I know why you are doing that... its what you know.

The good thing about the vanilla APIs is that you don't have to do knowingly broken things. The APIs themselves are stupid fast.

When I need to store state I put all the state goodness into a single object. Just one object, and its generally small even on extremely large applications. I update that object as often as the user interactions dictate. I let the needs of the application determine where that object is written: localStorage, a file, a database, or something else. I only ever need the state object when the page loads or reloads, because I am not doing things some weird framework way.

Built-in things are represented as data structures, so they are inherently as extensible as your programming capabilities allow.

> There's a reason popular frameworks are popular.

Because that is what employers dictate for hiring. If you want to work you have to do the stupid things for newbs. Framework popularity also does not indicate other positive qualities. These popular frameworks are the primary reason so many people on here bitch about the bloated web.


Replies

zdragnar • yesterday at 11:52 PM

> These popular frameworks are the primary reason so many people on here bitch about the bloated web.

I'm not saying a framework should be used for every single website. This one doesn't need one. It would be equally absurd to say not to use them.

> It sounds like you are trying to force framework insanity onto the vanilla APIs. That is insanity, but I know why you are doing that... its what you know.

I used to work at an agency that came up during the front-end time of slicing and dicing PSD files to get pixel perfect rendering on IE5-8, with all the quirks and everything. Nothing was allowed to be a framework, not CSS (bootstrap) or JS (aside from jQuery).

As applications got bigger and bigger our code and ability to deliver on time suffered. Nothing was impossible, per se, but the ad-hoc frameworks that got invented in house to cut down on boilerplate didn't keep up with the needs of the projects.

We slowly started allowing things like backbone, then later angularjs and right before I left React started to come on the scene. These came with their own problems, but they generally solved more than they caused.

"Framework insanity" is a meaningless phrase. There's plenty of frameworks that I don't care for, and things I don't like about the ones I do use. I'd rather use almost any of them than go back to doing what I'm doing now with pure vanilla JS. I'm not writing simple blogs or news sites or recipe sites that don't need much interaction. If I were, I'd be using vanilla JS.