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.
Friday, March 28, 2008
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.
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:
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:
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.
- 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...
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...
Subscribe to:
Posts (Atom)