Archive for January, 2008

Looking for an easier way to use Java and Flex?

Brian LeGros | January 20th, 2008 | programming  

Marcel Overkijk has taken advantage of the recent open sourcing of Flex to provide a plug-in for the Grails framework to expose AMF endpoints from your Grails application. The AMF end points are created via a service class in Grails. Grails, being built on Groovy, can very easily utilize any Java code, requires little work to configure, and can bundle a WAR for you with a single command. The plug-in looks really promising as does its road map which looks like it will have tools comparable to some of the other remoting packages available for Flex. This plug-in is built for use with BlazeDS, Adobe’s recent open sourcing of a subset of its LiveCycle Data Services product. Although I haven’t tried it yet (and its not recommended for production use), this is a great option to dumping a bunch of JARs into a shared Flex context or trying to setup your own BlazeDS server. Why not let Grails (and this plug-in) do the work for you? Seems like a much easier deployment option, IMO.

I’m also excited to look at Marcel’s code to see if I can learn anything to help in the implementation of an idea I had a while back regarding a Java factory for Flex to create objects from JSR 223 compatible languages using Java’s new script invocation API.

Thanks for the hard work Marcel! I look forward to messing around with the plug-in.

Proof of Concept : Learning Groovy, Grails, JRuby, and Rails

Brian LeGros | January 20th, 2008 | programming  

A couple months ago a few of us at work thought it would be worth looking into some of the newer programming languages and frameworks that have been receiving a lot of buzz. We were particularly interested in some of the productivity boosts that have been preached as a result of using these solutions. We decided to focus on the creation of a proof-of-concept (PoC) for one of our major web sites (sort of a stripped down CMS solution). The PoC consisted of two implementations, one using Groovy and Grails, and one using Ruby on Rails. On the Ruby side of things, we decided to look into JRuby, rather than the MRI or Rubinus implementations, since the majority of our development efforts rely on the JVM. Based on the success of this process, we are even open to considering these technologies as a possible replacement for ColdFusion and its assortment of frameworks that we currently use in our web tier.

I decided to move forward with Groovy and Grails in the first implementation. Its syntax seemed to be the most like Java which is what I am most comfortable with. I spent about 4 weeks learning the basics needed for Groovy and the Grails framework. From the little I’ve used it, I really like Groovy as a language. Learning Groovy was a cinch. The availability of closures, the use of builders to simplify configuration, and the emulation of formal properties using Groovy Beans are all great features. After seeing the amount of work being put into Groovy Swing integration, I can’t think why anyone would want to write a Swing UI in straight Java again; the syntax was just as simple as MXML without the markup. I am curious if any classpath conflicts would occur between dependencies in Groovy and our own projects, but I didn’t look into this any.

As far as Grails goes, I am really impressed at the work put into combining the technology stack on which the framework is based. The biggest and most notable feature I like is its tight integration with GORM. The use of GORM as the relational mapper truly makes working with the database effortless. Integration with legacy databases is fairly simple if you want to re-use your Hibernate mapping files, or if you want to do the configuration yourself in your domain classes. Because of GORM, you can approach pretty much any web application focusing solely on your object model; our shop follows this practice already as do most Java shops, so this is a big plus. On the templating side of things, I am pleased to see the work put into GSP. One of the main reasons we went with ColdFusion was because of the simplicity it provided over JSP, so GSP is a welcome attempt at change. Another feature I really like about Grails is the ability to create service classes to hook into, and expose, JEE endpoints with the utmost of ease. I didn’t get a chance to play with these, but from what I’ve seen in the plug-in section, it looks like working with JMS, SOAP, JTA, and a few other standards is ridiculously simple. Yet another feature I really enjoyed was the integration with Spring Web Flow. The scoping in Grails seems so natural; flows are very simple to construct and alleviate a lot of the hacking most developers have to put up with in the session scope. Finally, bundling an application into a WAR is provided out of the box so creating a Grails app and dropping it on your favorite JEE server is fairly effortless. From the little I got to work with the Grails framework, you can tell the team’s focus is clearly to improve Java in the web tier and they are on the right track. I know offering Spring integration is definitely a big draw for me since we use it so heavily in most of our initiatives.

Keeping in mind I worked with Grails 1.0 RC1, I did run into some difficulties with the framework. The first and biggest frustration I encountered was when working with domain classes. When I changed a domain class, while the built-in Jetty server was running, the server would attempt to reload the Spring context but just hang. As a result, I would have to take about 30s or so ever time I changed a domain class to bounce the built-in Jetty server. I’m not sure if this has been fixed since I played with it, but this really deterred me from working with Grails. One thing that I got frustrated with was what seems like a limitation in GSP. I wanted to create a view to edit a domain class which had a one-to-many relationship with another class. A pre-selected multi-select list box seemed like the perfect HTML widget to use. I was unable to find a way to automatically have GSP generate this for me. I searched the user forums, but I only found a post that said an implementation wasn’t available at that time. I didn’t search for a JSP library that may help, but maybe this could have been a viable alternative short of writing the code to render the HTML myself.

So after the Groovy and Grails experience, I dove into JRuby and Rails. Being that I scare easily at the sight of anything new, a colleague recommended Dave Thomas’ Rails book to get started; I also had other colleagues as resources to help in times of need. Since I’ve become more familiar with the Ruby syntax I must say there are some language aspects I do like. Mixins available at the language level are a lot handier than I would have thought, especially in the context of Rails. Properties and module level methods were nice to work with as well. I can definitely see where the “enough rope to hang yourself” analogy comes from however; I encountered a lot of variations on how to syntactically accomplish the same task. From a configuration standpoint, I also had to do some work to setup my environment. In the end, I had to pull down JRuby (1.03) and install the rails (1.2.6), activerecord-jdbc-adapter, and warbler gems as well as update my JDBC driver. Since JRuby is just an implementation of the Ruby language, however, I was able to use any Ruby reference, tutorial, or example I could find and had no issues.

As far as Rails goes, I was pleasantly surprised by how easy it was to get started. One of the biggest things I like about the framework is the inclusion of data migrations. You are required to interact with the database at a certain granularity but those interactions are abstracted by writing Ruby code. I’m not necessarily a fan of this granularity, but from a maintenance perspective, this is one of the best solutions I’ve encountered for managing an application’s database. I am also glad to see to see the FormOptionsHelper class. When data binding isn’t sufficient, the FormOptionsHelper class provides a lot of convenience methods to help work with select boxes. Tasks such as pre-populating a multi-select list box were extremely simple using options_from_collection_for_select. Lastly, I really liked the work done to integrate the use of REST into the framework. Working with ActiveResource seems fairly straightforward and doesn’t require as much configuration as I expected; that being said I haven’t worked much with this feature yet.

Based on my limited experience with JRuby and Rails, there were a few things of which I am wary. I haven’t looked into this much, but having two language cores available in JRuby freaks me out a bit. Without guidance or standards, I can definitely see a junior developer using Java implementations when Ruby ones are available forming a strange mixture of code. Another point to watch is the current maturity of the tools to migrate a Rails application to the JEE platform. ActiveRecord JDBC and Warbler are still under active development (although close to 1.0 releases) and it did take quite a bit of investigation to get my PoC working with our existing environment. Additionally, I don’t like ERB as a templating language. This is a personal preference, but it reminds me of PHP which I dislike for its heavy use of scriptlets; I really prefer using tag-based markup for templating. Finally, and probably the biggest thing I don’t like, is Rails’ implementation of ActiveRecord. ActiveRecord is cripplingly associated with the relational model rather than your application’s object model. A simple relationship such as belongs_to doesn’t relate to a composition relationship between a parent and child object, it relates to which tables contains the foreign key in your relational model. I designed my PoC with an object model in mind and had quite a bit of frustration, semantically speaking, trying to migrate that model into the mold for ActiveRecord. I felt like my focus was on the database for the most part and that seemed contrary to the goal of the framework.

Ok, so enough for my probably useless feedback, let me tell you what we decided to do. My personal preference lies with Groovy and Grails. The side of me that needs a solution in the immediate however, led to my choose JRuby on Rails. Let me explain. When I worked with Groovy and Grails, my learning curve wasn’t with the language, but with the framework. I found myself having lots of difficulty accomplishing tasks that I had expected to be fairly effortless. I associate a lot of these difficulties with the current state of the Grails framework. This is not meant to come off with a negative connotation, but with the perspective that Grails is the “new kid on the block” and still needs polish. When I worked with JRuby on Rails, the learning curve was with the language, not the framework. Rails met my expectations regarding the work needed to accomplish my goals (short of the ActiveRecord hoopla). Rails has the current advantage over Grails since it’s had the opportunity to be exposed to its community for 2 major iterations now. Getting an environment configured and working is a one time cost; I don’t count this again JRuby on Rails although it was easier to manage with Groovy and Grails. Additionally, running on JRuby provides us with the minimal level of Java integration that we need to re-use our existing architecture. JRuby 1.1’s focus on performance and very eminent release as well as Eclipse tooling support via RADRails are also an added plus.

So that’s the verdict from my PoC, but its not the end of my opinion. Anyone who has read this far and thinks I’m full of shit, ignore this next paragraph unless you want to flame me. I ultimately believe that Groovy and Grails will win out for the majority of users utilizing Java in the web tier. All of the arguments I have made for JRuby on Rails are based around the availability and maturity of its resources. These are arenas in which Groovy and Grails have just recently entered into competition. Groovy is quickly becoming the alternative for those in the Java community who are looking for a syntax with which they are more comfortable that brings a dynamic flare. Although it may have helped, Grails doesn’t seem to have the influence yet to cause the recent spike in popularity that Groovy has received as compared to what Rails did for Ruby. I think Java interop will also become more of an issue as people begin using languages running on the JVM. From the little I’ve seen, I really like Groovy’s approach, it feels familiar. I also think developers, like myself, are looking for re-use from the Java libraries and frameworks that we’ve relied on and with which we have experience. Grails’ tight integration with Spring, Hibernate, and other JEE standards (defacto or not) will make these approaches even simpler. It seems like since Grails explicitly chose to support the enterprise and Rails is choosing to stay out of it. I think Grails over time will have more to offer than Rails for those looking for new solutions on web that are currently using Java. Please keep in mind I’m not saying that Groovy/Grails isn’t currently ready for the enterprise (despite the FUD going around). As I understand it, many have been successful by using these technologies; I’m just saying I’m going to wait a while and see how others have been successful and learn from their examples.

In the end, I definitely think these new languages and frameworks provide a huge amount of productivity compared to how we are currently building applications for the web at the office. Tooling definitely needs some work on the Eclipse side of things, but Netbeans and IntelliJ are providing some great alternatives in the interim. I’m really looking forward to using JRuby and Rails to create our stripped down CMS application, which has recently received the green light. I’m even more excited about continuing to work with Groovy and Grails as their communities grow (and even pushing for its use in the office). Thank you to LaForge, Rocher, Nutter, Bini, and everyone else who has contributed their time and hard work into making Java on the web productive (and fun). I really see potential in the languages being built for the JVM and can’t wait to see what the future holds.


NOTE: Sorry to Jython, Django, Scala, and Lift for not including you in this PoC. For now I’ve spread my wings enough to be dangerous, and by dangerous I mean screw up enough software to retain job security. ;) I hope to find the time later this year to do some more exploring.

Diners, Drive-Ins, and Dives is Awesome

Brian LeGros | January 14th, 2008 | food  

Anyone who knows me, knows I watch a lot of the Food Network. I don’t watch because I want to become a good cook; I watch because I like to eat, period. Every night before bed, this show, “Diners, Drive-Ins, and Dives“, comes on and it drives me nuts. It’s hosted by the winner of the Food Network Challenge, Guy Fieri, and if you overlook his excess spray-on tan, this is a great show. The places they find across the country make some of the best comfort food I’ve ever seen. I usually need a glass of water before I go to bed to displace the amount of water my mouth loses while salivating over the food in this show. In all seriousness, Guy is a great host, and I look forward to each episode whenever they are on. If you like to eat, like I do, definitely check out the show.

Diners, Drive-Ins, and Dives can be found on Channel 59 on Bright House Cable in the evenings around 10:00 PM EST.

Be weary of cruises to the coast of Honduras

Brian LeGros | January 14th, 2008 | useless  

So I went to donate blood today as I like to do every couple months and I got turned away! Turns out that I took a cruise to Roatan, Honduras (off the coast) and there is a risk of Malaria in the area. Obviously I don’t have Malaria (cough), but I was told I can’t donate blood for a whole year now as a precaution. I really enjoy donating blood for some strange reason (my wife used to be a Phlebotomist), so I’m kinda bummed. I think what bums me out the most though is that the cruise ship (Norwegian Sun) never mentioned any risk of Malaria in the documents we got for the trip. Oh well, live (hopefully :) ) and learn, I guess.

Jockamo’s New Orleans Kitchen - Orlando, FL

Brian LeGros | January 12th, 2008 | food  

When I went off to college, I had a lot of hard realizations to deal with. My laundry needed to be done more than once a month, class was intended to be attended at every session, and the homemade Cajun dishes my Mom made didn’t make themselves. After 6 years and way too many attempts to find a reasonably priced, tasty Cajun restaurant, I returned to the Central Florida area to find Jockamo’s New Orleans Kitchen. After one visit, all of the greatness of my Mom’s cooking was relived. Even better, a rotating menu every day of the week has guaranteed my return for as long as I live in Central Florida.

Jockamo’s has a small spot in a strip mall next to a Dunkin Donuts and Five Guys and is always packed for lunch. Their menu has a great selection of po’boys including crawfish, oyster, catfish, and grouper. Jambalya and red beans and rice, with or without sausage, are also available daily. Now don’t get me wrong, their regular menu is great, but it’s the daily specials that’ll make you go back. Different types of etouffee, gumbo, fish, and bread pudding are available. For lunch, I ordered a large crawfish and shrimp etoufee (~$6) and the banana foster’s bread pudding (~$5) with a regular drink ($1.50). The roux they use for their all of their dishes reminds me of Mom’s home cooking and that’s pretty hard to do. I’ve also tried the cherries jubilee and peach bread pudding and they don’t disappoint either. Additionally, they have a homemade strudel, but I haven’t seen it on the menu in a while.

With the start of crawfish season, Jockamo’s doesn’t miss a beat. They’ve started their seasonal boil every other Saturday from 11:00 AM until the supply runs out. Each order comes with bucket of boiled crawfish and some traditional sides (potato, corn, etc). The first boil starts on January 12th and then January 19th, after that they resume their bi-weekly schedule. I haven’t had a chance to make it out to one of these yet, but I will this year. It’s been too long since my last one.

The way that Jockamo’s runs their restaurant makes me proud to be a Cajun in Central Florida. Jockamo’s does a great job at exposing the rustic nature of Cajun cuisine to the masses at truly reasonable price. For anyone who hasn’t visited Jockamo’s New Orleans Kitchen, you are missing out. Patronizing them will be one of the best decisions you’ll ever make about dining … “I GARONTEE!” (the late, great Justin Wilson).

Jackamo’s New Orleans Kitchen is located at 3042 W Sand Lake Rd, Orlando, FL.

Izziban Sushi - Orlando, FL

Brian LeGros | January 11th, 2008 | food  

Bucky over at 2ndPlayer.net has been raving about Izziban Sushi for the past few months. Never to be one to turn down the potential for good sushi, we headed over for our typical “short” Friday lunch. My expectations for any new sushi restaurant are usually low, but in the case of Izziban I was definitely not disappointed. In fact, I think Izziban has some of the best sushi I’ve tried in the Orlando area to date.

Located in the shopping plaza with World Market, Izziban has taken over the the space formally occupied by Saucy Bella. The restaurant layout hasn’t changed too much, but the decor is simple and well done; I especially like the collection of designer saki bottles lining the back wall. It’s your typical “wait to be seated” place. We were seated right away, our drink and food orders were taken, and our food was received all within 20 minutes. The lunch menu was a single page, back and front, with a great sampling of dishes. They have a large selection of bento boxes and lunch-sized entrees as well as sushi, sushimi, and roll lunches.

The table ordered a pretty big diversity of items from the lunch menu as well as an order of gyoza (~$5 - grilled pork dumplings). The gyoza was very flavorful and came with a sweet/salty dipping sauce. I ordered hot tea ($1.50) and the Roll Combo A (~$14) which came with 3 different rolls, a choice of soup or salad, and a generous helping of ginger and wasabi. The miso soup could have used some more tofu and seaweed. A couple others tried the salad which came with a nice chunk of pineapple, fried noodles, and a mild ginger dressing. The tuna roll is the typical tuna roll, the spicy salmon roll is made with smoked salmon, cucumber, and spicy masago, and the shrimp roll was made with shrimp tempura, covered in salmon eggs, and topped with mayo. The quality of the fish used in the rolls was excellent; the tuna literally melted in my mouth. I also tried some of the tonkatsu that someone ordered and it was extremely tender; most places fry the pork to “bone dry” perfection, so I was shocked to taste how well it was prepared. I wanted to try their egg sushi as well, but unfortunately I just didn’t have enough room left after finishing my meal. In fact, I can’t believe that I even was able to finish all 3 rolls. If that doesn’t spell tasty then I don’t know what does.

I do wish the pricing at Izziban was a little more affordable for lunch, but all and all, Izziban delivers great sushi and Japanese food. I couldn’t find anything that I tried from the menu that I didn’t like. I was sad to see Saucy Bella go, but I’m really glad to see another great local restaurant take its place. Good call Bucky.

Izziban Sushi is located next to World Market at 1700 West Sand Lake Road, Suite D124, Orlando FL.

January Adogo Meeting - Flex 3 Pre-release Tour with Ben Forta

Brian LeGros | January 5th, 2008 | news  

For those who aren’t following the Adogo blog, the January meeting promises to be a good one as we have been chosen by Adobe to be the only stop in Florida for the Flex 3 Pre-release Tour. For our leg of the tour we are extremely fortunate to have Ben Forta, Senior Technical Evangelist for Adobe, as our guest speaker. We’re going to be giving away tons of schwag as well as some pretty nice software licenses. We’re getting to use a conference room at Westgate Lakes thanks to the Porges and are going to have Pizza Hut cater most likely.

I’m really proud of all the work we’ve done at the Adogo (Adam, Max, and myself) and getting Orlando as a stop on this tour helping to affirm that. In the few months since last August, we have been able to create the beginnings necessary to revitalize the Adobe community in the Orlando area. We still have a lot of work to do to get the word out, but we’ve got a good foundation to build on.

Hope to see everyone at the next meeting (January 21st @ 7:00 PM at Westgate Lakes near the Smokehouse)!

Blueberry Muffin Restaurant - Indialantic, FL

Brian LeGros | January 5th, 2008 | food  

When you mention going out for breakfast in Melbourne, most everyone who has lived in the area thinks of one place, the Blueberry Muffin Restaurant. Since my wife was a child, she has been going to the Blueberry Muffin with her family. From what I understand the restaurant hasn’t changed much from what it is today. They’ve got a bar where individuals can sit and a few dozen tables in the dining room. Each morning they make a few variations on their homemade quiche and muffins. Blueberry and chocolate chip muffins are always available, but other choices such as Strawberry Bran or Banana find their way on the menu pretty frequently. Healthy and hungry diners alike should have no trouble finding menu choices that will satisfy their appetites.

With family in town over the holidays, we decided there was no better time to visit. Between the table we ordered the country fried steak with sausage gravy and eggs with grits and rye toast (~$7), the daily quiche (spinach and cheese) with home fries and a biscuit (~$7), #1 Special with eggs, home fries, and a blueberry muffin (~$3), a large orange juice (~$3) and a few hot chocolates w/whipped cream (~$2). The food came out within 10 minutes, as it always does, and as usual, was great. The country fried steak and gravy is probably some of the best I’ve had. The quiche is a slice of a larger portion baked in a traditional pie crust topped with a melted, crusted cheese and filled with the mixture of the day (Sausage Mushroom was also available that day). Did I mention that the orange juice is fresh squeezed.

I am really glad that the Blueberry Muffin continues to operate and provide a great venue for grabbing breakfast. Their prices are reasonable (we’ve once fed 3 people for $10) and their staff is courteous and fast. If you haven’t heard about the Blueberry Muffin yet and live in the Brevard area, then you are missing out.

The Blueberry Muffin Restaurant is located at 1130 N Highway A1A, Indialantic, FL 32903.

NOTE: If you go on a Sunday be prepared to wait in line as much as 20 minutes to get a table. Don’t let this deter you though, it’s worth the wait.

Dragonball Z Tenkaichi 3 - Online Play a Joke!

Brian LeGros | January 3rd, 2008 | useless  

For those of you who read/listen to the folks over at 2ndPlayer.net(http://www.2ndplayer.net), you may have read Dan’s write-up on the state of online play in the latest Dragonball Z game for the Wii. I’m not terribly savvy when it comes to looking into these things (so I’m definitely grateful to the 2nd Player guys for the investigation), but I’d like to throw my experience with the game into the ring.

First off, I’m a huge fan of the DBZ games since Atari took over the franchise. This installment of the game is probably some of the most fun I’ve ever had playing a DBZ fighter. The controls are definitely different from 2, but after a few chapters in Dragon History, you get used to how simple they are and how much more fun it is to pull off super moves. That being said, holy crap, why is it so hard to block in the Wii version. Maybe I’m extremely slow witted (which is probably the case), but man, I cannot pinch those damn (A + B) buttons fast enough to deflect an energy blast, teleport, or block. If it weren’t for easy mode, I’d probably be having less fun.

I digress though, online play … yeah it sucks. Here’s my advice, pray you can fight in an area with sparsely populated terrain and someone who is just as patient as you are. I haven’t had much luck pulling off any special moves, movement is like crawling, and my Wii has locked up twice while in this game mode; did I mention once you’re in an online battle, leaving is out of the question until it’s over. If the answers that Atari have given are true, then I’d suggest that anyone who owns this game just write off online play all together. Ignoring the fact that broadband in the US is all over the place, you figure most people have DSL/cable, getting 5-7Mbits down, and the Wii is running an 802.11b adapter (max 11Mbits). Even if your running some form of encryption over the wire and the Wii has less than favorable signal strength, I find it hard to believe these issues are coming from running DBZ over the wireless adapter. Maybe it’s the peer-to-peer connections, but come on, the game play experience is the same no matter who I’ve played against online thus far. Are you telling me we all need to use a 100Mbit wired connection to our 7Mbit pipes? Give me a break.

I bought DBZ Tenkaichi 3 because I’m a fan, but the promise of online play brought the potential for high replay value. I’m gonna be playing this game for at least a few months because of all the things necessary to get 100%. If online play isn’t fixed though through some type of patch, I’m gonna be cashing this game in for store credit once I get that 100% and moving on. Atari probably only cares about the original sale, so I’ll just say, if you’re looking buy this game because of online play, save your money. It sucks.

2ndPlayer.net rules, keep up the great work guys!