ruby-on-railsmodel-view-controllerbackbone.jsember.js

Client side MVC instead of server side MVC


Instead of using server side MVC like Ruby, Python, PHP to build very complex websites, why should not we split our website into multiple modules, and build each with client side MVC like backboneJS, EmberJS. In this case, we will use PHP / Ruby for creating webservices alone, which will serve data only.

Each module now act as small web app. If we link each other, they will perfectly look like a complex web app.

I visit many websites (like github, groupon, stackoverflow etc...) and they can be built or adopted to this approach. But i am not seeing this kind of approach. Does this approach has any problem on this kind of websites?


Solution

  • Oh yes. I got my answer.

    From google groups: I think one of the reasons is javascriptless user-agents — i.e. search engine crawlers and users with NoScript turned on.

    I hope, these are real problems why websites still using Server Side MVCs.

    When websites don't know target audience, they can't predict how well it will run on client side. So they should rely server to build much of their content.

    And think, if stackoverflow was designed using client side MVC's to build much thier content, no one can't reach stackoverflow posts using google search.

    From wikipedia under "Search engine optimization" section:
    Because of the lack of JavaScript execution on crawlers of all popular Web search engines, SEO has historically presented a problem for public facing websites wishing to adopt the SPA model.