FlexCamp London

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    FlexCamp London - Presentation Transcript

    1. Marco Casario CTO – Comtaste http://casario.blogs.com
    2. Who I am FlexCamp London
      • CTO of Comtaste , RIA Development, Consulting and Training firm
            • www.comtaste.com
      • My Books
          • AIR Cookbook
          • Flex Solutions: Essential Techniques for Flex 2 and Flex 3 Developers
          • Advanced AIR Applications
      • My Blog and my contacts
            • http://casario.blogs.com
            • http://blog.comtaste.com
    3. AIR Cookbook Cook-off FlexCamp London
      • Qualify for the Adobe AIR Cookbook Cook-off contest to celebrate the upcoming publication of the Adobe AIR Cookbook .
      • Submit your best solutions to common AIR coding challenges for a chance to win:
        • One pass to the Adobe MAX 2008 conference in San Francisco, and US$500 in O'Reilly books
        • Every English-language Adobe Developer Library (ADL) book published by O'Reilly Media
        • Five O'Reilly Media books of the winner's choice
        • Community choice award: US$350 in O'Reilly Media books to the winner of the top-rated recipe during the contest period
    4. Agenda FlexCamp London
      • We’ll talk about best practices using SQLite support in AIR with Flex
      • I’ll show examples on :
          • Create and open a database
          • Synchronous and Asyncronous operations
          • Insert records
          • Display records
          • Display records in a hierarchical mode
          • Using SQL statements from an XML file
          • Using the DAO Pattern
      • We will move very quickly  I have only 20 min
    5. Demos FlexCamp London STOP TALKING DEMO NOW
    6. DAO FlexCamp London
      • Data Access Object is an object that provides an abstract interface to some type of data storage
    7. DAO FlexCamp London
      • Data Access Object is an object that provides an abstract interface to some type of data storage mechanism
      • It provides some specific operations without exposing details of the database
      • public function SalesManager()
      • {
      • sqlConnection = SQLManager.getConnection( "flexcamp" );
      • }
      • public function getContact(contactId:int):SalesManagerVO
      • {
      • return getItem( "SELECT * FROM STUDENTS WHERE CONTACT_ID=? , studentID) as SalesManagerVO;
      • }
    8. DAO FlexCamp London
      • Benefits of using DAO (as given by Sun):
      • The benefits of using data access objects is the relatively simple and rigorous separation between two important parts of an application which can and should know almost nothing of each other, and which can be expected to evolve frequently and independently.
      • Changing business logic can rely on the same DAO interface, while changes to persistence logic do not affect DAO clients as long as the interface remains correctly implemented.
    9. What I don’t like FlexCamp London
      • Inconsistency in the AIR and Flex APIs
      • SQL does not use IResponder but it uses events and Responder as an argument
      • FILE only uses events
      • RPC (in Flex SDK) uses events or the IResponders class (with AsynchToken class)
    10. Best Practices FlexCamp London
      • Open a SQLConnection at the application startup (avoid delays when running statements)
      • Use only one SQLStatement (with parameters)
      • Execute the statements within an explicit transaction
      • Do not concatenate user input into statement text to secure your app
      • When embedding a SQLite DB into the AIR package the ApplicationFolder is read-only. So, copy the DB in a different folder (using the copyTo method)
    11. we make it RIA Marco Casario CTO – Comtaste http://casario.blogs.com
    12. Marco Casario CTO – Comtaste http://casario.blogs.com

    + marcocasariomarcocasario, 2 years ago

    custom

    927 views, 0 favs, 0 embeds more stats

    Send me a mail if you want me to send you the demos more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 927
      • 927 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories