Aug 03
I had the pleasure of going to my second Red Rocks concert of the summer. John Mayer was the first and he was great.
Yesterday was BareNaked Ladies (with Alanis opening). These guys put on such an amazing show. They don’t just come out and sing the songs as you hear them at home. They have fun with the lyrics, meld into a totally different song (e.g. the song from Deliverance, a song by RUSH, etc).
And then they do synchronized swimming-esque dancing with shopping carts.
Now THAT is entertainment.
Aug 03
You know the feeling when you open up some code from a fellow programmer, and it says a lot about them?
Their code style speaks to you as does the style of an essay does.
My latest experience is looking at various Groovy code snippets. There have been two extremes that I have come across:
I like my Java, just with a twist
These folks are happy in Java land, and the code looks just like it. There are just a few things differing. Maybe the odd ‘;’ is left off of the statements. Here and there variables aren’t staticly typed. But, mainly, it looks like Java
I want to be different
Some of the guys who have really bitten into Groovy really try hard to have their code NOT look anything like Java. Everything is groovy-fied to the extreme.
This reminds me of some days when I was deep in the Perl community. Since the language gives you 55 ways to do something, you see even more contrasting styles. In that environment you could find the hacker, the one liner, the I have a Comp Sci degree so I code correctly!, the obfuscator, and more.
Fun :)
Aug 03
It was really cool to see Slava Imeshev’s Unofficial WebLogic FAQ.
Hopefully it will fill up more and more, and maybe edocs.bea.com will work with you Slava ;)
Aug 02
Erik Hatcher finally had some time to grok AOP and AspectJ. He got quickly up to speed (as he normally does) and saw a use for it right away.
The one feature that has bothered me about Tapestry is its difference with what happens when validation fails compared to Struts. When validation fails, the listener method is still called in Tapestry, and this requires a bit of code to handle it *in every single listener method*. While I’m still on the fence on whether Tapestry should itself avoid calling a form listener method when validation fails, in the apps I build it is always the case. AspectJ came to my rescue. I created this aspect…
public aspect ValidationAspect {
void around(BasePage page) : execution(void
Home+.listener(IRequestCycle)) && this(page) {
ValidationDelegate delegate = (ValidationDelegate) page.getBeans().getBean("delegate");
System.out.println("aspected: " + delegate);
if (!delegate.getHasErrors()) {
proceed(page);
}
}
}
That piece of code looks for anything that implements Home base class / interface (Home+).
It would be nice to make this generic for anyone using Tapestry as Erik has said, so that it would only be called on org.apache.tapestry.form.Form listeners (via a cflow()).
Nicely done Erik :)
Aug 02
Here we have another one in the “get me away from angle brackets” category.
Kris Thompson pointed to the Nice clean, dynamic MVC framework: NanoWeb.
NanoWeb is a simple and powerful dynamic MVC framework based on Java servlet technology,Groovy and NanoContainer. NanoWeb borrows many ideas from WebWork and Struts, most importantly the concepts of actions and views. Its main difference from these frameworks is that it is 100% dynamic and requires no configuration beyond mapping of to servlets in web.xml
Pelle Braendgaard wrote a nice introduction to NanoWeb, in which he walks you through a simple application.
I liked his quote after writing the Groovy action:
I am no Groovy expert. As a matter of fact this was my first attempt at groovy and I have no idea what I
Aug 02
Windows search is painfully slow for me. It always has been, and I find myself manually trying to guess where things are in a subdirectory to narrow it down.
Even with indexing turned on it is slow. I wonder if they will take the Lookout technology (which uses Lucene.NET) and either:
a) Allow you to index your file system (schedule it, on demand)
b) Have built in support. If you create a new file, Windows adds the metadata into the index. If you update a file, delete a file, etc etc
Please? :)
Aug 02
The folks at Sandcast Software have kindly started a set of Tapestry Tutorials.
The first one done, that you can download now, walks over a simple CRUD app in Tapestry, and then it gets more and more fun from there:
Enhancing our application using Hibernate (pt. 2) – In this tutorial we will walk through integrating Hibernate with our existing CRUD listing.
Available 08/13/04
Enhancing our application using Spring (pt. 3) – In this tutorial we will walk through integrating the Spring framework with Hibernate and other beans that we have created with our existing application.
Enhancing our application using HiveMind (pt. 4) – In this tutorial we will walk through the same steps that we did with the Spring framework to highlight the differences between Spring and HiveMind.
Enhancing our listing with a paging component (pt. 5) – In this tutorial we again turn our eye towards the interface by implementing a paging component that allows the user to more easily navigate multiple results.
Enhancing our listing with a search component powered by Lucene (pt. 6) – In this tutorial we add a Lucene-based search component to our listing page to aid in user navigation.
Enhancing our listing with a sorting component using contrib:table (pt. 7) – In this tutorial we investigate one of the contributed components contrib.:table and how we can use it to sort our listing on specific columns.
Enhancing our listing with hot-links (alphabetical jump-links) (pt. 8) – In this tutorial we investigate how to implement alphabetical jump-links for our listing. Basically this would allow users to click on a letter and go to a page with only those items beginning with that letter to be shown. We will be using Lucene and a custom component to achieve this.
Creating a new listing using the contrib:tree component (pt. 9) – In this tutorial we investigate another type of listing, the tree listing and how we can achieve it using the contrib:tree component.
Thanks!