awslabs / green-boost

Build Full Stack Cloud Native Web Apps on AWS Fast
https://awslabs.github.io/green-boost/
Apache License 2.0
71 stars 8 forks source link

Migrate to Next.js and MUI #221

Open bestickley opened 1 year ago

bestickley commented 1 year ago

Migrate to Next.js and MUI. See related frontend tooling / framework discussion and UI component library discussion. This effort will be large and require many deprecations, but it will significantly increase developer velocity building with Green Boost hence the decision to move forward with these technologies.

firxworx commented 1 year ago

I have been following and poking around this repo with great interest. It shares some similarities and some parts + code have served as inspiration and even basis for parts of my own project stack. Awesome work @bestickley + team!

I have some reservations about NextJS to share. $0.02

I used to love it and still have great appreciation for the ecosystem and community it has fostered... however... more recently I have found a lot of issues and have been moving projects away from depending on it.

Why I wouldn't bet on it unless something changes

It feels to me as if the big NextJS push is to "Vercel-ize" React development and lock in the ecosystem of leading libraries.

My perception is that ever since Remix got acquired by Shopify, Vercel has stepped on the gas of a warpath of ever-bolder breaking changes. The pattern that feels slightly reminiscent of the infamous "embrace extend extinguish" policy of MSFT's earlier days.

Vercel is quick to sponsor developers and "influencers" to move libraries in a distinctly NextJS direction.

I figure Vercel's investors are looking for that big exit and are starting to feel the heat from new competition of all stripes.

Velocity?!?

My recent experience with NextJS has been:

I don't think having to rewrite and restructure your app and rethink its dependencies every time you upgrade a package or want to add some feature that used to be straightforward to implement can count as velocity.

With any NextJS-related update extremely popular libraries in the React ecosystem that aren't already under the Vercel fold seem to break with each new version. Even Vercel itself can't keep its own examples in sync.

Here's an example that impacted one of my projects: https://github.com/tailwindlabs/headlessui/issues/2479

I encourage you to follow the links + rabbit trail of issues on the NextJS issues side and take note of how there are chains of issues and projects impacted across the ecosystem.

AWS Angle

It also seems to me like Vercel has a strategy to always keep NextJS moving a step ahead of anyone wishing to host NextJS on anything but Vercel.

With all due respect to teams at AWS, it took Amplify forever to catch up to where it is today and I think its a safe bet the next moves will break feature compatibility with AWS yet again.

Projects like https://open-next.js.org/ (which is part of SST's NextJS-on-AWS magic) acknowledge that keeping pace with NextJS is a massive challenge. Right from their homepage:

Most of the open source options, like serverless-nextjs are dead. Their implementation can also be specific to the framework they are targeting.

Closed source SaaS products like Amplify have incomplete or incorrect implementations. And because they are closed source, you'll need to file a support ticket to get them updated.

I think the push with Neon, run-at-the-edge, etc. is part of a greater strategy to tend towards there being no true alternative to Vercel for NextJS -- and no way to possibly capture its full feature set with just AWS.

Personally if I worked at AWS/awslabs I'd be especially hesitant about this move.

Out of anyone I think AWS could provide a real alternative that many devs and businesses would flock to if only it understood in the same way that Vercel does what most developers are really after ;)

bestickley commented 1 year ago

@firxworx, thank you 😊 Greatly appreciate your opinion on this! Green Boost has just (like an hour ago) migrated to Next.js and MUI in gboost our CLI. And will soon in gboost-ui (React component library). I still believe it will bring greater velocity to developers. However, your hesitations and concerns are absolutely legitimate. If you're open to it, I'd like to setup a time with you next week to discuss your concerns. I'll reach out to possibly setup a time.

firxworx commented 1 year ago

@bestickley I'd be happy to chat :) Your work in this repo has legit saved me tons of time and answered many questions re AWS + CDK. I'll look out for a message from you. Have a great weekend!