Added by Antranig Basman, last edited by Colin Clark on May 15, 2009  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

A model object is any type of JavaScript object that represents the data in your application. Infusion doesn't impose any specific contracts on what type of object can be a model, but all model objects must be successfully copyable using the fluid.copy() function. Ordinarily, this will probably a JSON-compatible object, but the framework doesn't limit you to this.

fluid.copy() uses jQuery's .extend() method to make a deep copy of any object.

Other languages and frameworks have a similar concept; the key here is that Infusion doesn't impose a complex inheritance hierarchy or interface for your model. Java developers may recognize a similarity to the concept of POJOs (Plain Old Java Objects).

More details are at Framework Concepts#Model Objects.