Big picture question. I've got a cherrypy server running with all the shopping cart methods for my e-commerce site written in python. I'm working with jquery on the front end.
POSTing to my python methods is easy in javascript, but not passing data the other way. I can send it back with JSON, but not always conveniently. It seems like the easiest way is to just create javascript variables with cheetah like var width = $width
but that seems messy.
What am I doing fundamentally wrong here? It doesn't seem like I'm structuring my server-client interaction correctly at all. What's the best way to have my server methods called, and what's the best way to embed information from the server into a page so that it can be worked on with javascript?