Shaggy All American 17820 Posts user info edit post |
the official tutorials on oracles site (http://docs.oracle.com/javase/tutorial/) are pretty good and the official javadocs are probably the best standard library docs of any language
jse6 docs -> http://docs.oracle.com/javase/6/docs/api/
any general concepts will transfer from c++ to java so most of your learning will probably be syntax differences. You'll figure most of it out over time, but the tutorials are a good place to start if you're looking for specific topics.
The java standard library freaking rules. It has so much stuff and its documentation is very good. If its not in the java standard library, theres probably an apache project that does it.
Learn maven cause its the best build management tool ever.
Once you're comfortable in the java world learn spring cause its sw8 as hell.
Also, use eclipse for your IDE cause its probably the most stable with the best range of plugins and features
[Edited on February 8, 2012 at 2:09 PM. Reason : .] 2/8/2012 2:08:14 PM |
clalias All American 1580 Posts user info edit post |
Great reply. Seems I have a lot to review on maven, spring, etc.. I only spent a min looking at the maven site. Does it provide source control checkout/commit like subversion too?
our code will reside on a FC linux box that is managed by a windows server so we can mount drives on all of our desktops. So marvin plugs into eclipse too to run the make commands or what not?
I should mention that this is for a scientific programming problem. And a good reference book is needed since a lot of this code will be developed on a machine without an internet connection.
[Edited on February 8, 2012 at 3:27 PM. Reason : e] 2/8/2012 3:18:38 PM |
Shaggy All American 17820 Posts user info edit post |
maven is source control agnositc, so you'll still need some kind of server. svn is what most people use in java and maven supports project builds from svn if you're doing automated builds.
maven at its most basic does dependency management and project building. All maven projects have a pom.xml that defines the basic attributes of project (name, group, version, etc...). So once you create a project you can deploy it to a maven repo and anyone can use that compiled project. Since java bytecode is platform independent, only one copy per artifact+version needs to be submitted. The official maven central repo contains pretty much every binary from the major public projects and frameworks that are out there. When you add a dependency to your project you specificy the groupid, artifactid, and version in the pom.xml of your own project. Then you commit the pom.xml into your scm along with your source. This lets anyone else who checks out the project know what libraries your project needs and if they're using maven as well, then maven will automatically download the libs for them so they can use it.
Theres a command line version of maven which you would get from the official maven site, but newer versions of eclipse come with an embedded version of maven. The eclipse plugin also provides a gui based pom editor and dependency finder which makes it very nice.
On the build side of things, maven can do a whole heck of alot of stuff. You can get more info from the official site, but basically you add plugins to your pom.xml that add build functionality. For example the maven resources plugin lets you replace variables in your source or other text files with variables specified in the pom. You can also specify profiles in the pom that tell maven to use a specific set of variables. So lets say you have a dev, acceptance, and production environment and each one has a different database server. You create a database.hostname variable in each profile and assign it the proper hostname for each environment. Then in your config file for your code that handles database connections you use the variable ${database.hostname} instead of the actual hostname. Then when the maven build runs you can specify a profile to use and it will replace ${database.hostname} with whatever the hostname is for the profile you specify. This way you dont have to edit code or config to switch which database server you're using. When you have alot of configuration options that differ by environment maven makes it easy to keep track of.
Reource filtering is probably the most common example, but maven can do a wide range of tasks. Anything from simple stuff like packaging your code into a jar for deployment to checking out code from svn, compiling it, and then deploying it to a live server.
I'd start with just the dependency management first and then move on from there as you need. If you used a previous build tool maven fills the same goal and then some. 2/8/2012 3:43:58 PM |