Live data from Hacker News

SvelteKit 1.0

svelte.dev

251–260 of 296 posts

Re: SvelteKit 1.0

#251

Earlier quoted context omitted.

SvelteKit SSR is a very good pair to Python backends, like FastAPI.

Can you expand? I don't get how you can use SSR with another language than Node. I always thought one has to use the static adapter.

the backend svelte (node) can actually make calls to the separate api server and render a 'fuller' page to the client on page load.

I believe this is what is meant.

Re: SvelteKit 1.0

#252
post #27

This is how I move fast and break nothing. By having fullstack type-safety from database all the way to the frontend with auto-completion. My current stack: + SvelteKit (could be Next, Nuxt, Solid or any other TypeScript framework) + tRPC (typed calls between frontend and backend, https://trpc.io ) + trpc-sveltekit (glues SvelteKit and tRPC, https://github.com/icflorescu/trpc-sveltekit ) + Prisma (ORM, https://www.pr…

Same, but with ASP.NET (which produces an OpenAPI specification) + Entity Framework on the server, React + TypeScript on the client (which consume that specification through openapi-generator). https://github.com/OpenAPITools/openapi-generator I chuckle every time I read claims about Go (or whatever) being amazingly productive. I don't think it's possible to beat this stack with regards to both productivity and ease…

Add a `String.Equals(thing, thing2, StringComparison.OrdinalIgnoreCase)` in your where clause and now you're full table scanning.

LINQ makes things easy, but has traps.

Re: SvelteKit 1.0

#253
Is there any option if I want to do traditional (non JS) SSR but also want to share an API endpoint for both browser and other use cases?

Seems like a JS frontend framework or a JS SSR is the only option for such use case. If SSR and API force a JS backend that leaves a lot of the benefit that other languages bring to the table and effectively limiting you to 1 (JS) or 2 (TS including) languages. Seems like a sad state of affair in that regard.

Re: SvelteKit 1.0

#254

Earlier quoted context omitted.

You should also mention Zod, which acts as the type safe glue between the different boundaries. I have been using Google Sheets as a kind of hacky database. By defining the schemas in Zod I am able to automatically validate my sheets data and coerce the string cell values into their proper types. Zod schemas can be used all over the stack, imported for form validation, and avoid heaps of duplication and tests.

While Zod is hyped by Next.ja developers (I think mostly because Theo Brown has such a huge reach), I think Ajv is better, because it lets you generate OpenAPI documentation and it fully json schema compliant. I really like nextjs for its opinions on the frontend part, but it is lacking these strong, but great opinions on the backend. Wish love to see some design decisions from fastify adopted here. Matteo did really…

Fastify is excellent. I wish these new full stack frameworks were closer to that.

Re: SvelteKit 1.0

#255
post #124

Earlier quoted context omitted.

This is very backend-centric. It can't compare to a framework like SvelteKit or NEXT or NUXT, where the primary benefit is also shipping your tightly-integrated frontend code to the browser. .NET apps are old school, full refresh apps unless you are also using a separate frontend framework like React or Vue standalone. And that adds a lot of time and overheard. Everything you described in terms of easy migrations and…

Exactly. With ASP.NET, a React/Angular project is separate, there's a separate model layer, and you have to keep that in sync with the .NET models. With Next, there's true code reuse between client and server. Next is smart about shipping your code where it needs to run, server, client, both. You can even mix and match from page to page: Server-side render one page per request; statically generate another at build ti…

If you need to create a more complex application, you still would do that as a separate API project that your NextJS application would query...

Re: SvelteKit 1.0

#256
I’ve been using SvelteKit since very early beta, and it’s been amazing to watch it evolve along the way to 1.0. It is by far and away the most intuitive framework I’ve used and I can’t say enough good things about it.

Congratulations to the team, and keep up the good work!

Re: SvelteKit 1.0

#257
post #221

Earlier quoted context omitted.

Wish it is but it's crazy fast with M1

Any browser is fast with the last CPU node. Safari is becoming compatibility nightmare.

The tutorial used Web Containers which... aren't a standard and are very specifically Chrome-only. And it undoubtedly relies on a bunch of Chrome-only non-standards, too.

Re: SvelteKit 1.0

#258

Earlier quoted context omitted.

Same, but with ASP.NET (which produces an OpenAPI specification) + Entity Framework on the server, React + TypeScript on the client (which consume that specification through openapi-generator). https://github.com/OpenAPITools/openapi-generator I chuckle every time I read claims about Go (or whatever) being amazingly productive. I don't think it's possible to beat this stack with regards to both productivity and ease…

I agree with the sentiment--and with most of your comment--except the assertion that "I don't think it's possible to beat this stack". I have something similar: Kotlin on the server-side with my SQL DSL generated by jOOQ and Flyway running my schema migrations. I don't have any experience with LINQ--but it looks to be of a similar idea to jOOQ such that you get an autogenerated, injection-safe, type-safe, compile-tim…

jOOQ is not even close to EF LINQ, I worked with both.

Re: SvelteKit 1.0

#259

Earlier quoted context omitted.

> As much as I like ASP.NET, Next has leapfrogged it for web apps. Look, I like NextJS as much as the next guy - I'd say it's my main working technology right now. And I've never built anything on .Net - I know its characteristics from watching tutorials and reading docs. My take however is that "web apps" is a very broad world. NextJS gives you a thin API layer. There is no model layer to speak of. You're left fendi…

> I've never built anything on .Net The grass isn't greener. I've built in both - I have a .NET Core/Angular SaaS app that I created and sell, and I've been building greenfield in Next. I much prefer Next. The duplication in .NET/Angular has never been worth it...not once. And having network calls for everything is unnecessarily painful. I started the app in 2019, when RESTful SPAs were all the rage. I bought into th…

> But I'd still rather develop a web app in Next and put any background services elsewhere in .NET if needed.

Thanks for sharing your perspective.

I think we're essentially saying the same thing. I would start pretty much 99% of my projects in NextJS. But if I needed to reach for something doing complex logic and scaling to a larger team, I could always add a .Net service to that later.

Post reply on HN