Converted ModelViewController.md
diff --git a/ModelViewController.md b/ModelViewController.md new file mode 100644 index 0000000..764780e --- /dev/null +++ b/ModelViewController.md
@@ -0,0 +1,90 @@ +[Melange](MelangeIntro.md) follows +[Model-View-Controller](http://en.wikipedia.org/wiki/Model-view-controller) patterns +at multiple levels. The [SoC framework](SoCOverview.md) provides a set of +common [Model](ModelsOverview.md), [Views](ViewsOverview.md), and +[generic Controllers](ControllersOverview.md) to be used by each Melange +web application. Each of those applications is then similarly arranged +in a Model-View-Controller pattern. + +## Models + +Entities of each [Model](ModelsOverview.md) are stored in the +[Google App Engine Datastore](http://code.google.com/appengine/docs/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](GSoC.md) and +[GHOP](GHOP.md). 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](PersonModel.md) 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](OrganizationModel.md) [Reviewer](ReviewerModel.md), say, rather than +a [Contributor](ContributorModel.md)). + +## Views + +Model entities are displayed and modified via a variety of +[Views](ViewsOverview.md). 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](ControllersOverview.md). + +### Import and Export Views + +In addition to the HTML page views, other special "Views" are used to provide +read-write [GData APIs](GDataOverview.md) and read-only [Atom feeds](FeedsOverview.md) +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](http://code.google.com/apis/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. + +## Controllers + +Each separate program (e.g. [GSoC](GSoC.md) and [GHOP](GHOP.md)) implements its own +[Controller](ControllersOverview.md) 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](UserRoles.md) [Model entities](RoleModels.md) +to decide what other Program entities are viewable or modifiable by a +particular +[Google Accounts-authenticated](http://www.google.com/support/accounts/) +[User](UserModel.md). + +[Views](ViewsOverview.md) will submit the Model entity and the +[specific role](UserRoles.md) 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](http://soc.googlecode.com/svn/wiki/html/licenses/cc-by-attribution-2_5.html). +[](http://creativecommons.org/licenses/by/2.5/) \ No newline at end of file
diff --git a/ModelViewController.wiki b/ModelViewController.wiki deleted file mode 100644 index cf4ab73..0000000 --- a/ModelViewController.wiki +++ /dev/null
@@ -1,91 +0,0 @@ -#summary Model-View-Controller pattern -#labels Phase-Design,Deprecated,Importance-Overview - -[MelangeIntro Melange] follows -[http://en.wikipedia.org/wiki/Model-view-controller Model-View-Controller] patterns -at multiple levels. The [SoCOverview SoC framework] provides a set of -common [ModelsOverview Model], [ViewsOverview Views], and -[ControllersOverview generic Controllers] to be used by each Melange -web application. Each of those applications is then similarly arranged -in a Model-View-Controller pattern. - -== Models == - -Entities of each [ModelsOverview Model] are stored in the -[http://code.google.com/appengine/docs/datastore/ 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 GSoC] and -[GHOP 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 [PersonModel 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 -[OrganizationModel Organization] [ReviewerModel Reviewer], say, rather than -a [ContributorModel Contributor]). - -== Views == - -Model entities are displayed and modified via a variety of -[ViewsOverview 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 [ControllersOverview Controllers]. - -=== Import and Export Views === - -In addition to the HTML page views, other special "Views" are used to provide -read-write [GDataOverview GData APIs] and read-only [FeedsOverview 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 -[http://code.google.com/apis/gadgets/ 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. - -== Controllers == - -Each separate program (e.g. [GSoC GSoC] and [GHOP GHOP]) implements its own -[ControllersOverview 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 [UserRoles user role] [RoleModels Model entities] -to decide what other Program entities are viewable or modifiable by a -particular -[http://www.google.com/support/accounts/ Google Accounts-authenticated] -[UserModel User]. - -[ViewsOverview Views] will submit the Model entity and the -[UserRoles 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_ -[http://soc.googlecode.com/svn/wiki/html/licenses/cc-by-attribution-2_5.html Creative Commons Attribution 2.5 License]. -[http://creativecommons.org/licenses/by/2.5/ http://soc.googlecode.com/svn/wiki/html/licenses/cc-by-2_5-88x31.png] \ No newline at end of file