upfront adoption & migration of applications to latest jdk
TRANSCRIPT
Upfront Adoption & Migration of Applications to latest JDKs
Narendran Solai Sridharan12-Sep-2015
Common Complaints that stops us from Migration
• Business / Products which is in production should not break due to Migration.
• One will not be able to test all the Business / Product features post migration.
• No proof that the new Libraries do not have any issues.
• Low Tool support for new changes in language.
What we loose without Migration
• A lot of Secure & Performing Programming opportunity.
• New Programming Paradigms• SOLIDfied libraries & new libraries• Programming a resilient design &
Architecture.• Evading lot of redundant code and coming up
with a maintainable code.
How to Migrate??
Analysis: Changes to be under Scan
• Types of Release• Types of Compatibility• Features – Depreciated, Removed
and Enhanced• List of Bugs Reported & their Fixes
P.S. – Not all changes can be monitored. Most relevant changes required only to be monitored and incrementally the product should be enhanced.
Analysis: Type of Compatibility
• Every Projects has dependents Jars (from other projects), the upgrade should not affect binary (class file) compatibility. i.e dependent Jars should work without upgrade with the upgraded version of our Code.
• Source Compatibility states that old code should not produce any compilation Issues after JDK upgrade.
• Methods & Classes of JDK used should behave in the same way, any change in behavior introduced in the upgrade will lead to incapability and will lead to run time issues.
For Every change, JDK comes with classification based on the type of compatibility, otherwise we may require to do the classification.
Analysis: Type of Releases
• Platform – all binary, behavioral & source compatibility are allowed to get affected.
• Update – Security and bug fixes – only behavioral & Source compatibility are allowed to get affected
• Maintenance – large bug fixes, update in larger scale
Analysis: Features • Deprecated Features will get removed sooner,
so they need to removed in the code.• Enhanced features increases efficiency and
productivity, so they need to be recommended.• Removed Features should be removed from code
mandatorily.
Analysis: ReferencesFor each JDK release there used to be a Adoption GUIDES – They will serve as good first hand references.They provide type of compatibility issue anticipated, Features deprecated, enhanced and removed.
JDK 6 - Adoption Guidehttp://www.oracle.com/technetwork/java/javase/adoptionguide-137484.htmlJDK 7 - Adoption Guidehttp://docs.oracle.com/javase/7/docs/webnotes/adoptionGuide/JDK 8 - Adoption Guidehttp://www.oracle.com/technetwork/java/javase/jdk8-adoption-guide-2157601.html
Know How Open JDK are developedhttp://cr.openjdk.java.net/~darcy/OpenJdkDevGuide/OpenJdkDevelopersGuide.v0.777.html
Analysis: Present tools for JDK Migration
Eclipse IDEhttp://eclipsesource.com/blogs/2014/03/25/eclipse-support-for-java-8/
Netbeans IDE – Reference Slide & Videohttp://www.slideshare.net/GeertjanWielenga/smart-migration-to-jdk-8https://netbeans.org/kb/docs/java/jdk8-migration-screencast.html
Eclipse
Netbeans
Analysis: Opportunities• Code Quality Tools like PMD, Findbugs,
checklist, Sonar which usually works based on Heuristics.
• A Heuristics tool as for migration will be very helpful.
• Heuristic tool can be extended for refactoring and migration.
• Writing own rules if no one is found.
Questions??