As of ColdFusion 9 you have the ability to create database driven applications by writing virtually no SQL statements using ORM. You can use this server-side feature on the client-side in an AIR application.
This session will talk you through the basics of using ColdFusion ORM in AIR and how to "automagically" synchronise your local data with a remote ColdFusion 9 server. That's not all: we'll go one step further and take that ability to create database driven applications onto the mobile platform as well. Just like that.
2. Who Am I?
Steven Peeters
Instructor / consultant at multimediacollegeTM
• Adobe Flex, AIR, Flash Catalyst & ColdFusion Certified Instructor
• Adobe Community Professional
• ColdFusion User Group Manager
• 12+ years of development experience
• Flex & AIR since 2004
• Author for Friends of ED
Email: steven@multimediacollege.be
LinkedIn: www.linkedin.com/in/stevenpeeters
Twitter: @aikisteve
Blog: www.flexpert.be
Website: www.multimediacollege.be
3. Topics
• Database in AIR
• Using ColdFusion’s ORM
• Synchronising with a remote server
• Applying to mobile applications
Twitter hash tag: #airorm
13. Database encryption
• 256-bit AES encryption
• Use EncryptionKeyGenerator to validate strength
of encryption key
• as3corelib on code.google.com
14. Database encryption
• 256-bit AES encryption
• Use EncryptionKeyGenerator to validate strength
of encryption key
• as3corelib on code.google.com
• Re-ecryption is possible
16. Using ColdFusion’s ORM
• Server-side technology on client-side?
• cfair.swc
• <server root>/CFIDE/Scripts/AIR
17. Using ColdFusion’s ORM
• Server-side technology on client-side?
• cfair.swc
• <server root>/CFIDE/Scripts/AIR
• Works with local database
18. Using ColdFusion’s ORM
• Server-side technology on client-side?
• cfair.swc
• <server root>/CFIDE/Scripts/AIR
• Works with local database
• Use SyncManager class
19. Using ColdFusion’s ORM
• Server-side technology on client-side?
• cfair.swc
• <server root>/CFIDE/Scripts/AIR
• Works with local database
• Use SyncManager class
• Need to adjust DTOs with metadata
20. Using ColdFusion’s ORM
• Server-side technology on client-side?
• cfair.swc
• <server root>/CFIDE/Scripts/AIR
• Works with local database
• Use SyncManager class
• Need to adjust DTOs with metadata
• No BLOB possible :-(
46. Synchronising with remote server
• Fetching remote data
• syncManager.fetch(“foo”)
• Save remote data in local SQLite database
• session.saveUpdateCache(<ArrayCollection>)
49. Synchronising with remote server
• Reading data from local database
• session.load(<valueObject>, <filterObject>)
50. Synchronising with remote server
• Reading data from local database
• session.load(<valueObject>, <filterObject>)
• session.loadAll(<valueObject>)
51. Synchronising with remote server
• Reading data from local database
• session.load(<valueObject>, <filterObject>)
• session.loadAll(<valueObject>)
• session.loadbyPK(<valueObject>, <PK filter>)
52. Synchronising with remote server
• Reading data from local database
• session.load(<valueObject>, <filterObject>)
• session.loadAll(<valueObject>)
• session.loadbyPK(<valueObject>, <PK filter>)
• session.loadByQuery(<valueObject>, <SQL
where condition>)
59. Synchronising with remote server
• Pushing data to the remote database
• syncManager.autocommit = true
60. Synchronising with remote server
• Pushing data to the remote database
• syncManager.autocommit = true
• session.commit()
61. What can you do with it?
• Online/offline synchronisation
• Use DB as (temporary) storage
• Protect private data (encryption)
• Colaborate with other people
• ...