September 10, 2011
At long last (big sigh of relief here by me) QuickConnectFamily 2.1 is finally available for download. It involved a lot of work by many people and has come together well. There are some big changes for both the iOS and Android platforms. These enhancements and changes have been driven by requests from developers like you.
- Another BIG one. In order to make the Control Function code more readable and more easily comprehended for those new to the framework all Control Functions MUST return one of the following three values (see the documentation for more information):
- qc.STACK_CONTINUE – This instructs the framework to execute the next control function in the stack.
- qc.STACK_EXIT – This instructs the framework to terminate all further stack execution.
- qc.WAIT_FOR_DATA – This instructs the framework that a call to database or remote data has been made or a call to device specific behavior such as showing a map, displaying the camera, email editor or other native behaviors.
- Work has been done to improve the asynchronous call stability in the underlying framework. (Thank you to the team at affinityAmp).
- Miscellaneous bug fixes and enhancements.
- Bug fixes
- Expanded database support and fixes
- A major rework of the underlying Android Java code to make it match the design changes in iOS. This is in preparation for QC Plugins and some new features such as ‘window-in-window’ that will be part of the next release as a Plugin. The ‘window-in-window’ code is in there now but not official until it is converted to a plugin and the same behavior is available for iOS.
- Added a hybrid sqlite database example
- Bug fixes
- Removed the native footer code since libraries for scrolling and others such as Sencha, JQTouch, etc. are now of good quality.
- QC Family Hybrid Plugin API and design spec completed. There is an example of how you can add to QC on your own. If you thing these additions could be useful to others you are free to charge for them, or not, host them yourself, notify me and I will add them to the plugin list on the QC plugin site. If you are willing to donate them to the QC community send them to me for review and I will put them into the git repository and list them on the QC plugin site.
- Updated all the examples to use the new return values and the new qc name space.
August 1, 2011
This posting is about the QCDBSync library. For more information about QCDBSync go to:
For those of you doing native development in iOS and Android a new version of QCDBSync is now available for download from its sourceforge site.
This version adds the iOS version and its documentation to the download. You will no longer need to use git to use QCDBSync on iOS. It also adds delete functionality to the iOS version that only the Android version had before.
The iOS version is now much easier to use as well. Less work on your part, more functionality, must be good. Right?
June 15, 2011
I have just completed an update to QC Native for those of you who are doing native Android and/or iOS development. Download it from here: http://goo.gl/P7s6D
As with the previous version of QC Native all threading is done for you. ValCO’s and BCO’s will run in a background thread and VCO’s will run in the UI thread on Android, JavaSE, and iOS. No threads will be used when you use the qc.jar file in an Enterprise Java environment since they are not needed there.
The Control Objects in QC Native now use HashMap/NSMutableDictionary instead of ArrayList/NSArray. This allows you to have more control over the data used in your Control Objects. Another change is that you now add the results of your calculations in your BCO’s, ValCO’s, and VCO’s to the parameters HashMap/NSMutableDictionary instead of returning them from your handleIt methods. Now you return null to terminate a control stack and any value to continue.
This change will give us a strong base to build on for the foreseeable future for both the native and hybrid libraries.
May 11, 2011
So here is a hint for using the camera with the iPad.
The iPad allows the camera view to rotate as the orientation of the device changes. Imagine this set of views.
———-> base view
————–> camera view
If you display the camera from the subviews’ view controller the camera views’ control bar and the orientation of the camera view itself will only be correct if the device is in portrait-right-side-up orientation when the camera view is displayed. In any other orientation the camera view will be displayed incorrectly and this orientation error remains as the device orientation changes.
If the set of views is like this the camera view will be displayed correctly regardless of the original orientation of the device. It will remain correct as the orientation of the device changes.
———-> base view
—————> camera view
So here is a rule for showing the camera via the UIImagePickerControllerDelegate class.
“The view controller that displays the camera must be controlling a view whose superView is the main window if the controlled view auto rotates.”
January 15, 2011
QC 1.6.7 has been uploaded. It includes a complete rewrite of the way your QCAndroid apps are compiled from within xCode. I think you will find compiling much better. It also includes a native Android template that allows you to build QC applications in Androids’ native Java along side the Objective-C native template for iOS apps.
Just like in QC Native for iOS apps created using this QC Native for Android template ‘pre-threads’ your application for you. This means that any code that you write that is not directly related to updating the view is run in helper threads. Any code you write that updates the view will run in the main view thread just like the native QC iOS apps.
Build your Control stacks in either language and your Validation and Business Control Objects, including db and server/service access, will be run on background, helper threads and then when the View Control Objects are executed they will be run in the main-view thread.
This means that your applications’ user experience is snappier since the main-view thread is only blocked when the view is being updated.
I will be covering the basic structure of Android Native QC apps and how to write them at the Android Developer Conference in March.
I will be covering the basic structure of iOS Native and Hybrid QC apps at the iPhone Developers Conference in April.
More tutorials, when I get them done, will be available on the wiki.
I have also uploaded QuickConnectFamilyPC_1.6.7 for those of you who want to develop using Eclipse rather than Xcode. It includes a few examples of hybrid apps and instructions for how to use QC in Eclipse.
I’d love to see you at the developer conferences and get feedback in addition to what I receive via the Google group and this blog.
January 6, 2011
December 31, 2010
December 30, 2010
All User Interface libraries, regardless of platform, require that the UI components start their updates from the ‘main’ thread. Sometimes this is referred to as the UI thread but it is actually the main thread of the application.
What most people that are creating mobile apps don’t realize is that if they are using the main thread to do significant computation such as remote server access, XML parsing, database access, number crunching, etc. is that this makes their User Interface slow and chunky. The ywill notice the unresponsiveness of their UI but will not know why it isn’t smooth. They generally tend to come to believe that the problem is that the processors are not fast enough to do what they want to do. This is generally not the case.
What they really need to do is move the computational portions of their apps into background (worker) threads and let the UI thread remain responsive to the user. This can be a challenge that they are unwilling to attempt due to the perceived difficulty of implementing threading.
Starting with QuickConnect 1.6.5 I have made the native iOS and Android application templates pre-threaded for both iOS and Android apps. This means that you, as a developer, no longer need to worry about creating the background threads and then executing UI updates on the main thread for your mobile apps.
When you use one of the mobile native templates in QC all of your validation and computation code is automatically executed on a background thread. When this portion of your application is complete and you make a UI update the framework automatically causes your update to use the main thread. You won’t even be aware of the change.
All of this is triggered every time you use the QC framework handleRequest method. This is in addition to linearizing your asynchronous HTTP remote access calls and an easy to use SQLite wrapper. With this kind of a head start it becomes much easier for you to create highly responsive, high quality apps in a much shorter time.
I will soon be making this multi-threading available to all of you using the hybrid iOS and Android templates as well. It should make a huge difference in your execution speeds.
September 14, 2010
Recently I got a ping from a QuickConnect user regarding connecting to couchDB. For those that don’t know couchDB is a document storage database. It is written in Erlang
and, if I remember correctly, uses the Mnesia a database written in Erlang. couchDB also uses the HTTP protocol and JSON for communication.
As I went back and spent a few minutes with couchDB again I realized that the Objective-C version of the QCFamily Enterprise Data Sync feature that I will be presenting at the iPhoneDevCon on the 27th – 30th of September, 2010 needs only minor modifications to work with couchDB. I hadn’t thought of this before and was pleased that with these minor modifications couchDB could be added to Oracle, MySQL, and other relational databases that are supported.
Too much fun!
September 3, 2010
I have found that there are quite a few postings out there about how to use custom fonts in your application. It is unfortunate that I didn’t find a single one that actually helped me use a custom font. Most of them echoed each other and gave misleading or erroneous advice. Because of this I am going to post how to actually use a custom font in your app.
First, you must be aware that custom fonts are added on a per-application basis. You can not add a font to your iOS device and have it be available for all of your applications.
Second, no code needs to be added in order for you to use the custom font or fonts in a QuickConnectFamily hybrid iOS application or any other application that uses the UIWebView.
Third, no @font-face CSS call is needed in your application.
Fourth, this example will show two custom fonts being added and used. The first is the Freshman font, the second is the PF Handbook Pro Normal font. Both of these are available as ttf files.
OK. So here is how we do it.
- Drag your ttf files into the Resources group of your project selecting the copy checkbox.
- Open your applications’ info.plist found in the Resources group.
- Control-click on any of the properties and select New
- Select ‘fonts provided by application’
- Expand the resource just created by clicking the triangle button on the left of the description
- Enter Freshman.ttf in the Value column (You would put the name of your font file here)
- Control-click the Freshman.ttf row and select Add Row
- Enter PFHandbookProRegular.ttf in the Value column(You would put the name of another font you want to use here)
- Use the font in your CSS or directly in an inline style. Both now work.
Hopefully this will clear things up regarding using custom fonts.