Tuesday, December 30, 2008
2008 : The good, bad and ugly
The highlights of 2008 were speaking at conferences, giving presentations locally, wrote 68 articles for Javalobby, the three part SoapUI article was #1, #2 and #8 at Architecture Zone and SOA Zone. I also had the opportunity to learn and use many tools.
Now coming to the bad. I always wanted to learn Maven; I even tried to use it a few times. I first tried to use Maven was when I reviewed the book “Java Power Tools”. It was a simple project, and everything seemed to work fine. However, I failed miserably when I tried using Maven for a few other examples. Instead of persevering through my problems I gave up.I started out wanting to become an expert on Maven; I ended up being just another Novice.
Up until my spell of laziness, I read about 2-3 books a month. Starting in about October, I began to lose interest in reading and reviewing books. But I do hope to reverse this trend in the next year.
I never knew that there would be something worse waiting for me in 2008. I used to feel so bad whenever I heard on TV that a company was closing its operations and all the employees were laid off. I felt so bad for them, had no idea that it was going to happen to me also.
When I heard that the company I was working was closing its operations and we were given just 3 days notice, I was devastated, shocked and stunned. I just can't even write how I felt in those few days. My world had turned upside down. I had planned a trip to India to visit my parents and had collected 80 hours of vacation. Lost all of them, the company had no policy of paying for unused vacation. Hah, they tell me at the end. It was just bad.
However, I am sure I had done some good karma, I was able to find another job in just 3 days. Thanks to one of my Friends who referred me.
Now that I have gone through the worst, I am sure I will be able to cope better next time if the same happens.
Anyway, what an incredible year 2008 was. Life is full of surprises; good, bad and ugly, and if and only if we could predict the future........
Tuesday, December 16, 2008
Stripes Framework - Worth Trying
Just a few days back, I read the article on "TSS" about Stripes called "A Stripes 1.5 Test Drive". The one and only one thing which attracted me to this article was that other than the web.xml file, there wasn't any XML configuration files to be written and to maintain.
I read the article with great interest, and also read the documentation on the Stripes web site. Next, downloaded the libraries and was able to get it working with the many samples I had in minutes. Yes, trust me just minutes.
So, I decided to do something even more interesting which I always do and surprisingly it worked like a charm. I am planning on writing a detailed article about how I was easily able to use Stripes with my existing sample projects.
Have you used Stripes? What do you think about the same? Isn't it a great framework?
Stay tuned about my article as well, I will keep you posted sooon.
If you haven't used Stripes, give it a try. You will be really surprised to see how easy it is to use Stripes.
Tuesday, December 9, 2008
The Three Pillars of Continuous Integration
A software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build to detect integration errors as quickly as possible.
Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.
While CI is actually a process, the term Continuous Integration often is associated with three important tools in particular. As shown in the screen above the three pillars of CI are:
1. A version control repository like Subversion, or CVS.
2. A CI Server such as Hudson, or Cruise Control
3. An automated build process like Ant or Nant
So, let’s look at each of these in detail:
Version Control Repository:
Version control repositories also known as SCM (source code management) play a crucial role in any software development environment. They also play a very important role for a successful CI process. The SCM is a central place for the team to store every needed artifact for the project. It is mandatory for the teams to put everything needed for a successful build into this repository. This includes the build scripts, property files, database scripts, all the libraries required to build the software and so on.
The CI Server:
For CI to function properly, we also need to have an automated process that monitors a version control repository and runs a build when any changes are detected. There are several CI servers available, both open source and commercial. Most of them are similar in their basic configuration and monitor a particular version control repository and run builds when any changes are detected.
Some of the most commonly used open source CI servers are; Cruise Control, Continuum, and Hudson. Hudson is particularly interesting because of its ease of configuration and compelling plug-ins, which makes integration with test and static analysis tools much easier.
Automated Build:
The process of CI is about building software often, which is accomplished through the use of a build. A sturdy build strategy is by far the most important aspect of a successful CI process. In the absence of a solid build that does more than compile your code, CI withers. With automated builds, teams can reliably perform (in an automated fashion) otherwise manual tasks like compilation, testing, and even more interesting things like software inspection and deployment.
Now that we have seen the important tools in our CI process, let’s see how a typical CI scenario looks like for a developer:
* CI server is configured to poll the version control repository continuously for changes.
* Developer commits code to the repository.
* CI server detects this change, and retrieves the latest code from the repository.
* This causes the CI server to invoke the build script with the given targets and options.
* If configured, CI Server will send out an e-mail to the specified recipients when a certain important event occurs.
* The CI server continues to poll for changes.
Why is CI Important?
This is one of the most frequently asked questions, and here are a few points to note about this powerful technique:
* Building software often greatly increases the likelihood that you will spot defects early, when they still are relatively manageable.
* Extends defect visibility.
* CI ensures that you have production ready software at every change.
* CI also ensures that you have reduced the risk of integration issues by building software at every change.
* CI server can also be configured to run continuous inspection which can assist the development team in finding potential bugs, bad programming practice, automatically check coding standards, and also provide valuable feedback on the quality of code being written.
Over the past several months, I have assisted several companies in implementing CI. There was a little bit of resistance from the developers in the early stages when we implemented continuous feedback. But, never heard a single negative comment about this approach. If you already have a version control repository and automated builds, you are very close to the CI process.
Download one of the open source CI servers, configure and setup a simple project. It should take less than an hour if you have automated build scripts. Start adding additional features like code inspections, generating reports, metrics, documentation and so on. Most important, send continuous feedback to your team.
Give this process a try, you sure will be surprised to see how effective it is. And, as always share your thoughts, concerns or questions.
Monday, December 8, 2008
Spring vs EJB War : Will It Ever End?
I received several emails asking about my opinion. I did comment saying
As long as it is a healthy discussion on Spring Vs EJB and not a war of words between two individuals, I have no problem at all.
There was one person who went to say that "I was gaining more popularity with this article". I have been writing articles from many years now. Every time I have learnt something new or interesting, I have tried to share those with my community. I don't need such fame.
Of course, it had no effect, and the discussions took a completely different route.
I had seen such war of words and arguments when it came to Java vs .NET, but never had heard or read about two great and very useful framework and specification. I had one former colleague who went to such an extent saying:
I will jump off the bay bridge rather than work on Java.
I didn't understand that statement than, and don't even now. And now with this discussion taking a route which I had never imagined, I am even more confused.
What are your thoughts? Why do developers go to such extreme? Isn't it another language or framework? Don't we learn new languages when we go to different countries however hard it may be? Why we as developers have such hatred towards other technologies?
Thursday, December 4, 2008
Interesting books from Apress
Here is a sneak peek into the list:
978-1-4302-1877-7 Spring Persistence — A Running Start Fisher, Paul Jan 2009
978-1-4302-1648-3 Pro Spring Persistence with Hibernate Seddighi, Ahmad Jan 2009
978-1-4302-1881-4 Apache Batik: SVG Toolkit Kumar, Ajit Jan 2009
978-1-4302-1926-2 Grails Persistence with GORM and GSQL Fischer, Robert Jan 2009
978-1-59059-995-2 The Definitive Guide to Grails, Second Edition Rocher, Graeme Jan 2009
978-1-4302-1600-1 Groovy and Grails Recipes Jawad, Bashar Dec 2008
978-1-4302-1055-9 Practical RichFaces Katz, Max Dec 2008
And here is a list of books which have already been published and is available for you to purchase.
1. 978-1-4302-1061-0 Beginning Java™ ME Platform Rischpater, Ray Oct 2008
2. 978-1-4302-1624-7 The Definitive Guide to Spring Web Flow Vervaet, Erwin Oct 2008
3. 978-1-4302-0963-8 Beginning Database-Driven Application Development in Java™ EE: Using GlassFish™ Vasiliev, Yuli Sep 2008
4. 978-1-59059-737-8 The Definitive Guide to Apache MyFaces and Facelets Wadia, Zubin Sep 2008
5. 978-1-4302-1057-3 The Definitive Guide to SOA: Oracle® Service Bus, Second Edition Davies, Jeff Sep 2008
6. 978-1-4302-1031-3 Beginning Google Web Toolkit: From Novice to Professional Smeets, Bram Sep 2008
7. 978-1-4302-1009-2 Pro Java™ EE Spring Patterns: Best Practices and Design Strategies Implementing Java EE Patterns with the Spring Framework Kayal, Dhrubojyoti Aug 2008
8. 978-1-59059-921-1 Pro Spring 2.5 Machacek, Jan Aug 2008
9. 978-1-4302-0973-7 Practical API Design: Confessions of a Java™ Framework Architect Tulach, Jaroslav Jul 2008
10.978-1-59059-986-0 The Definitive Guide to Terracotta: Cluster the JVM for Spring, Hibernate and POJO Scalability , Terracotta, Inc. Jun 2008
11.978-1-59059-979-2 Spring Recipes: A Problem-Solution Approach Mak, Gary Jun 2008
Tuesday, December 2, 2008
Article Recursion
And, just yesterday my friend Andrew Glover wrote an article in his The Disco Blog called Code coverage coterie confab.
The article was also quoted by another blog as well. The article is "Code Coverage, what is it good for?".
What are your thoughts about code coverage? Do you use it? Share your thoughts?
EJB 3.1 - A Brief Look
The article has generated very interesting discussion from many readers, and there are very good comments as well. Javalobby also posted it as a Spotlight Feature.
I used the latest version of OpenEJB which has support for quite a few features of EJB 3.1 to work out all the samples. I was able to unit test all the samples as well with just a click of the button in Eclipse IDE. Just amazing for how EJB's have come.
Monday, December 1, 2008
Any Code Analysis Tools for Groovy & Grails?
Hello Meera,
I was just wondering if we have a code analysis tool in the market that integrates and works well with Grails & Groovy? Your response is very much appreciated and valued.
Many Thanks,
Navatha
I have used code analysis tools for both Java & .NET, but none for Groovy until now. I am pretty sure FindBugs which analyzes the byte code might work for Groovy and Grails. All other tools inspect the source code, so we might not be able to use any of them.
Have you used any such tool with Groovy & Grails? Any ideas? If so, please share your thoughts.
Saturday, November 29, 2008
Terror in India
I just don't understand how these terrorists could just go off and kill all the innocent people. They even went into a Maternity and Childrens hospital, can you believe how cruel these terrorists are? What might be going on in their minds? How do they get such hatred toward people?
Reading all the online stories makes me even more sad. Just unbelievable. With more than 1 billion people, how do we suspect any one person of this motive?
Who is responsible for the bloodshed? Can anyone stop this bloodshed at all?
If there is God, I pray to him sincerely to put some common sense into the brains of all these terrorists.
Wednesday, October 22, 2008
Why Pair Programming Should be made MANDATORY
Now that I am reading the book "Pragmatic Thinking and Learning", I was able to clearly understand why I felt the way I was in that Job working alone. In Chapter 4: Get In Your Right Mind Andy explains about Pair Programming and why it is important. He first explains about the R-Mode and the L-Mode of our brain. So, you may ask what is R-Mode and L-Mode:
If you're looking for global, holistic patterns, you need R-mode. If you need to analyze parts and look into detail, then you need a more L-mode approach. For most of us, this level of specialization is how it is. R-mode sees the forest; L-mode sees the tress.
For pair programming, Andy very well explains that we need to get both R-mode and L-mode working together, and the only way to do this is by having your L-mode work with another person's R-mode or their R-mode work with your L-mode.
Again,to quote from this excellent book:
The navigator is free to see these larger relationships and the larger picture, And most of the time, you cannot see these relationships if you're driving. So if you aren't pair programming, you definitely need to stop every so often and step away from the keyboard.
This doesn't mean that you should pair all the 8 hours you are working. I suggest we should pair when we are working on a critical piece of our module, when we are trying to fix bugs, learn a new language, writing build files. Always better to have another pair of eyes, and another mode of brain.
What do you think? Are you using Pair Programming at all? What are your thoughts?
Tuesday, October 14, 2008
Clean Code : MUST Read Book
What an amazing and interesting book it is. Around 4 weeks back, the book was at my front door when I came back from work. The next few weeks were quite hectic and I had no time to even open the book. Finally, two weeks back I decided to just browse the contents. I first read the foreword, which again is amazing. That was the beginning, I just couldn't stop.
This time since I hadn't signed up to review this book, I thought I should try a different format of writing the review. I mentioned 5 reasons why this book was worth reading, simple ones. And, later at the end summarized what I had learnt from this book. I guess it stuck a cord with the readers, and there were some good comments as well.
Take a look at the review, and try to get this book if you read or write code. Trust me it is worth the money and the time.
P.S: I sent an email to the publisher to find out who had shipped this book, and my contact at Pearson had sent the book. I did thank her profusely for sending this book along as well.
Friday, October 10, 2008
Maven: The Definitive Guide--New from O'Reilly
To quote from the email I received:
For too long, developers have worked on disorganized application projects, where every part seemed to have its own build system, and no common repository existed for information about the state of the project. Now there's help. The long-awaited official documentation to Maven is here.
Maven: The Definitive Guide (O'Reilly, US $34.99) serves as both an introduction and a comprehensive reference for Apache Maven, the tool that will transform the way an organization builds and manages application development. Written by members of Sonatype's engineering team—including Jason van Zyl, the creator of the Maven central repository—the book explains why Maven is replacing Ant as the tool of choice, not just for open source Java projects, but for applications in many other languages, including Scala, Ruby, and Groovy. The book also provides the first in-depth overview of Maven 2.
The first half of this book introduces Maven by example, with a series of real-world, multi-module applications that can be used as templates. The second half serves as a reference to a wide range of topics, teaching readers how to:
* Get started with Maven
* Understand the Project Object Model (POM)
* Integrate Maven with Eclipse
* Master advanced dependency management
* Use the Nexus repository manager
* Integrate Maven with Spring and Hibernate
* Write and use Maven plugins
* Generate a project website
* Customize a build with properties
* Use build profiles and profile activation
* Create and use Maven assemblies
* Develop with Maven archetypes
I did try learning Maven several times, and each time got lost in the POM. It sounds like this book is for people like me, but I already have quite a few books in my list. And with this one for me to review, I sure will have to try all the examples, and there isn't just enough time right now.
Wednesday, October 1, 2008
What's FuseMetrics?
* Junit
* TestNG
* JDepend
* Checkstyle
* PMD
* JavaNCSS
* FindBugs
* Simian
* Clover
* Cobertura
It produces summary metrics and graphs - sparkline and histograms.
No matter what build tool you are using, Ant, Maven, Gant or Gradle you can use FuseMetrics.
It’s completely open source and we have used it for many of our clients. To read more about FuseMetrics, take a look at the article I wrote at Javalobby here.
Try it out and give us your feedback.
Thursday, September 25, 2008
What's Gradle?
gradle is another java+groovy based build-tool
IMO gradle is clearly superior to gant.
it implements support for dependency-management
and some other really smart concepts.
check it out: http://www.gradle.org
As always, I didn't waste anytime once I saw this comment, and read the Getting Started and also Users Guide. It sure looks interesting. I will download Gradle and give it a try and share my experience. In the mean time:
Have you used Gradle? Share your thoughts?
Wednesday, September 24, 2008
Ant or Gant?
This article explains the following in detail:
1. When to choose Gant?
2. What's Gant?
3. Getting Started with Gant.
Of course, you should know Groovy before you decide to runaway from Ant.
Tuesday, September 23, 2008
Are Software Developers in America Lucky?
I have been in the software industry for a long time now. Every time someone moves back to India, and at the same time I chat with someone in India or UAE, I have this dreadful conversation. Read on:
Question 1: Meera, when are you coming back to India?
Meera: I have some family responsibilities, I am not sure I will be coming back soon.
Question 2: You should, the salary they pay here is amazing, do you know?
Meera: Yes, I do. But, I am really happy and content with my salary here as well.
Question 3: How is the working hours there?
Meera: I work 5 days a week if I am within the DC area, and if I am travelling I work 4 days.
Question 4: We work almost 10-14 hours everyday, do you know that?
Meera: Yes, I do. I have also worked when the project was due, and we had tight deadlines.
Question 5: See, that could be one reason why you will not fit in here?
Meera: I don't know, I really know how to manage my schedule and manage work which is assigned to me. So, I don't see any reason whatsoever to work 10-14 hours everyday. I sure wouldn't work at a place where my Manager would expect me to work like that.
Question 6: You guys working in America are really Lucky.
Meera: I don't know, when it comes to work, I can speak for myself and the team with whom I have worked and most worked hard. So, I am not sure why we are lucky?
At this point, I knew the conversation was taking a wrong path, and decided to logout of IM, and later saying that I got interrupted. This has not happened to me once or twice, but many times over the past 2 years. I should admit, I just can't argue at all.
But, I am still shell shocked. Why do developers in India have to work 10-14 hours? Is it really needed? And can you stay focused working 10-14 hours a day? Do you still have the ability to concentrate after 8-9 hours of work? I don't know? I should try working for a month or so in India just to see how things are now, don't you think so?
What are your thoughts? Are we developers working in America really lucky? What do you think?
I remembered the quote from Thomas Jefferson, which says
I'm a great believer in luck, and I find the harder I work the more I have of it.
I guess that sums up why American Developers are Lucky, right?
P.S: If you haven't yet noticed, I am an Indian and proud to be one as well. But, I just don't understand the logic behind working more than 40 hours every single week; and hence this post.
Update: The only reason I posted this article was to know why our fellow developers were working long hours, and to know their state of mind. And it was posted in good faith. I am seeing that the comments are taking a completely different direction, and I just don't want to start a war of words. I am not going to respond/approve any anonymous comments.
Friday, September 19, 2008
Is easyb Easy?
1. Scenarios within Stories
2. Run these Stories from Ant
3. Generate a report.
Check out the article to find out what my verdict was. Also, give it a try and let me know your verdict as well.
Thursday, September 18, 2008
Javadoc or Doxygen?
Here are a few reasons why you should consider using the Doxygen:
1. With Javadoc you have to remember all the HTML tags, you need to embed within your code comments. However, with Doxygen code comments are much more concise and polished, without the need for any HTML.
2. Doxygen can also generate a variety of diagrams, we will take a look at some of them later.
3. Doxygen also provides a structured view on the source code. As I mentioned in 2 above in the form of various diagrams, cross-referenced and syntax highlighted code.
4. You get all the above benefits even if the code does not have any comments at all.
5. Last but not the least, Doxygen is a documentation system not for just Java but also for various other languages like C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#.
The article shows in detailed steps the following:
Step 1. Download, Install Doxygen.
Step 2: Configure Doxygen.
Step 3. Doxygen and Ant.
Step 4. Integrate with Hudson.
Thursday, September 11, 2008
See me at Software Development Best Practices 2008
Software Development Best Practices 2008
October 27–30
Hynes Convention Center, Boston, MA
http://www.SDBestPractices.com
Software Development Best Practices is where the software development community gathers to learn about the latest business-critical technologies, network with peers, connect with innovative vendors and get inspiration from industry visionaries. The conference features 140+ in-depth sessions covering today's most important topics including agile processes, requirements analysis, project/people management, security, testing, SOA, C++ and much more.
I'm pleased to announce that I'll be teaching following session at SD Best Practices:
"Web Services Testing Made Easy and Fun with SoapUI" on Thursday (October 30, 2008) 10:30am — 12:00pm
You can find additional details about my session here.
Register by Friday, September 19, to take advantage of generous early bird discounts. As a speaker, I can also offer you an additional $100 off the VIP Pass. Simply register at http://www.SDBestPractices.com with the code 8ESPK to get your discount.
I encourage you to visit the website and explore all the excellent educational opportunities SD Best Practices 2008 has to offer.
I look forward to seeing you in Boston!
Wednesday, September 10, 2008
The Art of Debugging with GDB, DDD, and Eclipse
The Art of Debugging with GDB, DDD, and Eclipse (No Starch Press, September 2008, 280 pp, ISBN 9781593271749) teaches readers how to effectively use the three most popular open source debugging tools: GDB, DDD, and Eclipse. The text-command based GDB (the GNU Project Debugger) is included with most Linux distributions. DDD is a popular GUI front end for GDB, while Eclipse provides a complete integrated development environment.
The Art of Debugging offers readers specific advice for debugging with each tool and explains general debugging strategies. Real world examples of coding errors help to clarify the authors' guiding principles, and readers will quickly understand why their programs crash or throw exceptions.
The authors are well-known for their popular online debugging tutorials, and a printed book is long overdue. According to No Starch Press publisher Bill Pollock, "Programmers are desperate for a book devoted to debugging, particularly with GDB and DDD. Finally, the wait is over. No more debugging by hand."
In the book, readers learn how to:
* Inspect variables and data structures
* Understand segmentation faults and core dumps
* Use features like catchpoints, convenience variables, and artificial arrays
* Avoid common debugging pitfalls
* Prevent errors in the first place by making the best usage of editors, compilers, and static code checkers
The book also includes coverage of advanced topics like thread, client-server, GUI, and parallel programming. Whether readers dread the thought of debugging programs or simply want to improve their current debugging efforts, they'll find a valuable ally in The Art of Debugging with GDB, DDD, and Eclipse.
Monday, September 8, 2008
Princeton Premier Registry Scam
Here is the email:
---------------------------------------------------------------------------------------
Subject: Meera Subbarao's Inclusion In Our Global Network
Meera Subbarao
It is my pleasure to inform you that you are being considered for inclusion into the 2008-2009 Princeton Premier Business Leaders and Professionals Honors Edition section of the registry.
The 2008-2009 edition of the registry will include biographies of the world's most accomplished individuals. Recognition of this kind is an honor shared by thousands of executives and professionals throughout the world each year. Inclusion is considered by many as the single highest mark of achievement.
You may access our application form using the following link:
http://princetonpremierbios.addr2.com/url/437460/6b3fde40/
Upon final confirmation, you will be listed among other accomplished individuals in the Princeton Premier Registry.
For accuracy and publication deadlines, please complete your application form and return it to us within five business days. There is no cost to be included in the registry.
If you've already received this email from us, there is no need to respond again. This email serves as our final invitation to potential members who have not yet responded.
On behalf of the Executive Publisher, we wish you continued success.
Sincerely,
Jason Harris
Managing Director
Princeton Premier
Friday, September 5, 2008
CITCON Amsterdam
Jeffrey Fredrick and Paul Julius will take place in Amsterdam on
October 3 & 4. Attendance is free!
This is the third annual CITCON event in Europe. London in 2006 and
Brussels last year were both a blast. Everyone walked away having
learned a lot about the cutting edge of CI and Testing.
You're invited! Register at: http://citconf.com/amsterdam2008/register.php
So, what are you waiting for? If you live somewhere close to Amsterdam, register. Trust me, you will learn a lot from this conference.
Thursday, September 4, 2008
Spring 2.5 books from Apress
1. Spring Recipes: A Problem-Solution Approach
I read and reviewed this book for Javalobby, and gave it 5 stars for all the categories.
2. Pro Spring 2.5
I might start reading this soon..
3. Pro Java™ EE Spring Patterns: Best Practices and Design Strategies Implementing Java EE Patterns with the Spring Framework
I am reading this book currently, and didn't find anything new which I didn't otherwise know about the Java EE design patterns. Haven't tried working on the code samples either.
If you are using or planning to use Spring, than you definitely need 1 and either 2 or 3.
Wednesday, August 27, 2008
EJB 3.0 and Spring 2.5
Also, some interesting comments from readers and a few from Reza Rehman co-author of the "EJB3 in Action" book.
UML Diagrams from NetBeans
I especially liked the way Geertjan starts off his article by saying:
One incredibly useful article recently on Javalobby is called Reverse-engineer Source Code into UML Diagrams, by Meera Subbarao.
Take a look at your leisure.
Monday, August 25, 2008
Reverse-engineer Source Code into UML Diagrams
The article shows how easy and simple it is to include UML diagrams within your Javadoc and also keep them updated with every change in the source code repository. We can do these in less than a few minutes, and in a few simple steps.
Getting started with UmlGraph takes five steps:
- Download the source code for UMlGraph.
- Download and install Graphviz.
- Make changes to your Ant build file.
- Run the Ant target.
- Add this target to your CI job.
Take a look at the article, and share your thoughts. The response has been amazingly good for this article.
Friday, August 8, 2008
Spring's so Groovy
I wrote a simple "HelloWorldService" in Eclipse IDE following the samples provided by this book. Trust me, it was so easy.
In this tutorial written at testearly, you will learn how to use Groovy with Spring, using an external script source file, how to refresh changes when a script source file is changed, and finally see an inline script which was embedded within the Spring configuration file.
Have you used Spring and Groovy? If so, do you mind sharing your thoughts?P.S: Stay tuned for a detailed review of the book "Spring Recipes - A Problem-Solution Approach" at Javalobby.
Monday, August 4, 2008
New Apress Java Books - Summer 08
The Spring Framework remains the leader in the move from so-called heavyweight architectures, such as Enterprise JavaBeans, toward lightweight frameworks. Pro Spring 2.5 covers the new features of Spring 2.5, but moreover, it is focused on best practices and core standards of contemporary Spring development.
The Definitive Guide to Apache MyFaces and Facelets
Practical API Design: Confessions of a Java™ Framework Architect
The Definitive Guide to Terracotta: Cluster the JVM for Spring, Hibernate and POJO Scalability
Spring Recipes: A Problem-Solution Approach
Beginning Groovy and Grails: From Novice to Professional
COMING SOON
Beginning Database Development in Java EE: Using GlassFish TopLink
The Definitive Guide to SOA: Oracle Service Bus, Second Edition
Beginning Google Web Toolkit: From Novice to Professional
Learn to build rich, user–friendly web applications using a popular Java–based Ajax web framework, the Google Web Toolkit. The authors will guide you through the complete development of a GWT front end application with a no–nonsense, down–to–earth approach.
Thursday, July 31, 2008
[cobertura-instrument] WARN visitEnd, No line number information found for class
When I switched back to my Mac, things were working smoothly, when I moved back to my Windows Vista laptop on which I was preparing for the demo, I was getting the same warning and no coverage results.
I tried to run the target from ant with verbose on and it displayed the warning message saying:
[cobertura-instrument] WARN visitEnd, No line number information found for class com.stelligent.demo.CustomerInfo.
Perhaps you need to compile with debug=true?
[cobertura-instrument] WARN visitEnd, No line number information found for class com.stelligent.demo.StringToDate.
Perhaps you need to compile with debug=true?
Looked at the javac task at the Ant website, added a few more options and it worked like a charm. I have no clue why this happens on Vista, is it because I am using Java 6 here and Mc uses Java 5? Go figure.
The changes I added was as such for the javac task:
debug="true" debuglevel="vars,lines,source"
Wednesday, July 30, 2008
Windows Vista - Open Command Window Here
Anyway, each time I wanted to make sure my project works properly I had to open up a command window and go all the way to my project to run the build. This became frustrating and I looked at the "Windows Power Toys' and noticed that "Open Command Window Here" wouldn't work on Vista.
I accidentally was holding the shift key and also clicked the right mouse button, and viola magic happened. I was able to see the "Open Command Window Here" menu option with no additional downloads required.
Just click on this menu item and keep working. Isn't it neat. One nice thing about Vista.
P.S: I googled the same and found many had already blogged about the same as well. :)
Tuesday, July 29, 2008
Visual Documentation of Ant Dependencies in 3 Simple Steps
I was having trouble looking at build files generated automagically by one IDE. I like automation, but not which comes with magic. So, I tried using these two tools to generate the dot file and in turn open them using Graphviz. Graphviz is required to get the actual graph from this dot file which is generated by Grand and Vizant. Once you download and install Graphviz, you can run it as a standalone application and open these dot files generated as well.
Can you guess what IDE I was using? :)
Here is the link again for the blog at testearly:
1. Visual Documentation of Ant Dependencies in 3 simple steps.
Thursday, July 24, 2008
RESTful Web Services in 60 Seconds at Test Early
I continued working on the same and was also able to quickly generate web services for the domain classes I had within my project. This was even more simple with all the CRUD services as well as relationships available in a few seconds as shown below:
Shown below is all the resource and converter classes generated by the IDE.
I was however disappointed that this same operation isn't available when you have a grails project. It would have been easier to right click on all your domain classes and say "generate REST web services" and it would create by default the REST Controller and the changes needed within the URLMappings.groovy class.
You can read all my blog entires at testearly.com here:
1. My entries
Sunday, June 29, 2008
Interesting Book: Persistence in the Enterprise
I received a copy of "Persistence in the Enterprise - A guide to Persistence technologies" book sometime back, I was so busy the last couple of weeks, I literally had no time to even look at the table of contents. Over the weekend, I finally decided it was time to do some justice to this book. So, here is a sneak peek of my review. A detailed review will be posted as always on Javalobby as well.
This book is mainly divided into two parts:
Part 1, "A Question of Persistence", helps the reader understand the many issues and trade-offs we normally face while choosing a persistence framework. This part has 4 chapters that cover the following:
Chapter 1 - A brief history of Object-Relational Mapping. This gives a brief history lesson of some popular relational database persistence mechanisms associated with a few object-oriented languages.
Chapter 2 - High Level Requirements and Persistence. As the name itself suggests, this chapter discusses IT requirements around your persistence framework that you should consider.
Chapter 3 - Designing Persistent Object Services. This chapter introduces the reader to some fundamentals and best practices of domain modeling. Also discusses some common strategies of mapping a domain model to a database with an example-driven approach.
Chapter 4 - Evaluating your Options. This chapter takes you through some best practices for conducting an evaluation based on an objective questionnaire, which is used as a template for comparison in part 2. The questionnaire is very comprehensive, and covers the following sections:
- Background
- Architectural Overview
- Programming Model
- ORM Features Supported
- Tuning options
- Development Process for the Common Example
- Chapter 5 JDBC
- Chapter 6 Apache iBatis
- Chapter 7 Hibernate Core
- Chapter 8 Apache OpenJPA
- Chapter 9 pureQuery and ProjectZero
Appendix - Setting Up the Common Example. This section shows you how to set up and run the example for each persistence framework discussed. It has almost 30 pages, and has every detail and screen shots to get the examples working using Apache Derby as the database, Eclipse as the IDE, and JUnit and DbUnit as the testing frameworks.
Each and every chapter has a summary section, links to developerworks, and references which are really valuable.
If you have are using a home grown persistence framework, or considering writing one, or trying to move from one which you have been using, you should read this book before you venture into either one of those scenarios.
You can find the soft copy of the questionnaire at the link below:
Download the source code here:
Thursday, June 12, 2008
Chapter-wise review: The ThoughtWorks Anthology
1. Javalobby
The essays which were very interesting and the ones I could apply immediately to my work were:
1. Object Calisthenics essay written by Jeff Bay
2. Consumer Driven Contracts: A Service Evolution Pattern by Ian Robinson
3. Refactoring Ant Build files by Julian Simpson
4. Single-Click Software Release by Dave Farley
5. Agile vs. Waterfall Testing for Enterprise Web Apps by Kristan Vingrys
Did you read this book? What are your thoughts?
Why do you need the latest version of Hudson?
Here are the steps to use the latest Hudson version:
1. Download the 1.223 version from here.
2. Stop Hudson and replace your hudson.war with the latest version.
3. Start Hudson, and go to dashboard and click on Manage Hudson which should bring a page like this:
4. Click on Manage Plugins, which will open up a new page as shown below:
5. Now, select the plugins you want to install and click the Install button which is all the way down on the right hand corner.
6. Restart Hudson, and you have the plug-ins installed.
Also, some other new features are useful as well as per the Hudson changelog:
a. "Hudson's own user database" can be now configured to prevent sign-up.
b. Administrator can now create user accounts for others (issue 1193)
c. Authentication failure now leaves the INFO log on Hudson server log.
Tuesday, June 10, 2008
Effective Java - A Must Read Book
Last week, I received an email from Addison-Wesley about their 4 new books. Out of those 4 books, Effective Java and Persistence in the Enterprise were the 2 books which interested me. Even before volunteering to review these books, I logged into safari and did read a few chapter links to see if it was worth all the time I was spending. The table of contents and the sample chapters did change my mind.
I just received these books yesterday, and already half way through the "Effective Java" book.
It is just unbelievable. The book is filled with pragmatic advice, plenty of samples, and is also very readable.
Stay tuned for the detailed review which will be published at Javalobby soon.
Monday, June 9, 2008
Hudson - Tips and Tricks
Hudson is an open source CI server that is by far the easiest one to configure. Second to ease of use is Hudson’s impressive plug-in framework, which makes it easy to add features. For instance, Hudson has a plug-in for tracking FindBugs issues, PMD issues, and CheckStyle issues over time as well as code coverage. It also trends test results from JUnit, as well as build results and corresponding execution times. In spite of all these cool features, we had to find ways to get around some common issues we faced at work using Hudson.
The article I wrote at my company's blog Test Early describes a few real-life tips and tricks that I have found at work and will assist in configuring Hudson to work most effectively in your environment as well:
- Changing Hudson home directory
- OutOfMemoryError
- Securing Hudson
- Hudson Views
- Hudson and Groovy
- Spaces in directory names
- Browser to use
Wednesday, May 28, 2008
Java Power Tools Book Review
I am really amazed at how many tools John has covered, and also with such great detail.
It took me a while to add just the links to all the 30 tools John has covered in my review. Each time I added a link, I kept wondering how much time John must have spent writing about each one of these. Awesome. I have such great admiration for John for providing us with such a wonderful book.
Even though the book is heavy, and has 910 pages, I carry it everyday to work. It is a great reference book for all the tools as well.
Also, with the help of this book, and only this book I was able to write my first simple and most simple project using Maven. Yes, you heard me right Maven. Had tried using Maven many times, and every sample I downloaded just failed complaining about some dependency which I wasn't even sure where it was being stored.
Tuesday, May 20, 2008
SoapUI, CI and Coverage
This part of the series guides you step-by-step through the Ant tasks for running tests written using SoapUI, generating JUnit reports, integrating with CI, and to top it all off getting code coverage using Cobertura. When you are done with this part, you will be able to reap the benefits of writing tests, continuous integration, and code coverage.
Read the complete article here at Javalobby.
Functional Web Services Testing Made Easy with SoapUI - Part 3
Tuesday, May 13, 2008
SoapUI's so Groovy
Take a look at your leisure, as always give me a yell in case you need to find out more.
Friday, May 9, 2008
Java Power Tools Finally Arrived
I had interviewed John Ferguson Smart a long time back for Javalobby. From the day I did this interview, I was so enthusiastically waiting to read the book. I did glance over a few of the chapters, it is just unbelievable. With 30 tools being covered in this book, I will have to review this book in two parts.
I should mention that I did read the foreword first, since it is written by Andrew Glover, President of Stelligent. And that's where I work. :)
If you are writing software using Java, you should without a doubt get this book.
Stay tuned for the detailed review at Javalobby.
Tuesday, May 6, 2008
Functional Web Services Testing Made Easy with SoapUI - Part 1
Here are the links where you can find the article on various Zones at Javalobby:
1. Java Zone
2. Architects Zone
3. SOA Zone
The next part in this article will cover SoapUI and Groovy.
Give me a yell if you need any help.
Wednesday, April 16, 2008
SoapUI and WebLogic Web Services
The weblogic.webservice.GenericHand
public boolean handleRequest(MessageContext mc) {
SOAPMessageContext messageContext = (SOAPMessageContext) mc;
SOAPBody soapBody = messageContext.getMessage().getSOAPPart()
.getEnvelope().getBody();
Iterator itBody = soapBody.getChildElements();
while (itBody.hasNext()) {
Object obj = itBody.next();
SOAPElement bodyElement = (SOAPElement) obj;
String name = bodyElement.getElementName().getLocalName();
}
}
The following line:
SOAPElement bodyElement = (SOAPElement) obj;
throws a ClassCastException, the stack trace is shown below:
java.lang.ClassCastException: weblogic.webservice.core.soap.SOAPTextElement
at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.java:143)
at weblogic.webservice.core.DefaultOperation.process(DefaultOperation.java:549)
at weblogic.webservice.server.Dispatcher.process(Dispatcher.java:204)
at weblogic.webservice.server.Dispatcher.doDispatch(Dispatcher.java:176)
at weblogic.webservice.server.Dispatcher.dispatch(Dispatcher.java:96)
at weblogic.webservice.server.WebServiceManager.dispatch(WebServiceManager.java:100)
at weblogic.webservice.server.servlet.WebServiceServlet.serverSideInvoke(WebServiceServlet.java:297)
at weblogic.webservice.server.servlet.ServletBase.doPost(ServletBase.java:498)
at weblogic.webservice.server.servlet.WebServiceServlet.doPost(WebServiceServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7047)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3902)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
I did read in just one post that any default spaces in the request is converted
to a SoapTextElement.
If I add a simple guardian to check for
weblogic.webservice.core.soap.SOAPTextElement
and skip the loop it works, but I know that's isn't the right solution.
If I create a simple Web Services Client using Axis(WSDL2Java),
I don't see the same exception.
Have you seen this, how did you fix this? Any ideas?
Here is the thread which I saw on bea web site.
1. bea site
And this one which I guess is related to Spring:
2. Spring site
Tuesday, March 25, 2008
Matrix-based security in Hudson doesn't work in IE
I started working on getting the standard security setup and am having problems doing the same. I am using the 1.195 version. In this version, once I select the Matrix-based security, I am unable to add users or group.
I did find a workaround wherein I can go and change the config.xml file and manually grant permissions to users. But, if I go back and make any other configuration changes and save, my security changes are lost.
Are you having these problems? How did you manage to secure Hudson? Any ideas?
P.S: After I posted this and searched a lot on the net and didn't find any reference, I was a bit surprised. Downloaded Hudson on my laptop, and was able to use the Matrix-based security. Once it worked on my laptop, I knew who the culprit was. It was IE, my laptop by default uses Firefox as the browser. Once I downloaded and installed Firefox as well on the desktop, I was able to add users and roles.
Monday, March 24, 2008
Joined Stelligent
Saturday, March 22, 2008
Hudson's so Groovy
Having used Cruise Control for almost 4 years, when I started looking at Hudson last week, I was impressed seeing how easy it was to configure and get it up and running in just a few minutes. It also has several plugins available, and if you don't find one you can quickly write one as well.
Andrew Glover, in the TestEarly Blog, shows us how to use Groovy with Hudson. Hudson has a Groovy plug-in which can execute Groovy Scripts.
To quote from the blog "as a part of a CI project setup, another dependent
project’s directories were becoming read-only due to an SCM feature.
Consequently, a child project couldn’t write to the filesystem.
This problem was easily solved using Groovy (plus a little Ant)– a triggered build executes a small Groovy script that uses Ant’s chmod
task to make target directories read-write enabled. As you can see, the
fix requires 2 lines of code (which could, arguably, be reduced to one)"
def ant = new AntBuilder()
ant.chmod(dir:"./ci09_i/ui/rep2/reports/", perm:"ugo+rw",
includes:"**/*.*")
You can read the complete story at TestEarly.com
Isn't that cool? However, I am not sure if there is a way to specify Hudson to run the Groovy Script first before executing any build script or vice versa, any ideas?
Here are some useful links for additional reading:
Friday, February 1, 2008
Any idea when JBoss 5 will be out?
I am not sure JBoss is dependable anymore. Especially with the current version JBoss 5. I know it's still in beta, but it has been there since 2006. Even the latest JBoss 5.0.0 Beta3 has many problems; especially with Java 6.
With all the problems with JBoss and having no clear cut idea when the final release is due, I had to look for other options. I am glad I did, and found Oracle and GlassFish working with just no problems at all.
When I did an interview with the authors of the book "JBoss in Action", they did mention that all the features in JBoss 5 were already available in later versions of JBoss 4.
You can read the entire interview here.
To quote from the interview:
Javid : The difficult thing about putting out a book is that it starts getting outdated even before it is published (it takes 3-4 months to go through editing / printing). By the time the book is released, JBoss AS 5 should be available. By the time an organization starts standardizing on it, they'll probably have a patch or two released. In all honesty, it *is* a bit of guesswork. But, the reason we feel confident making the recommendation is that many of the technologies that will be available in JBoss AS 5 are already running in the latest versions of JBoss 4 , or as independent applications. The problems that will likely arise with these technologies in JBoss AS 5 are likely to be integration issues, which will hopefully get resolved fairly quickly.
Peter : Many of the technologies that will appear in JBoss Application Server 5.0 are already available in other versions. EJB3, the JBoss Web Server which is based on the Tomcat and the Apache Portable Runtime, and JAX-WS based web services using JBoss Web Services are already available in 4.2. JBoss Messaging can be added to 4.2. So once 5.0 comes out, many of its components will have already been tested. And because 5.0 will be Java EE 5 certified, I expect that it will generate a lot of interest from the community.
When most of the features have been already tested on earlier versions, of course not on Java 6, what's the delay?
In spite of finding alternate solutions, I still would like to use JBoss 5. I guess old habits don't go away easily right?
What are your thoughts?
Any ideas if we are going to get the final version in 2008 soon?
Book Review: Windows Vista Annoyances
In the "How To Use This Book" section, the author says "Windows Vista Annoyances" is not documentation; you can get that anywhere. Rather, it's a unique and thorough collection of solutions, hacks and time-saving tips to help you get the most from your PC". That's exactly what you will get from reading this book.
Anyone having a Windows Vista PC will find this invaluable for its tips, solutions and hacks. You will also find plenty of information on setup, installation, upgrade from other Windows versions, security features, performance, troubleshooting, and many more.
David Karp, has given us a unique guide which not only discusses the annoyances of Vista and workarounds for the same, but this book also helps you improve your experience with Windows Vista.To read the review, chapter wise you can take a look at the review on IT Book Zone.
Tuesday, January 29, 2008
Issues with SOAP address location in EJB 3.0
I have a simple Stateless Session Bean with the appropriate WebService annotations.
When I deploy my application to these 3 servers, each one has a different WSDL URL.
The name and serviceName are as specified in the @WebService annotation.
@WebService(name="HelloManager", serviceName = "HelloManagerService", targetNamespace = "urn:HelloManagerService")
There is however some consistency between JBoss and Oracle. They use the following notation:
soap:address location="http://hostname:portname/earfilename/name"
For e.g:
soap:address location="http://localhost:8080/ejb3webservices/HelloManager"
GlassFish on the other hand, uses the following notation:
soap:address location="http://hostname:portname/servicename/name"
For e.g:
soap:address location="http://localhost:8484/HelloManagerService/HelloManager"
I am trying to use SOAP UI to test my web services once they are deployed using Ant.
I didn't see any reference in the EJB 3.0 spec regarding the WSDL location. Is this vendor specific? Is there any place where we can customize the WSDL?
Also, I don't see any configurable attribute in the documentation for the @WebService annotation.
Saturday, January 26, 2008
Several Exciting New Books For Web Developers
The following 2 books are being published by Manning and the print edition will be available in a few days.
1. Laszlo in Action by Norman Klein and Max Carlson with Glenn MacEwen
2. jQuery in Action by Bear Bibeault and Yehuda Katz
The 3rd book from Apress is on Struts 2
3. Practical Apache Struts 2 Web 2.0 Projects by Ian Roughley
Have you read any of these books? Are you planning on buying these?
Friday, January 25, 2008
The SpringSource Certification Program Announced
Quote from SpringSource:
Eligible individuals can register to take the Spring Framework Professional certification examination, via the web, at one of over 4500 world-wide testing facilities, and can begin taking the exam on 31 January 2008. A person is eligible for registration if he or she has recently taken the 4-day “CoreSpring” class from SpringSource (or a SpringSource certified training partner in Europe, Africa or the MiddleEast (EMEA)). A person may also be eligible for registration, without attending the 4-day course, if he or she can demonstrate having significantly contributed to the Spring community or can provide a reference to a Spring development effort in which he or she was actively involved. This person is referred to as a “grandfathered” candidate.
I did contact Daryl Heinz Director of Training for SpringSource, Inc. with just one question. Please explain how we can provide a reference to show that we are using Spring in our Development?
Daryl replied back immediately with all the details. We just need to provide the contact information of our Manager so that SpringSource will be able to validate that we indeed have experience using Spring.
You can find all the details about the Certification here:
1. SpringSource Certification Program
I am really excited to take this Exam, how about you?
Wednesday, January 23, 2008
New features in EJB 3.1 : Article on ServerSide.com
You can read the article here:
1. New features in 3.1
The ones I am interested are:
1. Support for stateful web services via Stateful Session Bean web service endpoints.
2. The standardization of JNDI mapping. I had to workaround a solution for testing on 3 different application servers, JBoss, Oracle and GlassFish. Each of them have completely different naming convention for the Remote Interfaces.
The GlassFish AS uses the fully qualified name of the remote business interface as default.
Object obj = initialContext.lookup("com.os.ent.CustomerManagerRemote");
JBoss on the other hand uses the Application Name, followed by the EJB name and followed by /remoteconstant.
Object obj = initialContext.lookup("ejb3sampleapp/CustomerManager/remote");
Oracle, uses the name specified in the @Stateless annotation.
Object obj = initialContext.lookup("CustomerManager");
What new features are you looking forward in the coming version?