开发者

How to organize projects?

开发者 https://www.devze.com 2023-02-05 13:46 出处:网络
I\'ve been working with Visual Studio开发者_如何学Python for a long long time, but now I\'m been requested to work on a Java web project. We\'ve decide to use Spring MVC as framework, and we want to u

I've been working with Visual Studio开发者_如何学Python for a long long time, but now I'm been requested to work on a Java web project. We've decide to use Spring MVC as framework, and we want to use Log4J (for logging obviously =P) and JUnit for unit testing. Now, in the "Microsoft way" I will create a Solution, and I'll add A web project and a Unit testing project; now that I'm usign Netbeans, is it possible to do like that? Or how should I organize my projects?

Thanks for sharing your experience!


Have you thought about using Maven as a way to manage your project? I've heard really good things about it.

You can find a list of what Maven is, exactly, here.

In short, it has the following goals (I took these from the web site):

  1. Making the build process easy
  2. Providing a uniform build system
  3. Providing quality project information
  4. Providing guidelines for best practices development
  5. Allowing transparent migration to new features


Try to use maven, and there is a standard way for a project :)


In Netbeans you specify what type of project you want to create, say Java Web Application. Netbeans will then create the files and folders to support that project. Within the project view explorer, you can see the 'Test Packages' node, this is where you add java classes to support your unit testing. When you add a unit test, Netbeans will add a reference to the correct JUnit library to your project (you can see this on project properties > libraries > compile test).

For Spring MVC, the same goes. You add a dependency in Netbeans, either at project creation time, or from the properties dialog afterwards.

This is just tip of the iceberg. So I hope this information allows you to at least get started and you can return with more specific questions as you get further in.

0

精彩评论

暂无评论...
验证码 换一张
取 消