Where is Craig McClanahan(Author of Struts 1.x)?

Firstly, a little background on why I like Struts…please bear with me.

I started my career as a java developer in 2006. That time my team lead strongly believes that freshers should work on core technologies without any tools for at-least 6 months so that they will get a chance to learn basics and have a strong foundation on fundamentals.So I was working on Core Java, Servlets and JSP for first 3-4 months and I used to hear the term “Struts” very frequently on web and in our senior java developers discussions. So I started learning Struts in my free time and practiced it by myself by writing code using EditPlus(no eclipse ide as per my team leads rule :-)).

One evening me and my friend sat together to write a simple registration application using struts.Because we were not using any IDE, it is like write the code in EditPlus, compile using javac, build war file using jar command and deploy to tomcat. I still remember the same process(code/compile/build/deploy with bare hands) is repeated 17 times to finally get that one form struts application working because of spelling mistakes, missing import statements, mistakes in struts xml configuration etc etc. After 4th time we started counting how many times we need to do this in frustration:-))

Soon we got EclipseIDE and coding became a cake walk… type first 2 chars and Ctrl+K…enjoy :-).
We were using LombozEclipse which comes with in-built Support for creating Struts projects.So coding became fun with LombozEclipse, Tomcat & Struts.
I fall in love with Struts after knowing how easy it is to develop web apps using Struts instead of directly using Servlets. Then I experimented with different types Action Classes, Modules, Validations, Tiles, i18n, lot of Struts UI tags….That was a great time for me.

After a year or so I started hearing like Struts is not that good, depends on Servlet API, verbose xml, blah blah in the process of marketing brand new MVC frameworks. Every new MVC framework started explaining how their framework is better than Struts.

I remember, I guess in Spring in Action book author mentioned Struts as “King Of Java Web Frameworks”. Yes, that true. Yes I agree that Struts has its own set of limitations/drawbacks. But writing a framework when there is no such a similar framework exists is not easy.

What I meant to say is writing SpringMVC is easier as it has a reference to check what minimum features needs to be provided, what limitations should be eliminated and what additional features should be added by looking at Struts. But for Struts Author there is no such a reference to check against.

After sometime I came to know that Craig McClanahan is moved on to JSF1.x and then to Shale and then totally fade-out from java community.
After that no news about what he is doing, no updates on his blog, no clue where he is and what he is doing.

Recently somewhere I read in some blog like “Craig McClanahan created shit framework(struts) and now he is playing with Rails Toys”. I really surprised rather disappointed after knowing that Craig McClanahan, The Author of The King of Java Web Framework, is entirely left Java šŸ™

Even what is more surprising to me is why SpringSource or RedHat guys didn’t try to bring him back to Java.
When there was no MVC framework, no DI concepts, no Annotations he was able to create such a beautiful framework. Now we have all fancy stuff IOC, DI, CDI, Annotations, REST, JSON and 1000 more… With all these, he could create something more poweful.

Come on guys bring him back to Java Community.

Unable to create a maven project using appfuse archetypes?

I don’t know why sometimes when i tried to create a Maven project using one of appfuse archetypes, eclipse throws error saying unable to create maven project.

I resolved it by doing following:

Add Remote Catalog : http://repo1.maven.org/maven2/archetype-catalog.xml

Now I am able to create maven projects using Appfuse archetypes.

Are frameworks making developers dumb?

Last week I got to take interviews to hire senior java developers with around 5 years of experience. But after the interview process is over I felt like the frameworks makes developers life easier but at the same time making them dumb.

Everyone puts almost all the new frameworks on their resume claiming they have “Strong, working experience on Spring, Hibernate, Web Services etc”.

Here is how the interviews went on.

Me: You have used Spring in your latest project. What are the advantages of using Spring?
Interviewee: We can configure beans in XML and it will take care of instantiating and give it to us.

Me: If Spring is for only creating objects why is it required at all, I can directly instantiate the dependencies using “new”. Why should I configure the class names in XML and get the object from Spring?

Interviewee: If tomorrow we want to create another implementation of our interface we can create new implementation and update the XML configuration to use new impl. We don’t need to change Java class and compile them.
Me: But you are writing a new Java class, so obviously you need to compile the project.
Regarding XML change, 99% of the times your XML will be packaged in war or ear file.
So you will run ANT script and create the war with the all the new changes.
Then your point of “if it is XML i don’t need to compile” is not a valid point.

Interviewee: Hmmm, But the Dependency Injection design pattern suggests to follow this way.
Me: OK. I am done with the interview. Our HR will get back to you. šŸ™‚

Interview with another guy:

Me: Can you explain about your latest project and what technologies have you used?
Interviewee: It is some XYZ System and we are using Spring, Hibernate, REST WebServices.
Me: Ok. Can you explain something about RESTful architecture?
Interviewee: We can develop RESTful application by using @RequestMapping(value=”/url”, method=”POST”). And also we can use PUT, DELETE methods.
Me: That OK, but what is the concept of RESTful architecture?
Interviewee: That’s what I am explaining. If you use @RequestMapping(value=”/url”, method=”POST”) you can develop RESTful application.

Me: Ok, How good are you in Hibernate?
Interviewee: I am using Hibernate for the last 2 years. I am very good in using Hibernate.
Me: What are the advantages of using Hibernate over JDBC?
Interviewee: By using we don’t need to write anything to interact with database, Hibernate will take care of.
Me: How Hibernate comes to know about your project requirement?
Interviewee: If we use Hibernate it will take care saving, updating and fetching data from database.
Me: Uffffffuuuuu… OK.. In your free time do you read any technology related blogs?
Interviewee: Yeah, why not. That how I learn Hibernate in-depth.
Me : Very Good, nice talking to you. Our HR will get back to you. šŸ™‚

Interview process went on like this…

I strongly believe frameworks will increase developer productivity. But the developers should try to understand how the framework is doing the stuff. You need not learn all the internal working mechanisms of frameworks. If you are really good at Servlets and JSP then it is very easy to understand any Java Web framework like Struts, SpringMVC etc.If you aren’t good at the basics then obviously for every other question reply would be.. “framework’s annotation/xml will execute this”

I strongly recommend the people who want to start their career as a Java developer to work on Core Java, Servlets, JSP for sometime.Then only one can understand the frameworks in proper way.

Syntax Highlighting

To enable syntax highlighting on blogspot follow the below steps.

Go to Design –> EditHTML–>Edit Template section

Add the following just before </head>

<!-- Add-in CSS for syntax highlighting -->

<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js' type='text/javascript'/>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCpp.js' type='text/javascript'/>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCSharp.js' type='text/javascript'/>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCss.js' type='text/javascript'/>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushDelphi.js' type='text/javascript'/>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushJava.js' type='text/javascript'/>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushJScript.js' type='text/javascript'/>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushPhp.js' type='text/javascript'/>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushPython.js' type='text/javascript'/>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushRuby.js' type='text/javascript'/>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushSql.js' type='text/javascript'/>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushVb.js' type='text/javascript'/>
<script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushXml.js' type='text/javascript'/>

Add the following just before </body>

<!-- Add-in Script for syntax highlighting -->

<script language='javascript'>

Add the <pre> tag surrounding the code snippets.

<pre class="xml" name="code">

Your XML goes here

<pre class="java" name="code">
Your Java code goes here

Finally you need to deliver DeveloperWrittenCode.WAR, not Manager’sManagerialSkills.zip

Some IT managers perspective on developers made me to write this post.

A managing director of a company telling to delivery head that

We need not worry about developers. If we go around the villages with a car and get the people who just completed their school and give him a computer with internet connection and then give 15 days of time to learn java. Then assign the work and put a deadline. They will complete the work. We need not bother about Developers. All we need to care about is Managers, who can interact with the client and make the developers to finish their work.

A Delivery head telling to a team lead that

Why the project get delayed? If you allocate the work to your developers and put a deadline they should complete it on-time. If they can’t we don’t need them and we can terminate them right away”.(The team is a one year experienced java developer and two 2 months experienced fresh graduates, and still nobody knows what are the requirements for the project).

A delivery head is telling to a senior developer that

I will give you 3 fresh graduates and i want to build a portal that looks like igoogle in 2 months. Just assign the work and put a deadline. They will complete it.(Those 3 fresh graduates just know about computer programming in theory and they haven’t write HelloWorld program yet).

I know not all manager think like this. I have worked with many good managers who takes care of developers very well, sit with the developers when it needs to work in late nights, arranging dinner and drop him at his door steps at 2’o clock in the midnight. I know managers will have much more responsibilities than a developer. I know managers are responsible to give justification if the project delivery got delayed. But that doesn’t mean that managers should treat the developers as machines.

A project delivery is not solely depends on either developers or managers. It is a team work. Everyone should understand the importance of others contribution and treat properly.

Putting the deadline is the only way to make the developers complete their work? No.

There are some other approaches to keep the team members energy levels up and get the maximum productivity.

1. Observe their interested areas and put them to work on those areas:
Some developers are more interested on UI development, some are interested on Back-end Server side coding and some others are much more interested on Database programming. If any developer is interested in any particular area allow him to work on it. You can get maximum productivity from him as he likes what he is doing which always results in better productivity.

2. Give an opportunity to improve in his weak areas:
Some developers are very strong in technical aspects but poor in communication skills. Communication skills are very important as developers has to communicate their design approaches, any development issues to others. In that case ask them to build a good POC using his favorite technologies and explain the design and best practices he followed to his team. After doing this multiple times there will be definitely an improvement in his communication skills.

3. Promptly give feedback on his improvement:
It is more important to give feedback on his improvement which build confidence on himself. If you don’t give any feedback promptly and you did it on year-end appraisal only there will be no use. Give timely feedback and allow give a chance to improve.

4. Appreciate the good work:
When a developer did a good job it is the managers responsibility to let others know about it because all the developers may not be good at marketing himself. A simple congratulations email or a ThanksCard might drastically improve the developers productivity.

5. Give the ownership on his work:
When a developer is capable of handling a module ask him to take up the ownership on that. This will be good for both the project and the developer. For that module you can have a single point of contact to track the progress and the developer may improve on how to design the module, architecture best practices etc instead of just coding to the design.

6. Listen to their suggestions:
Even though some developers have less experience they might have better ideas. Listen to them. If a developer suggest a new way of doing something ask him to prove that it will work by doing a simple POC.

A great developer’s(Craig McClanahan) passion on technology gave birth to Struts which became the default web application framework for java and brings up lots of job opportunities(Still there are lot of openings for Struts 1.x). Another great developer/architect’s(Rod Johnson) expertise on application development gave birth to Spring framework which eases the life of java developers across the world and cut down the development time drastically which is saving lot of money to enterprises. Some other technology freak’s(Gavin King) thoughts on database programming using java created Hibernate ORM framework which influences the persistence approach and became a default tool for persistence across the java community.

This is the power of a developer. Feel proud to be a developer.

The last thing that I can say is “Finally you need to deliver DeveloperWrittenCode.WAR to your client, not Manager’sManagerialSkills.zip“.