Documentation for a historical release of Infusion: 1.3
Please view the Infusion Documentation site for the latest documentation.
If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

A POJO is a concept borrowed (and clarified) from Java - POJO, whilst originally representing "Plain Old Java Object" here has J standing for "Javascript", and, unlike in the Java world, is given a very specific operational meaning. An object is a POJO, and hence suitable to be a Model, if when passed to the framework utility function fluid.copy is "successfully duplicated" – that is, the developer considers the copy can faithfully stand in for the original.

More details are at Framework Concepts#POJO.

Here's an idea for another way to frame this concept:

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 types of objects 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.

Java developers may recognize a similarity to the concept of POJOs (Plain Old JavaScript Objects).

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

  • No labels