|
Haystack posted:Sorry nerds, HTMX means that the backend is the frontend now
|
# ? Oct 4, 2023 06:47 |
|
|
# ? Jun 7, 2024 06:10 |
|
duck monster posted:Can't you just drop in a component somewhere (I havent done Ruby in a long time, so I have no idea how turbo + stimulus works, I just remember that for a while rubys answer to SPA was some stupid library that just preloaded pages and broke things. Which is a shame, because other than its dreadful default ORM, rails is a lot of fun.) Yes and I often imagine a world in which Rails figured out and heavily promoted an elegant way to do this in like 2017 and remained relevant. Imagine if Rails came up with islands of interactivity instead of Astro.
|
# ? Oct 4, 2023 13:50 |
|
hey mom its 420 posted:actually, react server components means that the frontend is the backend now Did they fix the secrets leak in react server components? I kinda stopped using react and paying attention to it when that happened.
|
# ? Oct 4, 2023 13:53 |
|
prom candy posted:Yes and I often imagine a world in which Rails figured out and heavily promoted an elegant way to do this in like 2017 and remained relevant. Imagine if Rails came up with islands of interactivity instead of Astro. Since you've been kind of the Astro guy here, wanted to run something by you, if you don't mind. My agency's about to make one of those Awwward-y/FWA-y sites with lots of bells and whistles (page transitions, bespoke complex animations, WebGL, etc) and a developer on the team has been making a really big push for Astro. We've just been semi-burned by the app router on a big project so we're all kind of using this as an opportunity to try something new. The big selling point to him with Astro is that we could three fiber and drei as little React islands. From my vantage point, the site we're making is going to be littered with JS in every corner. Components will need mounting/unmounting animations. We'll need (very simple) shared state between pages and I'm not certain View Transitions will be enough to achieve the transitions we might want between pages. Minimizing the JS bundle size is also something of a tertiary concern since we're going to be preloading large 3D assets before allowing the user to enter the experience. Anything SPA-y with Astro is opt-in, as far as I can tell. But then lusion used Astro with their site and my arguments suddenly appear to have less credibility, heh. But what say you? Given your choice of literally any tech stack, would you still reach for Astro on a complex site that tows the line between website and full-on app/experience?
|
# ? Oct 4, 2023 14:57 |
|
fsif posted:Since you've been kind of the Astro guy here, wanted to run something by you, if you don't mind. You can build anything with anything these days but I don't think I would pick Astro for what you're doing. If you don't need SSR/SEO and aren't worried so much about bundle sizes I would probably reach for a good old fashioned React+Vite SPA. I'm surprised you guys are using app router at all. I'm not touching that for production for a long time. Server actions are still in alpha aren't they?
|
# ? Oct 4, 2023 15:37 |
|
prom candy posted:You can build anything with anything these days but I don't think I would pick Astro for what you're doing. If you don't need SSR/SEO and aren't worried so much about bundle sizes I would probably reach for a good old fashioned React+Vite SPA. We do need the SEO, but I'm leaning toward SvelteKit or Nuxt. I'd also rather just use Next with the pages router. It was a mistake to use the app router when we did though, IMO. We began development about a week after it was announced as "stable." The prevailing rationale at the time was that we were setting up a site for a company that has its own in-house dev team and we wanted to ensure that it was set up well for updates over the next several years. It looked like the beginning of Vercel phasing out the pages router. (And we didn't need server actions.) But the rest of the React ecosystem (particularly three fiber and drei) weren't ready for server components and we obviously saw next to no advantage in using them since our sites are so loaded with client-side JS anyway.
|
# ? Oct 4, 2023 15:58 |
|
fsif posted:We do need the SEO, but I'm leaning toward SvelteKit or Nuxt. I'd also rather just use Next with the pages router. SvelteKit rocks. I have no Vue experience and probably never will because I hate directives. I'll adopt React Server Components when they get added to Remix.
|
# ? Oct 4, 2023 16:49 |
|
gbut posted:Did they fix the secrets leak in react server components? I kinda stopped using react and paying attention to it when that happened.
|
# ? Oct 5, 2023 06:57 |
|
Angular vs React in this day and age? I can't find a straight answer about this, because each camp is hailing itself to be the best thing ever. IT dept is kinda pushy about getting me to switch from React to Angular.
|
# ? Oct 6, 2023 16:21 |
|
Why would you care what your IT department thinks about what front-end webtech is used?
|
# ? Oct 6, 2023 16:25 |
|
IT has opinions about everything when it comes to web dev, and they are mostly misinformed and wrong and should be ignored.
|
# ? Oct 6, 2023 16:27 |
|
They're both fine, use the one you're already familiar with IMHO. And definitely don't change it at the behest of IT??
|
# ? Oct 6, 2023 16:30 |
Switch to Vue instead
|
|
# ? Oct 6, 2023 16:31 |
|
Combat Pretzel posted:Angular vs React in this day and age? I can't find a straight answer about this, because each camp is hailing itself to be the best thing ever. IT dept is kinda pushy about getting me to switch from React to Angular. switch as in do new projects in angular, or port existing code from react to angular? i've never heard of anyone porting between one to another, i thought all web devs just make new projects if they got tired of the old ones.
|
# ? Oct 6, 2023 16:56 |
|
minato posted:Why would you care what your IT department thinks about what front-end webtech is used? --edit: I mean, a while ago we already had a similar discussion about me using Node.JS, with what them being an IBM i shop and writing their backend in RPG, served as web service via some IBM middleware poo poo. I stood my ground here. Bruegels Fuckbooks posted:switch as in do new projects in angular, or port existing code from react to angular? i've never heard of anyone porting between one to another, i thought all web devs just make new projects if they got tired of the old ones. lunar detritus posted:Switch to Vue instead Combat Pretzel fucked around with this message at 17:31 on Oct 6, 2023 |
# ? Oct 6, 2023 17:25 |
|
Combat Pretzel posted:Because they're being whiny about me sitting in a department doing its own development work adjacent to them, and oh what would happen if I were to quit (or break my neck). As in "we don't have anyone that can do React". Are they under the impression that all new web "frameworks" are as difficult to learn as angular is? Do they not have anyone in their department who wants to become marketable by learning "new" (read, literally decade old) web technology?
|
# ? Oct 6, 2023 17:33 |
|
Bruegels Fuckbooks posted:Are they under the impression that all new web "frameworks" are as difficult to learn as angular is? Do they not have anyone in their department who wants to become marketable by learning "new" (read, literally decade old) web technology? I prodded at Angular a bit today. It looks okay-ish in the first experiments. But I'd rather not switch, if it's actually dieing off. Combat Pretzel fucked around with this message at 17:55 on Oct 6, 2023 |
# ? Oct 6, 2023 17:39 |
|
Switching to Angular will be bad for your career and you should do everything you can to avoid it. React is far and away the incumbent. Angular lost.
|
# ? Oct 6, 2023 17:59 |
|
Combat Pretzel posted:Because they're being whiny about me sitting in a department doing its own development work adjacent to them, and oh what would happen if I were to quit (or break my neck)
|
# ? Oct 6, 2023 18:00 |
|
If he can’t articulate what it is about React that is inherently insecure compared to Angular (and this is the first I’ve heard anything like that) then
|
# ? Oct 6, 2023 18:03 |
|
Does IT just have some negative Meta/Facebook bias?
|
# ? Oct 6, 2023 18:29 |
|
Definitely a hard bias against Microsoft. To then say that they're getting Hyper-V hosts to run Docker containers. And tell me my preliminary VM to host my Node.JS poo poo would be Windows Server based, until they have competencies in regards to Linux (i.e. new hires).
|
# ? Oct 6, 2023 19:13 |
|
angular being a microsoft product literally doesn't matter tell them to stfu the app should be running in docker in production regardless, the environment shouldn't matter if they're the ones deploying it and they're doing it in a modern way
|
# ? Oct 6, 2023 19:21 |
|
Huh, I thought Google created it?
|
# ? Oct 6, 2023 19:27 |
|
If they are setting up infra for Docker containers why are they running your web apps in a Windows Server VM? Half the point of using Docker (and JavaScript web apps I guess to some extent) is abstracting away the stupid OS idiosyncrasies With all due respect, what in the absolute gently caress is going on with your IT department
|
# ? Oct 6, 2023 19:38 |
|
google, microsoft. whatever!
|
# ? Oct 6, 2023 21:35 |
|
Typescript is Microsoft
|
# ? Oct 7, 2023 05:27 |
|
Angular is good if you're looking forward to 2014. Yeah, I don't understand the hate for React and JS by self-professed backend developers. It's almost always based on pure emotions. It's been the most popular view library for 10 years or something and while it's transitioned to functional components, hooks and SSR, I think you can still use the old style class components and lifecycle methods perfectly fine. Meanwhile Vue and Angular have had harrowing transitions which pretty much required you to rewrite your whole app in one go, and I wouldn't trust them not to try the same poo poo again. It's not perfect, but it's surprisingly easy to create a react app that just works nowadays. But the differences between Vue/Svelte/React/Angular aren't really that big or that important imo. What I think is more important is to use TS with strict mode, give tailwind a shot, and if you can, use something like tRPC or ts-rest; when you have a web app, I think it's a complete waste of time to hand-roll your own REST API for it. Like what if instead of just calling a function you had to think of a RESTful path for your endpoint, decide on the http method to use, write all the boilerplate for it and create a serializer and a deserializer and maybe deal with some query params and headers to boot. And then, if you want TS support for those endpoints on your front-end, you have to generate an OpenAPI schema or something and hook up a codegen tool to generate types and fetch functions (you also have to hook it up to your CI or run it manually, in which case everyone forgets all the time). Sorry for the long-winded rant, I'm knee deep in web dev lately and have an axe to grind. hope someone finds this helpful
|
# ? Oct 7, 2023 08:17 |
|
Macichne Leainig posted:With all due respect, what in the absolute gently caress is going on with your IT department Seriously, reading back some of these rants in the past about this company, it feels like I was posting on shrooms or some poo poo, but I'm not even joking. I've slipped into my current mixed position of production planning and data analyst because of random happenstance and some computer knowledge coming from my hobbies. And I feel like I'm being gaslit every time I deal with them. But since job hopping isn't so much a thing where in Europe as it is in the US, combined with the lack of sufficient paperwork (i.e. diplomas ans poo poo) that they tend to insist on around these parts, I have to stick to this for a while. Combat Pretzel fucked around with this message at 11:50 on Oct 7, 2023 |
# ? Oct 7, 2023 11:47 |
|
I'm trying to implement react-beautiful-dnd. It's almost there except for the fact that there's the slightest flicker before things update. Any advice on where to look next, I'm not quite sure what to google? It appears that my video recorder won't pick up the flickering so I guess I need to describe it. 1. I have two items in a list [A, B] 2. I drag B to be before A 3. I let go of B. 4. B animates to where it should be in the sort order and pushes A down. 5. It shows [B, A] for a brief moment 5. For a brief moment, the screen flickers [A, B] 6. Everything is sorted and displayed correctly as [A, B] huhu fucked around with this message at 00:26 on Oct 10, 2023 |
# ? Oct 10, 2023 00:21 |
|
Could be a performance problem rerendering the whole list. See this blog on React devtool's support for showing rerenders To reduce rerenders you'd usually memoize the reactdnd item, and make sure each item doesn't depend on frequently changing state (global or local).
|
# ? Oct 10, 2023 00:58 |
|
I have not done such things, but they surely can't be harder than making GUI apps with C++/Java and QT/JavaFX... So I installed angular on my server, and created a project. The tsconfig.json was lacking in some aspects, so I added in a few more configuration variables. Will I hate myself for this? code:
Anyways, I'm hoping I can use typescript for the front- and backend, because Javascript is.. not... optimal. My brains start to hurt after trying to do something with it after a while. I want to make a personal web app for my own use, which displays weather information in a format I like. We've made a few desktop apps which pull data over API, I'd reuse a weather api I've used earlier, so fetching and parsing data should not be a big deal. How good/bad an idea Angular&node.js SPA with strictest typescript is?
|
# ? Oct 14, 2023 11:09 |
|
I'd say that not using TS in any kind of web dev project is a bad idea. It's always great to start super strict and then you can relax it up a bit if you want, but usually you won't even have to do that. If you have control over the back-end, you can try something like tRPC or ts-rest to get type-safe API calls for pretty much no hassle.
|
# ? Oct 14, 2023 11:16 |
|
hey mom its 420 posted:I'd say that not using TS in any kind of web dev project is a bad idea. It's always great to start super strict and then you can relax it up a bit if you want, but usually you won't even have to do that. As a counterpoint, I do the exact opposite of starting strict. I start as js, not ts, then when basic functionality is working I rename to ts, and do my typing then. I code kind of seat of my pants and things are constantly shifting for the first part of something new and I don’t want typescript constantly yelling at me while I’m just tryna get the idea working. I don’t know what my types are yet, so I refuse to argue with ts over the types until I do know.
|
# ? Oct 14, 2023 15:40 |
|
HaB posted:I code kind of seat of my pants and things are constantly shifting for the first part of something new and I don’t want typescript constantly yelling at me while I’m just tryna get the idea working. This is one of the scenarios where I actually find Typescript to be super helpful. When code is in a fluid state and shifting around a lot or I'm making large refactors, having types there to provide guardrails makes it a hell of a lot easier to move and change the code around without causing unexpected side-effects. Every time my types change, I'm alerted by the Typescript compiler to anywhere where an old version of the type is still expected.
|
# ? Oct 14, 2023 18:13 |
|
I like using esbuild (or any build tool that just removes the typescript) because not only is it super fast, it also means you can run your code while it has type errors. That way you're free to ignore the compiler when you're hacking on stuff but you still get all the hinting in your editor and you can add typechecking to your process whenever you're ready.
|
# ? Oct 14, 2023 23:26 |
|
HaB posted:As a counterpoint, I do the exact opposite of starting strict. I start as js, not ts, then when basic functionality is working I rename to ts, and do my typing then. That's cool too, and I think largely a matter of personal preference. My preference is more in line with Ima Computer. I like starting out by defining all my data structures and seeing if they make sense, which is where types are very useful. And then when I'm implementing functions and moving them around, it's much easy to change my approach and refactor stuff because the type system will tell me what I need to fix to make the change. Otherwise, I find myself spending a lot of time just searching for pieces of code where my assumptions don't work anymore instead of having the compiler tell me that. Also, I think going from more strict to less strict is easier than the other way around.
|
# ? Oct 15, 2023 10:20 |
|
The trick is not getting caught up in a type error and wasting time trying to figure out what magic incantation it wants.
|
# ? Oct 15, 2023 19:56 |
|
Combat Pretzel posted:Angular vs React in this day and age? I can't find a straight answer about this, because each camp is hailing itself to be the best thing ever. IT dept is kinda pushy about getting me to switch from React to Angular. Angular (whether original or the redesigned v2-and-onward variety) was fundamentally designed for the pre-Webpack era when your build process was "concatenate all the files together and minify the result". Because of this, a significant majority of what it does is just a separate set of mechanisms for doing things that tooling you're using anyway already handles, like handling global state, dependency injection, template parsing, etc. Vue is conceptually very similar to parts of Angular (two-way bindings, directives, etc), but without all the extra boilerplate that's just part of the build process now. Vue even has some of the same nonsense choices like reinventing JS syntax for filters/pipes. smackfu posted:The trick is not getting caught up in a type error and wasting time trying to figure out what magic incantation it wants. If you're working with your own design and not some outside system, even having non-obvious type errors means you're probably doing something wrong. Roadie fucked around with this message at 01:50 on Oct 16, 2023 |
# ? Oct 16, 2023 01:43 |
|
|
# ? Jun 7, 2024 06:10 |
|
Combat Pretzel posted:The gently caress I know. There's a whole lot of poo poo I could rant about. And did so in the past in various other threads in this subforum. I think the best recent one was one of the guys in the department I'm doing the planning for, asked me to set up a network drive, because our IT department couldn't manage (probably by them attempting some harebrained account-specific solution via GPOs, which was ridiculous, because said system was pretty much single user... which is the explanation I made up in my mind). This is a pretty universal experience. Theres a *lot* of whackness out there in the land of corporate IT.
|
# ? Oct 27, 2023 08:24 |