Melange follows Model-View-Controller patterns at multiple levels. The SoC framework provides a set of common Model, Views, and generic Controllers to be used by each Melange web application. Each of those applications is then similarly arranged in a Model-View-Controller pattern.


Entities of each Model are stored in the Google App Engine Datastore. All data for a given instance of a particular Program is stored in Model entities in the Datastore. The SoC framework Models are designed so that they can be used in a variety of Program formats, including both GSoC and GHOP. Other Melange Models not in the SoC framework are specific to a particular Program.

The Models are also designed so that, while entities are specific to a given year of a particular Program, entities can be imported from one Program instance to another. For example, a Person need not re-enter all of their personal information to participate in another, future Program, even if their participation is going to be in a different role (an Organization Reviewer, say, rather than a Contributor).


Model entities are displayed and modified via a variety of Views. Some views simply display entities or lists of entities, while other views are forms for creating and altering entities. The Melange views are implemented using Django templates and forms. Many of these views are shared and re-used between different Programs and their Program-specific Controllers.

Import and Export Views

In addition to the HTML page views, other special “Views” are used to provide read-write GData APIs and read-only Atom feeds and CSV file exports. These GData APIs, Atom feeds, and CSV files provide import and export capabilities for Program entities.

The Melange GData APIs will also make it possible to implement alternative front-ends capable of viewing and manipulating, say, one Organization‘s data. Such a front-end could be implemented in any programming language that can be used to implement a GData client. Such Organization-specific front-ends could, for example, be embedded in the Organization’s web site. These GData APIs could also be used to create widgets such as Google Gadgets that monitor or alter small aspects of a Program.

Atom feeds make it possible to monitor activity during the course of a Program without resorting to email, using a pull approach instead of the existing email push method.


Each separate program (e.g. GSoC and GHOP) implements its own Controller containing the “business logic” of the program (though in the case of these two examples, much of the code in the two Controllers is expected to be shared). It will be possible to support Program formats that have not yet been conceived by adding new Controller modules to the framework. Since Melange is being released under an Open Source license, new Sponsor organizations could implement their own custom Program while reusing much of the SoC framework code.

Security and Roles

The Controllers make use of user role Model entities to decide what other Program entities are viewable or modifiable by a particular Google Accounts-authenticated User.

Views will submit the Model entity and the specific role to an “authorization” method in the Controller. This method will indicate what privileges (read-only, read-write, not-authorized, etc.) that specific User in that specific Role has for that specific Model entity. These authorization methods in the Controller can also provide error indications and descriptive text that can be displayed to the User by the View.

Copyright 2008 Google Inc. This work is licensed under a Creative Commons Attribution 2.5 License.