Earlier quoted context omitted.
Having spent a decade in the late 90s / early aughts doing PHP web development (including Bootstrap), I can't for the life of me figure out why modern frameworks need hooks and a shadow DOM and a component model. I dabbled for a bit about a decade ago, and the first and last JS framework I worked with was Angular2 (which was in beta); this was right about the time Typescript was getting started (in fact, I distinctly…
In my experience, a lot of developers have a very limited grasp of what the browser can do for you without React. If all you know is React, everything looks like a single-page application.
Thank You Bootstrap 1
31–40 of 65 posts
Re: Thank You Bootstrap 1
#32Earlier quoted context omitted.
You split your app into components and separate it from the backend using an API. This allows you to build a bigger development team. The result will be less efficient but more featureful, more polished, will have someone on call and a better bus factor. It's a trade-off.
I don't mean to be obtuse, so let me make sure I have this right (and please afford me some leeway on my gentle ribbing, I assure you it's all in good fun and nothing personal): A framework will allow me to separate the app from its backend? The web, by its very nature, runs on a client/server architecture, so it has long been possible to separate the front from the backend via an API (we can argue the level of diffi…
As you say, it has always been possible to build things where the browser-based client is separated from the backend via an explicit API. Consider an application that shows you a list of flights coming into an airport. You want it to automatically update whenever new flights come in, so you need some polling to fetch that data, and some Javascript to clone elements, fill in the details of the new flights, and insert them into the DOM. But you also want sort functionality, so you need to be able to rearrange all the elements as well. And you want to filter, so you need to be able to store all the flight information internally as state, even if those flights aren't currently being shown. And your can click on each flight to expand it and view more details about that flight, so while you're rearranging and rewriting all your flights, you also need to be keeping track of which ones are currently open or not.
This was the exact application where I first realised that all the jQuery-based DOM manipulation techniques I'd learned were not going to be enough, and that there was a lot of value in having a tool that manages keeping the DOM in sync with the application state, allowing you to focus on keeping track of that state.
There are other approaches, but in my experience, they mostly come down to building your own framework, one way or another. They don't have to be as complicated as React, or as heavyweight as Angular, but you need some system in place to help you sync your state to the DOM.
I'm not establishing here that all web development needs to take this approach, just that there are a lot of situations where it is very useful. I've ended up building and maintaining variants in the above filter/sort/details/live updates system three or four times in different contexts and with different parameters, to say nothing of other, similarly complex web apps where the system works have been unmanageable without some sort of frontend framework.
Once this starts, though, you end up with frontend developers who specialise in this kind of development, and I suspect this results in a kind of siloisation, splitting web development into frontend teams and backend teams, who can each specialise further. Backend developers no longer need to worry about that occasional time where they need to tweak some CSS or JS, and frontend developers don't need to understand databases. This in turn develops into frontend developers using their tools in a wider variety of situations, because it turns out they make a lot of web development a lot easier, not just complex state management. It's a bit like how people use git to track their dotfiles. Even though git is designed to coordinate between multiple people syncing complex branches and forks together, it turns out it also works well as a simple backup and rollback mechanism.
The result is that tools like React are probably somewhat overused, but that allows developers to specialise into broad fields like "frontend" or "backend", while also remaining very general within those fields (because most work that is frontend will use similar sorts of tools and layouts, just like how MVC will apply to most backend development, regardless of language or framework). And this also isn't universal - there are still plenty of smaller, more boutique design operations that will build websites in the more traditional way.
Re: Thank You Bootstrap 1
#33Earlier quoted context omitted.
Hilarious analogy that honestly doesn’t seem that far off. But in that reality, you probably wouldn’t be able to walk to the store, much less anywhere else, because there would be all these semi trucks driving everywhere and a road-dominated country. That’s basically a dev trying to get a job today, which means they’re just gonna focus on learning that whether it’s the best solution or not. Most devs don’t use React…
Well we can all relate to that. We've all got to eat (and stay warm & dry). I think I'm just getting to the "old man yells at cloud" stage of my career. I think of all of the things that we could have built over the years, and understand, I say this not to detract from all of the great software that has been built, but to lament the fact that devs spend so much time spinning their wheels these days (when not reinvent…
would it be OK for me to steal your analogy? It's great!
In the team I'm currently leading, we have made the same observation, with stuff getting more complicated without anything substantial to show for it. In a way we're having a harder time getting out features than twenty years ago, but somehow that's "progress".
As an experiment, I had one of my juniors rewrite a (admittedly small) frontend with Go templates and HTMX, and not only did they have a blast doing it, they were surprised at how simple everything suddenly was. Give that one a try, it's worth it!
That said, there are frontends with requirements that actually do need all that framework crap. Once you want 3D stuff that a user can move around with the mouse, you pretty much have no other choice. While those special cases are rare, people prefer to learn one framework and use it for every nail they see lying around instead of looking at all the other tools in their shed...
Re: Thank You Bootstrap 1
#34Earlier quoted context omitted.
I don't mean to be obtuse, so let me make sure I have this right (and please afford me some leeway on my gentle ribbing, I assure you it's all in good fun and nothing personal): A framework will allow me to separate the app from its backend? The web, by its very nature, runs on a client/server architecture, so it has long been possible to separate the front from the backend via an API (we can argue the level of diffi…
One thing that I've learned over time is that if I can't understand why people are taking some particularly obtuse or circuitous route, then that's probably because I don't yet understand what they're doing properly. I never really understood why people would use terminal-based text editors until I tried it out for myself, and while I still have my doubts, I understand the tradeoffs much better now. If frontend devel…
I appreciate the concrete examples, and yes, that makes perfect sense when you start getting into data-heavy frontend applications. I do remember jQuery being useful for AJAX and for DOM selection primarily, so I get it.
And of course I knew I was missing something, that's why I asked lol, the question was serious and I knew HN wouldn't let me down.
I'm still a bit mystified about the necessity of a shadow DOM, it just seems counterintuitive to me, but perhaps it's because I'm not familiar with browsers' DOM handling conventions. Perhaps me gaining some insight there would make the purpose of a shadow DOM more clear.
Honestly, I really did figure that it had something to do with the event model (not the DOM or shadow DOM). Something about providing a more consistent apparatus for wiring and handling events.
I still think there's a lot of unnecessary spinning of the wheels on the front end, but that gets beat to death around here, so I'll let it be.
Re: Thank You Bootstrap 1
#35Something that I've often wished, as a primarily backend focused engineer, often without frontend support, is for designers or perhaps design engineers, to pretty much build Bootstrap themes. That would let me code to the Bootstrap docs (which are pretty good), while allowing us to brand or customise whatever we're working on. I've seen even contract designers push back on this idea, suggesting that doing such a thin…
Having spent a decade in the late 90s / early aughts doing PHP web development (including Bootstrap), I can't for the life of me figure out why modern frameworks need hooks and a shadow DOM and a component model. I dabbled for a bit about a decade ago, and the first and last JS framework I worked with was Angular2 (which was in beta); this was right about the time Typescript was getting started (in fact, I distinctly…
Main difference that I noticed between that time and the present day is that you hardly ever see unfixable monstrosities made by a lone-wolf one-man-army developer any more - at least in the Angular space, where as long as you're familiar with the convention, you'll manage. Much of that is thanks to TypeScript and the possibility to communicate to future maintainers what was your intention without writing paragraphs upon paragraphs of documentation.
Of course the tradeoff is that it's all pretty heavy right now, but that's what frameworks like Svelte or SolidJS and generally the concept of Signals try to address.
My take is that the moment we get Signals into the JS standard, this will all neatly fold like rows in Tetris.
Re: Thank You Bootstrap 1
#36Earlier quoted context omitted.
Having spent a decade in the late 90s / early aughts doing PHP web development (including Bootstrap), I can't for the life of me figure out why modern frameworks need hooks and a shadow DOM and a component model. I dabbled for a bit about a decade ago, and the first and last JS framework I worked with was Angular2 (which was in beta); this was right about the time Typescript was getting started (in fact, I distinctly…
You split your app into components and separate it from the backend using an API. This allows you to build a bigger development team. The result will be less efficient but more featureful, more polished, will have someone on call and a better bus factor. It's a trade-off.
Not sure about polished. Just see the Atlassian wasteland: lot of features, I'm sure huge and numerous teams. Ages to load a page or anything. Multiple API documentations depending on what you need. The integration between tools is mostly random. "Simple" feature asked for a decade ago never got implemented.
Re: Thank You Bootstrap 1
#37Something that I've often wished, as a primarily backend focused engineer, often without frontend support, is for designers or perhaps design engineers, to pretty much build Bootstrap themes. That would let me code to the Bootstrap docs (which are pretty good), while allowing us to brand or customise whatever we're working on. I've seen even contract designers push back on this idea, suggesting that doing such a thin…
Having spent a decade in the late 90s / early aughts doing PHP web development (including Bootstrap), I can't for the life of me figure out why modern frameworks need hooks and a shadow DOM and a component model. I dabbled for a bit about a decade ago, and the first and last JS framework I worked with was Angular2 (which was in beta); this was right about the time Typescript was getting started (in fact, I distinctly…
Money and resume driven development.
Just being a webmaster integrating a simple design could be done by "anyone" so not paying so well anymore. So came the idea: now we're not doing websites, we're doing webapps. Suddenly fresh-out-of-school engineers can try to implement GUI concepts they vastly misunderstood, but in javascript and limited by the DOM. So that's years of work to maybe get a tenth of the performances of desktop apps: javascript interpreters to optimize, browsers, frameworks and then the apps themselves.
Add the rise of smartphone apps and you even get the excuse of "we made an API for the apps, so why not use it for the frontend".
Re: Thank You Bootstrap 1
#38Earlier quoted context omitted.
Well we can all relate to that. We've all got to eat (and stay warm & dry). I think I'm just getting to the "old man yells at cloud" stage of my career. I think of all of the things that we could have built over the years, and understand, I say this not to detract from all of the great software that has been built, but to lament the fact that devs spend so much time spinning their wheels these days (when not reinvent…
Hi fellow yelling old man, would it be OK for me to steal your analogy? It's great! In the team I'm currently leading, we have made the same observation, with stuff getting more complicated without anything substantial to show for it. In a way we're having a harder time getting out features than twenty years ago, but somehow that's "progress". As an experiment, I had one of my juniors rewrite a (admittedly small) fro…
I have been looking to slap together a small blog platform, and this sounds like a perfect setup. Thanks, I appreciate the tips.
And yes, I would be honored if you used my analogy! Hopefully it can give some frustrated devs a chuckle and brighten a small part of their day.
Re: Thank You Bootstrap 1
#39Earlier quoted context omitted.
"bus factor" is just a side benefit of having a larger dev team. The idea is if someone gets run over by a bus then you still have someone who "knows" the code to train the replacement.
I like it. I will add it to my lexicon. Thanks!
Re: Thank You Bootstrap 1
#40Earlier quoted context omitted.
You split your app into components and separate it from the backend using an API. This allows you to build a bigger development team. The result will be less efficient but more featureful, more polished, will have someone on call and a better bus factor. It's a trade-off.
I don't mean to be obtuse, so let me make sure I have this right (and please afford me some leeway on my gentle ribbing, I assure you it's all in good fun and nothing personal): A framework will allow me to separate the app from its backend? The web, by its very nature, runs on a client/server architecture, so it has long been possible to separate the front from the backend via an API (we can argue the level of diffi…
You asked whether some of the reasons are technical. Not in the sense that you can't do it in a simpler way, no.
Look at it from the perspective of a company that has a product and a few developers working on it. It's successful. Now a lot of requests pops up. Some are small, some are related to an obscure integration, maybe a few custom development requests from important customers, bug fixes... The company can now either say no to a big chunk of them (a fine choice), or, if it has money, it can hire more people.
Now, with more people, for them to be somehow effective, you need to create internal APIs and narrow down the focus areas of your teams. Backend/frontend is a separation layer, you're right. But I'd argue it's not that useful for this problem. If the backend emits HTML, what's the frontend work then? Styling? On the other hand, running a thick client in the browser that consumes an API makes it possible to decouple even the release cycle of the frontend from the backend.
Mind you, there are companies that are/were successful with a small team. But most often, the success is supported by large teams at the cost of technical perfection.