I have a website hosted on PythonAnywhere that is generated via a Flask app with the Jinja2 template engine. I recently had an idea for a more focused app that may or may not be a standalone thing. A friend of mine, who's a professional web developer, recommended the Angular framework because it's really easy to convert to a web app to a mobile app with Capacitor. I decided to give this a go to see if I could get to grips with it.
I should say, at this point, that – whilst I am a programmer in 'real life' – I'm only a hobbyist when it comes to websites and app development, and the kind of programming I do on a day-to-day basis is very different.
Anyway, I gave Angular a go by working through their tutorials and I have to say that I'm very impressed. The hierarchical and encapsulated structure of the different components all feels much more programmatic and logical to me. The use of Typescript has less of a Wild West feel to it than ordinary Javascript too. I don't think I'll ever get on with CSS, but that's a different story... I managed to write a Flask backend that passed JSON back and forth from my Angular frontend and it all looks promising.
So far, so good, but I'm now wondering if it's worth it. Whilst I definitely think it's an improvement, it's much less familiar to me, and having distinct front and backends requires a whole different way of thinking: things that were previously trivial now require more thought.
Thinking ahead, one stumbling block may be the deployment of the app to PythonAnywhere, so I wanted to ask whether this is easy to do, and whether there are any guides to help me? I did a search and found a few things that indicated it was viable, but no detailed instructions on how to do it.
Specifically, I'm initially thinking that I'll add the backend needed for the new app to my existing Flask app (the one which generates my website), then host the new Angular app in an iframe. This then leaves open the possibility of converting to a standalone mobile app in the future, should I ever get this far. Does anyone have any inkling for whether this is possible? i.e. is it possible to have a 'mixed' website on PythonAnywhere where some bits are generated via Jinja2/renderTemplate etc. and some from Angular?
Sorry for my general ignorance and the generally nebulous nature of my query. If I had a few weeks to sit down and work though this properly, then I'd have more of a grip on it, but unfortunately I have to fit my learning in between work and children!
Finally, what are people's general thoughts on the benefits of Angular as a package? Is it worth it? My path of least resistance is just to use Flask for everything and abandon the idea of ever making it a standalone app.