If you are considering tying your next project to an application server, you should seriously consider the consequences of this. What are you really after? Why do you think this is a good idea?
More than likely there are a handful of alternatives to all of your concerns. And if you were to pursue these alternatives, you will greatly improve the productivity of your team.
If you are a member of such a team where you have little to do with the decision to run under an application server, I will also make some suggestions on how to work around the server more effectively.
Background
I am a very strong believer that being test-driven is excellent start towards generally improving your productivity. I am also a believer in being story-test-driven, however that’ll be a discussion for another day. When I say “test-driven”, I am specifically referring to the red-green-refactor mantra of TDD. With respect to application servers, this does not include JunitEE and/or Cactus style testing. It’s simply not practical to write a test, compile it, build an ear, deploy it, and run your test to see it fail. On my current project, the average round trip to make this happen once is about 30 minutes. In the TDD circle of life, generally speaking, I want this cycle to be less than 5 seconds (once the test is written).
There are many reasons to be test-driven in your development. Writing tests first ensures your code is testable. Writing tests first clearly influences your design. Writing tests first definitely helps you minimize over-engineering your solution (which also saves you a lot of time). And the left over artifact of tests helps you avoid unintentional breaks from future enhancement and from refactoring. The tests support refactoring, which in turn keeps you from suffering code rot. And code rot might not kill your project instantly, but it will kill morale. There are many other reasons as well, but I’d recommend you read Test Driven Development by Kent Beck, Refactoring by Martin Fowler, and Clean Code by Robert Martin for that. As for app server development and test-driven strategies, I would strongly recommend you read J2EE Development without EJB by Rod Johnson.
Now if you do happen to have an application server, you need to consciously work to architect around it in order to be able to effectively test-drive your code. Things to consider: First, minimize your dependencies on the app server. Regardless of what front-end framework you use, keep the front-end extremely thin and light. You can certainly use JavaScript on your client, because you can unit test JavaScript with any of a handful of frameworks, none of which require you to be running the app server to run your tests. By thin and light I’m referring to JSPs, JPFs, Actions, etc. You want little to no logic in these files. Utilize some form of MVC here to maintain a good separation of concerns. If you keep nothing but simple mappings from domain/model objects to view objects and otherwise just make simple calls to the POJOs just beyond the application server, then you can keep the top-most level of your POJO model focused on the behaviors required by the application. You can easily TDD your way from there.
Just a thought: I recommend making it a goal of yours to start up the application server as few times as possible every iteration. I’m even thinking about keeping a metric for this, because I’m sure it will be directly correlated with story cycle time.
I hope this could help frame your dealings with an application server with a little bit of stategic thinking as well as help make your testing strategy more effective.
May all your tests run green.