Aptana moves to the server side

Posted At : January 23, 2008 4:33 AM | Posted By : Mark Drew
Related Categories: webdev, eclipse, ajax, apple

Those clever folks at Aptana famous for their IDE and Eclipse plugins for JavaScript/Ajax, HTML and CSS have released Jaxer, The Ajax Server:

...Jaxer changes all that. Jaxer is the world's first true Ajax server. HTML, JavaScript, and CSS are native to Jaxer, as are XMLHttpRequests, JSON, DOM scripting, etc. And as a server it offers access to databases, files, and networking, as well as logging, process management, scalability, security, integration APIs, and extensibility

You can get it as part of the IDE or download the standalone server, for Windows, Mac and Linux.

I dont find this surprising really, since Paul Colton, the CEO and founder is the man behind JRun!

Awesome stuff, and I hope to get some examples up to show you soon!

Using keyword substitution in Subversion

Posted At : January 11, 2008 9:54 AM | Posted By : Mark Drew
Related Categories: eclipse, subversion

When I previously used CVS, I was able to put in my code some keywords that I wanted to substitue, such as the checkin date, who had checked it in, which version it was etc.

I have had a hell of a time finding out how to do this in Subversion (SVN). Thanks to a link sent to me by Tom Chiverton, I managed to figure out how to do it via Eclipse.

First of, read the manual, especially the svn:keywords section.

So, lets say I want to put the following in my headers:

Author: $Author$
Date: $Date$
Revision: $Revision$

So in CFEclipse/Eclipse enter that in a file and check it in to your repository, nothing happens right?

No changes to the file happen, we must first set the properties for that file (or group of files):

1. Right click on your file and do Team -> Set Property

2. Select the "svn:keywords" property from the drop down

3. In the text area add (without the quotes) "Date Author Revision"

4. Check in the file and reload when it asks if you want to reload the file (since SVN has changed it)

TADDA!!!

Your file should look like this now:

Author: $Author: mark.drew $
Date: $Date: 2008-01-11 15:03:22 +0000 (Fri, 11 Jan 2008) $
Revision: $Revision: 2076 $

I hope that helps!

Sending complex objects through webservices using ColdFusion

Posted At : November 18, 2007 11:21 AM | Posted By : Mark Drew
Related Categories: coldfusion, eclipse, webservices

Title: Sending complex objects through webservices using ColdFusion

Using web servies with ColdFusion is pretty simple most of the time, you create a webservice object and then call the methods on that object, for example:

<cfset ws = CreateObject("webservice", "http://localhost/someservice/?wsdl")>
   <cfset aResults = ws.doSearch("find something")>

This is all fine and dandy if you have to pass a simple string or many other things, but what happens if, as I am having to do at the moment, you need to call a method that takes an object as a parameter? Sometimes, looking at the WSDL of the webserive isn't enough to tell you how to create an object to send to the webservice.

First of, a simple way of creating an object is with a struct, so if you had to send an parameter (lets say, SearchQueryTO) you can create it as follows:

searchQuery = StructNew();
   searchQuery.params = "find Something";
   searchQuery.resultCount = "10";
   //Do a search with the object...    results = ws.doSearch(searchQuery);

The searchQuery struct above now gets automagically translated into the SearchQuery object that the webservice requires, all fine so far, but recently I got stuck with trying to pass some data back to a webservice. The WSDL said that it was an array of SearchCriteriaTO's but no matter what I did (create Arrays etc) it wouldn't accept it.

In the ColdFusion server, all webservice calls generate java classes or "stubs" using a little Apache Axis library called wsdl2Java (imaginative eh), these stubbs are what you are actually calling from your code to connect to the webservice, since I didn't know EXACTLY what I had to call, you can do the following:

  • Zip up the stubbs for your service, they are held in /stubs/ and there will be a "WSxxxxxxx" folder where the x's are a number. Delete them all and make a call to your miscreant webservice to see the folder generated for the stubbs
  • In Eclipse, create a new Java Project, you wont be doing any actual java but it just will help so that you can import the zipped stub folder
  • Right click on the project, and select Java Build Path
  • Click on the Libraries tab and select "Add External Jars..." and select the zip that you created of your stubs and click ok
  • In your project you should now expand the "Referenced Libraries" node and you will see all the java classes that make up your webservice

The problem I had was that I didn't know, even from the WSDL, how I was meant to send the array of objects, well, in my webservice, it had generated a ArrayofSearchCriteriaTO class, which had a "searchCriteriaTO" property that was an array, therefore I had to first create the ArrayofSearchCriteriaTO and then put all the search criterias into the property:

//create the array that we will pass
   ArrayOfSearchCriteriaTO = StructNew();
   ArrayOfSearchCriteriaTO['searchCriteriaTO'] = ArrayNew(1);
   
   //create the objects that we will put into the array    sc = StructNew();
   sc['attributeName'] = "name";
   sc['stringValue'] = "some value";

You notice that I used the ['property'] to create the keys in the array, I did this to be sure that the keys would retain their case, of course this is not essential, but I was just trying to make sure that I was hitting the right properties (since java is case sensitive).

Missed CFEclipse at MAX?

Posted At : October 20, 2007 3:34 PM | Posted By : Mark Drew
Related Categories: coldfusion, eclipse, max, CFConferences, adobe, presentations

If you missed my CFEclipse presentation at Adobe MAX Barcelona, João Fernandes has been kind enough to post up a video of my whole presentation!

You can check it out here: http://www.onflexwithcf.org/index.cfm/2007/10/20/Using-Eclipse-for-ColdFusion-Development--Videos

I had some problems getting the debugger working, and I realised later that it was simply that I named my project wrong and should have set up the mappings.

Hope you enjoy it!

Eclipse, ColdFusion and Mark Drew, Synchronised?

Posted At : July 9, 2007 10:32 AM | Posted By : Mark Drew
Related Categories: coldfusion, eclipse, cfeclipse, adobe, personal

A little twitter message from Kev got me thinking about something totally unrelated really, but it might explain a few things.

Let me fill you in with a few facts first:

  • Eclipse just released version 3.3. Last year, at the same time, they released 3.2 and the year before that 3.1
  • Adobe's ColdFusion going to be 12 years old tomorrow (10th of July)
  • I am going to be 33 on the 11th of July

Take all these facts together and you start seeing a pattern! I share (nearly) a birthday with a technology I love. I work on CFEclipse which is built on the Eclipse platform, which releases a version for the last 3 years that matches my age, within two weeks of my birthday, hmm... this is real synchronicity at work here don't you think?

Anyway, Happy (Early) Birthday ColdFusion, may Adobe keep releasing great software for many years to come!

(just as a thought exercise, do you think they will release CF tomorrow???)

CFEclipse and Eclipse 3.3

Posted At : July 3, 2007 6:29 AM | Posted By : Mark Drew
Related Categories: coldfusion, eclipse, cfeclipse, presentations, cfunited

At CFUnited 2007, I did a couple of presentations showing CFEclipse, which at the end of the presentation I mentioned was actually running on Eclipse 3.3. Not bad going considering that Eclipse 3.3 was released on the day of my first presentation huh?

The issue now is getting everything REALLY working, I did a number of smoke tests and even did a whole presentation running Eclipse 3.3 but there are some things I want to tidy and other changes I want to make before I do a release (just doing a compatibility release seems a waste of time at the moment, considering the effort involved!)

So, what and when should you expect? Well, I am going to be checking in stuff this week, I only do checkins against an issue so I have to create the right ones (if they are not there). You should see more activity over at the CFEclipse Trac website. Also, if you are planning on adding a ticket to Trac, make sure there isnt one there already, I have spotted a few been adding about Eclipse 3.3 already, there is no need to add more!

I want to send out a big thank you to Dean Harmon as he did all the Eclipse 3.3 compatibility including the backwards compatibility stuff. Now, stop saying that Adobe does nothing to contribute!!!

So, there it is, a semi-official announcement... saying not much... but at least now you know.

What would you pay for? Should CFEclipse still be free?

Posted At : April 13, 2007 7:01 AM | Posted By : Mark Drew
Related Categories: coldfusion, eclipse, donations, cfeclipse

Before I start, don't worry, I am not going to charge for CFEclipse, but I have been thinking about the costs involved in making CFEclipse and trying to see how I can at least raise a small percentage of those.

To give you an idea of how many developer hours that go into CFEclipse, add up 2-3 man hours a day, every day, for about 6 years (I am using an average of number of developers that have been involved as well as frequency of coding), and lets say, they get paid a fair rate for a Java programmer (about ?40 an hour I think), thats about ?262,800 (thats about $516,402).

Sit back and take that in, Half a million dollars...

[More]

Getting to know FTP in CFEclipse

Posted At : March 22, 2007 6:37 AM | Posted By : Mark Drew
Related Categories: coldfusion, eclipse

Scott Stroz has posted a little write up on how to use FTP/SFTP in CFEclipse, I know I should have done this before, but alas time is tight!

Have a good read over at his blog

Watchmen: The Movie?!

Posted At : March 21, 2007 2:45 PM | Posted By : Mark Drew
Related Categories: eclipse, graphic novels

If anyone knows me, they will know I am into my Graphic Novels, I am a big fan of Garth Ennis' Preacher (loved that series!), Hell Blazer (ok ok, Constantine you Hollywoodized Harlots!) Frank Miller (going to see the 300 this weekend, and no Spartan can stop me!) and the truly awesome Alan Moore.

I just found out through the digg-vine that the director of the 300 will be making Watchmen! Check out the interview!.

This leaves me both excited and scared. All recent attempts at Moore's films have turned out parodies that have completely missed the point of the original novel, Johnny Depp's stupid Laandaan accent in From Hell and the complete parody that was The League of Extraordinary Gentlemen.

I can see why Frank Miller put a stop to any of that malarkey and only let Robert Rodriguez make Sin City by becoming a co-director of the film (and after Rodriguez made a short film to show Miller the potential).

Now, I recently re-read (for like the 10th time) Watchmen, and its an interesting story with many subtleties and issues that I hope don't get completely lost. If you were to flick through Watchemen the visual style (all these over the hill superheroes) is not something that would look that alluring on film, or at least, something that could be completely done wrong.

The back story of some of the characters really add to the story and that is what I think wont make it to the film, so I just hope that Zack Snyder will be able to translate such a big story.

On another note, they will be making Preacher as a TV Series! Well done! A nine book epic such as this cant be turned into 90 minute film, no way, no how bubba.

Of course, that is what they should be doing with World War Z, do it something like Band of Brothers format, but alas, looks like Brad Pitt is going for the easy money in a film version.

Interesting features of Eclipse 3.3

Posted At : March 14, 2007 1:15 PM | Posted By : Mark Drew
Related Categories: coldfusion, eclipse, flex, cfeclipse, Java

I know Eclipse 3.3 hasn't been released, yet, but I was looking at the latest stream build's notes on what is new and noteworthy and I found a few things that might be of interest to people that use CFEclipse and have had some bugs or issues with it.

Mozilla everywhere

Mozilla can now be used as the underlying browser control on Windows and OS X, providing that you have XULRunner installed and registered. To use this just create your Browser with the SWT.MOZILLA style.

This means we can set the default internal browser to use Mozilla, which means (if I am reading it correctly) we could include Firebug and Ray's ColdFire.

Open files with other editors

You can now open files with editors that are not registered for the specific file extension. Right-click on your file and select Open with > Other. You will be presented with a list of editors to choose from.

As it says, you can now choose what to edit those .tpl files (if you have made up a template extension) and quickly edit it in CFEclipse

Text drag and drop in text editors

It is now possible to drag and drop text to and from text editors

This has been a long time coming. Spike implemented the drag and drop stuff in CFEclipse which has caused some problems with some users, and its a pain to have to implement something that should be part of the framework! Finally!!! (I breathe a sigh of relief)

Configurable and extendable hyperlink detection

Clients can use the org.eclipse.ui.workbench.texteditor.hyperlinkDetectors extension point to add their own detectors and can enable their viewers using the corresponding methods in the source viewer configuration along with the org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTargets extension point

One of the nightmares of adding CFC introspection and linking is simply adding the (simple) hyperlink for the objects and telling it what to do. All the solutions I have been looking at so far look like hacks, so this is a much neater way of doing it! Great stuff!

Reading more into past Eclipse 3.3 (M4) releases, there are other things that will make some issues disappear from my little list too.

Show invisible whitespace characters

It is now possible to see the invisible whitespace characters in textual editors: Such as space, tab etc. I remember there was a bit of a conversation about this in the cfeclipse user list (did I mention it moved to google groups by the way?)

Spell checking in text editor

Spell checking is now also available in the text editor As it says on the tin!

There are many other improvements, some of which affect more plug-in and Java developers than the CF Community and that will definitely make my life easier! I just love it when a product starts getting better and better!

I am also thinking of dropping support for Eclipse 3.1 (as if I did a lot of support for it! I know, I know!) as soon as Eclipse 3.3 is released (which I think will be this summer). I know this will affect people using FlexBuilder standalone, but the easy work-around is to re-install it as a plug-in onto 3.2 so I hope it wont cause major issues.