Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

backbone or ext/sencha touch or both

We have a website written in the traditional Jquery selector-callback spagetti code. We are planning to begin migration to backbone to help clean things up.

We use mustache and use the same templates for rendering in php server-side and javascript client-side. But there are some mustache alternatives (handlerbars/dust) that we are interested in but can't explore because there is currently no php alternative. We are considering moving all server-side rendering to node so we can use the same logic/code for client and server rendering. We would be porting all our php view classes to javascript/backbone and just use php as our data/controller layer.

In parallel, we are preparing to develop a sencha touch website/app which would normally be written using the sencha/ext approaches in javascript.

The actual templating will be very different between the sencha and main site, but much of the view models could probably be the same.

There are three approaches I can think of:

  1. use backbone as the main view models including inside sencha
  2. use sencha everywhere using the sencha/ext classes/approach in the main site
  3. keep them separate and either deal with duplication or try to abstract out the essential logic to other classes.
like image 313
Yehosef Avatar asked Nov 04 '22 03:11

Yehosef


1 Answers

One advantage of the ExtJS route is you can use the same models, stores, etc and just have separate views, grids, whathaveyous for mobile/non-mobile. Then you can just serve up the same JSON/XML from PHP. The JsonStore/XmlStores will be the same on each platform. Been a while since I've used ExtJS so cannot offer more concise example.

like image 129
Morgan ARR Allen Avatar answered Nov 09 '22 05:11

Morgan ARR Allen