Dive Into Java A Roadmap to Effective Java Programming
When do you KNOW a language? When you know the syntax? When you can write software with it? When you know where’s the manual? When you use the language for N years? When you can consult others?
NO When you know the syntax? When you can write software with it? When you know where’s the manual? When you use the language for N years? When you can consult others?
You KNOW a language when... When you know the difference in syntax between versions When you can write maintainable software with it efficiently When you know how to use the manual When you use the language actively for N years and keep up with it’s evolution When you can consult others on advanced topics
AND When you know when, how and why you should use tooling and third party extensions (A good IDE, Build / Dependency Мanagement, Frameworks, Libraries) When you know and use it’s main concepts and methodologies in practice (For Java its Object Oriented Programming and Design Patterns)
Learning Java is learning… Java
We’ll look a bit more at OOP Principles / Design Patterns – Fundamentals – Difference from Procedural Programming (PL/SQL) – Java Specific stuff you MUST know Tooling – What to use and what to avoid – IDE – Building / Dependency Management Frameworks – Spring – Hibernate
Object Oriented Programming A-Must Book: “Design Patterns: Elements of Reusable Object-Oriented Software” by “Gang of Four” (Erich Gamma, Richard Helm, Ralph Johnson, John M. Vlissides)Erich GammaRichard HelmRalph JohnsonJohn M. Vlissides Common mistakes PL/SQL programmers make – Thinking that PL/SQL skills are enough to code Java – Doing everything with IF/ELSE, WHILE, FOR, SWITCH. – Long methods. 30 lines is a long method. 300 is Sparta... And Sparta failed. – Creating Superobjects and Monolithic Entities.
More Common Mistakes import org.apache.xml.*; Ignoring Java Code Conventions: No comments or //-- useless /* comments */ instead of JavaDoc: omments/ omments/ Pasting code from Google search results Copy/Paste.
Design Patterns Why do we need Design Patterns? Dependency Injection Patterns of Enterprise Application Architecture Enterprise Integration Patterns Read Books!
Tooling vim? JDeveloper? NetBeans? Eclipse? IntelliJ IDEA?
Tooling vim? – it’s a Swiss Army Knife, but you need serious heavy artillery for Java. JDeveloper? NetBeans? Eclipse? IntelliJ IDEA?
Tooling vim? – it’s a Swiss Army Knife, but you need serious heavy artillery for Java. JDeveloper? – It’s what Oracle wants you to use. And Oracle should keep it’s hands away from Java. NetBeans? Eclipse? IntelliJ IDEA?
Tooling vim? – it’s a Swiss Army Knife, but you need serious heavy artillery for Java. JDeveloper? – It’s what Oracle wants you to use. And Oracle should keep it’s hands away from Java. NetBeans – OK. Has improved a lot, but... Eclipse? IntelliJ IDEA?
Tooling vim? – it’s a Swiss Army Knife, but you need serious heavy artillery for Java. JDeveloper? – It’s what Oracle wants you to use. And Oracle should keep it’s hands away from Java. NetBeans – OK. Has improved a lot, but... Eclipse – Open Source, fast*, plugable IntelliJ IDEA?
Tooling vim? – it’s a Swiss Army Knife, but you need serious heavy artillery for Java. JDeveloper? – It’s what Oracle wants you to use. And Oracle should keep it’s hands away from Java. NetBeans – OK. Has improved a lot, but... Eclipse – Open Source, fast*, plugable IntelliJ IDEA – shareware, but a good one
Tooling Building – Manual – Apache Ant – Maven 2 Dependency Management – Manual – Maven 2 Debugging – Manual – With IDE Conclusion – Automate Everything! – Always use Maven 2 – You may want to use Ant for specific low-level tasks
Frameworks What EVERY Java developer should know – Spring Framework ( Full Stack. Lightweight J2EE. – Hibernate ( Database Persistence. There’s more – For almost anything… Avoid – Oracle Frameworks (like ADF) – Closed Source
Don’t Get Rusty Subscribe to RSS feeds! – – – – – The Internet is full of more resources Read Books! – Documentation at java.sun.com – “Head First” series – Martin Fowler’s writings – “Effective Java” – “Java Concurrency in Practice” – Prefer reading NEW books (less than 3 years old), except for the true classics Don’t read misguiding stuff! – “Learn Java in 21 days” – “Sam’s Teach Yourself Java in a week” – “Java Tutorial” at oracle.com – Most solutions in various forums and Google search results are bad or outdated examples
Where to start? Download the latest Eclipse ( hit F1 and go through Java Development tutorial. Download Maven 2 (maven.apache.org), Install Maven Integration in Eclipse ( read the manuals, play around.maven.apache.orghttp://code.google.com/p/q4e/wiki/Installation Read “Head First Java” ( 2nd-edition-excellent-book-from-o-reilly.kf) 2nd-edition-excellent-book-from-o-reilly.kf Read “Head First Design Patterns” ( Try Spring Framework (add the dependency with Maven. Find the dependency at Read Spring documentation (especially parts about Dependency Injection) at Subscribe to RSS feeds mentioned earlier and follow what the community is up to
Questions?