DEV Community

loading...

Discussion on: Why did you choose the SPA architecure?

aarongarvey profile image
Aaron Garvey

Definitely worth trying out Lambda in my opinion. And no, not too hard to dev locally with this type of setup. It's might not be as straight forward as having direct access to a local database etc, but there are plenty of tools emerging that can really help mock out these serverless resources, and deploy everything in a multi-stage style environment. If your keen to check out AWS Lambda, might be worth looking into the AWS Amplify toolkit. It takes away alot of the initial complexity of setting up functions, and provides the reuqired resources to develop, mock, and test everything locally before you push to the cloud. Here you can find the general process of setting up a GraphQL server and Lambda backend using the AWS Amplify CLI docs.amplify.aws/cli/usage/mock

Thread Thread
justgage profile image
Gage Author

Very cool, that does look like that would help.

This might be a stupid question, but I'm wondering what were you doing that caused you to pick this stack in the first place, Were you using another framework before or is this the first one you tried?

Thread Thread
aarongarvey profile image
Aaron Garvey

Mostly I was using Ruby on Rails beforehand, but the main choice to venture down serverless was not wanting to maintain the underlying OS and systems behind each database and general backend systems. I spend probably 80%ish of my time now writing front end code, and the remaining 20% with backend initial configuration and deployment. For me, it's nice to not have to worry about running the latest container, or be too concerned about partitioning off and sharding DB tables etc.

Thread Thread
justgage profile image
Gage Author

Yeah that's a very big benefit I do admit! We used to use Create React App at Podium and that was one of my favorite benefits, never having to worry about the Webpack config under the hood. Things would generally just work and we would get upgrades for free.

So were you using Ruby on Rails as just an API? Or were you doing server rendered pages? What were you building with them? They must have been pretty successful if you ended up having to shard DB tables 🙌

Thread Thread
aarongarvey profile image
Aaron Garvey

Hahaha. Successful is a very subjective view. These were niche CRM/ERP style applications that were server rendered pages as well as API, and rightly or wrongly the sharing strategy was only in place for some limited multi region use cases, not necessarily due to database load etc.