Thursday, May 29, 2008

Leading the OpenBD BOF

I was originally slated to lead the Improving Quality through Code Review and Mentoring. A twist of fate happened and OpenBD was pitted at the same time in another BOF, originally lead by Vince. Unfortunately Vince from New Atlanta will not be able to make the Open BlueDragon BOF. So now Mark Drew has agreed to take over my original BOF so I can lead the OpenBD BOF! Long and the short. I am leading the Open BlueDragon BOF at cfUnited (with plenty of help from Matt Woodward and Sean Corfield of course)! Leave comments on what you would like to see/discuss in that BOF!

Thursday, May 22, 2008

JavaOne Treasures

My company sent 6 folks to JavaOne and today was the first of many recap/regurgitation of JavaOne goodness. Mylyn a tool the CFML community has already been introduced to by some fellow bloggers is, of course, making a big splash in the Java community as well. Since I have had a large amount of experience with it I got the chance to help present the plugin to everyone, which was fun to see it get a bigger response. Next my Java counter part talked about JSF and blabbered a bit about the JSF2.0 spec, hype or real we'll see I suppose.

The next recap was of a tool that everyone, EVERYONE, should have in their toolbelt. The tool is best used with Java 6 but can hook in with Java 5 and even 1.4 a little. The tool is free; VisualVM and can, with Java 6, visually show you all sorts of stats on what is running in your JVM. It can get down to how many of what classes you have in memory. Its also plugable and they already have a cool plugin to show a histogram of your GC which can be very interesting! The tool is at RC1 right now and is a must for anyone doing any sort of development on the Java platform.

Next Hot topics/Buzz was presented. It was cool to see Flex get a mention, gave me a chance to pimp ColdFusion as well as talk about BlazeDS. Groovy was of course brought up and we had a short discussion of it. In the same light Ruby and other dynamic languages (funny not CFML) were brought interesting missing from the list was Scala which I thought had some buzz at JavaOne from other accounts. Selenium got a mention and seems to be growing as an accepted tool in many communities now, again a good thing to see. I was really hoping JavaFX would get more than a 5 second mention but I expect much more about JavaFX over the next couple of months, again vapor or reality...we'll see. Finally 2 debugging tools were talked about Fiddler, and Omniscient. Omniscient looks particularly interesting as it essentially records your applications stacks and allows you to replay something to allow you to do intensive root cuase analysis on a bug, very cool stuff.

Overall it was an excellent recap with loads of good tips and information and I am really looking forward to playing with Omniscient and VisualVM as I start doing more and more with OpenBD.

Saturday, May 17, 2008

Open BD Plugin Architecture

Alan Williamson said he needed to document and blog about the plugin architecture of Open BlueDragon, after all it is his baby. Being the huge proponent of it, I decided to go poke around the source and figure some of this out on my own. What follows is my interpretation of the plugin architecture after messing with it this this morning. I'm sure Alan will have better documentation in the wiki.

Firstly since I didn't really feel like writing a hello world function I took the code Andrew Scott posted the other day and turned it into a plugin. Since the plugin stuff has not got much press Andrew did what he knew he could do and added his function to the core, something that has gotten some criticism already. This type of functionality is perfect for the plugin architecture so i figured it would be perfect for my example. In an effort to keep this entry from getting too long I am going to focus in on the com.bluedragon.plugin package and how to use the plugin architecture and I will leave out how to create a tag or method till later. Besides others have already figured it out so you can too right?

The Plugin package contains only 2 concrete classes and for now we only need to worry about one of them, and an interface; the PluginManager (concrete) and Plugin (interface). We'll be using the PluginManager to register our functions and tags, on a side note it looks like this is also Java's interface to CFCs. On start up the PluginManager is called and it uses a node in bluedragon.xml to know what plugins to load. The node is <plugin> and the path is (found on line 67 of PluginManager): server.system.plugin. Here is a snippet example:
<server>

<system>

<plugin>com.bluedragon.extra.ExtraPackPlugIn</plugin>

</system>

</server>

The classes specified in the plugin node should be in the classpath, on launch, and each should implement the Plugin interface (the other class in the package mentioned earlier). One of the methods you have to implement is pluginStart. This method takes an instance of the PluginManager which you can then use to register all your addin methods and tags. To add a tag it would lok something like this:

manager.registerFunction("QueryGetRow", "com.cfinnovate.example.QueryGetRow");
(or registerTag, for tags).

The first argument will be the name used inside of your CFML and the second is the class that implements the functionaity for your method/tag. Generally they'll extend functionBase or cfTag. NOTE: you can override builtin functions and tags with the PluginManager's methods.

The important thing to call out here is your methods and tags can be written exactly as if they were built into the core, just put them in your own package. The end result is a, 100% portable to the core, extension to Open BlueDragon. As far as eclipse setup I created a new resource folder inside of my openbd project called plugins and put the plugin code in my own package and it worked perfectly. This also allows for easy export to a jar to distribute to others. Here is a recap:
  1. Create a Class that implements Plugin
  2. Place that class (and your actual method/tag classes) in the classpath
  3. Put the plugin implementing class in the server.system.plugin node
  4. Start the server and enjoy
If you would like to see a working example check out this example jar (which contains the source as well). Please note that the function itself is Andrew's which he shared with OpenBD and this is example code. An entire example project can be found in my SADHaTS project. Please note that to make it easier to share I put it in its own project. If you want to test out building the way I explained earlier just copy the package into a new resource tree in your openBD project. Happy coding!

Update: Alan has blogged about it now here

Thursday, May 15, 2008

Open BlueDragon Update

CVS and Bug tracking is up and running. There is an open readonly CVS account for folks that want to create patches and/or get the latest straight off CVS:

Connection type: pserver
Host: cvs.bluedragon.org
Repo Path: /cvs/openbd
User: openbdpublic
password: password

Bug Tracker:
https://openbd-bugz.cvsdude.com/

I'll follow up with a quick tutorial this evening on how to create patches and submit them through the bug tracker! I am very excited, its all coming together, hopefully the wiki will be up by the end of the week too!

Tuesday, May 13, 2008

ColdFusion 7 & 8 annoyance

Just a quick post about an annoying "feature" of ColdFusion 7 & 8, and maybe even 6.1. In CF5 and CF6.0 nesting cfoutput tags was forbidden unless you specified a valid Group attribute in the parent cfoutput, not so much in CF7 (and maybe 6.1). Whenever that functionality changed it went fairly undocumented, though there is a comment in livedocs for v7 and a subtle wording change from 6-6.1. So fair warning if your testing environment is ohh lets say 7 but for some backwards reason you have to release code back on CF5 (or 6.0) code might break by this undocumented difference.

There is a subtle wording change from 6-> 6.1 but I do not think that does this, major, change justice:

Live Docs v6:

To nest cfoutput blocks, you must specify the group and query attributes at the top-most level, and the group attribute for each inner block except the innermost cfoutput block.

Live Docs 6.1:
If you nest cfoutput blocks that process a query, you specify the query and group attributes at the top-most level; you can specify a group attribute for each inner block except the innermost cfoutput block.


Nothing in the Change history...annoying.

Sunday, May 11, 2008

Pulse2 Review

This weekend I finally got around to giving pulse2 a spin. For those that have not heard of pulse2 its an eclipse based application that does the dirty work when it comes to configuring..eclipse. I know this sounds kind of odd but that's what it is and does. Once you open pulse2 you can chose which Eclipse runtime you want, like the core + WTP, then all additional plugins in the Pulse2 catalog. Once you have chosen the plugins you want Pulse does the dirty work of downloading and resolving dependencies. If you have 2 profiles with the same plugin it will not download it twice, its smart like that. You can also save these configs as profiles and share them with others. Pulse2 in its basic form is free but as I quickly found out anything worth while really requires the freelance account and that is subscription based @ $6/month or $60/year.

My initial thought, and why it took me so long to use pulse, was meh I can do this all on my own. However, loading different profiles can be really useful. Lets say I am working on mxUnit's eclipse plugin I can load an IDE specifically geared towards plugin dev. This would be pretty different than if I was working on OpenBD's core (something else I did this weekend). I quickly learned how nice Pulse2 is and this is a perfect way to help others in the community, share my profile and anyone can use it! The problem for me comes in that you can only use plugins in Pulse2's catalog to use Pulse2 for free. Even worse some of the plugins in the catalog require a freelance account to use (Aptana and Jboss tools are the 2 biggies here). This seems crappy to me since there is not way they can keep the catalog up-to-date. A perfect example of this is mxUnit; if I want to make a profile for the average CFML developer its either without the mxUnit plugin or it is a freelance account profile.

You can always install plugins yourself and have them not managed by Pulse but again I loose the profile aspect of it. In addition to being able to add your own plugins with a freelance account you can also share configuration settings. This is really awesome since I have multiple dev computers pulse will now keep them all in sync with one another. That to me seems like the type of services that I should pay for, not the ability to manage any plugin I want, isn't that what pulse set out to do FREE to begin with? Other than my not all plugins can be managed gripe, I also had quite a few issues with Pulse2 on Leopard, invalid argument exceptions. So bad that I would repeatedly have to shut down Pulse2 and relaunch to get my profiles configured all the way. Once the profile was configured Pulse did work perfectly so it was choppy starting but overall the product worked and worked well.

At this point I am not sure the service is worth the $60/year, I know it is not much but I can already accomplish most of what the service extras do for me with source control and checking in/out my eclipse configurations. What's more my method works with more than just eclipse it works will all my dev tools. This type of functionality is in the roadmap and once that comes to fruition I think it will surely be worth the cost. I might just get the subscription now so I can help fund the project and continue to use my extra managed plugins I guess I'll make that decision in 29 days.

Wednesday, May 07, 2008

Open BlueDragon released

It's been a bit since I posted. I've been busy, cf.Objective and Open BlueDragon launched, then catch-up at work. I've been messing around with an installer for Windows for OpenBD and I am working on some additional video tutorials as well. I posted a rough one right after the OpenBD launch. Expect more in the future:

Saturday, April 26, 2008

Back to Mac

After about 10 years away from Mac I finally have returned. I grew up with Macintosh and left after a horrible experience with Power Computing and OS8. Over my time away I've grown fairly used to Windows but quite a few events have taken place that have led to my Mac reunion. Firstly I've always secretly wanted to return to a Mac but the initial release of OS X was lack luster (and the OS9 backwards compatibility was a nighmare, my mother went through it). Then I had no desire to go back to Mac with the adoption of Intel, reference the time frame I left Mac the first time. The Intel switch seems to be stable and Leopard seems to have gone through a nice settling period as well so this seemed like a good time to make my move back home.

My second reason, Vista, aka windows biggest mistake since ME which was not even that long ago. Vista itself really is not enough to turn a person to Mac, XP is solid and supported and I am sure Windows will correct itself with the next major release. The unfortunate part of Vista was it did show me where Microsoft is heading with their OS and quite frankly I am unimpressed. Vista is a hog and if nothing else is trying to be more Mac like, it lacks innovation and MS looks to be moving towards a subscription model. I'm not saying Mac really impresses me as an OS but Apple is continuing to push innovation into their line of computers and OS.

Features that won me over:
  • Similarly spec'ed laptops in the Windows arena are as much or more
  • Spaces is cool and I think I will be more efficient in the longrun
  • I missed AppleScript and it can be very helpful
  • Expose looks like it will be nice
  • The multitouch track pad was attractive
  • Time machine looked impressive
Finally I'll admit its "the in thing." Anyone that knows me would know I am not generally in the "in" crowd so it shouldn't come as a a surprise that this was not a determining factor but it did add a sense of urgency to purchase it now. I planned to get one soon and was considerng waiting till June to see if they did anything like add BlueRay but after reading about the power cost of BR I figured it may not be worth it anyway.

After < 24 hours of use I have to say I am loving the multitouch mouse pad! On my previous HP I would use my pinky to hit that small little sliver on the right side of my mousepad to scroll up and down, and heaven forbid if I wanted to horizontally scroll. Bedlam would happen if I accidentally passed over the sacred scrolling area while just trying to move the mouse! The multitouch pad is nice and large and there is no sweet spot for scrolling, just use 2 fingers and pull/push, sorry for anyone out there that sawed off all but one finger. "Right Clicking" is easy as well with the 2 finger tap very easy and pretty intuitive. Most annoying thing so far is the lack of a delete key, well its called delete but it is a backspace to do a (windows) delete I have to do fn + delete.

Tuesday, April 22, 2008

The Good The Bad and The Ugly

Generally I keep my blog entries to technology, and rarely stray. Well today is one of those days where I am pissed off enough to post about something other than technology.

The Good
My Sony digital camera tumbled all the way down my roof and fell off to the concrete patio below and is working perfectly, after I glued the dial back on. I am amazed it is working great, zoom and everything. Kudos goes out to Sony on this one, when I saw it fly off the roof I thought for sure I was out a camera.

The Bad
So why in earth was my camera on the roof in the first place? Well we discovered we had a leak in the roof and when the roofer came to inspect it I wanted before and after pictures. The repair was to a flashing (I think thats the term) around a vent and was not too expensive $200.

The Ugly

Why did I want before and after pictures? Apparently this was never done correctly since our house was built by MI Homes 2+ years ago. And even though it just now was showing it has been leaking water for 2 solid years into our home. Upon further inspection we have at least a small amount of mold growing that is currently visible and from the looks of it we might find more. We'll know how ugly tomorrow when the drywall folks come out and repair/inspect.

So moral of the story, don't trust a builder and make sure to double check EVERYTHING. We checked everything but our ass of a Realtor did not recommend getting a home inspector, shame on us for not knowing better (we were first time home buyers too boot here). Overall I have been fairly dissatisfied with my purchase from MI Homes, some due to their incompetence and some due to my incompetence as to what to look for when a home is built (like doing their jobs properly and roofing correctly). There I finally posted a rant, its been a while.

Tuesday, April 08, 2008

Open BlueDragon Steering Committee

Alan Williamson introduced the Open BlueDragon Steering Committee today. As my previous posts may have given away I am honored to be among the likes of Sean, Matt, Mark, Mike and others on the Steering Committee. I feel like the small fish among the giants which is kind of cool since at work I am the Lead ColdFusion Architect. As I am quoted on Alan's blog entry I want to see CFML grow but I think it is important that we stay true to the spirit of the language. An additional focus area for me will definitely revolve around packaging and deploying Open BlueDragon. I feel that packaging an deployment is a 2 way stream, the community feedback on directions or tutorials is vital to the success of this project. Expect more, and better, tutorials in the upcoming weeks.

Like everyone involved in the Steering Committee if you ever would like to discuss Open BlueDragon feel free to email me at adam.haskell@openbluedragon.org. Also don't hesitate to hunt me down at cf.Objective() or cfUnited to speak your mind about the project. I've had the pleasure of talking to many of the Steering Committee members at conferences past and we are all very approachable, though apparently Mark Drew can be scary sometimes!

Sunday, April 06, 2008

Why Adobe should LOVE Open BlueDragon

Friday I let the cat out of the bag about one of the cool features of Open BlueDragon, Sandbox Projects. Prior to this Jason Delmore had a very informative post explaining why ColdFusion is not free. Jason begins by stating ColdFusion is not a lot of things, failing to really tell us what ColdFusion is in any certain terms other than a platform that does not fit the mold of all the things it is not. He conceeds that ColdFusion the language is free, or rather agrees to call it free for the sake of conversation, "let's call this FREE." Jason then proceeds to describe a bunch of features that cost oodles of money if developers/organizations want to use these technologies. Adobe seems to be very enamored with creating the "ColdFusion platform," and why not its a great revenue machine. This is EXACTLY why they should love Open BlueDragon. Think about sandbox projects for a second. If the language itself is a small part if ColdFusion why bother maintaining it? Why not let the community support the language, while you (Adobe), and others, focus on the platform. If Adobe thinks their exchange integration is popular enough test the waters make an extension pack for Open BlueDragon and put a price tag on it, likewise for the ajax features (though I would love to see that one GPLv2 so it can come bundled). One thing I did not cover in my last entry is how you can even override default behaviors with Sandboxes. Thanks to this type of behavior Adobe could even offer their cfImage enhancements as an alternate package. The community would really prosper from this type of business model. CFML becomes a powerful community driven language by itself and the platform can be grown by multiple companies that add value to the platform (or language) through extensions (humm sounds like my favorite IDE!!).

Saturday, April 05, 2008

Going to cf.Objective()

I have been considering going to cf.Objective() for a while now, despite the fact that I would be paying for it myself. You see, I have been spoiled for years as my employer has paid, all expenses, for me to attend CFunited, including this year. Heck even in college I had a full ride between scholarships and tuition savings from relatives. The thought of paying for education was simply foreign to me. I was having a hard time justifying the cost (not so much of the conference but the flight, hotel, food, etc.), as I felt many of the topics revolved around things I was less than interested in or I already had experienced. Then the big news broke; Open BlueDragon will be released at cf.Objective. This pushed me back into looking at the topics and reconsidering. As I read more about the topics and thought more about them I began to realize my original thinking was...scary. I had begun to become complacent in my role and was not interested in looking "outside my box." Opening my eyes, and readjusting my attitude, I realized there was not a single session where I could learn something, share experiences with others after a session, or ask insightful questions during the session. I started looking at my budget and really considering going. Then Brian Meloche changed his topic a slight bit and Adobe announced their topics. After reading the descriptions I realized these sessions alone could be worth the price of admission. After that it was a week worth of getting over actually spending money to get educated, I know crazy . I am going!!

To lessen the mental anguish of spending money to get educated I've decided to make a vacation of it and my wife will be tagging along. We'll fly in Wednesday and leave Monday. This should give her plenty of time to shop without me and enough time to hang out together in the evenings and before the conference. Hotwire fetched us a great deal for the trip. Surprisingly it only ended up costing about $200 more to turn this into a vacation, when compared to my original budget that was not figuring Hotwire's sweet deal. If anyone has suggestions of must see's or must do's leave a comment! I'm really looking forward to the experience, I just wish some of my co-workers could come too.

Friday, April 04, 2008

I <3 Open BlueDragon

A couple times now I have see Vince, Alan, or others from the BlueDragon teams quoted as saying, "Don't you love being in control." I thought sure yeah its open source but I still have to either branch or wait for you to accept my contributes to make it in the distro. Well I am happy to make an exclusive announcement! Introducing.... Open BlueDragon Sandboxe Projects! Take from the Steering Committee's, draft, charter:

As part of the Open BlueDragon initiative, there will be a secondary code repository for projects that are not part of the core code base. This repository will be known as the project sandbox. Contributions to this area will extend the BlueDragon engine via the official plugin interface. This plugin interface facilitates deep integration into the core engine without necessitating any changes to the core code base.


This is THE most exciting news I have seen, and it gets better:
The plugin API makes it VERY EASY to hook Java code up to CFC's... [the] plugin makes it easy for you to create a tag that would then bridge Java Technology-with-CFML-through-CFC.
Say your enterprise wants to use Open BlueDragon but you heavily use cfgrid's AJAX functionality, nothing is stopping you from writing a jar and dropping it in your distro, its that simple! No branching or figuring out the engine, use the published API and presto, AWESOME! As an added bonus you can contribute it back and if it is popular and well written it may become part of the distro in the future. Alan has already talked about some fantastic Sandbox Projects that blog-city uses which I will let him brag about, and others have spoke of additional ideas as well.

I was excited about the open source initiative from the beginning but seeing this and learning more about it I am even more excited. Thanks to Alan and Andy and everyone over at New Atlanta for this contribution to the community. And a special thanks to Alan for giving me the go ahead to blog about this, I was so excited I just couldn't contain myself.

Friday, March 28, 2008

Training Developers: Tips for Success

Being the lead ColdFusion Software Architect I get the fun jobs, and I mean that in all seriousness, like training new developers. In some cases they are just new to ColdFusion and not new to programming other times they are new to it all. Today I had the sincere pleasure of training 4 individuals that have been working in ColdFusion on and off for the good bit of a year. The rest of the time they work in various Mainframe languages supporting a couple of core systems at Kroger. Its amazing to see how they have progressed from the Introduction to ColdFusion course I offered some 6 months prior. I've blogged about my training experiences before and I received some good feedback so I figured I would lob another training ball into the blogsphere and see what I get back.

I can not stress enough labs labs labs. Don't make the labs easy make them think; force them to apply knowledge. Many of my students hate me for it but I tend to make them drawn conclusions, simple ones, based off what they should have learned from the lecture. My training focuses on learning not memorizing, and they thank me later. I do 2 types of labs for each lecture segment. First a group thought exercise where we work through a problem together. I generally give leading questions to guide my students to the correct answers. These are exercises not simple questions like what is defaultFuseaction. An example exercise might be, "Given this Fusebox.xml and subsequent files what will the user first see on the screen?" Next is an individual lab that requires them applying a large chunk of the group exercise with less help and generally a more detail. Following the previous example I may provide 5 files to the user and give them a screen shot of what the final product should look like. They have to wire them together and submit to one more page. I make these individual labs hard because we have already done easier labs together. The end result is high retention and developers that are thinking for themselves and not just regurgitating exactly what they memorized.

Bring water, for yourself and others. Your brain loves fluid and dehydration causes mental fatigue. You have already lost a large amount of learning capacity if you are feeling thirsty, so I bring lots of water and encourage drinking it as much as possible. I am considering putting it in my slides in the future. As a result though make sure you plan for an extra 5 minutes in the labs for frequent breaks :).

Know your audience. Spend time to get to know them and their backgrounds. If you can learn their names ahead of time that is great, I hate name tags they feel childish. Wait, this goes beyond knowing names though! Know folks background; where they come from, what they are working on currently, take a few minutes to learn some likes and dislikes. I learned more about what runs on MVS and more about cobol so I could be an affective trainer. I don't plan to program in it ever but having a base knowledge allows me to related to my students better. I'm not a huge baseball fan but when I had training around the world series I watched, it allowed me to related to folks in the class.

You want to involve folks in the training. I hate using the word lecture to describe training; it should be a conversation. Lectures are boring and do not fire off nearly as many synaps in the brain. Conversational style lecture engages the students more which fires synaps more which leads to better retention and a more enjoyable experience. Conversational lecture also has a synergistic effect when you know your audience in that they become much more comfortable and this will lead to more honest and frequent feedback throughout the lecture.

That's all I have time for now, happy learning and happy training.

Monday, March 24, 2008

BlueDragon + open source == cf.Objective()

Looks like BlueDragon is going open a little before I thought it would. New Atlanta is letting the Dragon out of the den at cf.Objective(). I even got a shout out in Vince's post on the BlueDragon forums. I had already wanted to attend cf.Objective() but we already had cfUnited approved, now I want to go even more! Maybe I'll just put up the $$ it looks like an awesome conference, sure did want my MBP though, hah. Not much more to say about this details are in Vince's post, off to look at flight costs!

Saturday, March 22, 2008

Glassfish - Initial Thoughts

So NCAA tourny games didn't start till 2:10 Saturday and I took the opportunity in the morning to test drive Glassfish, an open source JEE app server like Jboss. So far I'm mildly impressed with Glassfish. Install is as simple as running 2 commands from a command line, both of which are clearly explained on the download page. The 2 commands unzip an archive and run an ANT task to setup the rest of the server. Starting up the server is simple and quick though not quite as intuitive as run.bat for Jboss. Deploying a CFML engine is simple as can be, navigate to the autodeploy folder and drop in the CFML engine war (or ear). BlueDragon and ColdFusion started up without issue and a marker file is created in the deploy directory once an application is deployed. As the name suggests applications are auto deployed once dropped in the autodeploy directory and subsequent file changes are picked up real time. The whole experience is right on par with Jboss. I was able to get a single server cluster of BlueDragon up and running in less than 40 minutes and I only had to refer to the instructions on Glassfish's wiki once. Keep in mind I am no server admin so 40 minutes with little instruction is pretty good. The entire experience with the web based GUI admin was pleasant and fairly intuitive, though a tad sluggish in a few spots (this may have been more my PC than anything else). Server startup and shut down are comparable to Jboss; Glassfish maybe a little faster with starting ColdFusion and starting BlueDragon is blazing fast in either environment. I did not get into load testing or anything of that nature but my test application which uses Fusebox and ACEGI started up quick and my test cases ran without error.

I only had a couple of dislikes, for instance the default configuration redirects all log messages to a log file instead of showing log messages in a console. Another gripe is the install, while not hard, is not as easy as Jboss. Advanced configuration however seems easier with Glassfish's slick GUI admin and I would rate that more important than a 2 step install in the Enterprise market; unfortunately if it is harder to install developer adoption maybe slower. Not that Glassfish was hard to install, far from it, but it is not quite the "unzip wherever" install like Jboss. My only other ding is WTP does not package Glassfish adapters with the server manager for Eclipse, so I had to download one. Downloading the adapter was simple enough through the provided interface in Eclipse and configuration the Glassfish adapter was pretty much the same as configuring Jboss. I was also happy to see the default startup commands used in Eclipse force logging information to the console which was one of my complaints earlier.

I would say Glassfish is a solid competitor and I see a huge potential for Glassfish. Especially after Red Hat took over the Jboss product and more or less alienated many enterprise customers with the licensing changes. If you are evaluating app servers take a serious look at Glassfish. I certainly hope Adobe considers supporting Glassfish in future releases.

Software Complexity

Recently we had an R&D analyst from Microsoft stop by and talk with us. It was an interesting mix in the room 2 .Net individuals an architect and a lead developer, one CFM architect (me), and 3 Java folks one architect, one lead, and one Sr. developer. Scott, the fellow from Microsoft, was visiting there to talk about how we can change the software complexity landscape. Everything was open, compiler checks to static analysis tools. Before I give me thoughts on the discussion, which I will never be able to articulate the massive amount of geek power in that tiny room, allow me to explain what Software Complexity is, in Scott's eyes, because I came into the conversation with a differing idea. Software complexity would probably be better referred to as dependency hell, and then some. We're not just talking about dependency management between classes but the tendency of the lines to blur between layers or frameworks and code starts to bubble to the wrong place, this then leads to dependencies that should not exist or should exists in a different manner. The picture was painted with a prototype tool that could show dependencies, including highlighting cyclical dependencies of dlls. The example was Visual Studio's codebase. Scot explained that when the engineers of Visual Studio took a first look at this tool they immediately said those dependencies (pointing to the core and another package). They also noticed that while they were treating the Visual Studio core as a core, it really was much less a core and much more a wrapper/framework around other cores in the system. I started off the conversation with a non tool based approach in that a large problem in our industry is ITs inability to explain to management, or measure for that matter, the cost of complex poorly designed software. You can have a perfectly built application but then when it comes crunch time instead of evaluating the changes/additions we bang something out where we know it will work. This then gets built upon and banged again and 1 year later we have a bad design. I think it is an industry wide issue where we struggle to quantify with hard numbers the cost. We're developers not management though so we want a tool that will fix this or help us fix/manage software complexity. The discussion that followed took us all over the map from compiler checks that would enforce a macro packaging concept to annotations and class loaders that would choke if the view ever tried to instantiate part of the model. We had some really good ideas and some really bad ideas too; one of the best was my co-worker's idea, the java architect. Have a tool that could extract methods and entirely ignore the package structure and repackage them based on dependencies. It is this repackaging that becomes powerful, in essence creates a procedural application then based purely on method dependency repackage the methods and view the differences. The repackaging may not be better but it would allow you to see how heavily a method is used outside its original class/package. This could give you great insight into large complex systems and help with anything from refactoring to finding better edge cases for regression testing. An off shoot from this idea was also to view method dependency and make sure it always flowed upstream and never regressed back down. Let’s face it as our industry runs further down the OO rat hole these types of problems will become more prevalent, especially as our small systems grow into large systems. There are tools out there to help manage dependencies like maven but these tools are not attacking the fact that framework A and framework B should never have been dependents in the first place. What are your thoughts, sky's the limit, what can we do manage software complexity? Is it a real problem?

Monday, March 17, 2008

Jboss Eclipse and BlueDragon

With the recent news of BlueDragon JEE edition releasing a new focus has been put on this type of environment. This is a GOOD thing in my eyes, I am a firm believer in knowing the underlying implementation of what you are working on. I'm not saying you should be a Java expert but if i say something like context path or context root I'd like folks to understand what that is, maybe even the different between and EAR and WAR. Enough of my soap box lets get into the nitty gritty there are whole bunches tutorials and FAQs out there about JBOSS and JEE servers and the like but few from a ColdFusion perspective consider this the first of many entries on this topic. Today I am going to focus on getting BlueDragon installed in Jboss and eclipse configured to start and stop jboss! By the way MOST of the below directions are perfect for ColdFusion as well. OK things you will need:

  • Jboss (preferable 4.2.2GA) - if sourceforge intimidates you or you just want the download use this link.
  • Eclipse w/ WTP - This can be a bit intimidating the all in one package is here For those do it yourselfers WTP info can be found here
  • BlueDragon (J2EE edition) - you will need and account, they don't bug you (at this point you could also download the ColdFusion installer).
  • Java SDK (or JDK), I like Java 5 - It will be the 3rd link JDK 5.0 Update 15 (at the time of this writting).


Now that we have this all downloaded lets get to setting everything up.

Installing the Necessary Software
1) Install the JDK, the defaults are fine.
2) Creat a directory somewhere free of spaces, I like c:\tools or c:\IDE or /usr/tools/
If you already have eclipse installed you can skip this step if you'd rather not move eclpse
3) Extract Eclipse into the tools directory, at this point eclipse is ready to run. If you already have eclipse you will want to get the WTP project installed into eclipse at this point*.
4) Extract the Jboss directory into the tools directory, or else where. I like putting all my developement tools in the same place as siblings. In reality so long as all these pieces are installed into paths that are devoid of spaces you can put them all anywhere you want
5) Extract the BlueDragon Zip into its own directorty on the desktop. At this point if you are wanting to use ColdFusion you would run the CF8 installer and choose an WAR deploy (if you are using updater 1 an EAR deploy would be a better option).
6) Inside the extracted directory you should find a directory named something like BlueDragon_webapp_701_352 rename it to bluedragon.war
7) Take that newly renamed directory and place it into this path: {jboss folder}/server/default/deploy , if you used tools and jboss 4.2.2 it would be C:\tools\jboss-4.2.2.GA\server\default\deploy\.
8)Take a breath, at this point we have installed Java, Eclipse (with WTP), Jboss and deployed bluedragon to Jboss.

Spot Check: you should now have c:\tools\eclipse-3.3.0, C:\tools\jboss-4.2.1.GA,C:\tools\jboss-4.2.1.GA\server\default\deploy\bluedragon.war\ , and C:\Program Files\Java\jdk1.5.0_14 (like I said earlier the space in program files is OK for the java install). Inside the the jboss directory (C:\tools\jboss-4.2.1.GA) there is a bin folder and you should find in there a run.bat if you double click it you should see jboss start up, feel free to do so to see if its all working. Before you move on be sure to ctrl-c and close the run.bat window!!

Setting Up Eclipse.
To Configure Eclipse to run Jboss you will need to setup a few things this includes setting up elcipse to know about the JDK5 and then configuring WTP's server control to run your instance of JBoss.

1) Start eclipse (there should an eclipse.exe in the eclipse directory)
2) At this point you will probably want to install all the goodies you might enjoy inside eclipse. If I might suggest a few plugins, first the DUH one cfEclipse, Aptana, mxUnit, and QuantmDB
3) Next we'll setup the JDK, go to Windows -> Preferences... Java -> Installed JREs (click on this option)
4) Assuming you are current you will probably have a JRE 1.6 or JRE 1.5 selected, this is FINE. What you want to do is choose ADD (the button is on the Right of the window)
5) You will be greated by a new window...in the JRE Home Directory input box enter: C:\Program Files\Java\jdk1.5.0_15 (if you downloaded something other than updater 15 the final _## might be different but you get the idea). At this point eclipse will "freeze" for a second or 2 and then all the other fields will be filled out, nice ehh??. All these values are fine and click OK until all the preference windows are closed. Now on to Configuring the Eclipse to run Jboss!
6) First we need to get the correct panel showing, Select Window -> Show View -> Other...
7) You'll want to Scroll down and find "Servers" expand that and select Server.
8) A new panel should now be available in the lower grouping of Panels.
9) Select this panel as focus and then right click -> new -> server...
10) TaDa a magically list of servers you can configure Eclipse to manage, out of the box. Select Jboss -> 4.2 , then Next
11) On this screen select the just recently added JDK 5 in the drop down and put C:/tools/jboss-4.2.2.GA in the Application Server Directory input box. If you placed Jboss somewhere else you will want to specify the folder that CONTAINS the /bin/ directory. Click Next.
12) If you rather not type in 8080 while on localhost you can configure jboss (more or less) to listen on a different port like 80 on this screen, I just take the defaults.
13) Click Finish. You will now see JBOSS 4.2 in the Server panel.
14) Highlight it and click the Play Icon, alternately you can right click it and choose start.

There you have it Eclipse Jboss and BlueDragon running and happy. Assuming all goes well you can now browse to http://localhost:8080/bluedragon/index.cfm.

Notes about JEE environment:
  • Paths are case sensitive even on windows, ColdFusion variables are still not case sensative.
  • In a simple install (like the one above) your context root is the name of the .war file/directory
  • when using cfinclude the path root is the directories in bluedragon.war
  • When access files in the root of bluegradon.war you must navigate to http://localhost/bluedragon/file.cfm
  • If you want BlueDragon (or any WAR) to redeploy jut touch (change the mod date) of the {war}/WEB-INF/web.xml file

In my next entry I will attempt to explain portions of the technology used to make this all happen. For now be happy it is running and enjoy BlueDragon on Jboss (or ColdFusion on Jboss).


* The reason you want to install WTP is WTP offers a server configuration that allows you to control a JEE server from inside eclipse. previously the only way to do this was with a commerical product like myEclipse but the WTP project now offers a similar feature for start stopping and managing deploys to JEE servers all from inside eclipse.

Monday, March 10, 2008

Thanks New Atlanta

If you have not heard New Atlanta has announced they will open source Blue Dragon's J2EE edition. The press release can be found here.

This is one of those times I wish I had named my blog something other than cfRant. I mean let's face it what is there to rant about here? New Atlanta just made a heck of a move to give the community a mature CFML engine. The Smith Project is nice, don't get me wrong, but the product was not exactly mature and has suffered from some nuances that made it hard impossible to use popular frameworks.

We, Kroger, seriously evaluated using BlueDragon about 2 or 3 years back but at the time the pricing model for the J2EE version was just not competitive when compared to ColdFusion and the functionality CF7 offered at the enterprise edition (to date I still question if we have used many of those features we paid for but that's a rant for a different day). I know since then the product has grown and added additional feature making it an even stronger candidate for companies. I must applaud New Atlanta for releasing the J2EE edition. I hope this drives more developers to learn more about the J2EE ColdFusion's installation, like context roots. At the same time I do have some concern about a bit of a learning curve in that respect too, hopefully the FAQ statement "
New Atlanta plans to work aggressively to integrate and distribute BlueDragon with popular open source products" will alleviate that adoption issue. When BlueDragon releases I will certainly do my best to blog about setup and configuration, if I feel New Atlanta's documentation is lacking in any way. We have been running ColdFusion in this type of configuration for years and Bob Burns and myself are big advocates of Jboss and ColdFusion.

I have some pretty strong feelings about CFML and the direction Abode has pushed it, sometimes I agree, other times I have silently disagreed. I think there are some areas that could stand some great improvement, not to mention area's I would like to contribute. Now all I have to do is get onto the BlueDragon steering committee! Vince if you happen to read this I am definitely interested. I am eager to see the source code for BlueDragon, I'm sure there's another group of folks interested as well...

Thursday, February 21, 2008

Build for Eclipse

This is in response to a comment on Mark Drew's blog by Tero. At Kroger we have an automated builder for our ColdFusion Projects. I'm making it available for everyone here I offer no official support but feel free to leave a comment if you have questions. Its fairly simple and works for us, installation Instructions:

Unzip the contents into your project in eclipse. You should have some thing like /[project]/_builder and /[project/.externalToolBuilders/. You'll also want to add the following XML block to your .project file



<buildSpec>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>auto,full,incremental,</triggers>

<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/project_build.launch</value>

</dictionary>
</arguments>
</buildCommand>
</buildSpec>



Now let's get to educating you about what's actually going on. In eclipse you can attach 1 or more builders to a project. They can execute at different times in Eclipse. You can set these builders up by right clicking the project and selecting the properties. The above xml block is what eclipse would put in your .project file so it knows there is a builder attached to the project. Okay now how the ANT file works. Below is a bulleted list of exceptions you may want to know about/change.
  • This is setup specifically for JBoss but it is very easy to change.
  • Properties are not variables once they are defined they will not be over written. So the order of the property declarations is important
  • The ANT script does try to take advantage of an environment variable of JBOSS_HOME. If it is not defined it will use the definition of env.JBOSS_HOME in the .properties file.
  • Some additional pathing for JBoss may need to be modified
  • The default build task is Project and all projects in Kroger deploy to cfusion.war/projects/ you may want to change that behavior
Please feel free to modify and use to your hearts content I am always happy to try to answer questions as well.