Hello
I've developed a Marionette app loosely based on the app structure given in David Sulc in his excellent
eBook.My app uses pushState instead of # url's. On server, I'm using Lithium PHP framework and it can be easily used to respond to any complete URL with pushstate with basic html content + javascripts/templates.
Now that my app is meeting most of the functional requirements, I though about SEO for single page apps (rather late!) and stumbled upon Derick's
post from Sep 2011 about progressive enhancement approach that can be used by apps to ensure that search engine crawlers can index the pages.
The approach of progressive enhancement in short 'reverse maps' the existing html content to view's el by passing the element to view at creation and creates the views.
Question(s):- What is the easiest method to implement such progressive enhancement in existing marionette app with complicated nested layouts?
- Any interesting insight that other developers might want to share when it comes to SEO for marionette SPA's.
- Feature Request: Can Marionettejs community look at options to implement the support for progressive enhancement/SEO friendly behavior so that attaching views to rendered html becomes easier?
Example: The server renders the html results into a defined element and is then picked up by marionettejs and views are automatically created based on the html mark up provided in the page? A very simplistic way could be passing options to views and view then attempts to create the models from the html while referencing the template for this view.
var myView = new MyCollectionView({ buildView: true, fromElem: '#fromServer'});
Thanks
Nilesh Kale