Web Development

lysdexic OP , in Weird things engineers believe about Web development

From the whole blog post, the thing that caught my eye was the side remark regarding SPAs vs MPAs. It was one of those things that people don't tend to think about it but once someone touches on the subject, the problem become obvious. It seems that modern javascript frameworks focus on SPAs and try to shoehorn the concept everywhere, even when it clearly does not fit. Things reached a point where rewriting browser history to get that SPA to look like a MPA is now a basic feature of multiple pages, and it rarely works well.

Perhaps it's too extreme to claim that MPAs are the future, but indeed there are a ton of webapps that are SPAs piling on complexity just to masquerade as MPAs.

colorado , in E-Commerce, shopping cart question

as always, the answer is it depends. I've worked on B2B websites where you can't even see the real pricing until you sign in so it is impossible for that application to add a guest checkout. it really depends on your requirements.

Shadow , in E-Commerce, shopping cart question
@Shadow@lemmy.ca avatar

Lol if I have to sign up first, I'd leave and go somewhere else.

I want to see the full shipping and delivery price before I commit to anything, even signing up.

TootSweet , in E-Commerce, shopping cart question

This seems more like a business analytics kind of question than a programming question. But I'd imagine you'll get less sales without a guest checkout option than with if that answers your question.

You might manage to mitigate that a bit by letting folks fill their cart and start the checkout process and only require them to sign in at the last minute after they're already pretty invested in checking out.

silas , in New to Webdev
@silas@programming.dev avatar

For a static site, I would personally choose Astro or SvelteKit—both of those are highly optimized for static sites. In my opinion the syntax of these frameworks feels closer to plain HTML/CSS/JS than React and will naturally teach you more about the fundamentals as you go.

If you’re just starting out, the most important thing is to really make sure you learn your JavaScript Web APIs and other HTML and CSS fundamentals as you go. The better you know these, the better your websites will be regardless of which framework or tools you choose. These fundamental skills will have the highest reward for you in the long term.

And ask a ton of questions here too!

ICastFist , in Web Components FTW! - HTMHell
@ICastFist@programming.dev avatar

That is, indeed, a special type of html hell.

Also, if memory serves, plain old HTML4 allowed you to load partial html files within a main page and they'd render as expected, which completely beats the reasoning behind the "why use web components" on the piece (reusability, maintainability)

onlinepersona , in FOSS alternative to google analytics
TootSweet , in Framework of Your choice and why

More important than learning a framework is to learn how things work beneath the frameworks. Try doing a project without frameworks. Who knows. You might even like it.

0x1C3B00DA ,
@0x1C3B00DA@kbin.social avatar

this is how I like to do my personal projects. And I can always pull in Alpine.js or HTMX if I need to as the project progresses

dan ,
@dan@upvote.au avatar

HTMX

I'm glad this style of frontend coding (where you use a prebuilt JS library that handles common interactions through simple configuration, rather than writing custom JS) is coming back into fashion. It was common 15-20 years ago, and as web apps became heavier and heavier, I started to think it was a good idea again.

GammaGames , in htmx is a library that allows you to access modern browser features directly from HTML, rather than using javascript.
@GammaGames@beehaw.org avatar

I’m always kinda surprised when I see htmx. What’s the perks? I already have my stack, why should I change? I looked into it recently and it looked really unappealing

crazyfuckincoder , in Bun 1.0

Javascript isn't my primary language but How is it different/better than vite? I've used vite for a few vue projects and it felt really fast.

g6d3np81 ,
@g6d3np81@kbin.social avatar

Bun is designed as a drop-in replacement for Node.js. It natively implements hundreds of Node.js and Web APIs, including fs, path, Buffer and more.

The goal of Bun is to run most of the world's server-side JavaScript and provide tools to improve performance, reduce complexity, and multiply developer productivity.

If it can replace node and pnpm at the same time then this sounds quite good actually.

EDIT
https://bun.sh/guides/ecosystem/vite

While Vite currently works with Bun, it has not been heavily optimized, nor has Vite been adapted to use Bun's bundler, module resolver, or transpiler.

https://bun.sh/guides/ecosystem/nuxt

Bun supports Nuxt out of the box. Initialize a Nuxt app with official nuxi CLI.

crazyfuckincoder ,

So it can also do tooling like vite but it primarily aims to replace node as a better and faster js runtime since they're rewritten most js api in zig and c++ from what it shows on their github. I'll give it a try sometime and see if it's really all that fast and easy as it claims.

agedbeef , in Bun 1.0

It’s hard not to get excited for Bun.

elbarto777 , in It's a smolsite! This whole site fits inside the URL!

Neat project! I wonder what the max url length is. It's implementation-dependant, right?

Lmaydev ,

From a quick Google yes. Numbers below are likely out of date though.

Chrome
2,083 characters

Firefox
65,536 characters

Safari
80,000 characters

Internet Explorer
2,083 characters

elbarto777 ,

64K in a URL on Firefox? Wow! That was the RAM size of home computers in the early 80s. Wild.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • webdev@programming.dev
  • test
  • worldmews
  • mews
  • All magazines