|
|
|
Ask HN: How do you manage complexity in large JavaScript applications
|
|
9 points
by harshitj
3746 days ago
|
|
Hi All, I was just wondering how you guys manage complexity in large JS Applications? Since JavaScript is so flexible and HN is full of very smart people, I'm curious to know how everyone handles it. I'm also pretty sure that for someone who is just starting out, this would be tremendously useful for them to know. |
|
By not making them large in the first place.
Take for instance the Facebook home when you're logged in. It looks like one unified app. But what you might not know is that it may be comprised of several different "applets" that are totally independent of one another. They may possibly not use the same framework, nor share code, and could possibly be built by several teams which are proficient in different languages and tools.
iirc, Spotify's app isn't built as one huge app. It's several different "applets" running in iframes. This ensures that each applet is totally isolated (so they don't kill each other even if they use different frameworks and versions) and self-contained (so they're testable individually, reducing the need for integration tests).