3 ms·
Has the DX of Workers improved? I think Deno is lightyears ahead.
by pier25 3y ago
Has the DX of Workers improved?
I think Deno is lightyears ahead.
- KRAKRISMOTT 3y agoStill no compatibility with standard ORMs like Prisma either. And the team has been aware of the issue for years now https://github.com/cloudflare/workers-sdk/issues/2701 https://github.com/cloudflare/workers-sdk/issues/2701 https://news.ycombinator.com/item?id=31341513 https://news.ycombinator.com/item?id=31341513
- kentonv 3y agoSorry that D1 has been slow out the gate. Now that we've solved the basic technical issues we can really focus on improving DX.
- Akkuma 3y agoYou can use drizzle-orm with Cloudflare and that is fully compatible.
- rozenmd 3y agoDrizzle is amazing.
- Akkuma 3y agoThis is my first time using it and I've been very pleased with it so far. It keeps it simple, has solid typing & schema building, and reminds me of LINQ. I'm also a thin models kind of person and the fact this is just an object without needing to build ORM classes is even better.
- radiofmd 3y ago> standard ORMs like Prisma Prisma isn't standard and too slow anyway.
- igalklebanov 3y agoYou can use D1 with Kysely (the typesafe sql query builder) via the kysely-d1 3rd party dialect. https://github.com/kysely-org/kysely https://github.com/kysely-org/kysely https://github.com/aidenwallis/kysely-d1 https://github.com/aidenwallis/kysely-d1
- kentonv 3y agoHard to say without knowing what specific problem you have had but we are improving all the time. Several improvements announced just this week, take a look at the blog. Among other things, we made Wrangler (Workers CLI tool) use the open source workerd by default for local development, so local dev should produce a much more precise simulation now (since it's literally running the same code).
- pier25 3y agoAnd what about the DX of using Workers with Pages? I tried to use that recently and it was a disaster. I wrote about my experience here: https://twitter.com/pierbover/status/1641474067013271552 https://twitter.com/pierbover/status/1641474067013271552 I then opened these two issues: https://github.com/cloudflare/workers-sdk/issues/2962 https://github.com/cloudflare/workers-sdk/issues/2962 https://github.com/cloudflare/workers-sdk/issues/2964 https://github.com/cloudflare/workers-sdk/issues/2964 I ended up moving the project over to Netlify + Edge functions. I had it all working in like 5-10 mins as it should. Took me two hours to figure out why Workers weren't working in my Pages project, and could never get Workers working properly with my Astro project. I think you're working exclusively on the engine of Workers which is really top notch, but Cloudflare really needs to improve the outer layer which affects DX considerably.
- kentonv 3y agoSorry you experienced that. FWIW this announcement from Wednesday should help address the problems you ran into: https://blog.cloudflare.com/pages-and-workers-are-converging-into-one-experience/ https://blog.cloudflare.com/pages-and-workers-are-converging...
- mscccc 3y agoI've been using workers on & off since it launched. Just tried it again recently and the local dev experience with wrangler is excellent now.