I'm writing the backend in Go, and the frontend in Vue. I'm also using GraphQL. So my development looks like:
- Write logic in Go
- Write GraphQL resolvers in Go
- Write relevant Vue components for GraphQL
- Look up the syntax for Vue-baesd web components I'm using (eg, Vue+Bootstrap)
- Compile/minify my Vue code
- Run my Go program
If I had chosen to write this as I have in the past: server-side HTML templating and rendering, then I'd be done with the project by now! How can I improve my productivity without spending so much time in documentation or switching between different languages and code bases? My pain points are:
- It would be nice to use mostly normal HTML, or web components, without having to look up the syntax for every element every time I want to create a button.
- It would be nice to have some sort of automatic binding between form elements and server side processing. GraphQL makes this easy, as does DOM binding in Vue, to avoid the tedium of writing POST form parsing logic and special templating for indicating errors.
- It would also be nice to be able to use the same language, or the same code base. Right now, the server and client really do feel like distinct code bases, even though they're in the same repo.
How can I implement this such that my code feels as productive as using plain old HTML and templating, but with the UX touches, and developer productivity gains, with more modern tooling?
My only advise is to take a step back and re-examine what you are willing to achieve. There is a massive disconnect between what you wish you have and the work you are wanting to perform.