This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Both from Manning! the difference between JUnit in Action and JUnit Recipes

 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am wondering what the differences are existing between JUnit in Action by Vincent Massol and Ted Husted and this book in current promotion... Since both of them are from the same publisher, there should be some kinda unique approach in writing styles between them... Can anyone identify one?

But in my own sense, the title "JUnit in Action" seems more practicices and examples than the title "JUnit Recipes", which seems giving some tastes of different unit testings to the readers....
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can read some detail of both book at

1. JUnit recipes
2. JUnit in action
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by somkiat puisungnoen:
you can read some detail of both book at

1. JUnit recipes
2. JUnit in action


Mmm... thanks for the links, anyway... What I want to know is not the topics of the books, but the approach the authors use to explain the JUnit... I do believe that there will be some differences, because a single publisher won't publish books with the same approach for JUnit only...

So I think people who has read both books will be able to answer my questions or one of the authors as well....
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I feel that receipes are like cookbook, they tell you how to get things done.
 
J. B. Rainsberger
author
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have read both books, and Vince Massol and I have spoken a fair bit about our respective projects. Vince was the one who recommended me to Manning to write JUnit Recipes, so we're certainly not trying to compete with one another.

JUnit in Action is a deep overview of testing with JUnit. By that, I mean that it covers a wide range of topics in a tutorial/guide format, including an in-depth look at Cactus, which is of importance to J2EE programmers.

JUnit Recipes is more detail-oriented, and its recipes focus on solving individual problems. Although it includes enough introductory material for the person new to JUnit, it presents that material in recipe format, rather than in the format of a general introduction.

If you can, buy and read both! I think that JUnit in Action will do a very good job of giving you general ideas about how to approach testing problems and JUnit Recipes will help you solve the individual problems as they come up.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by J. B. Rainsberger:
If you can, buy and read both! I think that JUnit in Action will do a very good job of giving you general ideas about how to approach testing problems and JUnit Recipes will help you solve the individual problems as they come up.


Notice, though, that the advanced part of "JUnit in Action" mostly concentrates on testing web applications - for Swing programmers, there might be better books out there?
 
J. B. Rainsberger
author
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more example of the difference between _JUnit in Action_ and _JUnit Recipes_. Here is a question from the JUnit Yahoo! group.


I am using Junit 3.8.1 with WSAD 5.1
On some workstation the test methods are called in a wrong order, i.e
the last method of the test class is called first a.s.o. up to the
beginning of the class.
Did anybody already get this strange behavior?
Is there a way, to define a parameter for that or is that a known bug?


Go to _JUnit Recipes_, chapter 4, and the various recipes will describe why this isn't a bug and what to do about it.

I want to be clear: _JUnit in Action_ is an excellent book, but if you have a specific problem to solve, _JUnit Recipes_ makes it easier to find a solution.
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ilja Preuss:


Notice, though, that the advanced part of "JUnit in Action" mostly concentrates on testing web applications - for Swing programmers, there might be better books out there?


oh!!! some people are still using/developing swing applications??
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've read "Junit in Action" and found it good for developing/selling a testing strategy. It sounds like "Junit Recipes" is more for solving specific problems.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kishore Dandu:

oh!!! some people are still using/developing swing applications??


Yes, and quite successfully: http://www.disy.net/de/images/cadenza/cdza_prof_big.gif

(The screenshot is out-of-date, it looks much better today! )
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JUnit Recipes will help you solve the individual problems as they come up.[/QB]


So, JUnit Recipes is like Pattern to solve problen or not ???
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by somkiat puisungnoen:
So, JUnit Recipes is like Pattern to solve problen or not ???

The recipes are solutions to specific problems. Whether the problems are abstract enough to count as problem patterns, I don't know.
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by somkiat puisungnoen:


So, JUnit Recipes is like Pattern to solve problen or not ???


Maybe the following explains

Q 4 J. B. Rainsberger (2): preconditions for a recipe

Cheers,

Gian Franco
 
Allan Halme
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kishore Dandu:
some people are still using/developing swing applications??


Yeah, and I wish I were, too. I've been working with web applications for over four years now and although, on the one hand, I enjoy creating HTML interfaces, especially these days with some cool custom JSP tags we've developed, I would stil SO MUCH prefer to create GUI interfaces, just for the pure pleasure of the performance and usability of the interface and its responsiveness and the flexibility you're afforded.

Doing HTML interfaces makes me feel like this:

... whereas I would like to feel like this:
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kishore Dandu:


oh!!! some people are still using/developing swing applications??


Me!!! In the last project, I developed CRM applicaiton using Swing to interact with Oracle database.... And it was fun... As I used to develop a lot of Swing applciations in the university life, I'm still liking it, despite of its performance and many defects....

But due to the SWT book promotion in the past, I decided to study SWT and I will use SWT in the upcoming project....
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by J. B. Rainsberger:
JUnit in Action is a deep overview of testing with JUnit. By that, I mean that it covers a wide range of topics in a tutorial/guide format, including an in-depth look at Cactus, which is of importance to J2EE programmers.

JUnit Recipes is more detail-oriented, and its recipes focus on solving individual problems. Although it includes enough introductory material for the person new to JUnit, it presents that material in recipe format, rather than in the format of a general introduction.


So is it like....
If we want to want a ready-made solution for a certain problem, get JUnit Recipes and the solution will be there... but JUnit in Action is more about JUnit in general, teaching how to do things in JUnit?

So will it mean that JUnit is suitable for those who want to learn core JUnit, instead of applying JUnit stuff to the real world?

Thanks a lot, Mr.Rainsberger for the great replies...
 
Roger Graff
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does either book discuss how JUnit works with a test driven development strategy?

Thanks!
 
J. B. Rainsberger
author
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So is it like....
If we want to want a ready-made solution for a certain problem, get JUnit Recipes and the solution will be there... but JUnit in Action is more about JUnit in general, teaching how to do things in JUnit?


Almost.

In learning there are various stages:

1. Unconscious incompetence -- I don't know what I don't know.
2. Conscious incompetence -- I know what I don't know.
3. Unconscious competence -- I do it right without realizing it.
4. Conscious competence -- I do it right and I realize it.

In stage 1, you need overviews and introductions. JUnit in Action does this very well: it helps you most when you don't know what you need to do yet. You read JUnit in Action and it guides you through starting to use JUnit.

In stage 2, you ask questions on mailing lists like "I tried to do X and it didn't work" or "I have no idea how to do Y, what do I do?" You know that you don't know something specific, and you need help with that. JUnit Recipes answers questions this way: it organizes information into answers to questions, or solutions to problems.

Now, JUnit Recipes /also/ includes introductory information, but it is still organized into solutions to problems. You don't know how to test an interface? Recipe 2.6. You don't know how to test a method without a return value? (This is a very common question in stage 2) Recipe 2.2.

With JUnit in Action, you won't necessarily know how to find the specific solution you need to your specific problem. With JUnit Recipes, you just look at the table of contents.

So will it mean that JUnit is suitable for those who want to learn core JUnit, instead of applying JUnit stuff to the real world?


I don't quite understand this question. I don't think it has anything to do with the books: they both give you plenty of information for applying JUnit to real problems.
 
J. B. Rainsberger
author
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does either book discuss how JUnit works with a test driven development strategy?


Vince and I are both TDD practitioners, so yes, although in both cases, we do not talk about TDD as "the way to do it". It's more like this: "If you're a TDD practitioner, you'd do this...."
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JB,
The stages of learning vs how to get help is interesting!
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by J. B. Rainsberger:

I don't quite understand this question. I don't think it has anything to do with the books: they both give you plenty of information for applying JUnit to real problems.


It's alright. You have provided me the answer to that question already in your explanation above... Thank you very much for your great explanations on both books...
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeanne Boyarsky:
JB,
The stages of learning vs how to get help is interesting!


Does it mean that JUnit in Action is for the stages of learning JUnit, while JUnit Recipes is to get helps about JUnit real world problem?

Then we can conclude the difference between JUnit in Action and JUnit Recipes as above sentence.....
 
Warren Dew
blacksmith
Ranch Hand
Posts: 1332
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kishore Dandu:

oh!!! some people are still using/developing swing applications??

What do you use instead?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ko Ko Naing:


Does it mean that JUnit in Action is for the stages of learning JUnit, while JUnit Recipes is to get helps about JUnit real world problem?

Then we can conclude the difference between JUnit in Action and JUnit Recipes as above sentence.....

Yes! I also found it interesting that JUnit Recipes is more in line with newsgroups and forums.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic