Compound Theory

v2.0

Categories

  1. Transfer
  2. ColdFusion
  3. JRuby
  4. Java
  5. ColdSpring
  6. Squabble
  7. JavaLoader
  8. ColdDoc
  9. 2ddu
  10. AsyncHTTP
  11. OO Analysis and Design
  12. Flex
  13. Railo
  14. XML / XSL
  15. Hibernate
  16. ColdFusion Builder
  17. Fall
  18. Ubuntu
  19. XHTML / CSS
  20. Eclipse
  21. Git
  22. Oracle Database
  23. Usability / UI Design
  24. webDU
  25. cf.Objective()
  26. LWJGL
  27. cf.Objective(ANZ)
  28. Captcha
  29. MAX
  30. Melbourne CFUG
  31. Martial Arts
  32. Random Things
  33. Conduit

Recent Posts

Projects

Recent Comments

26 July 2006 05:29 PM 2 Comments

Need New CFUG Melbourne Venue

Unfortunately after years of service, the current venue for the Melbourne ColdFusion user group venue is no longer available to us.

If anyone knows a venue in Melbourne that is happy to have some geeks once a month doing presentations on ColdFusion and other related Adobe technologies, please shoot an email to:

Steve AT cfcentral DOT com DOT au

Or you can contact me directly , and I will pass it onto Steve.

Failing any of that, if you are interested in attending the Melbourne CFUG, please stay tuned to the CFAUSSIE mailing list , as announcements will be made to where we will eventually end up.

Please do note, it is really important we find somewhere.  There are some great presentations lined up for the next few months, including Flex development and ColdFusion / Java integration, and without a venue none of this will happen.

User groups are an important part of what keep ColdFusion alive and strong, so any and all suggestions are more than appreciated.
19 July 2006 10:33 AM 6 Comments

AsyncHTTP - Asynchronous HTTP Requests

I don't know how many times I've gone looking to do asynchronous processing in ColdFusion, and come up against the myriad of hacks, workarounds and that general feeling that I want to poke my eyes out with a rusty spoon.

Now that JavaLoader exists, integrating Java with ColdFusion becomes so ridiculously easy, it would have been relative heresy if I hadn't sat down for an afternoon and wrote a library for making asynchronous HTTP GET and POST requests.

To use the asyncHTTP library , you simply have to drop /asyncHTTP/ the folder in your web root, or create a mapping to it.

From here we create an instance of the AsyncHTTP.cfc:

asyncHTTP = createObject("component", "asyncHTTP.AsyncHTTP").init();

Now that we have an instance of the AsynHTTP CFC, to do an asynchronous GET request, we simply call:

asyncHTTP.get("http://www.site.com/mytemplate.cfm?var=value");

If we want to pass form data across, we can also do an asynchronous POST request, like so:

formData = StructNew();
formData.var = "value";
asyncHTTP.post("http://www.site.com/anothertemplate.cfm", formData);


That is it! It is as simple as that.

Please download the library, give is a spin, and any questions, feedback, bugs or general comments, please either reply to this blog post, or shoot me an email .

03 July 2006 04:20 PM 6 Comments

Primary Key Control with Transfer (Transfer Tutorial Part 2)

Previously we looked at doing basic CRUD operations in Transfer, and I was going to look at some of the composition options that are available, but I decided we would look at primary keys instead first.

Primary keys are an integral part of almost any database driven application, and consequently are an integral part of Transfer as well.

When a Business Object is inserted into the database, a primary key value will need to be supplied, either by the database generating the unique value, or by code generating the unique value.
 
A Business Object will need to know the value of its primary key, so that it knows what record it is representing.

Transfer will handle this process for you, and how it does that is configured through the <id> element that is found within the Transfer configuration file .

There are three different ways that Transfer does this:

Retrieves Database Generated Primary Keys

By default, Transfer will attempt to retrieve numeric keys that are generated by the database.  Understandably, this happens differently for each supported database -

Transfer can Generate Primary Keys

Transfer can also generate primary key values for you.  There are three different types of primary keys that it can generate -


Manually Override Transfer

Last, but not least, you are able to manually override Transfer's primary key controls to insert a record with a primary key value of your choosing.

A Business Object generated by Transfer will have a set() method for its primary key.  If this value is set before the Object is inserted into the database, Transfer will attempt to insert it using this value.

For example,
<cfscript>
    post = transfer.new("post.Post");
    post.setIDPost("george");

    transfer.save(post);
</cfscript>


This will attempt to insert the Post with the primary key value of "george".

With these three options, you should have all the control you need to manage primary keys within the database.

More details on Transfer can be found here .