I am working toward a small webapp that I would like to have a desktop-like feel to it. The application will use python on the backend and I will be using hand-coded javascript (on top of jquery, etc.) on the web side. I have a few objects that I would like to pass back-and-forth between the two and wondered about how folks approach the issue. As an example, I have a “filter” that I will be treating as an object:
filter: {
name:'genericGeneFilter',
type:'geneFilter',
symbol:'ExampleSymbol',
includeExclude:'include'}
How do folks do the following:
- Define the classes in one place (so that server-side and client-side both get the definition)
- Define the user interaction (form fields, appearance, etc.) conveniently
- Pass data to/from server/client. Use serialized forms, json, gets/posts, or html?
- Keep client and server in sync with regard to “objects” being passed back-and-forth.
Also you can take a look at backbonejs
There is another js library called emberjs that seems to do much more than backbonejs.:
Read more on their github repo