We have a website written in traditional jQuery-callback spagetti code. We plan to begin the transition to the highway to help clean things up.
We use mustache and use the same templates for rendering on the server side of php and on the side of javascript. But there are some alternative whiskers (handlerbars / dust) that interest us but cannot explore, because there is currently no alternative to php. We are considering the possibility of transferring all server rendering to node so that we can use the same logic / code to render the client and server. We are porting all our php view classes to javascript / backbone and will just use php as our data / controller level.
In parallel, we are preparing to develop a sencha touch website / application, which is usually written using sencha / ext approaches in javascript.
Actual templates will vary greatly between senches and the main site, but most view models can probably be the same.
There are three approaches that I can think of:
- use the main model as the main presentation models, including inside sencha
- use sencha everywhere, using the sencha / ext classes / approach on the main site.
- keep them separate and either do duplication, or try to abstract the main logic with other classes.
source
share