Twitter: raymondcamden


Address: Lafayette, LA, USA

ColdFusion/Spry Kit Proof of Concept

11-02-2006 4,851 views ColdFusion 14 Comments

So - in case folks are curious - I now have both a dishwasher and the Internet back at my house. I feel like I've returned to the modern world. (Yes, I'm spoiled.)

Last night instead of my normal useless browsing, I worked up a quick set of tags that will make it easier for folks to use Spry widgets. So for example, to create tabs (with the not yet officially released Spry Tab code), you can do this:

view plain print about
1<cf_tab id="demo0">
2
3    <cf_page title="Tab 1">
4    Orig Ganster
5    </cf_page>
6    
7    <cf_page title="Tab 2">
8    Tab 2
9    </cf_page>
10    
11</cf_tab>

Accordions are much more difficult:

view plain print about
1<cf_accordion id="demo1">
2
3    <cf_page title="Page One">
4    This is the content for the first accordion panel.
5    </cf_page>
6    
7    <cf_page title="Page Two">
8    This is the second page with some dynamic content, <cfoutput>#timeFormat(now())#</cfoutput>
9    </cf_page>
10    
11</cf_accordion>

The custom tags are smart enough to know when they have been run once in the request and will not re-include the JavaScript files more than once. Before I tell you where to download this - please note that this is very rough code. It doesn't have documentation (bah, docs are for wimps!) or proper error handling, or even strong testing. It really is just something I was playing with.

This all stemmed from a long talk I had with Charlie Arehart about CF and Spry and he will be working on this project as well. The project is being hosted - where else - at RIAForge: http://cfspry.riaforge.org

I also have some ideas for how to work with Spry datasets as well - but that is still way in the planning stages.

p.s. I said the code was a bit ugly - and it is - but check out how the custom tags are written, especially page.cfm. Notice how it checks for the parent and based on this can check to see if it properly wrapped. Custom tags are cool. Don't let them CFC folks fool ya!

14 Comments

  • Commented on 11-02-2006 at 9:33 PM
    Ray,

    I think I want in on this as well.

    ap
  • Commented on 11-02-2006 at 11:25 PM
    Hi Ray,

    Are there any place that we can download Spry 1.4? :)
  • Commented on 11-03-2006 at 2:51 AM
    It remember something to me :)
  • Commented on 11-03-2006 at 5:47 AM
    Oguz - labs.adobe.com, although the tab code is NOT in it. It is in the preview they released before MAX.

    Andrea - your comment made absolutely no sense to me. :)
  • Joel Cox #
    Commented on 11-03-2006 at 9:14 AM
    Cool, will take a look at this.

    BTW, there's a typo in the footer on the project pages:

    "This project is sharing it's code via Subversion."

    There shouldn't be an apostrophe in the "it's". Minor point, I know :P
  • Commented on 11-03-2006 at 9:18 AM
    Typo? What typo? I don't see any typo.

    -whistles innocently-
  • Commented on 11-03-2006 at 9:21 AM
    Ray, I know where is the Spry files and I know labs.adobe.com.

    I have already seen some Spry 1.4 samples and I know it will be published within some time. I just wondered that whether I missed them or not?

    Anyway thanks. :)
  • Commented on 11-03-2006 at 12:57 PM
    If I look at http://svn.riaforge.org/cfspry/ in a browser, it says revision 0 and there are no directories.

    I've never been able to get code out of subversion on the first try, but is there really code in there this time?
  • Commented on 11-03-2006 at 1:03 PM
    I've not yet put the code in SVN. Use the DOwnload link at top by the project name.

    SVN currently is for BROWSING only (unless you get via a SVN client).
  • Commented on 11-03-2006 at 2:16 PM
    I like it. Pretty cool, thanks Ray.
  • Commented on 11-04-2006 at 3:55 AM
    Great to see it posted on riaforge now. As for my contributions, I have to say that it may be a couple of weeks before I can do much. I'm traveling in Europe (speaking several times over a couple of weeks, http://carehart.org/blog/client/index.cfm/2006/11/...europeanswing), so limited free time and connectivity. Glad to see others wanting in on things.
  • Commented on 11-05-2006 at 9:46 PM
    The zip is updated. I'll be adding to the repo in a few moments. In general, I wont be posting here for small updates like this, but will use the blog at http://cfspry.riaforge.org.
  • Commented on 11-07-2006 at 9:54 PM
    Alan said: "If I look at http://svn.riaforge.org/cfspry/ in a browser..."

    I'm just learning about svn myself Alan. Here's one way to get tapped in. Go to: http://tortoisesvn.net/downloads and install TortoiseSVN (It's "the coolest Interface to (Sub)Version Control").
    It installs two new menu items in the windows explorer context menu (when you right-click on a folder).
    Create a new folder C:\svn
    This will be the root download directory for all things subversion.
    Create a new folder C:\svn\cfSpry
    This will be this project's folder syncronized with the repository.

    Right-click on the cfSpry folder.
    Choose SVN Checkout
    The dialog box will ask "URL of repository".
    Paste: http://svn.riaforge.org/cfspry
    You now have the latest copy.
    If you want to change the ColdFusion code (for instance the colors and what-not), then (I think) the way to do that is to copy the folder into an area under your web root and change to your hearts content. That way, you don't lose your changes when you get the latest version from the repository again.
    I use Beyond Compare by scootersoftware.com to see what changes have been made, but apparently there is a diff function built into subversion as well.
  • Commented on 11-07-2006 at 9:59 PM
    Be careful not to click on the Google ads at
    http://tortoisesvn.net/downloads.
    The ads are for some kind of "Windows Installer Program".

    The program you want to download is named something like
    TortoiseSVN-1.4.0.7501-win32-svn-1.4.0.msi

Post Reply

Please refrain from posting large blocks of code as a comment. Use Pastebin or Gists instead. Text wrapped in asterisks (*) will be bold and text wrapped in underscores (_) will be italicized.

Leave this field empty