logo

Flex App Basics: And Finally - Source Code Download

Enough waffle Jake, just give us the code. Ok, I've been teasing you long enough. Here's the download of both the Flex source code and the Notes database for the Contact Manager app we've been looking at.

Download the Zip file and extract the NSF to your server and the Zip within the Zip to your PC somewhere. Then, from within Flex Builder, go to File -> Import and browse to this Zip. This will import all the code as a ready-to-compile project.

Before you run it - once it's imported - open the Constants.as file from the root "/src" folder and then change the default path to wherever you put the NSF. Save the file and hit the compile/run/play button (green triangle). It should compile and run. You can then start adding documents to the backend database in Notes. Et voila.

As a recap, here are the ten posts I've made over the last month or so, which describe various aspects of the code:

  1. Building Your Views Remotely
  2. Extending Basic View Behaviour
  3. Using Components To Simplify Your Code
  4. Opening Documents From a View
  5. Managing Document Attachments
  6. Multiple File Uploads (note: read the comments to this post if you plan on using it!)
  7. Alert Is To Flex as MessageBox Is To LotusScript
  8. Display Column Values As Icons
  9. Creating an Icon Library
  10. The Form Container

What it's not is a step-by-step guide that let's a beginner get to grips with Flex development. If you're looking for a more in-depth guide to learning Flex basics then you could try this comprehensive series of screencasts.

What it is is an ill-thought-out series of ramblings with very little coercion. By making it a numbered series I may well have given the wrong impression. Sorry. While each of the ten posts has its own merits there's little point reading them in order, really. Although, if you're going to pick apart the Flex app itself it might be worth doing so.

Even if you have no use of a Contact Manager (heck, if you needed a contact manager then this probably isn't of much use anyway) the Flex app represents a conglomeration of as many of my current "best practices" as I could squeeze in. The code contains a lot of the goodness that I've learnt over the past year or more of my love affair with Flex. Primarily it demonstrates the ever-important concept of using re-usable components wherever possible.

Enjoy. If you have any questions, let me know...

Comments

    • avatar
    • Casper
    • Wed 10 Feb 2010 04:32 AM

    >Hear that? Silence! Be the first to talk. Use the form below...

    can't talk - looking at code...

      • avatar
      • Jake Howlett
      • Wed 10 Feb 2010 05:20 AM

      Hi Casper,

      Assuming you're the same Casper I spoke to a while back about your name, you might be pleased to know there'll be a Casper Howlett arriving any day now (I gave in under pressure and am starting to like the name now ;-). Then again there's a 50% chance it might not be a Casper...

      Show the rest of this thread

    • avatar
    • Dragon Cotterill
    • Wed 10 Feb 2010 04:41 AM

    The only way you get ahead in development is by stealing the work done by others. The customers/clients don't know this of course, so it makes us look good at what we do.

    But in the blogging world we all know who to steal off. The ones who blaze the trails for others to follow. Which is the reason everybody comes and visits this site. We steal from the best.

    Once again, you've proved you're ahead of the curve. On behalf of me and all the other little thieves, a huge Thank You.

      • avatar
      • Jake Howlett
      • Wed 10 Feb 2010 05:20 AM

      Thanks Dragon. Flattery is always welcome here!

  1. A round of applause for Jack Howlett.

      • avatar
      • Jake Howlett
      • Wed 10 Feb 2010 05:20 AM

      Never mind Jack! What about me?

      Show the rest of this thread

    • avatar
    • Palmi
    • Wed 10 Feb 2010 08:56 AM

    All rise , Mr Jake Howlett has enter the room

  2. Hi Jake,

    Once again. Thank you very much !

    Alejandro ;)

  3. Hi Jake,

    I feel this application covers all the flex basics that are required to develop any flex application integrating with domino :) ...

    Thanks for all your effort in this... :)

      • avatar
      • Jake Howlett
      • Thu 11 Feb 2010 04:20 AM

      That's something I meant to talk about above but forgot to. Although it's called "contact manager" and has views/forms for contacts and companies what I was trying to show was a way to build a re-usable framework for porting Domino apps to Flex.

      The views are controlled from the server, so all you have to do is quickly knock up a form based on the Form.mxml component, tie it to the view and you're away.

      Obviously it's not as simple as just pointing the Flex app at an NSF and letting it do the rest. While it is (in theory) possible to control every aspect from teh server and use the same Flex app for all (simple) databases I just feel the idea of a one size fits all framework is never going to work in practice.

      Glad you could see the usefulness of the "architecture" though.

      Show the rest of this thread

    • avatar
    • Rishi
    • Thu 11 Feb 2010 08:41 PM

    Thanks jake for inspiring in Flex development..

    • avatar
    • Jono
    • Fri 12 Feb 2010 02:50 AM

    Don't sell yourself short Jake - you've done a great job as usual and have inspired many of us. Big thanks & hope everything goes will with the birth of your new arrival.

    • avatar
    • Alex
    • Fri 12 Feb 2010 11:09 AM

    Yes... "We steal from the best".

    (Or "Jake Howlett what else?!")

    Thank you so much Jake

    • avatar
    • Eddie
    • Tue 23 Feb 2010 09:22 AM

    Hi Jake,

    Great posts - as ever, a real help to a fledgling flex developer.

    One thing that has come up for me - I have a flex app sitting on a hosted shared server and the hosting company is more than somewhat reluctant to allow me to add the DominoDisableFileUploadChecks=1 to the ini.

    Any ideas how I might be able to get around this?

    Eddie

      • avatar
      • Jake Howlett
      • Tue 23 Feb 2010 11:14 AM

      Move host? Every other solution is a hack.

    • avatar
    • Jasper
    • Wed 28 Apr 2010 03:03 PM

    Thanks! Great work!

    But i can't understand how to run it localy? I've changed defaukt path but it didn't work...

  4. Hi Jake,

    I am running this application locally.

    But when i try to upload a file, it's giving IO Error.

    Could you please let me know, why the error is coming?

    Anonymous has editor access to the database.

    I need to have file upload functionality in my flex and domino project.

  5. Hi Jake,

    In the log i am getting the following exception.

    HTTP Web Server: File Upload Not Allowed Exception [/contacts.nsf/0/64B24509D51EE1EB6525774800169D73?SaveDocument]

    I have added DominoDisableFileUploadChecks=1 in notes.ini

      • avatar
      • Jake Howlett
      • Sun 20 Jun 2010 02:35 AM

      My guess would be that that INI setting doesn't work when developing locally.

      Show the rest of this thread

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Wed 10 Feb 2010

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content