Hi,
I'm (not alone) in the process of choosing a stack for a new SPA.
I have experience with Vue.JS but I'm eager to try React and although I'd be primarily working on the front-end, other team members have React experience so it seems like a good fit. However, some suggest using Backbone in conjunction with React. I'm not all that familiar with BackBone but isn't it getting a bit long in the tooth? I wonder about the wisdom of using an old framework which (as a cursory Google search reveals) most seem to be losing interest in, for a from-scratch SPA in 2020 - but then I defer to those with the most experience in these frameworks than I (that's you lot in case you were wondering).
The backend should be in Spring Boot however, one of the requirements is that this SPA should be able to run locally. So we'd be talking about something along the lines of what Electron.JS enables for fully Javascript projects (with an embedded DB server - probably PostgreSQL) but for Spring Boot. Any ideas? A solution that would require minimal user effort for local installation would obviously be preferable. I'd rather not have them setting up their own application servers and manually installing databases etc. I also wonder about how product updates etc. would work in such a context...
Cheers!
My 5 cents:
React Pick React if the team is more familiar with it. Following this choice, you have 2 important decisions to make: 1. What to use for state management? a. the Reach hooks with useEffect, useReducer and React.createContext - for simpler apps, I would go with that b. Redux or something else 2. Javascript, Flow.js or TypeScript - I would go with TypeScript. Seems like, whoever adopts it, stays with it long-term
Spring Boot As an embedded database, you could also use the H2 database engine. In local dev/test mode I typically use a transient instance of H2, that gets initialised with the Spring app and then gets fully destroyed when you stop Spring. H2 supports various SQL-dialects, thus you can use Postgres compatibility mode.
Docker / Docker Compose If you're doing local installations, Docker with Docker Compose could streamline that, so you won't have to install database servers.
Yup. Redux and Typescript. I've heard good things about GraphQL as well - maybe worth a look. Definitely an embedded H2 in dev (have done that only many previous projects). However Docker (+Compose) for a local installation ? Wouldn't that be a tad heavy? The ideal would be something like a .msi that any user could launch to install the whole stack locally as a service and then they'd simply access the app via a browser pointed at localhost:port/myapp or whatever...
Thanks for the feedback!
With docker you can limit the dependencies to 1 thing... Docker, and with `docker-compose`, the installation would be as simple as `docker-compose up`
I really don't have experience with `.msi`-installers
Check this article out:
https://www.callicoder.com/spring-boot-mysql-react-docker-compose-example/
I am not certain why anyone would recommend Backbone in 2020 and in conjuncture with React. While sure, React is not technically a framework for applications specifically and Backbone is if you keep to a simple file and directory structure with React you'll be fine. You are right, Backbone is old, the community support is not nearly as large as for React and the documentation for Backbone is lacking. Stay with React, you'll be fine.