Archives

You are currently viewing archive for March 2006

29 March 2006

Database Classes 0.2

Today we took CFDatabaseBase to a new level. We added support for sqlite 3.3.4 and MySQL 5.0. We plan to add support for a lot more databases such as postgreSQL, Oracle and a lot more...

Stay tuned.

Plugin available below.

Download CFDatabasePlugin 0.2

28 March 2006

REALbasic Database Classes

Everyone has played around with the database classes built-in to REALbasic and most of us have complained. Don't take me wrong, they do the job and they do it well, but I think we're in need of a new Database API. Easier to use and better integrated into RB.

With that said, we have started work on a new Database API. We've got the base class down (CFDatabaseBase) and we've also started work on a subclass to be used with MySQL (CFMySQL).

Here are some of the cool things about this new API:

- Very easy to subclass and implement for other databases (in plugins or rb).
- Uses delegates instead of events (More about this in the download).
- Has a built in threaded and non threaded querying system.
- No RecordSet or DatabaseField. We use db.ResultCount and db.ResultAtIndex.
- Tuples are returned as dictionaries of Column/Value.
- lot's more...

Take it for a spin and tell us what you think.

Plugin available below.

Download CFDatabasePlugin 0.1 (804KB)

14 March 2006

Spotlight's NSMetaDataQuery

Do you ever try to use an API from any particular programming language and after a while you just give up because it just does not seem to work? Well i recently ran into something similar with the Cocoa NSMetadataQuery class.

DTMetaData Cocoa Classes

I was playing around with Cocoa Spotlight classes and i started trying to use the setPredicate: message. The documentation on Apples website says we can use the same kind of query string as we when using a MDQueryRef, but it just didn't seem to work. After messing around for an hour, i finally decided to post a question to the cocoa-dev mailling list. The responses i got were pretty much what i expected - NSMetaDataQuery still has a few bugs and the NSPredicate passed to it does not get parsed correctly on all occasions.

With that said, I set out to write my own Spotlight query classes. It took about a half hour and they just feel like a bit more love and care went into them then Apple's.

Source code available below.

Download DTMetaData classes (5KB)