permaculture playing cards*
The moose likes Beginning Java and the fly likes Learning Java and Agile Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Learning Java and Agile Java" Watch "Learning Java and Agile Java" New topic
Author

Learning Java and Agile Java

Tina Long
Ranch Hand

Joined: Mar 04, 2005
Posts: 36
I'm beginning a new job as a web developer. I mainly will be developing Java applications using Sturts framework. Everything I know about JAVA is from books and not experience. I understand OO concepts and have a pretty good idea of how JAVA works - however I'm rusty on my Java syntax. my company would like to send me to a training class to get my skills up...I found one class that I thought would work - but it's been cancelled and most of the training companies seem to have closed or their websites just stink!

I've found a few posts about Agile Java by Jeff Langr - and I'm not sure that this book will help me. It seems to be about a methodology of coding - but can this methodology be used to when creating web applications? (I hope that's not too dumb of a question)

Does anyone have any suggestions on where I can find a training class (that isn't cancelled ) or any good books where I can brush up on my Java and learn what I don't know about it - I'm sure there's lots to know...
Jeff Langr
author
Ranch Hand

Joined: May 14, 2003
Posts: 762
Greetings Tina,

Agile Java is designed as a better way for you to learn Java; it also provides you with a solid way to code. It doesn't delve specifically into web applications, but the techniques are applicable to any Java code that you do. The best approach for you is probably to (a) brush up on your Java skills (which Agile Java will certainly help with), (b) learn about how to write better Java code (again Agile Java will help) using test-driven development (TDD), and then (c) look into some of the many available web frameworks.

There are many other good books on Java available, books that will help you brush up on skills. I'm sure one of the other posters here can recommend a book or two. But if you want to try something fairly new and hot, which TDD is, Agile Java's the place to go. If you are more comfortable with your Java skills, you can skip directly to books specifically about TDD--do a search on Amazon and you'll find a handful of good books.

Struts and Tapestry are frameworks that will help you put together web applications, but you can actually roll your own with good results. Cactus and HttpUnit are tools that will help you test web-based applications; there's also a StrutsTestCase tool that works with JUnit-based testing.

You'll certainly avoid a lot of headaches, though, by first mastering the rudiments of how to do "good" Java programming.

I'll let others speak to training.

Regards,
Jeff


Books: Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4462
    
    6

Tina,

Short story:

I'm sure you can use the techniques taught in the book to develop web applications. Try to move most of your business logic to POJOs; use the web components for presentation and control. If you're using EJBs, move the business logic out of them into POJOs (basically making the EJBs just facades). You can test POJOs much faster and more easily than you can the components that have dependencies on the web and EJB container.


Longer story:

I'm actually trying to introduce the practice of test-driven development on the web development project I'm working on right now. We're using Struts for the presentation and control tier and EJBs for persistence and other backend services.

One of the things we've had to struggle with is the difficulty and complications of trying to test-drive web components and EJBs. The difficulty arises when we have to deal with dependencies on the web and EJB containers. There are test frameworks out there that help in these areas but since most of our developers are not very familiar with them, it's making the learning process even harder. So, to start our developers off with just plain old JUnit, we used some of the ideas in

this article and moved most of our logic out of the Struts classes and into
POJOs which we can more easily test-drive with JUnit. (The EJBs are a slightly different story though, since the code for those are generated by a tool we are using ). This strategy has the added benefit of making us refactor our code base so that we have a better design and clear separation of concerns in the different tiers.

I also introduced the concept of Dependency Injection to help loosen the coupling between our POJOs and the services that they used.

I know some of these concepts may seem like they are advanced but I have found that even the relatively inexperienced developers on my team can grasp the concepts and can appreciate the benefits of using the related techniques.

(Hopefully, I will find time to update my blog soon to give some detailed coding examples)


Junilu - [How to Ask Questions] [How to Answer Questions]
Tina Long
Ranch Hand

Joined: Mar 04, 2005
Posts: 36
I talked with my team and they are not using TDD at all - and i don't have a say on taking the business logic out and putting them into POJOs...they have already set up how they want to do everything...

I still need to find a really good resource to brush up on my Java and to learn Struts.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Learning Java and Agile Java