-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Lazy PI started out as a simple tool for deserializing PI objects. Since then the goals of this project have evolved. In the future, a set of objects will be created to facilitate lazy loading and a more object oriented design. Lazy loading helps limit the number of calls WebAPI to only those objects that are needed.
Objects are designed around the different "controllers" included in the PI WebAPI. For those familiar with the AF SDK, LazyPI should feel familiar. To do this the objects outlined in the paragraphs below have been designed to follow a similar pattern.
For each major object(ex. AFElement, AFEventFrame)a static class will be provided for basic calls(ex. Find, Create) where those properties(ex. ID, path) managed by AF may not be know.
There will also be instance oriented objects that will represent a single object from the AF Database. These object instances will provide the developer with access to those referenced objects that are relevant. For example an instance of AFElement will contain a list of it's child AFElement. These children should be lazy load to limit the query only to when the object is called.
An interface will be created to house all of the calls relevant to a controller. The calls defined in these interfaces will be exposed through the Static and Dynamic objects. Each Static and Dynamic type will only expose a subset of the methods in the interface.
Instance Objects - those objects which reference a specific instance will simply use the singular form of the controller it exposes. (ex. AFElement)
Static Objects - those objects which create a general interact for unknown objects will use the plural form of the controller it exposes. (ex. AFElements)
Controller Interface - the interfaces for interacting with a specific controller will use the singular form of the controller it exposes prefixed by an 'I' (ex. IAFElement)