Thursday, July 12, 2007

Keyboard shortcut for grails external tool in Eclipse


Somehow I think this should have been much easier to do. Since it didn't seem to be I am placing it here.

Using Grails in Eclipse (IDE integration information here), I wanted to make a shortcut for the external tools command which is used so much in this set up.

To do this you need to go to preferences (under the window menu), and select Keys -> Modify (Tab) -> Run/Debug (Category pull down) -> Run Last Launched External Tool (Name pull down) then assign the key in the key sequence and be sure to click the "Add" button.

Once all that is done you have a keyboard shortcut for the external tool.

(Please.. I'd like to see netbeans and grails integration)

Tuesday, June 26, 2007

Perm gen size and Grails

I've been continuing to work with the Grails framework and found an interesting issue. When working with the Tomcat application server I run into several issues related to out of memory errors with Grails applications.

Attempts to resolve this with -Xmx512m or some other setting for the memory heap size failed to work. This seems to be due to the large number of elements (controllers, domains, etc) in my grails app that load classes. I believe this is related to issues of lots of use of reflection (not sure). It does appear that this memory is alive during the entire life of the application (not garbage collected). After installing several plug-ins and increasing the size of the application quite a bit this occurred. It also seems to be partly related to the creation of an additional "Context Path" for an application in Tomcat.

I found some reference to Tomcat 6 having better "perm size" management on the net vs Tomcat 5 series. Though nothing of a definitive nature. I saw it seems related since it removing the extra "Context Path" for this grails application seemed to resolve things. Perhaps it is an issue with grails applications in multiple Context Path's but the perm gen size increase did resolve it cleanly.

My current options line for catalina.sh:
JAVA_OPTS='-Xmx512m -XX:MaxPermSize=256m -server -Djava.awt.headless=true'

Friday, May 18, 2007

CBS bought me (well, last.fm)

So I didn't want this blog to become abandoned, and in fact I have several items throughout the last weeks that I have felt worthy of blogging about and have not. I think I just need to discipline myself to post my thoughts when I have them and not "I'll do that later".

But yesterday when I heard CBS bought last.fm (and being a last.fm user) it got me to thinking and motivated to post this thought. I have just been bought... along with my data. Will CBS keep it, take it, toss it out? Indeed if you look around I have relationships with Google, Amazon, Last.fm, Digg and other sites. All this data is valuable to me and what might happen to it in a merger, take-over, bankruptcy?

Do we need a Federal DATA Insurance Corp.
I had this thought a few weeks ago when talking to Josh, regarding my use of Amazon S3 to backup my data. I was looking at various on-line data backup sites. There are many and for my small amount several I could get free (add supported). However, I liked the Amazon S3 due to it's use of services and quite frankly the size and apparent strength of Amazon.

We began talking about the amount of data a person has on the net. I have data I would call valuable with Google (mail, RSS, this blog and a bit more), Amazon (data via S3) and Yahoo (they own del.icio.us now).

However, if any of these were to go away what would happen to my data? Gone? It got me to thinking about the Federal Deposit Insurance Corp. Established to provide some assurance that money (or at least some) would be safe.

Though the analogy is obviously not one to one it does make me wonder if there isn't some general consumer SLA that needs to be established with on-line data "deposit" sites. A Federal DATA Insurance Corp. to provide the public with some level of trust, confidence that data stored on-line in places like Flicker, MySpace, S3, Google, etc are retrievable when/if a company goes south.

Sunday, March 04, 2007

IDE for jRuby

I went looking for the current state of IDE's for Ruby and in particular Ruby on Rails. In fact even more specifically for jRuby since I am not very interested in Ruby or ROR unless it is hosted on the JVM.

I found RadRails and RDT. Both of these are based on the Eclipse IDE platform. The former apparently based on the later. I installed and attempted to use both with jRuby. I had little success in this effort and from what I can gather jRuby support is yet to come for these packages.

I grabbed one of the Netbeans 6 nightly builds and was presently surprised to find jRuby there. A little more searching reveled this site which has done a far further exhaustive review of various Ruby IDE's than I have seen so far. Tor Norbye's blog section on Ruby also provides news straight from the source on this effort.

Thursday, March 01, 2007

February Errata

So it has been some time since I made a post. Been busy but I hope to manage my time better in future so that I can post my thoughts more often. The main reason I do this is to benefit myself in terms of aligning what I see and experience in the community into a coherent philosophy.

I wanted to touch on several things in the last few weeks I have been interested in. Actually sitting down and writing this was sparked by this news item (Adobe to take Photoshop online at Cnet) that caught my eye in my RSS feeds.

It caught my eye due to a discussion I had with Josh, where we debated a bit this very concept. Word processing and excell spread sheets aside it seemed unlikely that the on-line application model as exemplified by Google docs would work for something like GIMP or Photoshop. It is interesting to look at this in light of things like Joyent though. Correl is looking to take a variation of Word Perfect into a model that uses both on-line and off-line elements in collaboration with Joyent. This mix of on-line and off-line aspects to an application is very interesting to me. It is all part of the development that is taking place where API's like XUL, XAML etc are getting attention in the same context as GTK and QT. However, how much application API's matter is up to debate. Is it only the movement and management of information in an open and extensible manner that really is important?

One element of that did catch my eye was Remix which uses Flex. This is more interesting to me as it brings up the issue of rich client development. I have been watching XUL, XAML (Windows Presentation Foundation) and things like FLEX and Laszlo for some time now. Mix in things like the rich client platforms from Eclipse and Netbeans and you have the making of new "internet aware application API's" forming. This would be great. GTK, QT, Cocca etc. aside what is more interesting to me is the ability to make "application" that come to the user over the net.

Grails Update
Grails has a new major number out and a major shift in the way it deals with incorporating third party features. A very nice plug in approach. The jump from .3 to .4 was a bit painful as you have to un-weave the code you have done in the old approach for the new. I updated an Acegi security based application from .3 to .4. The biggest pain is removing the controller, domain, and other classes that were required prior to the plugin approach. Though this was a bit tedious it is well worth it for the nice new plugin based system. Hopefully such a major effort will not be required in the future. I suspect the Acegi package is one of the bigger ones to migrate.

Seems they also changed the way to they do the creation of URL's and several of my relative links got broken. I should be using more of the Grails link tag (http://grails.org/Tag+-+link) more than using relative URL linking.

This blog visualization is cool
This is neat.. http://twingly.se/ScreenSaver.aspx useful? Not so sure, but for sure neat. If I ran windows I would likely install it and play with it some.

Yahoo Pipes
Yahoo Pipes came out, this one one of those things I was interested in blogging about. I even retrieved/reactivated my Yahoo account just to play with this. While I found it very interesting, I can not say I found it highly useful. This idea implemented as an API I could embed in my app server, that would be far more interesting.

There are several other packages like this out there too. xFruits and even www.yourminis.com.

Don't get me wrong, the idea behind Pipes is very much along the route I would like to see things going. Mechanisms to collect, relate and cross reference data generated on the net. I'd just rather have it as an API for my applications rather than a third party service provide to/for me.

Get things done
I was only tangentially aware of the GTD approach. The book has spawned several packages on-line and I reviewed a few of them listed in the post at Center Networks. One, Tracks, caught my eye and I actually installed and got ruby working (which can be a pain with regard to DB access at times). (rant) The Ruby on Rails database API and interface is archaic in comparison to Java JDBC let alone persistence aspects (/rant)

I got it set up and working and played around with it some. It took a while to get this done due to the poor, IMHO, ruby database approach. Anyway, Tracks is interesting, but I think I was more interested in the experience it gave me with Ruby on Rails than anything else. I may try and play with it some more in the future though and revisit it as a utility and approach to time management. On a side note the Joyent package mentioned above is a Ruby on Rails application. The note some interesting news coming from them based on the collaboration with Sun. One might speculate on them switching to jRuby in the near future. jRuby plus the Java VM could be a very powerful combination for an application like this. I am still a Grails person until jRuby evolves more. When it does I will give it a try again.

Saturday, January 27, 2007

XML UI's revisted (XAML, XUL and AJAX)

Back in October I made a post about WPF and my concerns around it. Now the European Committee for Interoperable Systems (ECIS), has raised similar concerns. To be fair some of the points raised by the people at the respectable Ars Technica site are valid on this point. Their article on this development raises many issues that indicate XAML (WPF) is not quite a full scale attack on standards (not yet anyway). A review of WPF at Wikipedia.

This was interesting news for me to wake up to since I have been thinking about XML based GUI's lately in relation to the Grails development I have been doing. Grails recently added OpenLaszlo as a build option for interfaces. (Ref: http://grails.codehaus.org/OpenLaszlo+plugin)

The combination of XHTML and JavaSript to make user interfaces via AJAX that one can embedd into XHTML is currently all the rage. One can contrast this with XUL as yet another plus JavasScriptUI toolset. The process of embedding XUL UI's into XHTML might not be so clear to me at this time. Though perhaps XHTML in XUL is more likely anyway. I need to investigate this and also how CDF might play into this. Blending AJAX and XUL approaches might be an interesting gadonkin.

In the same manner that the grails generate-views command can be used to make XHTML interfaces the grails generate-laszlo is used to scaffold artifacts for Laszlo. So why not a grails generate-xul command? Indeed, as the Ars article points out it is hard to imagine anything that could compete with the ubiquitous presence of HTML. However, for web applications the ability to auto generate different UI's (XHTML, XUL, OpenLaszlo, etc) has some appeal. If this is done automatically from the domain classes with common class extensions to a set of scaffold'ed artifacts then a developer can simply worry about the application and the elements a UI needs and leave the final implementation of the UI up to the user. If the user wants XUL, then give that, if the user wants OpenLaszlo then give that. This might have more appeal yet as the web moves toward things like the iPhone, or the OpenMoko.

Also of note in that regard is the development of things like Wazaabi which brings XUL to the Eclipse RPC environment which can be used develop rich client applications. A friend of mine has used Eclipse RPC in his efforts related to work in Antarctica. :)

In conclusion I believe that the generation of richer UI's delivered across the web to browsers or brokered out to supporting apps by browsers is a developing trend. I'm interested to see how the Grails application framework could be used to generate XUL interfaces that are used from within Mozilla based browsers like Firefox. Combine this with the Mircoformats based semantics I have written previously about and I start to see a component framework built around Web standards and protocols. I need to build an example of some of this to truly investigate it.

Sunday, January 14, 2007

Microformats

I was interested to see some news items that on the surface don't seem related but to me have a lot to say about trends.

Mozilla has started talking about Firefox 3 (http://www.readwriteweb.com/archives/mozilla_does_microformats_firefox3.php) and in particular has mentioned microformats and a broader role for the browser as broker of information and service on the net to other applications. As a long time UNIX person I believe in the vision of small dedicated programs that do what they are meant to do and do it well tied together via piping. So the idea of data described by microformats, discovered or retrieved by broker and routed (piped) to other more dedicated applications has appeal to me.

Also of note was Songbird talking about plans for an API for site developers. I hope this evolves into a microformat or RDFa that allows a music centric site developer to place data directly into their web page that allows browsers like Songbird or even machine searching and indexing of music by the likes of Google or Singing Fish to use structured data from within a page or site.

This could get very exciting with things like Apple TV and The Venice Project (which is also using Mozilla technology) coming up and extending this possibility into video. With browsers getting more extensible and smarter about how they can handle structured data site developers will actually be able to see a reason (ie benefit) to doing something (anything) with metadata. Which to this point has has little to no use or benefit (IMHO).