Presentation is loading. Please wait.

Presentation is loading. Please wait.

Project Topic 2: Migration to Java 9

Similar presentations


Presentation on theme: "Project Topic 2: Migration to Java 9"— Presentation transcript:

1 Project Topic 2: Migration to Java 9
Software Architecture Fall 2017 Project Mentor: Negar Ghorbani

2 Intro to Java 9 Main Goals The Modular JDK Modular Source Code
Strong Encapsulation - Hide Internal APIs Improved Accessibility Being Aware of dependencies Reliable Configuration Scale Java SE to smaller devices Easier to construct and maintain libraries and applications

3 Java 9 Module A named, self-describing collection of code, data, and some resources A set of related packages designed for reuse Java 9 Module Code Data + Resources Module Descriptor module-info.java

4 Java 8 Vs. Java 9 Application
Module Module Descriptor Packages Packages Types (Classes, Abstract Classes, Interfaces, …) Types (Classes, Abstract Classes, Interfaces, …) Code Data Resources XML Properties etc. Code Data Resources XML Properties etc.

5 Module Types Application (Named) Automatic Unnamed Platform
What we are going to create Third party dependencies Automatic For migrating applications and using pre-Java 9 libraries Any JAR file without module descriptor Unnamed Exports all packages and read all modules Can’t be read, but can read all Platform The JDK itself All the basic Java features

6 Creating a Module What other modules does it depend on?
Depends on java.base by default Keyword: requires Requires transitive: make a module available to other modules as a transitive dependency What packages it export to other modules? Can be accessible by other modules (or an specific module) Nothing exported by default Sub-packages will remain concealed Keyword: exports

7 Creating a Module: Example
Dependency Graph com.seal.utils example.tools example.conv

8 Creating a Module: Example
com.seal.utils can only access example.tools package, not any of its sub-packages e.g. services

9 Migration to Java 9 Steps: Running the program
Updating third-party libraries Compiling the application Running jDeps tool on the code An static analysis tool for finding compile dependencies on JDK internal APIs Resolving the possible challenges

10 Migration to Java 9 Most Common Challenges:
Illegal access to internal APIs Dependencies on Java EE modules Split Packages More info:

11 Class Project Choose a Java software system Choose a team
At least 10K LOC At least 30 classes Not developed by you: was developed by others and is used by thousands of people. Publicly available, open source. Must be unique in class: each group has their own program — no two groups may share the same system. Must be recognizable, well-used, popular project Choose a team Up to three students

12 Class Project: Implementation
Migrate the system to Java 9 Fix the possible problems Explain the problem, and how you fixed it Compile and run the system with JDK 9 Define appropriate modules, according to the system’s architecture Explain the modules and the reason you defined them Show all the packages and types within each of the modules Compile and run the system with the modified architecture

13 Class Project: Analysis
Write a report of each task performed, and Compare the system before and after your architectural modification Visualize/model the architecture of the system before and after the migration Explain the difference in any possible aspect Performance Encapsulation Reusability Maintenance Security and Accessibility ... Describe in detail, the resulting advantages of the modified system after migrating to Java 9


Download ppt "Project Topic 2: Migration to Java 9"

Similar presentations


Ads by Google