I'm creating a small web application. The application have several screens (list, inner list, item details, etc.). I have a REST API on the server and I need to create the client.
At start I thought about HTML page for each main screen. For every page I have a CSS and JS code. The HTML will include only place holders (empty divs) that wwill be filled by the JS code.
Then I've decided to a create the application as single page application and using the URL with anchors to imply the state (domain.com/#list1#item1).
I've found this question to be informative about the architecture of the application, but I wonder:
1) How can I server the right CSS to the page in a clean way?
2) How can I define the page basic structure (the way the HTML divs do) in a clean way?