4 ms·
something about using html attributes as a programming language makes me cringe a little. The toy apps look great and maybe where these can really shine, but se
by _e4c8 3y ago
something about using html attributes as a programming language makes me cringe a little. The toy apps look great and maybe where these can really shine, but seems like it may start to turn into a mess very quickly
- DancerOfFaran 3y ago> may start to turn into a mess very quickly These "stacks" ONLY work if you are building hobbyist apps, or if you want to sell services. A fast-moving product company has many better alternatives that are probably far more tailored to their business objectives and team composition. Maintaining these things in production for many years is often painful and cumbersome. Moreover, they usually are introduced by a single person who has a lot of enthusiasm to maintain it, but when that person leaves all hell breaks loose. Even more fun is when the underlying infrastructure provider decides to deprecate an API that requires a ton of bespoke fixes (e.g. Netlify's Next.js edge plugin which recently had a behind-the-scenes change to how Lambdas are spun up causing bugs with state leaking between requests). With that said, it's good to explore new technologies. I just wish these sorts of posts (which are thinly veiled product marketing/tutorials) would expand to actual direction/feedback about how to use new tools in production effectively.
- deredede 3y agoThis is a blog post from somebody exploring how to use a (combination of) tool and reporting on writing a TODO app with it. How could they give direction/feedback about how to use these tools in production effectively when they are only playing around themselves? New tools are, by definition, new, and full of unknowns. There are roughly only two ways to use them in production effectively: either you understand what they are trying to do and take the risk because you are convinced it is The Way, or you wait until the tool/tech settles and becomes not so new anymore as the experience reports from the first group trickles in.
- globalreset 3y agoLike `style` or `input`? People got so stuck on JS for decades that they've forgot that HyperText in HTML is there for a reason. It was always supposed to be more than just UI descriptor markup. It is JS who is out of place in web. A little script in form of DHTML that grew into becoming a cancer that it is now.
- afavour 3y agoIs this a trick question? Style attributes are awful. It’s why CSS of any reasonable size is written in separate files.
- unmole 3y agoTailwind says hi.
- Macha 3y agoI feel a lot of Tailwind's popularity is from people who were not around when inline style attributes were common place.
- scrollaway 3y agoAnd I feel a lot of Tailwind’s flak comes from people who never used it. Having used inline styles in the past, there is no comparison to tailwind. Tailwind is a good and productive, though certainly not ideal tool. But it’s miles ahead of whatever else has been produced by css frameworks, in terms of productivity and maintainability.
- deredede 3y agoI'm not sure how that's worse than the plethora of binding attributes that you find in React/Vue/Svelte and the like. Sure they are not technically HTML attributes, but as programming languages, the outcome is very similar.
- scotty79 3y agoReact doesn't have bindings.
- deredede 3y agoThe `value={state}` / `onchange={evt => setState(evt.target.value)}` dance you do instead also fits the "programming with attributes" paradigm, which was my point.
- scotty79 3y agoThat's really not the recommended way. Write a handler for the event and just mention it in jsx. Don't do stuff inline. Also jsx conceptually is not html. Just alternative syntax for some JS. You don't even have to use it if you want to completely avoid coding in anything that even resembles html. React is nothing like Vue or Svelte.
- scotty79 3y agoI had the same suspicion and it was proven by AngularJS that ended up as horrible ad hoc mess.