by jug · 9y ago · 0 comments
It's like assembling a castle from bricks of lego where each brick changes shape every 6 months. Jesus. I feel burnt out before I barely begin! And when I've settled on something, it's about the toolchain and distribution models. "Is it Webpack or Gulp or Browserify and what is a docker image anyway or should I just use Meteor..."
There _are_ options for people like me. Angular 2, EmberJS, big hunking frameworks like those. But then the problem instead becomes that it's hard to grow your web apps organically. The startup... You have to build a huge garden of Eden surrounding it, and only then can you ship your "Hello world". So exhausting before I've barely got started. Besides, what do these big frameworks even _do_ for me behind the curtains? I don't understand the underpinnings. I just have to trust the docs and that they don't change.
So then I tell myself "oh f all that" and build a fun Web API in Python and Flask. And hack raw HTML and CSS in a text editor. The minimalist, pretty code and lack of 100 MB's of dependencies is too alluring. I feel like I'm forced to give up. How in the world will I have enough spare time and energy after full time job days to get even just average experience in the main JS frameworks of today and keep up with "what you have to know in 2017/18/19"? I also feel like the JS world suffers a lot from not settling down, from experience hugely underestimated. It takes time to mature, and create a high quality, broad ecosystem and community. I sometimes think of the waste from the community being this fragmented, keeping to reinvent the wheel.
The biggest problem isn't just that, it's that those big frameworks change fairly frequently too.
I've witnessed web projects go from backbone to angular to react in the span of a year.
I'm mainly a Qt dev, however I needed to add a Cesium component to the application I'm working on. What a mess. Everything about the javascript ecosystem seems to be in a constant state a flux. I tried to make it better with Typescript, but after trying that for ages I realized I was only complicating things for myself, many of my libraries didn't ship typescript definitions, the main one I was working with needed to be generated based on the documentation and once that was done was severely lacking in much of its functionality.
From crashing editors that wipe your files to dependencies that have breaking updates every few days. And there's a dozen options for everything, at least 5 different module loading systems, of which I had to use several in order to get something compatible with both Cesium and node since both use different module formats and I needed a loader that would support both.
Then there's the packing tools which didn't support what I wanted to do at all without a lot of manual hacks.
Eugh, I don't want to touch it again, the whole thing just made me feel incompetent and thrown around.
But I know I have to, and now I'm sitting here asking myself if React or Backbone would help clean up some messy UI code...
Might be the relatively reasonable size of the projects I have going. But it works well for a lot of stuff.
I think a lot of the problem comes from fear of projects becoming obsolete. Ultimately JS/CSS/HTML isn't going to fundamentally transform in short order.
That said, having built a Backbone app, and then gotten into React+Redux, I'm all in on React and Redux as a better way to build apps. It's a much more consistent mental model, and makes tracing data flow much easier.
I'm actually hoping to write a blog post in the next few weeks discussing how to use Cesium with React+Webpack: basic setup, using React to render Cesium primitives, and then advanced Webpack setup for code splitting.