Examples of behaviors included in QBO 3 include:
In many cases, the BehaviorAPI can be used to help abstract functionality between behavior filters we write. Take qbo3.ContactObject and qbo.Paginate as an example: when the user clicks on page 2 (something the Paginate filter recognizes), we need to have qbo3.ContactObject respond to that click and request page 2 from the server. Under QBO 2.0, we would do something like this:
This implies our Paginate class is always a child of a qbo Panel, and that Panel has a SetPage method that accepts a record start parameter. Not very modular.
In QBO 3, using the BehaviorAPI, we instead do this:
and in the behavior that loads qbo.*Object:
Any objects participating in the behavior will have the BehaviorAPI events raised to them, and can listen appropriately.
This approach is key to long-term maintainability of complicated forms like a BPO form or complicated Short Sale forms.
Scripts that should be included on demand, but not part of the full library, should be placed in a child folder of the Scripts folder, such as Scripts/Custom/myCustomScript.js
Use Pascal case for class names and server-side parameters, and Camel case for name spaces, method names and variables. For example: