Sha256: 191f665f0db41dab76e173fa61c26af73ef88e27243bd7b31c581a11bf9ae3da

Contents?: true

Size: 1.44 KB

Versions: 9

Compression:

Stored size: 1.44 KB

Contents






6) Responses may optionally pass through a custom object factory function, to be transformed to eg. objects based on Kojac.EmberModel.
EmberModel enables domain models to be declared with typed properties. eg.

	Person = Kojac.EmberModel.extend({
		id: Int,
		name: String,
		width: Int,
		enabled: Boolean,
		details: Object
	});

Property values passed to set() or setProperties() are intelligently coerced into the type of the property definition, or null, including when read from JSON. Regardless of the property type, null is the value used to represent a lack of value eg. not NaN or 0



KOJAC Thoughts

perhaps there are 3 valid requests :

products						: collection
products__50				: item
products__50.images	: item property collection (IPC)

standard key format :
resource__index.property

An IPC can only be a property on an item, as defined on the server

# Collection Properties and associations

+ server manages associations
+ client can create, read, append/prepend/insert, remove on a IPC
+ eg. customer has orders property.
	- data is sent via orders_ids array
	- orders property is a curried function configured to use the orders_ids property of this, to look up and return the records from the cache

	Customer {
		order_ids: [],	// will be array of integer or string ids
		orders: [OrderVo,'order_ids','order'],	// becomes a function bound to the object that uses ids from order_ids and order prefix to read array of OrderVo's from cache
	}


Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
kojac-0.17.0 notes.txt
kojac-0.16.0 notes.txt
kojac-0.15.0 notes.txt
kojac-0.13.0 notes.txt
kojac-0.12.0 notes.txt
kojac-0.11.0 notes.txt
kojac-0.9.1 notes.txt
kojac-0.9.0.1 notes.txt
kojac-0.9.0 notes.txt