brandonsavage/socorro — comment on commit 9a0fb69ea23d979c90f42d83e281ad4cb403942e
File:  line 0
By rhelmer:

So it looks like this is:
1) model running SQL against PostgreSQL
2) controller turns the result to JSON
3) view returns that JSON for a mustache.js template to use

Seems like you could do the #1 and #2 in an middleware service, PHP could call that and return the JSON it recieves.
Embedding the JSON data in HTML is a little funky but I think it's ok for now (hopefully we can open up the middleware a bit in the future, so browsers could just pull from it).