typhonjs-backbone-parse / backbone-parse-es6

A fork of Backbone converting it to ES6 along with Parse 1.6+ integration and ES5 bundles.
Mozilla Public License 2.0
11 stars 0 forks source link

Question : What architecture would you recommend for a multipage website with Backbone-Parse ES6? #6

Closed AlexisBarta closed 8 years ago

AlexisBarta commented 8 years ago

I know it's not an issue, it's more a question but I'd like your advise on how to organize my code to have a multipage website (or something that looks like it) which is SEO friendly.

Multiple router in multiple .html pages or one router to rule them all?

typhonrt commented 8 years ago

Indeed this question could be better served by a google search as there is a lot of info out there and this topic is more directed toward any single page app. Despite having multipage website in the question I assume you are interested in a single page app that responds like a multipage website. Search for "backbone router seo" or "single page seo" as in general I'd like to keep the issues related to the repo / project. Keep in mind that times have changed a bit too and Google has also taken into account single page apps over the years. I don't have any specific SEO knowledge though.

There are too many variables to discuss especially since .htaccess rewrite rules could come into play for instance. I'd say stick with one Router. If the lookup table is small enough to keep on the client side then do that otherwise you might have to request things from the server and use History w/ push state. You can find a project on Github called urlify to create urls from phrases.

Right now the backbone-parse-es6-todos demos have a functioning Router & History example including handling a logged out user attempting to enter valid or invalid routes. As things go most Todos demos I've seen especially for Backbone don't hook up Router / History: https://github.com/typhonjs-demos/backbone-parse-es6-todos-improved https://github.com/typhonjs-demos/backbone-parse-es6-todos

AlexisBarta commented 8 years ago

It was related because my first question was: What is the impact of a "multipage website or a single page app that responds like a multipage website" of the folder structure on a project based on Backbone-Parse ES6?

Because Backbone-Parse ES6 is a project about structure and code organization. So it totally made sense to me.

typhonrt commented 8 years ago

As mentioned your original question doesn't specifically involve backbone-parse-es6 as SEO tuning applies to any kind of single page web app regardless of framework. A google search gives plenty of information; though keep in mind there are a lot of myths surrounding SEO in general. With a search of "single page apps seo" the second link that comes up for me is this one and the info looks reasonable and you can apply the advice given to Backbone: https://www.getambassador.com/blog/single-page-webapp-seo


You are stating a different question in your reply above replacing "SEO" with "folder structure". Not much is my answer. You use templates and fill it in from data on the server / from Parse. If you have a million products they can conceivably all use the same product template. Configure a Router to trigger lookups based on the product part of the URL. In this case you might be able to use server side methods of Parse to resolve the actual product data to load.

Or look at a site like Amazon which encodes a text description of the product into the URL then also includes the ID field of the product to lookup "dp/B005SLSVMK/": http://www.amazon.com/Fever-Tree-Premium-Ginger-16-9-Ounce-Bottles/dp/B005SLSVMK/

I can't offer much more direct advice because I have no idea what you are trying to build. Even then it'd be a bit beyond the scope of advice I have time to offer since none of the above is specifically related to backbone-parse-es6.

Good luck though! :D

AlexisBarta commented 8 years ago

Thank you for all the time you take to answer me ;) And happy new year!!!