Basics of Manager.cfc XML

In my last entry on Manager.cfc, we covered a fairly basic example of managing widgets with images and thumbnails. I want to step back this time and start with a more simple example to allow us to really dive in and understand some of what Manager.cfc provides. This example will be expanded in subsequent entries to provide more complexity to cover some of the challenges that you might run into in the real world.

For our example, we have a client that has asked us to build an HR application. One part of that is that the company has 5 departments:

  • Executive
  • I.T.
  • Legal
  • Production
  • Sales

When asked if these will ever change, our client says "I don't think so." (which, of course, means "probably"). So, let's set up the XML for this table:


Super Easy CRUD/File Management

A few months ago, I wrote about using Records.cfc and Manager.cfc to manage records and associated files. I just released a new build of the com.sebtools package that contains these components and it makes a really easy process even easier. I am really excited about how easy this stuff is now.


Records / Manager Form

Much of this entry has been updated as Super Easy CRUD/File Management.

I did a rough introduction to Records.cfc last time - just enough to show how it can make really basic CRUD operations easy. This time I want to show how you can take advantage of it to help keep your applications DRY.

In addition to the methods that I discussed last time, Records.cfc components (that is, components that extend Records.cfc) also get another method that I would like to discuss today:


Records / Manager

This entry has been updated as Super Easy CRUD/File Management.

It occurred to me recently that I haven't yet blogged about one of my favorite tools in my com.sebtools package. It makes the most common CRUD tasks dead simple (I think more than any other CRUD tool that I have seen). Records.cfc is one of the only components in the com.sebtools package that is used by extension rather than composition. Normally, I prefer composition but I think the benefits are worth it in this case.

Rather than try to describe what it does in generic terms, let's start with an example. We can start with a completely empty folder.


Updated SpamFilter Definitions

This is just a quick note that I have updated the spam definitions for SpamFilter.cfc. So, if you are using SpamFilter.cfc and have the second argument of init ("getNewDefs") set to true, simply re-initialize it and you will have the updated definitions.


Introducing Manager.cfc

I have been told by some people using DataMgr that it should handle files as well. The problem with that is that managing files is outside the purview of what DataMgr should do.

I actually do have another project called FileMgr (part of the com.sebtools package) that does a little bit of what DataMgr does, but for files. Mostly, it handles uploads and makes sure that the needed folders exist - one less thing to worry about on deployment.

What would be nice, is a component that works like DataMgr but handles files (and even image resizing) just as automatically as DataMgr handles data.

The component is (showing no imagination on my part) called Manager.cfc.


com.sebtools Build 8: FileMgr and Mailer Updates

John Whish found a couple of bugs in FileMgr (ColdFusion 9 compatibility and a bug in the getFilePath method) that should be fixed now.

I also added getNoticeMethod to Mailer.cfc which should make it easier to see what it is doing when sending notices as well as make it possible to interject a step after the notice email is compiled but before it sends.

com.sebtools is open source and free for any use.

Tracking Scheduled Tasks with Scheduler 1.1

One of the sites I work on went through a period where it ran very slowly (or even crashed) a few times a month. Each time, the problem generally started around three in the morning. As the site has several scheduled tasks, I was asked if any of them could be the culprit. At the time, I had no reliable way to answer that question. Now I do.


DataMgr and com.sebtools Build 2

I just fixed a couple of bugs in DataMgr which caused an update in both DataMgr and in the com.sebtools pack. The com.sebtools package also includes an update to FileMgr among other components.


com.sebtools Build 1

I have done a few entries on components that use DataMgr (listed under "DataMgr Utility Set"). Until now, I have had each as a separate download. My thinking was that it would reduce the amount of data you would need to download in order to use the tools. In fact, this added a step to use them as you had to download DataMgr as well if you didn't already have it.

In an attempt to learn from this mistake, I have merged all of these projects as the com.sebtools package.


More Entries

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