Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Clean Code: Agile toolkit

 
Paul Wallace
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What do you consider the essential "agile toolkit" that a developer should use, for example:

Dependency Injection - to enable mock objects to be inserted into unit tests, what DI frameworks would you consider?
Testing Frameworks?

What else?

Regards,

Paul
 
Jair Rillo Junior
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- Decoupling your code (DI is an excellent approach) - You can use Spring, Google Guice or even EJB3
- Unit Testing and Integration Testing - In Both, you can use JUnit + Any mock object framework (I like JMock + Hamcrest)
- Automatic build process - I use Maven instead Ant
- SVN or CVS - SVN is better in my opinion
- Refactoring - A good IDE, like Eclipse, can help you in this task
- Keep your code as much simpler as possible.
- Paper, Pen and a Dashboard
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would add index cards, and since recently also planning poker cards.

You don't need a DI framework to practice dependency injection, by the way. In my experience, simple DI through constructor parameters works just fine most of the time. In many cases it seems to me that the flexibility of a DI framework isn't needed at all and the additional indirection just makes it harder to understand and navigate the structure of the system.
 
Robert Martin
Author
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Wallace:
Hi,

What do you consider the essential "agile toolkit" that a developer should use, for example:

Dependency Injection - to enable mock objects to be inserted into unit tests, what DI frameworks would you consider?
Testing Frameworks?

What else?

Regards,

Paul


The best agile toolkit is a good brain and a disciplined attitude. The rest is just gravy. Of course I really like IntelliJ as an IDE. Eclipse is pretty good too. And I use JUnit and Emma.

Dependency Injection is useful, but I hate all the XML files. (XML is God's way of punishing us for writing ugly code. ;-)

I like JMock, but use it sparingly since heavy use of these mocking tools leads to very fragile tests.
 
Jean-Claude Rouvinez
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Robert Martin wrote:
Originally posted by Paul Wallace:
Hi,

. . .

I like JMock, but use it sparingly since heavy use of these mocking tools leads to very fragile tests.


Hi,

We are going to use JMock in our project. Do you still agree, that this mocking tool leads to very fragile tests? I personally don't think so.
J.-Claude
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic