My question is in regards to what is considered best practice in web development. I have been concentrating on web apps, javascript web apps in particular so my general practice is to load the html, use ajax to pull in the data I need from a database, and build the view dynamically. So naturally I am used to storing my page content in a database.
This is great for things like blog posts, or small amounts of data like phone numbers and email addresses that I want to display, but what about what would normally be static content? Say a marketing front page that displays content about the backend web app? It would be nice to keep this all on one page (even though its not search engine friendly) and use javascript transitions to display the data, but this would require either building a bunch of divs and hiding the ones not in view, or pulling the data from the database as required. What about mixed content types like maybe a faq list, then separate paragraphs of general data, etc.
How is this type of thing normally accomplished?
AJAX is a wonderful thing, but I don’t think it should be used in this way. I can’t speak as an authority, but I find it’s preferable to store your content on separate pages for this kind of thing.
What is important is that if you decide to go down the Ajax route, always make the page actually bookmark-able/navigate-able through history.
i.e. I goto http://www.example.com/webapp/, click on about and it would take me to http://www.example.com/webapp/#about.
Revisiting http://www.example.com/webapp/#about should take me back to where I was.
There’s more infuriating than a site that gets so carried away with fancy transitions they forget the basic wants of end user.