Backbone.js app with Savant

243 views
Skip to first unread message

jason

unread,
May 26, 2012, 7:36:21 AM5/26/12
to PHP Savant
I just recently released a code generator that looks at a MySQL schema
and automatically generates an application that uses Savant on the
server side and Backbone.js on the client side. I'd be interested in
feedback if anybody wants to give it a try. I'm fairly new to Savant
but I like the simplicity and it works great as a view layer in my
framework.

If you just want to check it out quickly the Live Demo lets you play
around with a generated app without having to download or install
anything. You can check it out at http://phreeze.com/

Brett Bieber

unread,
May 26, 2012, 8:13:33 AM5/26/12
to phps...@googlegroups.com
Looks very nice. Can you talk a bit more about the Savant integration? 


--
Brett Bieber

Jason

unread,
May 26, 2012, 4:18:30 PM5/26/12
to phps...@googlegroups.com
Sure.  Well, Phreeze is basically another MVC framework but the view layer is provided by Savant.  Technically the view layer is abstracted by the framework so just about any template engine would work, but for all of my work now I choose to generate apps using Savant as my view layer.  It can be a little confusing because Backbone is also an MVC, but it's only at the client (browser) level.  So all together a Phreeze generated app is Javascript MVC on top of a PHP MVC.  But, on the PHP side Savant is the view.  It's in charge of rendering the HTML on which Backbone sits.

I really like using a template engine myself.  I know there are strong opinions about them.  I used Smarty for years, but I've switched to Savant so that we can use PHP as our view layer.  I've delved into the guts a little bit and written some simple formatter plugins that are used by Phreeze (one that converts strings to studly caps, for instance) and it's just a nice, clean system.

One thing that I really would like to check out is the new PEAR2 Savant which as I understand has template inheritance.  I am a huge fan of that and have used it with Smarty and also .NET.  I haven't given it a try yet because I was confused about whether to go with that or Savvy.  I decide to go with the one that seemed to have the widest adoption at this point, but it should be trivial to implement either of those other two options.

sfth...@gmail.com

unread,
Feb 22, 2014, 4:41:55 PM2/22/14
to phps...@googlegroups.com
nice project.
are you still using savant/savant3?
i have a distro of codeigniter that uses phpti for inheritance with or without savant3.
plays nice with idiorm.
i've given a lot of though to using backbone or ember with it.
https://github.com/sfthurber/cim-xa
Reply all
Reply to author
Forward
0 new messages