Tuesday, January 30, 2007

Transfer ORM

ORM stands for object relational Mapping. I am not sure I understand everything it does yet but I do know that it automatically creates CRUD DAO objects. I use to spend hours writing beans, DAO's and gateways. Well, Transfer does the beans and DAO's automatically and even some of the simple gateway queries.

Previously I had been using http://rooibos.maestropublishing.com/ to generate beans and then I would cut and past generic DAO code for the CRUD methods. CRUD stands for Create-Read-Update-Delete. The standard things you do to an "object" or row in a database.

Setup is probably the most difficult, as anything else, especially the first time you attempt it. In Transfer you have to download the open source code from: http://www.compoundtheory.com/?action=transfer.download or you can get the latest BER (Bleeding Edge Release) via SVN at http://svn.riaforge.org/transfer .

You place this code in your root directory. You will then have a "transfer" directory under web root.

you need to initialise the transfer object, which I did for my test in my application.cfc file. You can just do it on a page if you want. You can get further instructions here: http://www.compoundtheory.com/?action=displayPost&ID=112. This page also offers examples of using Transfer for the basic CRUD operations.

Once you define your datasource and your table in datasource.xml and transfer.xml. It is this easy to get a row from the database:

transfer.get("user.user", userid).

Want a query of all users:

transfert.list("user.user")

It took me about as much time to figure out how to use the basics of transfer as it would have to generate all the DAO, Bean and simple Gateway methods for 1, maybe 2 projects, but now I can save my self tons of time not having to create those anymore.

I am amazed at the creators of such "frameworks" as transfer. They are wicked smart and provide a real value to me. Thanks to Mark Mandel and any others who devote their time and smarts.

Wednesday, January 17, 2007

Invalid Color Space error in Acrobat Reader

Had a user that was getting this error when trying to read an acrobat attachment that I sent her:
 
"Invalid Color Space"
 
This prevented her from seeing some of the images I had put in the document.
 
http://www.abcteach.com/help_topic.php?id=134 mentioned that this error would be resolved by upgrading your acrobat.

Tuesday, January 09, 2007

Google Apps for Your Domain

You can host your email for free using google Apps for your domain. This is awesome. You set up an account, point your MX DNS record for your domain as per the instructions and wallah! Google handles all your email for you and your users.

I set up one of my domains to use it and it works great. It did take one of my networks 3 days to get the dns changes but when it kicked in it worked just as I hoped. Check out the benefits:

Google Apps for your Domain

The have a few other things than just email, and I am sure they will add more.

There are a couple of downsides to this. Your email is hosted outside your company. I currently don't have a way to connect to gmail using CFMAIL.

The upsides are huge though. They take care of software, bandwidth, spam filtering, administering etc.. Lots of reasons to take advantage of this.

Friday, January 05, 2007

156 Useful Run Commands.

Interesting article about run command you can issue in windows. As it states, most are available via the GUI interface of windows, but there are some nifty ones that you may find usefull.

http://www.fixmyxp.com/content/view/20/42/
I have been using subversion for a few months now and I love it. It has been my first real run at source code control. I installed subversion locally on my development machine. This was a little difficult but I haven't had a moments problem with it since I installed it. The one drawback is accessing the code repository from remote locations. And there is also the matter of backing up and updating.

Several times I have thought about finding a subversion host online, but the meager attempts I made were not succesfull. But I came across one a few days ago and took the plunge. It was a peice of cake. For testing I started a new project. I just sent support and email about importing the existing project I had. Everything is the same. Only know I don't have to worry about backups of my code and updates of the subversion software. And best of all I can access the code from my latpop at home or wherever. It is $15.00 a month. I price I feel is fair. I had I small issue I sent to tech support and the resonded very quickly

So far so good. The site:

http://www.wush.net/
A site I came across when looking for ftp hosting. Looks like the offer other stuff too and great prices and functionality.

http://www.siteground.com
Here is a great link that explains mapping network drives when a user logs in to small business server.

http://msmvps.com/blogs/kwsupport/archive/2004/11/03/17830.aspx

Tuesday, January 02, 2007

We have some fields that we want to default to a certain value in Platypus. The main one is the suppress receipts filed. A while back, platypus support sent a script to make this work. It never did. Turns out they had a slight error in the script. The sent me the corrected script last week:

insert into options (name, value, descriptio, category) values ('Default Suppress Receipt','Y','The default Suppress Receipts option for new customers.','Customer Defaults')

This worked, but not until I deleted to old incorrect value out of the options table. I also restarted platypus. One of those two things made it work.

This gave me the idea for another field also. On my own I did the following:

insert into options (name, value, descriptio, category) values ('Default Suppress Statements','I','The default Suppress Statements option for new customers.','Customer Defaults')

This now enters the correct default value for the Suppress Statements field. I am not positive how it works, but it appears that you can add a row to the options table to cause default values. Just have to use the word "Default" in front of the actual field name. Should work for any field, at least on the general tab.