Friday, June 18, 2010

GSoC 2010 Data Seeder - Views

My project drifted away a bit from the original timeline due to some unforeseen complications, so I'm now almost a week late. Melange has been built from the ground up heavily supporting the View-Logic-Model layers and in this way reusing a lot of code. However, so far, all views and logic classes have been tied up to a specific entity which dictates all this behavior.

Unfortunately, the data seeder project doesn't involve any specific model in order to build functionality around it, but rather it collects data regarding all other models in the application. So there's now a need for a new type of view that is not centered around any model. Initially, I thought that setting up a new general-purpose view is as simple as registering some patterns and some methods, but this doesn't seem to be the case. Instead, some of the code in soc.views.models.base had to be adapted to a new type of view (soc.views.base) that is not model-centric. I have used this new type of view to create the backend side of the AJAX API implementation. An example of the JSON data that is collected by the backend can be seen here [0]. The current version might seem a bit too big (mainly because the list of possible countriy choices is repeated for several models), but that might change.

Next stop: Build a basic web interface

No comments:

Post a Comment