Live data from Hacker News

SvelteKit 1.0

svelte.dev

211–220 of 296 posts

Re: SvelteKit 1.0

#211

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…

If your are going to mention .NET in this context, why not mention Blazor? With Blazor you just write both the reactive frontend and backend in C#. No need to write Javascript. Super productive, type safe all the way. Today it has even support for hot reloading. Save your C# and see the changes in your browser. https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blaz...

* The payload of WASM makes it a difficult choice if serving mobile or regions with poor internet and you want a good first impression.

* Server side needing a constant socket for everything presents it's own limitations.

* It has hot reloading, but it pales in comparison to the JS experience at best and in my own experience has a lot of edge cases leading to full rebuilds.

* C# tooling is fantastic; Razor however I've found to be slow and well behind the experience of popular JS libraries.

* When you do need JS interop (e.g. browser API's) the experience is, IMO, awful.

I feel Blazor's niche is internal, simple LOB apps and I can understand the appeal if you don't already know JS or have some serious regulatory requirements around vendors and need to avoid NPM.

Personally, I find the DX and quality of the end product in svelte kit trump the code sharing of Blazor.

Re: SvelteKit 1.0

#212
I've been using SvelteKit since July of this year on downforeveryoneorjustme.com and it's easily my favorite Javascript framework at this point. I found Svelte made sense to me almost immediately and debugging issues has always been a breeze.

Congratulations to the Svelte/SvelteKit team!

Re: SvelteKit 1.0

#213

Earlier quoted context omitted.

Except it forces you to use node js, or do I read it wrong? Can we get a streamlined js framework that is just about the frontend and let’s you use whatever backend language you want? I know there is react, vue and angular but they seem so bloated

Svelte is a frontend framework, which you can use to build anything from a full SPA to a single button. SvelteKit is a Node backend framework that integrates tightly with Svelte.

Thanks that's exactly the answer I was looking for

Re: SvelteKit 1.0

#214
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…

For local development do you run two servers, next and asp and then for dynamic api calls by the client do you proxy the request through next or go directly to the asp server by its port number?

Similarly in production do you use a reverse proxy for the asp server so that requests to like /api go to the asp server?

Re: SvelteKit 1.0

#215

Earlier quoted context omitted.

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…

> 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…

If anything the model layer in Next.js is superior because you can use the same model layer to build the page SSR, and then Next.js will gracefully transfer the entire model layer over to the client where your app can continue to work against it.

Re: SvelteKit 1.0

#216
post #66

There is a plethora of javascript frameworks: React, Vue, Svelte, Remix, etc. If I know nothing about front-end development, and would like to learn one that is: - Intuitive - Suitable for small projects as well as large projects. - That is here to stay, i.e. either adopted by many companies, or its adoption curve is going up. Which one should I pick? Would Svelte be a good choice?

Just learn react, you won’t regret it. I wouldn’t do anything else before you understand it well. Don’t worry about anything on the server.

Just use: typescript, vite, and react.

Re: SvelteKit 1.0

#217
post #173

Earlier quoted context omitted.

Svelte will be also the career choice in couple of years, like Angular was the career choice when React launched (although they have only 3 years between them).

and before angular was jquery. But I do think there's quite a big difference between React and Angular. Angular never reached the level of marketshare that React has even if it was close. And even when it was close it was only for a few years. React has been the standard for nearly a decade now. And React has been much more explicit about growing its ecosystem whereas Angular has much fewer 3rd party plugins/tools. I…

I'm surprised that 5% of developers have used svelte. That seems like a lot, I was under the impression that webdevs are not the majority of software developers.

Re: SvelteKit 1.0

#218

All the praise for SvelteKit in this thread peaked my interest. But where would I start? I'm currently looking around to find a modern "toolkit" to write a new webbased frontend for our traditional desktop app. It's goin to be more or less CRUD with lots of tables/grids. Currently I favour vue.js with Quasar because of all the tooling and ressources it offers. It looks like it's easy to start with a traditional "navi…

I’d be careful about the hype train in a 1.0 milestone announcement post. There’s plenty weird and quirky about svelte + kit. Take it with a grain of salt.

Re: SvelteKit 1.0

#219
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…

How are you liking Prisma compared to a pure SQL approach?

I'm using prisma with postgres. It's pretty nice. You define all your tables in their custom schema format which has VS Code integration and lots of type checks so it will tell you if there's a problem with the schema. You can generate types from the schema file automatically and also a statically typed ORM layer that will let you write queries against those tables with full code completion. It also will generate migration scripts for you when your schema changes.

It's not as good as EF by a long shot (nothing really is), but for most queries it works fine. You can also use SQL or stored procs for the exception cases which no ORM ever fully replaces anyways.

Re: SvelteKit 1.0

#220

While most of the comments here seem positive… A custom template language is like another programming language to learn (to make mistakes in). I prefer JSX/TSX which is closer to reusing HTML.

I don’t get why you’d want to try to emulate html. The syntax and closing tags are brutal on the eyes. I’d prefer a more lisp style syntax for representing html
Post reply on HN