07 April 2006

PostgreSQL and Oracle...

I've been working on updating the CFDatabaseBase classes. My main concern this week was getting Postgre and Oracle up and running.

More after the jump...

» read more

05 April 2006

Delegates take 0.2

Quicky. We added windows support to the CFDelegate plugin. Download away.

Download CFDelegatePlugin 0.2

02 April 2006

Delegates in REALbasic

Since discovering Cocoa a while back, i've always wanted to be able to implement a delegate system within rb's limited event system without using Class Interfaces.

A delegate is a really simple concept. A delegate is an object that implements events for another object. Take the Socket class for example. Instead of always receiving the 'PageReceived' event within a subclass or whatnot, you could set a delegate on your socket object, and have that object implement the 'PageReceived' event. What's great about delegates is that they don't need to implement every event. They can choose which ones to fill. When the object that wants to call into a delegate tries to call it, it can check if the delegate implements the event. If it does, it just goes ahead and calls into it, if it does not implement the event, then it can just do something else.

I'll be glad to help anyone who wants more info about delegates. You can download the plugin below.

Download CFDelegatePlugin 0.1

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)