David Harris's Technology Blog

ColdFusion, Flex, and other stuff...   (and 341,536 hours, 31 mins in to my plan for global domination)

Search:

Calendar:

Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Subscribe:

Enter your email address to subscribe to this blog.

Archives By Subject:

Tags:

action script adobe air ajax cfug coldfusion flash flex frameworks free software fxug general jpgmetadatareader mac off topic opensource papervision spry

Recent Entries:

No recent entries.

Top Posts:

Recent Comments:

Top Commenters:

My Links:

RSS:


Transfer: Something I like about it.

I've been looking in to Mark Mandel's Transfer bit since he presented to the http://www.cfug.org.nz end of last year.

One thing (of the many things) I like about it is the XML config file.

Why do I like it?

2 reasons.

1. The fact you can introduce some form of package.class hierarchy to the Database, so flat database's can be organized better EG:

<transfer>
<objectDefinitions>
<package name="mypackage">
<object name="myclass" table="mytable" >
<id name="id" type="UUID" />
<property name="my property" type="string" />
...etc...
So this means I call my "myclass" like this:
transfer.getTransfer().new("mypackage.myclass");

2. The second reason is: I CAN COMMENT THE XML! Why is this good? I'm sure we have all returned to database tables with a few to many columns and tried to would out what "status" column and "anotherStatus" column actually relates to in the business logic of the application. This process involves digging through code and random comments. With the XML config of transfer, a simple comment on the property can explain it so the next person who needs to work with it knows where look to find out what the class (db table) is for and what purpose the property servers.

Hopefully I'll find the time to blog some examples on Transfer later.

EG: Event model and decorators

Transfer 1.0 ORM is released!

Just noticed this on a mailing list:

Transfer 1.0 Release Candidate - Out Now!

Well done Mark!

Mark presented to the NZCFUG last year on TransferORM.

I'll be downloading Transfer 1.0 soon to have take it for a spin!

A couple of Flex Podcasts

Today I listened to the ColdFusion Weekly podcast.

The topic was Flex Frameworks Roundtable

Peter and Matt got together the different "voices" of the Flex Frameworks out there and got them talking.

Speaking personally the saying, "If all you have is a hammer, then everything is a nail" rings true for my experience with frameworks. I tend to find once I get my head-space in a particular framework I find myself approaching all the problems I need to solve within that framework.

In ColdFusion, "Fusebox" was that framework for me for a while, and currently "Cairngorm" is the Flex one.

While it is not a bad thing to actually learn a tool/framework well, it's great to listen to well respected members of the various framework communities flesh out what problems their favorite framework is trying to solve, and how.

A couple of the things that stuck with me are:

- the less "boiler plate" code you have to write to add functionality to an Application, the better

- MVC is not a framework, but applications should be MVC, no matter what framework/approach you take [that's a *whole* other blog post I've been thinking about for a while now!]

At the end of the day, no matter what framework/style/approach you take, if you are going to create a non-trivial application, there is still a lot of work to do! Even if you use one of the plethora of code-gen tools out there, you will still have a lot of leg work!

Near the end of the podcast (64mins) there is some great talking about what these guys would like to see in Flex/Framework in the future.

Well done Matt and Peter for setting this up, and thank you!

I also listened to this one, which is great for a more in-depth on Cairngorm: www.theflexshow.com: Universal-Mind-Cairngorm-Extensions-w-Thomas-Burleson

Enjoy!

Free Mind Mapping tool - FreeMind

I am just sitting down to prepare for the next NZ CFUG meeting and am yet again finding myself downloading "FreeMind", a free mind mapping tool.

[Quote]FreeMind is a premier free mind-mapping software written in Java[/Quote]

I've used it a few times now and find it very useful to get my thoughts down, so thought I would mention it to you!

so, which one of you is doing a free AIR mind mapping tool? - or maybe I should...hmmm

CF Frameworks Explorer...WOW

It's Friday night, so what better to do after a hard week (of holiday) than watch some TV...CFEclipse TV that is.

I watched episode: "08 CF Frameworks Explorer Introduction", and _WOW_, that looks good!

One thing with a lot of frameworks is ye olde XML config files can get a bit on the large side, and having an IDE that knows about a framework, and tells you about the config file(s) is awesome!

The creators of frameworks must be very happy with Mark Drew! (hint hint) ;-)

CFEclipse - I think I am in love

Tonight at the Auckland CFUG, we had Mark Drew "Connect"ed in to show off CFEclipse.

I've been using CFEclipse now for over a year, and love it.

I REALLY like the easy of copying and moving code round.

But Mark opened my eyes to the REAL power of CFEclipse...

It was like I was driving a Porsche, and only using the first gear (may be reverse a bit to often too!), and he showed me the other gears...and the overdrive...and the warp drive...

I am looking forward to using the new found (well...shown...) powers tomorrow!

Also he mentioned that if he was doing this presentation in August, he would have a lot more to show! From what I gather, he will start showing off the new bits @ cfObjective.

The meeting was recorded. Mark's voice didn't travel so well (from London to New Zealand), with the sound dropping in and out a bit, but the video worked fine, so you can see what is going on OK.

So, if you have never looked @at using CFEclipse, I suggest you check out http://www.cfeclipse.org and have a look. You can't beat the price! It's FREE!

Once I get the URL for the recording I'll add it to this entry and the http://www.cfug.co.nz site, so check back later!
[edit]
The link for the recording is https://admin.adobe.acrobat.com/_a200985228/p56436186/
[/edit]

In the presentation he covers
- Installing Eclipse
- Installing CFEclipse
- Over view of features in CFEclipse

8 hours to Mark Drew on CFEclipse

in 8 hours (6pm NZ time) Mark Drew is going to present to the Auckland NZ CFUG group on...what else but...CFEclipse!

He will be coming in via Adobe Connect (and not in person this time!)

So, if you are up round 6pm NZ time, you are welcome to come along!

A useful site I find for TimeZones is http://www.timeanddate.com/worldclock/

PS: if you are attending (in person or remotely) from NZ, there will be a prize draw after the presentation!

My Flex2 Gallery - what it does, and what is next

Features:

- Preloads main images. You can see this by the Alpha of the Thumb nail. if you watch the thumbnails, they are slightly faded out to start with, and fade in. The fading in is indicative of the main image loading.

- XML is reading Exif/Iptc JPG meta data for the comments.

- The XML is an argument passed in, so you can have dynamic/static XML depending on your setup. (You'd need to use my CF XML to get the Meta-data functionality!)

- Main images loading is staggered, meaning it doesn't attempt to load all of them at the same time.

Plans:

- Stagger the thumbnail loading

- write self contained application using CF to manage the photos (if I do this, I will host the project @ www.riaforge.com)

- Learn PaperVision3D and use 3D to display thumbs and use 3D in transitions (lots of learning required to do this!)

Credits:

The gallery uses SimpleViewer XML format (with permission, thank you Felix!)
The reasons for this are:

- It's a good format. While is does have attributes i won't use, the format is easy to understand

- I use SimpleViewer, so means I can use the same underlying XML for either Gallery, which means if some one has options of 2 different galleries with the one XML format.

Reflection of thumbsnails use http://blog.wrench.com.au/2006/07/08/live-reflection-component-with-a-twist/

Introducing JpgMetadataReader.cfc V0.3

another update so soon you ask?

The main difference with this version is I removed the getter and setter functions for ITPC metadata and created the functions:

- getMetadataKeys( type ) - setMetadataKeys( type , keys )

Why did I do this?

Because every digital camera stores some type of it's own meta data. To get access to this you can call:

<cfset stMetaData   = oMetaData.getMetaDataStruct("C:\path\to\jpg\picture.jpg","FujiFilm Makernote")>
...no prizes for guessing the make of digital camera I have!...

So what you can do is set the default keys (to empty string) like this:

<cfset oMetaData.setMetadataKeys("FujiFilm Makernote","valueone,valuetwo,valuethree")>

That way you don't need to worry about lots of "structKeyExists" calls! :-)

Hope this makes sense, and any feed back will be welcomed!

Introducing JpgMetadataReader.cfc V0.2

Just when you think you are being clever, you find there is someone who has already been cleverer (is that a word?) than you!

I asked Mr Google about ColdFusion and EXIF and he told me about this: http://www.leavethatthingalone.com/blog/index.cfm/2006/5/16/Using-ColdFusion-to-Read-EXIF-Information-from-JPEGs

The same Java class was being used, but the really clever thing here is that you don't need to add that class to the lib dir/class paths in CF.

After reading this, and thinking how I plan to use my JpgMetadataReader.cfc, I have made to following changes:

- the init function now has the optional argument "JpegMetadataReader", which is "An instantiated object of com.drew.imaging.jpeg.JpegMetadataReader" (that's the hint) If you do not pass this in, it will attempt to create the java object, and if it is located in the lib/class path, you'll be fine :-)

- added the functions "getITPCKeys" and "setITPCKeys". These functions are used to define a comma delimited list of keys that MUST be returned in the result struct. The struct keys are inited with a value of "" (empty string) The default list is "Caption/Abstract,Keywords,Credit,Copyright Notice,Object Name" and is dirived from http://www.controlledvocabulary.com/imagedatabases/iptc_naa.html#IPTCchart

- added the optional argument "type" to "getMetaDataStruct". This will return only the type of meta data you specify. eg:

<cfset stMetaData   = oMetaData.getMetaDataStruct("c:\my\picture\here.jpg","exif")>
...will only return "exif" meta data. If this argument is not provided or is an empty string, any avalible meta data will be returned. If a non-existant type is provided, you will end up with a empty Struct.

So, enough info, now for some code:

<!---
...code here to create the java object...

eg:
MyJpegMetadataReaderJavaObject = loader.create("com.drew.imaging.jpeg.JpegMetadataReader");

...if you are using Mark Mandle's Java loader (http://javaloader.riaforge.org/)

--->


<cfset oMetaData   = createObject("component","org.harris.JpgMetadataReader").init(MyJpegMetadataReaderJavaObject)>

<cfset stMetaData   = oMetaData.getMetaDataStruct("c:\my\picture\here.jpg")>

<cfdump var="#stMetaData#">

The only difference here from the initial code snippet is that I have provided the Java class "com.drew.imaging.jpeg.JpegMetadataReader" in the variable "MyJpegMetadataReaderJavaObject"

What is really cool about the JavaLoader is that you can load ANY java class!

Enjoy!

The New TradeMe and TradeMe.cfc

The fine folks at Trademe.co.nz have just update their site...

and much to my surprise, my TradeMe.cfc still works just fine!

More Entries