Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Roadie
Jun 30, 2013
Web components suck for a bunch of reasons, but the most obvious one is that they're stuck with string templating for all input and output.

Adbot
ADBOT LOVES YOU

Semisomnum
Aug 22, 2006

Half Asleep


Pekinduck posted:

This seems like a silly question but I'm not getting anywhere searching for stuff. Is there a good place to get basic sets of CSS styled elements? I have a web interface I want to make more visually appealing. Nothing too complicated but a lot of tables and user inputs. Everything I find seems to be a completed website template. Thanks!

I like pico.css

prom candy
Dec 16, 2005

Only I may dance

America Inc. posted:

TIL you can define your own custom HTML elements (aka Web Components). React and Vue are the kiddy pool - and yet so much of the ecosystem and job requirements are built around it.

Well now I know some skills I can learn to get away from the herd.

This is probably the wrong way to think about Web Components. Also "the herd" is where the jobs are.

MrMoo
Sep 14, 2000

Roadie posted:

Web components suck for a bunch of reasons, but the most obvious one is that they're stuck with string templating for all input and output.

This is not even true. Web components have a shadow DOM which you can treat as a document fragment and thus use any template system you desire with.

Web components are accelerated by the browser and thus inherently faster than any other solution by quite a degree.

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
i've never tried web components and it's never come up so i just assume they're not going to take off for at least another 10 years :shrug:

camoseven
Dec 30, 2005

RODOLPHONE RINGIN'

teen phone cutie posted:

i've never tried web components and it's never come up so i just assume they're not going to take off for at least another 10 years :shrug:

They'll never take off because they are hot garbage

Semisomnum
Aug 22, 2006

Half Asleep


They could "take off" as an implementation detail that gets abstracted away by one of the big frameworks like react. Web Components use native APIs to accomplish a lot of what those frameworks already do internally, so if they offer significant performance increases we might see adoption pick up.

prom candy
Dec 16, 2005

Only I may dance
Someone will need to solve the SSR issue, although for client-only apps who cares

Pekinduck
May 10, 2008
Thanks for the suggestions everyone! I'm looking into the frameworks you suggested.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

fletcher posted:

I'm having some trouble with using different auth_basic_user_file for separate location blocks, as soon as I log in to something.com/location2 it starts using that authentication for something.com/location1 - that should be possible right? Here's what I've got:

code:
    location /location1 {
        auth_basic "Restricted";
        auth_basic_user_file /etc/nginx/htpasswd1;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-Host $http_post;
        proxy_set_header Host $http_host;

        proxy_pass [url]http://backend1.docker-network;[/url]
    }

    location /location2 {
        auth_basic "Restricted";
        auth_basic_user_file /etc/nginx/htpasswd2;
        
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-Host $http_post;
        proxy_set_header Host $http_host;
        proxy_max_temp_file_size 0;

        proxy_pass [url]http://backend2.docker-network:1234/app;[/url]
        proxy_redirect [url]http://[/url] [url]https://;[/url]
    }

For my question I asked over a year ago - I ended up using different subdomains to solve the problem. However, Firefox seems to have changed something in a version update a few months ago and now I'm facing the same issue. I tried Firefox Containers as a way to resolve the issue, that didn't seem to work. When I auth to subdomain1.something.com and then go to subdomain2.something.com, it tries to supply the authentication information from subdomain1 :(

America Inc.
Nov 22, 2013

I plan to live forever, of course, but barring that I'd settle for a couple thousand years. Even 500 would be pretty nice.

prom candy posted:

Also "the herd" is where the jobs are.

True. But if you want the carrot you either have to be leading the flock, hope that you can run the fastest and get lucky, find the one they're not telling you about, or learn how to grow carrots yourself.

I also understand there's very little utility gained by the sound of my whining

America Inc. fucked around with this message at 06:08 on Feb 28, 2023

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
what the heck

prom candy
Dec 16, 2005

Only I may dance

America Inc. posted:

True. But if you want the carrot you either have to be leading the flock, hope that you can run the fastest and get lucky, find the one they're not telling you about, or learn how to grow carrots yourself.

I also understand there's very little utility gained by the sound of my whining

a lot of people are getting paid good money to write React hth

camoseven
Dec 30, 2005

RODOLPHONE RINGIN'
Yea but how many of them are getting paid in carrots??

prom candy
Dec 16, 2005

Only I may dance
Money can buy many peanuts carrots.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

prom candy posted:

Money can buy many peanuts carrots.

Explain how!

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
kinda related, i watched this well put together react documentary

https://www.youtube.com/watch?v=8pDqJVdNa44

(it's an hour long and i can't say i recommend watching the whole thing), but it was somewhat depressing to watch and spend a lot of the time thinking, "i will never create anything this important ever in my entire life"

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

It used to be there were huge swings in the market, entire ecosystems would grow die and be replaced within 5 years. That doesn't really seem to happen anymore, it has more or less been decided event based languages are what's up. Therefore Javascript owns. Python is used for calculations and things like c++ or rust is used for anything that needs a lot of performance. That's basically the entire industry and it's stagnating.

It's no longer necessary to always be exploring new technologies to stay ahead of the curve, there isn't one anymore. I think that's more or less what was being discussed earlier.

frogbs
May 5, 2004
Well well well
Is this the best thread to complain about the state of content management systems in 2023? Why are there like 500 static site generator options, but only like 5 open-source headless CMS options with a nice page/post editor? I know these things are all fairly developer centric now, are most folks just using an ssg and manually editing .md files? I feel like I’m going crazy wiring up all this stuff just to get a blog up and running.

Thankfully it looks like Netlify CMS was un-abandoned, so that's good at least.

frogbs fucked around with this message at 06:19 on Mar 2, 2023

prom candy
Dec 16, 2005

Only I may dance

Nolgthorn posted:

It used to be there were huge swings in the market, entire ecosystems would grow die and be replaced within 5 years. That doesn't really seem to happen anymore, it has more or less been decided event based languages are what's up. Therefore Javascript owns. Python is used for calculations and things like c++ or rust is used for anything that needs a lot of performance. That's basically the entire industry and it's stagnating.

It's no longer necessary to always be exploring new technologies to stay ahead of the curve, there isn't one anymore. I think that's more or less what was being discussed earlier.

JavaScript has been stagnant for a while but it's kinda popping off lately. Svelte and SolidJS are both interesting alternatives to React and people are getting nutty for signals. React core team members have even been on Twitter a lot lately defending their decisions wrt React's programming model which is something I don't think I've seen much of from them.

There's still a performance gap with WASM that makes it probably not a good choice for most projects but if/when that changes it'll be the Wild West again for a while as people build web frameworks in all kinds of different languages (like Leptos in Rust)

America Inc.
Nov 22, 2013

I plan to live forever, of course, but barring that I'd settle for a couple thousand years. Even 500 would be pretty nice.

prom candy posted:

but if/when that changes it'll be the Wild West again for a while as people build web frameworks in all kinds of different languages (like Leptos in Rust)

I was gonna ask, has anyone here tried functional programming with Clojure or Elm, or even Ramda? It's my understanding that functional programming used to be more popular in Web circles.

In regards to wasm, the company I used to be at has been trying to compile their C++ backend into wasm for ages for the web app. It hasn't worked out so far.

E: I actually see a parallel between modern C++ (and Rust) and the emergence of frameworks like Svelte and Next. With both there is a focus on moving the responsibility for performance off the developer onto the language or framework itself, and a focus on doing more stuff at compile time and not run time.

America Inc. fucked around with this message at 08:19 on Mar 2, 2023

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

America Inc. posted:

I was gonna ask, has anyone here tried functional programming with Clojure or Elm, or even Ramda? It's my understanding that functional programming used to be more popular in Web circles.

In regards to wasm, the company I used to be at has been trying to compile their C++ backend into wasm for ages for the web app. It hasn't worked out so far.

E: I actually see a parallel between modern C++ (and Rust) and the emergence of frameworks like Svelte and Next. With both there is a focus on moving the responsibility for performance off the developer onto the language or framework itself, and a focus on doing more stuff at compile time and not run time.

I have written a few small apps in Elm, and it's an amazing language. The downside for me was interactivity (CSS stuff basically) and fetching JSON with APIs. Note that my experience was years ago, so things might have changed. It was nothing I couldn't have worked around / with, but "I could do this much, much faster in React" was a strong pull. That said, even if you don't wind up using Elm a lot, I would highly recommend building something in it because the architecture and way you have to code taught me many a good lesson.

fsif
Jul 18, 2003

prom candy posted:

JavaScript has been stagnant for a while but it's kinda popping off lately. Svelte and SolidJS are both interesting alternatives to React and people are getting nutty for signals. React core team members have even been on Twitter a lot lately defending their decisions wrt React's programming model which is something I don't think I've seen much of from them.

You could go broke predicting React's demise, but THIS TIME it does feel like we've reached an inflection point. Been starting to peak into server components in Next 13 and they're such a mess.

prom candy
Dec 16, 2005

Only I may dance

fsif posted:

You could go broke predicting React's demise, but THIS TIME it does feel like we've reached an inflection point. Been starting to peak into server components in Next 13 and they're such a mess.

Yeah I am deeply uninterested in what Next 13 and RSC have to offer. It feels like they're adding these layers of complexity. When I was first evaluating FE frameworks I went with React because compared to Angular (and Ember lol) its programming model was clear and simple. It feels like they're getting away from that more and more.

Right now I think SvelteKit is my favourite metaframework, with the only major downside being that it's Svelte. Remix is cool too (and they just released Hot Module Reloading) but the core team are constantly being jackasses on Twitter and that's a red flag for me in terms of trying to pick frameworks that will have lots of long-term adoption. On the flip side though they did get acquired by Shopify so it's not going to disappear. I set my friend up with a Remix install for a project he's been working on and he's constantly telling me how much he likes working with it.

Maybe it's because I've been doing this for a long time but I like these metaframeworks that kinda feel like the web of 2005-2010 where things are still based around links and form submissions, but with all the progressive enhancement built in automatically for you so they feel like an SPA to the end user. Also with end to end typesafety. I've been in the SPA trenches since 2016 or so and it's really interesting to now see the synthesis of that era of programming with the previous era.

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
i really hope server components become a battle-tested standard within the next couple years because after learning Remix, one of the biggest pain point is you're still downloading JS that potentially does not need to run on the client if the server returns your markup in the way you want and just slows down the page load for absolutely no reason.

i think if Svelte gets there first, that's gonna be a game changer. (i know nothing about svelte. is SSR even a well supported thing)?

prom candy posted:

but the core team are constantly being jackasses on Twitter

pls post some links i want to cringe at people

The Dark Souls of Posters
Nov 4, 2011

Just Post, Kupo
Did Vue just vanish? That was supposed to be the next big thing like five years ago.

Cory Parsnipson
Nov 15, 2015

frogbs posted:

Is this the best thread to complain about the state of content management systems in 2023? Why are there like 500 static site generator options, but only like 5 open-source headless CMS options with a nice page/post editor? I know these things are all fairly developer centric now, are most folks just using an ssg and manually editing .md files? I feel like I’m going crazy wiring up all this stuff just to get a blog up and running.

Thankfully it looks like Netlify CMS was un-abandoned, so that's good at least.

I feel this... I had a hard time finding information on how people used SSG's and what to do when you had something that didn't quite fit the paradigm. (Like an email form, for instance).

Seemed like the easy answer was to pay for microservices and bolt on all the things you needed a la carte. It could get expensive real fast. What else you could do is implement all that stuff yourself with an AWS account or something but I felt silly because at that point it was easier to just use a full framework like Django.

Not sure I get it either :thunk:

Edit: oh, uhhhh... Yeah I think the main editor for ssg folks is their favorite programming ide + GitHub.

Cory Parsnipson fucked around with this message at 20:16 on Mar 2, 2023

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself

FlowerRhythmREMIX posted:

Did Vue just vanish? That was supposed to be the next big thing like five years ago.

it's definitely around. our product at my last job was built with it, and my buddy is also using it as his company

Cheen
Apr 17, 2005

Been using phoenix liveview and elixir and loathe having to pivot back to a react project

prom candy
Dec 16, 2005

Only I may dance

teen phone cutie posted:

i really hope server components become a battle-tested standard within the next couple years because after learning Remix, one of the biggest pain point is you're still downloading JS that potentially does not need to run on the client if the server returns your markup in the way you want and just slows down the page load for absolutely no reason.

i think if Svelte gets there first, that's gonna be a game changer. (i know nothing about svelte. is SSR even a well supported thing)?

SvelteKit does SSR really nicely. It still hydrates every page but because of the nature of Svelte it doesn't end up being all that heavy. Any SSR framework is gonna codesplit effectively so I don't really worry too much about delivering a few dozen KBs of Javascript that may not need to get used. I also don't target users on slow connections though. If I did I'd probably be building with Astro.

teen phone cutie posted:

pls post some links i want to cringe at people

Ryan Florence deactivated his twitter recently but one of the other guys started some poo poo last week saying basically SvelteKit stole a feature from Remix. A feature that I think Qwik had like 8 years ago. Ryan was constantly picking fights with other framework people and generally acting lovely.

Cheen posted:

Been using phoenix liveview and elixir and loathe having to pivot back to a react project

I've heard this stack is great but there's no type safety right? I can't go back.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

FlowerRhythmREMIX posted:

Did Vue just vanish? That was supposed to be the next big thing like five years ago.

It feels like they got self conscious and started to pivot instead of holding onto a good thing. Now you can write Vue with jsx if you want which is totally unnecessary for example. They needed to provide something better than react not duplicate it.

They also ditched their bundler agnosticism and now it basically doesn't function without stupid goddamn webpack. Exactly what I want to get away from.

Nolgthorn fucked around with this message at 02:35 on Mar 3, 2023

prom candy
Dec 16, 2005

Only I may dance
I thought the Vue guy made Vite?

Spime Wrangler
Feb 23, 2003

Because we can.

Vue3 is awesome, love it.

Roadie
Jun 30, 2013

prom candy posted:

Yeah I am deeply uninterested in what Next 13 and RSC have to offer. It feels like they're adding these layers of complexity. When I was first evaluating FE frameworks I went with React because compared to Angular (and Ember lol) its programming model was clear and simple. It feels like they're getting away from that more and more.

If you don't want the complexity, don't use server components? If you just want to stick to client-side stuff, there's nothing new needed other than the de facto standard around .client.js / import 'client-only';.

The rest of it is complicated because server-rendering specific layers of the component tree and mushing them together with client-rendered components while treating all of it as a single set of nodes for the user and doing it performantly enough that you're still coming out ahead in user experience even after eating the round-trip time is complicated.

prom candy
Dec 16, 2005

Only I may dance

Roadie posted:

If you don't want the complexity, don't use server components? If you just want to stick to client-side stuff, there's nothing new needed other than the de facto standard around .client.js / import 'client-only';.

The rest of it is complicated because server-rendering specific layers of the component tree and mushing them together with client-rendered components while treating all of it as a single set of nodes for the user and doing it performantly enough that you're still coming out ahead in user experience even after eating the round-trip time is complicated.

I still want SSR though, but for me there are diminishing returns when you add a lot of complexity to the programming model just to ship 10kb of JavaScript instead of 15kb of JavaScript. Part of that has to do with the kinds of apps I build though. If I was building something for public consumption or where traffic from regions with bad internet was important then my priorities would be different.

barkbell
Apr 14, 2006

woof

prom candy posted:

Ryan Florence deactivated his twitter recently but one of the other guys started some poo poo last week saying basically SvelteKit stole a feature from Remix. A feature that I think Qwik had like 8 years ago. Ryan was constantly picking fights with other framework people and generally acting lovely.

mad the framework they put tons of marketing dollars into isnt as popular with the cool kids

prom candy
Dec 16, 2005

Only I may dance

barkbell posted:

mad the framework they put tons of marketing dollars into isnt as popular with the cool kids

I thought maybe he'd calm down after they got bought by Shopify but I don't think he can help himself

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself

Spime Wrangler posted:

Vue3 is awesome, love it.

it's a shame that all the packages in Vue had to also upgrade to Vue3 to be able to leverage it in your consuming app. i'm sure it's in a much better spot now, but Vue3 meant nothing to us at my company a few years ago because we were reliant on libraries like Vuetify which was going to take a long time to migrate to Vue3 themselves.

death cob for cutie
Dec 30, 2006

dwarves won't delve no more
too much splatting down on Zot:4
Context: I teach/write curriculum for a web development bootcamp that teaches three languages/stacks/frameworks/whatever: Python with Flask, JS with Node/Express/React and Java using Spring. All I really personally do is Python programming; I'm a "web developer" in that I only gently caress up writing basic JS like, half the time. Students get the Python course first and it's really intended primarily to get them used to the basics of webdev (what is a "server", what does a database do, what does it mean to receive requests and return responses, etc.) while also accepting the fact that most of the students will have been writing any kind of code for about like, four weeks total. A key part of this is that the Python section in particular is not explicitly a "hey this is Real-World" experience, but it's really to make sure they get their footing as newbie programmers before we start throwing more at them.

Towards the end of their Flask section we teach them how to write some AJAX to make API calls to the server and then puke data out into the browser. A lot of instructors are pushing to just staple React on top of things; a lot of other instructors have a concern that React may be too complicated for students who still fumble getting their Flask server up and running sometimes. (I cannot emphasize enough that these are students who, before starting this course, did no kind of computer-touching)

What're my options in the world of JavaScript frameworks that are, first and foremost, easy to get going? They don't have to be particularly popular, they don't need to have widespread industry use - they just need to be well-documented and in-use somewhere.

Adbot
ADBOT LOVES YOU

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

death cob for cutie posted:

Context: I teach/write curriculum for a web development bootcamp that teaches three languages/stacks/frameworks/whatever: Python with Flask, JS with Node/Express/React and Java using Spring. All I really personally do is Python programming; I'm a "web developer" in that I only gently caress up writing basic JS like, half the time. Students get the Python course first and it's really intended primarily to get them used to the basics of webdev (what is a "server", what does a database do, what does it mean to receive requests and return responses, etc.) while also accepting the fact that most of the students will have been writing any kind of code for about like, four weeks total. A key part of this is that the Python section in particular is not explicitly a "hey this is Real-World" experience, but it's really to make sure they get their footing as newbie programmers before we start throwing more at them.

Towards the end of their Flask section we teach them how to write some AJAX to make API calls to the server and then puke data out into the browser. A lot of instructors are pushing to just staple React on top of things; a lot of other instructors have a concern that React may be too complicated for students who still fumble getting their Flask server up and running sometimes. (I cannot emphasize enough that these are students who, before starting this course, did no kind of computer-touching)

What're my options in the world of JavaScript frameworks that are, first and foremost, easy to get going? They don't have to be particularly popular, they don't need to have widespread industry use - they just need to be well-documented and in-use somewhere.

Honestly, while create-react-app is not suited for a new PRODUCTION web app any more, it is as easy as you can get to get going.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply