Just a quick newbie question. When I was learning flask/django I was taught to use certain python packages to render the html first on the server and then serve it. As I learned more and more technologies on the front end, I realized that letting frameworks render and serve web pages is kind of inefficient (that's why we have nginx and apache, right?) So is it wiser to just build APIs on the framework end and have the static content served separately or have everything come from the framework?
Like all questions, it really depends.<p>I would build out your project entirely first then look for possible optimizations like this. You will need to see how often this content changes, how often it is requested and the cost of regenerating it. In addition to this, you will want to look at the added engineering costs of this.<p>If it's something that rarely changes, I usually just have a background job generate it and serve it as static content, but only if it is accessed a lot.