http://club.coolmaps.com
tomorrow's fusion today
WorkShop QuickNav

Contributor Application - Laying the Ground Work
A few minutes of planning can save you hours of frustration when building even a small CF application. Before opening Access, or coding any CF sit down and map out what it is you want to achieve and the information you need to achieve it.

Requirements for eFuse Headlines contributor application:

  • Daniel should be able to update the eFuse headlines that appear on the FuseWire page via a secure browser based adminstration area.
  • Adminstration functionality should include the ability to list/add/edit/delete and toggle visibility of headline stories.
  • The required information for each headline article
    • Date Headline story was added
    • The headline
    • Blurb about the headline
    • URL of full story on eFuse
    • Text to be displayed for URL

That's our high level planning done! Easy.

Keep in mind there are many ways to build a CF contributor application, using many tools. Ours is simple but it gets the job done.

With Access open creating a database to accomodate our application doesn't take too long. If you haven't already downloaded the zip file including the demo.mdb file and CF code, get it here.

We've created a new table for our Headlines application - depending on your situation it could be in a database containing other tables, or a new .mdb you intend to use for this purpose.

Our database fields include:

  • newsID - used to identify each entry into the database and have set it to the primary key and AutoNumber.
  • newsdate - used to record the date each headline was added. It's not essential for the needs of this particular application but always handy to have around!
  • headline - where Daniel's headline text will live
  • blurb - descriptive text of headlines
  • siteurl - the location of the eFuse story
  • texturl - text that will be displayed for the URL
  • visibility - a toggle yes/no on visibility of headline in FuseWire and related blurb and URL info.

The order and naming of the fields is up to you. We try to keep our field names short and descriptive (very important if you are coding manually) and the order somewhat logical.

If you want more info about the settings of each field, open and explore demo.mdb located in the resource zip file for this workshop.

With the database ready, it needs to be uploaded to the server and registered with Cold Fusion Server as a Data Source. If you have Adminstrator access to CF Server this is easily done via data sources > ODBC. Choose Add, browse the server to locate the .mdb file and name it.

The data source name is important - it's how CF Server identifies your .mdb on the server, so you'll be using it in all your CF work. Again, short and easy to remember is always helpful. Typo's are NOT your friend with CF, don't invite them in.

If you don't have Administrator access to CF Server you will need to talk to whoever does and have them register your datasource. If it's your ISP they may charge you for registering a Data Source - not because of the work usually (it only takes a few seconds), but to offset server resources your data source may use once your application is up and running! Be sure to have the database placed somewhere convenient on the server.

If you're a confident 'do it yourself-er' (and you will be before very long with CF) the clock should be at 5 minutes or so by this stage! We'll have the contributor application up and running within 30 mins or the pizza is free :-)

[ go to Building the Admin - Adding Articles ]

WorkShop QuickNav

[ to top of page ]

to home page
back next

Support CCC thru Amazon. Buy CF Bible 1 - The CF Web Application Construction Kit

Support CCC thru Amazon. Buy CF Bible 2 - Advanced CF Application Development

 
member of club xChange
downloads contact us site map