![]() |
QC Native 1.3
the native iOS implementation of
|
#import <QuickConnect.h>
Public Member Functions | |
(QuickConnect *) | - init |
(QuickConnect *) | - initWithPersistentStoreCoodinator: |
(void) | - handleRequest:withParameters: |
(void) | - mapCommandToBCO:withObject: |
(void) | - mapCommandToVCO:withObject: |
(void) | - mapCommandToValCO:withObject: |
(void) | - mapCommandToECO:withObject: |
(void) | - mapCommandToSCO:withObject: |
Properties | |
QCMapper * | theMapper |
NSPersistentStoreCoordinator * | theCoordinator |
The QuickConnect class is used to create control stacks and execute them. Control stacks consist a few types of classes that all implement the ControlObject interface. These types are:
ValCO Validation Control Objects - these stacks objects are used to validate values that will be used later in other control objects. The items validated are usually passed in as parameters. By convention names for classes of this type end with ValCO. Control objects of this type are executed on a background thread.
BCO Business Control Objects - these stack objects are used to interact with databases, remote servers, files, and are also used to do data manipulation/computation. By convention names for classes of this type end with BCO. Control objects of this type are executed on a background thread.
VCOView Control Objects - these stack objects are used to do user interface updates. By convention names for classes of this type end with VCO. Control objects of this type are executed on the main UI thread.
ECOError Control Objects - these stack objects are used to notify the user of errors and do any view cleanup required if an bad data or an error/exception occurs during the execution of a stack. By convention names for classes of this type end with ECO. This type of control object is executed on the main UI thread.
An example of a login stack could include the following control objects:
- (void) handleRequest: | (NSString *) | aCmd | |
withParameters: | (NSMutableDictionary *) | parameters | |
This is the trigger for the execution of mapped stacks. Each call to handle request is run on a background worker thread.
aCommand | The NSString that uniquely identifies the stack of Control Objects you want executed. |
parameters | The NSMutableDictionary instance containing any and all values that you want passed to the indicated stack or nil if there are none. |
- (QuickConnect*) init |
The default initialization method
- (QuickConnect*) initWithPersistentStoreCoodinator: | (NSPersistentStoreCoordinator *) | aCoordinator |
This initialization method is used when your application will be using CoreData.
aCoordinator | The NSPersistentStoreCoordinator instance for your application. If Xcode generated your CoreData code for you this is found in your app delegate |
- (void) mapCommandToBCO: | (NSString *) | aCommand | |
withObject: | (Class) | aClass | |
This method maps a specific Business Control Object, see the description at the top of this page, to the business (data) portion of the stack indicated by the command string.
aCommand | The NSString that uniquely identifies the stack of Control Objects being created. |
aClass | The Class of the Control Object to be added to the stack. Example: [GetUserBCO class] |
- (void) mapCommandToECO: | (NSString *) | aCommand | |
withObject: | (Class) | aClass | |
This method maps a specific Error Control Object to an error stack indicated by the command string. ECO's are mapped to their own stack not the stack in which the error occurs.
aCommand | The NSString that uniquely identifies the stack of Control Objects being created. |
aClass | The Class of the Control Object to be added to the stack. Example: [InvalidCredentialsECO class] |
- (void) mapCommandToValCO: | (NSString *) | aCommand | |
withObject: | (Class) | aClass | |
This method maps a specific Validation Control Object, see the description at the top of this page, to the validation portion of the stack indicated by the command string.
aCommand | The NSString that uniquely identifies the stack of Control Objects being created. |
aClass | The Class of the Control Object to be added to the stack. Example: [CredentialsValCO class] |
- (void) mapCommandToVCO: | (NSString *) | aCommand | |
withObject: | (Class) | aClass | |
This method maps a specific View Control Object, see the description at the top of this page, to the view modification portion of the stack indicated by the command string.
aCommand | The NSString that uniquely identifies the stack of Control Objects being created. |
aClass | The Class of the Control Object to be added to the stack. Example: [LoginSuccessVCO class] |