Neptune Programs: RSS Reader

It looks like my "one new Neptune program per month" goal got missed by a bit. I am going to blame a combination of cf.Objective, a recent vacation and associated upsurge in work.

In any event, here is the program for June (with only days to spare). RSS Reader is a simple program to get RSS feeds and display them on your site. While you could certainly use <CFFEED>, it is slow to get feeds on every page request and <CFFEED> sometimes has bugs (RSS Reader itself uses Ray Camden's rss.cfc under the hood).


cf.Objective Custom Tags Presentation

I had the high honor and great opportunity to speak at the most recent cf.Objective() conference.

If you haven't ever been to this conference, I would highly recommend it. This was the sixth year of the conference (my third) and it was fantastic all around. The other presentations were universally good (if not great). As always, I learned a lot - both in the presentations themselves and in conversations with other speakers and attendees.

For my part, I gave a presentation title "Don't Forget About Custom Tags", attempting to convince people that custom tags are still relevant and a great tool to have in your toolbox (and one which should be used frequently).

I zipped up the presentation (PowerPoint file and code) for anyone interested in seeing it.

I felt a bit more nervous than I expected, so I felt a little flat, but hopefully people enjoyed the presentation and I will get the opportunity again (I'll find out the answer to the first when I get the chance to read the reviews).

Thanks and congratulations to all of those responsible for putting on another great conference!

Scheduler Program

One thing that I run into frequently in my programming life is the desire to schedule events. I like CFSCHEDULE, but by iteself it has a few limitations that I don't like. It is a bit limited in the intervals available and I have to have an HTTP page set up for it.

What I want is the ability to schedule a CFC method to be run directly from that CFC. Fortunately, Scheduler.cfc allows me to do just that. Scheduler.cfc itself still requires a scheduled task to run it. Scheduler.cfc also has the ability to report data about the scheduled tasks that it has run, but (as it is just a CFC) it doesn't have a UI to report that data.

The Scheduler program solves both of those. It is essentially a wrapper for Scheduler.cfc. When the program is installed (copying it to a folder after installing Neptune), it automatically creates a "/schedule.cfm" and creates a ColdFusion scheduled task to execute it every 15 minutes (you can, of course change that). It also creates a page that reports all of the scheduled tasks running on the system as well as how long they execute (in seconds) on average, as well as the ability to see details of every time that they have run.

This information can be invaluable if you are trouble-shooting a scheduled task.


Neptune Framework in Beta 2

It took a little longer than I had hoped to get this out - mostly owing to being behind on a number of other things. Even so, I am really excited about this release of the framework.

For an overview of what Neptune is, you can read the Neptune framework announcement or see the Neptune documentation.

So, what's new in Beta 2?


English-Friendly Interval Calculation

I am working on a small program to digest and store RSS feeds (in part using Ray Camden's nice RSS.cfc). One thing I ran into is that I want to be able to specify how frequently feeds should get updated. It seems obvious that I should have an argument for this in the init() method of my CFC. What I don't want, however, is to either limit myself to one interval (days, for example) or to have multiple arguments just for the interval.

Moreover, I really want to be able to specify the interval in a human-readable format. So, I created a UDF (implemented as a method in my CFC) to make date calculations based on a readable string indicating the interval.

Here are some examples of intervals that it will calculate:

  • daily
  • annually
  • every day
  • every other minute
  • every 3rd quarter
  • every fourth year
  • every other Saturday
  • 4th Saturday
  • three weeks
  • 2 months, 2 days, 11 minutes
  • - every second Sunday

Most of these should be pretty obvious, but the last two might require a touch of explanation. The UDF will accept a comma delimited list, in which case it will apply all of the intervals to the date given.

If the interval starts with a "-" then it will subtract the interval given. The subtraction will only apply to the entire interval, not to single items in the list.


Adding Fields to StarterCart

Every shopping cart that I have tried or reviewed has some generic fields in their products that are meant to handle any product data that wasn't otherwise covered by their existing fields. I never liked this approach. It makes the GUI user somehow responsible for data structure and probably doesn't eliminate the need for custom code anyway.

With StarterCart, I took a different approach. Instead of having several product fields as well as some generic fields, I have only the bare bones - fields for the name, price, description. I honestly debated about whether or not to include a description field.

So, how do you add fields?


New Open Source ColdFusion Shopping Cart

I have tried a handful of ColdFusion shopping carts and I have never been happy with them. They tend to do more than I need, but not in the way that I need it. That they don't work quite as I need isn't a problem. That they are difficult to modify is.

After a few frustrating experiences, I finally decided to build a shopping cart the way I always wanted one to work. The real difference between this cart and others is that it assumes that you will have to modify it. Rather than give you 90% of what you need and making it hard to do the other 10%, it gives you closer to 60% of what you need, but makes it extremely easy to get the other 40%.

The result is a free, open source, shopping cart program that I call StarterCart. While it is very slim on features, it does provide some significant advantages over other shopping cart programs that I have seen.


Real World HTML: Client Review

In our last "Real World HTML" entry, we created a printable page - finishing up the implementation of the design and the print page. There's nothing left to do now, but show it to the client.

I don't think I have ever shown something to a client that hasn't wanted something changed - even if I show them a pixel-perfect match of the original design. In fact, I have been tempted to use the approach Hal Helms mentions for exacting clients (watch for the Rick Roll).

In any event, I had no reason to expect this to be any different.


I'm Speaking at cf.Objective() this year!

It is hard to believe, but I have been accepted to speak at cf.Objective() this year. I have been to this conference twice before and I loved it both times. The presentations were great and so were the hallway and dinner conversations. It seemed like I was learning something all the time.

I am honored and humbled (ok, intimidated) to be among the speakers at cf.Objective() 2011. They recently announced the schedule and it is well, awesome! Seriously, go take a look. I'll wait.


Real World HTML: The Printable Page

In our last "Real World HTML" entry, we handled a rounded corner box sitting on a gradient - finishing up the implementation of the design. The only thing that remains now is making the printed page look good. Styling for print should be easy - especially if the HTML is structured well.

With that in mind, let's take a quick look at what we have so far.


More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.