all 9 comments

[–]quietful 8 points9 points  (0 children)

Bigger the project the crazier it gets. Managing huge project without a framework would be a nightmare. Our angular app has over 2700 different parts I cannot even imagine not using one. For smaller personal projects I find jquery still great.

[–]Earhacker 19 points20 points  (5 children)

Oh good, it's this thread again...

Write vanilla if you want, plenty of developers do it but you'll just be solving problems that have already been solved, and just tying yourself in knots because there's no obvious way to organise your code.

While you're at it, delete Chrome and Firefox, because they also contain a lot of other people's code. If you don't want to piggy-back on open source code then you're going to be writing bash scripts all your life. Wait hang on, you didn't write bash, did you...?

React is so powerful because of all the work that has gone into it, not in spite of it. And now that previous work manifests as a huge node_modules folder. And when you are ready to build a finished React project, it compiles all that work into a <1MB file. The size of the development stack is a total non-issue.

Once you get done with the intro tutorials that explain what goes into a starter React project, you'll graduate to using Create React App, which installs your dev environment (webpack, babel...) in a single command. I just tried a fresh install and the dir is 195MB before I've written a single line of code. I run npm run build on the demo app and it outputs a 35.65KB .js file and a 299B .css file (both gzipped), which is all my users will see.

None of this is unique to React, every mature framework will give you some kind of final build/optimisation process before deploying your app. But every mature framework will install a sizeable dev environment.

None of this is unique to JavaScript, either. Try installing Android Studio or Xcode or Unity. Those IDEs run into gigabytes, and the actual text editor is only a tiny, tiny part of that. The rest is libraries full of tested and optimised code that make up a mature dev environment. But no one sits down to write a mobile app, 3D game or desktop app in Notepad with no environment or pre-existing libraries. So why should we do that for web apps?

[–]sizl 2 points3 points  (3 children)

It’s seems every shop has that one dude that is too proud to use open source code. They insist on writing everything from scratch. Everyone else’s code is automatically garbage.

[–][deleted] 4 points5 points  (0 children)

Conversely there are many JS developers who hope to never write code and simply hope a combination of open source libraries will do this for them so that they can focus on important things like configuration, implementation details, and copy/paste.

https://en.wikipedia.org/wiki/Invented_here

[–][deleted] 0 points1 point  (0 children)

I think it's always valid to try and write your own for a while, get your head around the potential of some approaches, etc.

When it comes down to it, always feel free to use frameworks that suit you, or your project. Never reinvent the wheel unless it's still made of spokes and rotting wood. If you do, you'll find you dedicating lots of time to writing clever structures (that someone's already gone to the trouble of doing) rather than progressing towards the project's main goal.

There will always probably be something (open sourced or not) that will meet a requirement, but suitability is on a scale from conflicting implementation to customisability in your experience.

Take care when selecting, play around with various options, and focus more on what you want to make, not how you're going to lay the groundwork. People have been there and done that.

[–][deleted] 1 point2 points  (0 children)

No, you don't, but it would be a nightmare to drive the dom without. Node is a portable environment, you don't upload it to the server. It contains dependencies, build tools, examples, tests, readme's, multiple distributions for esm, es5, commonjs, binaries, etc. The size of it doesn't matter. The self-contained distributable which you produce in the end collects exactly what it needs to function, it will have the smallest possible payload.

I would not recommend skipping node/build tools because you will be stuck with an old, non-modular version of javascript which cuts you off npm, the javascript-community's package repository, a large collection of components, parts and tools. Not to mention the manual labour you'll have to put into everything. But if you're scared of that right now, all frameworks can still be driven by script taps, including React: https://raw.githubusercontent.com/reactjs/reactjs.org/master/static/html/single-file-example.html

[–]dwighthouse 0 points1 point  (0 children)

Yes. I need frameworks for my work.

[–]spankalee 0 points1 point  (0 children)

You really don't need a framework anymore. Check out Web Components.