HTML and CSS Reference
In-Depth Information
* @return {String}
*/
this.getRole = function(){
return _role;
}
/**
* Sets the actor's role in relation
* to the associated film
* @param {String} role
*/
this.setRole = function(role){
_role = role;
}
this.init();
}
The Movie Model
The Movie model is one of the biggest models within the MoMemo application. It
has composite associations with the Actor and Video models, so if the movie is
destroyed, the associated object instances will also be destroyed. The attributes
for the associations are also arrays, so you will need to create add and remove
methods for the arrays objects, which aren't outlined in the UML class diagram.
To begin with, create the movie.js model file within js/app/model/ . The Movie
model will mimic some of the properties available from the Rotten Tomatoes
API.
NOTE: Only some of the Rotten Tomatoes APIs will be covered in this
book. You can find out more about what the APIs are capable of at
http://developer.rottentomatoes.com/ .
The following code snippet shows the instance variables that you will need to
create accessors for.
var app = app || {};
app.model = app.model || {};
/**
* A movie model used for all movies within the application
*
 
Search WWH ::




Custom Search