My first submission to CFLib.org has been approved and posted! Check it out: CFLib.org - listToQuery.
It is super-simple and does exactly what it says. I wrote it because I was working on a project which required a list be converted to a query, and I couldn't find any existing UDFs to do so.
If you find yourself in a similar situation, I highly recommend submitting your solution to CFLib.org. It helps everyone! Plus, it gives you priceless bragging rights.
On a side note: I was working on CouchDB for Coldfusion and ended up spending 3 hours writing a UDF that I planned to submit to CFLib. When I was done, I found EasySocket, which was submitted a week ago and is almost exactly what I wrote! If only I had searched CFLib for "socket" before writing my own UDF. How disappointing...
Wednesday, September 9, 2009
ListToQuery: My first CFLib submission
Posted by
Russ
at
9:18 PM
0
comments
Labels: coldfusion, functions, open-source
Monday, August 31, 2009
An object-database for Coldfusion
I've been working on an OODB (object-database) for Coldfusion! It uses CouchDB as the data-storage engine and it is Railo compatible. As far as I know, there is no OODB for Coldfusion yet, so this is fairly cutting-edge.
So far I've got the basic CRUD working, and it is WAY cool. Instead of data-mapping by hand or even using CF 9's fancy new ORM (object-relational mapping), you just make your object and go like so:
OODB.save(myObject, 'myObjID');
How simple is that?! When you want to populate an object with saved data, you go like so:
OODB.load(myObject, 'myObjID');
This has the potential to save vast amounts of development time by allowing developers to focus almost entirely on object behavior instead of data-mapping. I think OODB will be really useful for projects that have relatively small data storage needs (blogs, wikis, etc). SQL will probably remain the best choice for large datasets though.
The next big thing I need to do for this project is to make an OODB method to get lists of object IDs based on the data within them. Until then, this code is more cool than it is useful.
If you'd like to check it out, download CouchDB for Coldfusion. You'll find the OODB files in the OODB directory. Don't forget to install CouchDB first! You'll also need to modify document.cfc to get it working.
WARNING: I don't recommend this for real-world use yet: this is beta code running on beta software.
Follow me on Twitter if you'd like to stay up to date on the latest developments.
Special thanks to Mingo Hagen and Sean Corfield for their continued input and support.
Posted by
Russ
at
5:26 PM
2
comments
Labels: coldfusion, couchdb, oodb
Saturday, August 1, 2009
My first "single-serving site"
Last night, I made my first "single-serving site": www.PleaseClickOnThisAdThankYou.com.
It has 3 parts:
1. A page title in large helvetica font
2. A Google Adsense Ad
3. A "Share" button from addThis.com
The domain cost me $8.99 and I found free hosting through 110mb.com/ (it's ad-free too!)
A single-serving site generally has these qualities:
- A descriptive domain name
- Only one main page
- One purpose (or no purpose?)
- Large helvetica font
Single-serving sites seem to be a growing and evolving phenomenon, and I like the idea of simple, "viral" sites. I first heard about it from a tweet about cfelse.com. If you'd like to build your own, Wired Magazine's interactive flow-chart is a great place to start.
Posted by
Russ
at
12:18 AM
4
comments
Saturday, July 11, 2009
CouchDB for Coldfusion
Download the project here: CouchDB for Coldfusion on RIAForge
A recent Twitter by Mingo Hagen inspired me to start my first open-source project on RIAForge: CouchDB for Coldfusion. This project is basically a CFC wrapper for CouchDB operations.
CouchDB is a fairly new concept. It is a document-oriented database that uses a RESTful HTTP/JSON API for interactions. You should read more about it yourself, but here are just a few reasons why it is cool:
* Schema-free storage
* Data is stored as JSON
* All document revisions are saved
* You can interact with the DB directly through the browser via the built-in API
* Built-in web-based admin
CouchDB for Coldfusion is still in the early stages, but already I find it is an easy way to interact with CouchDB. I'll be using this project as a way to learn more about CouchDB. If you'd like to contribute please let me know and I'll give you SVN access.
Posted by
Russ
at
10:24 PM
10
comments