Java 9 brings modules as a core concept to the platform, but it’s more than just a language feature. With modules in Java 9, we can improve the design of code to increase maintainability and extensibility. As with every design principle, modularity requires thought and trade-offs to really reap the benefits. This session covers design practices for making codebases more maintainable and extensible. You will also find out about trade-offs to help you make the best choices. Topics include hiding implementations, using services for extensibility, API modules, avoiding cycles, optional dependencies, and dynamically loading modules. Familiarity with modules is helpful but not required. The speakers are the authors of Java 9 Modularity (O’Reilly).
Also see https://javamodularity.com
With modularity coming to the core Java platform in Java 9, are all our modularity needs fulfilled, or does it still make sense to use something like OSGi? In this talk you will learn how Jigsaw helps modularity, and in what cases it might fall short.
Java 9 will provide a module-system, called Jigsaw. Besides modularising the JDK itself, Java developers can build more modular applications with Jigsaw. Modularity and Java go back way longer, though. OSGi, the de facto standard for modularity in Java has been around since 2000. Adoption is increasing in recent years.
A modular architecture has many advantages, such as increased decoupling resulting in more flexibility. In that sense, native support for Java modularity is very welcome. The big question now is: does Java 9 provide everything you need to build truly modular applications? Since Java 9 needs to maintain backwards compatibility, some compromises need to be made while enforcing module boundaries.
This talk discusses what you really need to build modular applications. We'll investigate which requirements are met (or not) by both module systems. You'll see that both Jigsaw and OSGi provided pieces of the modularity puzzle. Also, you'll learn whether having an additional modular runtime such as OSGi on top of Java 9 still makes sense.
The document discusses JavaScript modularity and module systems. It describes some of the challenges of modularity in JavaScript, like globals and namespacing issues. It then compares different module systems for JavaScript like AMD, CommonJS, and ES6 modules. RequireJS is presented as a robust implementation of the AMD specification that supports features like lazy-loading and backwards compatibility. The document advocates picking one module system and sticking with it for consistency.
Microservices promise a scalable architecture, increased flexibility, and better performance. But then you find out what’s actually involved in designing, developing, and running a microservices-based architecture. It turns out it’s not that straightforward after all.
Often the discussion around microservices is framed by a false dichotomy between the messy monolith and the lean and mean microservices architecture. Sander Mak explains that there’s a third way: the modularized application. Functional decomposition of your application doesn’t imply that every component has to become its own independent process.
Modularization is about strong encapsulation, well-defined interfaces, and explicit dependencies. Many languages offer in-process modularization features (for example, Java 9 with its upcoming module system), and there’s a strong overlap between the microservices philosophy and development benefits—without incurring the penalty of operational complexity.
Sander explores the right (and wrong) reasons for going with a microservices architecture, as well as what a modularized application entails. You’ll see that splitting up an existing service or application into microservices isn’t always the clear winner. You’ll leave able to choose between the alternatives for the right reasons. There’s a place for both independently deployed microservices and larger applications with a strong internal modular structure. Choose wisely.
With Java 9, modularity comes to your doorstep (whether you ordered it or not). This isn't your average language feature: making the most out of it may involve rewiring your brain. In this session we explore the benefits of a modular codebase using Java 9 modules. Because who doesn’t like more reliable and secure applications, meanwhile killing the dreaded classpath?
After reviewing the basic concepts of modules, we'll explore modularity patterns that enhance your design and development skills. We all have existing software, so migration of codebases to a modular world is an important topic as well. Automatic modules and other new concepts are added to your toolbox to this end.
Want examples? We've got plenty in this practical and code-driven talk. Even if you intend to use Java 9 without modules, this talk helps you prevent common issues. You'll be ready for Java 9 before you know it.
Both speakers are currently writing “Java 9 Modularity” for O’Reilly, expected early 2017. They have extensive experience under the belt already with the Java 9 Jigsaw early access builds.
In September 2017 the long-awaited release of Java 9 gave us a new module system in Java. It also kick-started the release-train of frequent Java releases, with Java 11 being the first long-term supported Java version poised to take modules into the mainstream. So what has happened since the introduction of the module system?
This talk will provide an overview adoption of modules in open-source libraries, IDEs, build tools, and so on. It will also feature tools that have emerged to make working with modules easier. Expect an honest overview of the current state of modules in Java, with lots of demos to show what's possible. After this talk you can start developing your own modular Java application without hesitation!
With Java 9 modules coming to us soon, you want your existing code to be fully ready for the module system. Making code modular can be a daunting task, but Java 9 comes with a number features to ease migration. This includes automatic modules, the unnamed module and a number of command line arguments.
In this talk we will look at examples of migrating real code. It discusses common problems youll run into during migration, leading to practical tips and the ability to set realistic goals. Its also a good way to understand the module system itself and the various migration paths it supports. This talk is an excellent preparation to start migrating your own code.
* Understanding modules and the module path
* Automatic modules
* Mixing classpath and modulepath
* Dealing with reflection
* Escape switches
* Jdeps
All topics will be based on examples of often used libraries and frameworks.
This document discusses modularity in Java applications and platforms. It covers OSGi, a popular modular system for Java that allows bundles to be installed and updated dynamically. It also discusses Project Jigsaw, which aims to add built-in modularity to the Java platform starting in JDK 9 by defining Java modules. Project Penrose explores interoperability between OSGi and Jigsaw modular systems.
With modularity coming to the core Java platform in Java 9, are all our modularity needs fulfilled, or does it still make sense to use something like OSGi? In this talk you will learn how Jigsaw helps modularity, and in what cases it might fall short.
Java 9 will provide a module-system, called Jigsaw. Besides modularising the JDK itself, Java developers can build more modular applications with Jigsaw. Modularity and Java go back way longer, though. OSGi, the de facto standard for modularity in Java has been around since 2000. Adoption is increasing in recent years.
A modular architecture has many advantages, such as increased decoupling resulting in more flexibility. In that sense, native support for Java modularity is very welcome. The big question now is: does Java 9 provide everything you need to build truly modular applications? Since Java 9 needs to maintain backwards compatibility, some compromises need to be made while enforcing module boundaries.
This talk discusses what you really need to build modular applications. We'll investigate which requirements are met (or not) by both module systems. You'll see that both Jigsaw and OSGi provided pieces of the modularity puzzle. Also, you'll learn whether having an additional modular runtime such as OSGi on top of Java 9 still makes sense.
The document discusses JavaScript modularity and module systems. It describes some of the challenges of modularity in JavaScript, like globals and namespacing issues. It then compares different module systems for JavaScript like AMD, CommonJS, and ES6 modules. RequireJS is presented as a robust implementation of the AMD specification that supports features like lazy-loading and backwards compatibility. The document advocates picking one module system and sticking with it for consistency.
Microservices promise a scalable architecture, increased flexibility, and better performance. But then you find out what’s actually involved in designing, developing, and running a microservices-based architecture. It turns out it’s not that straightforward after all.
Often the discussion around microservices is framed by a false dichotomy between the messy monolith and the lean and mean microservices architecture. Sander Mak explains that there’s a third way: the modularized application. Functional decomposition of your application doesn’t imply that every component has to become its own independent process.
Modularization is about strong encapsulation, well-defined interfaces, and explicit dependencies. Many languages offer in-process modularization features (for example, Java 9 with its upcoming module system), and there’s a strong overlap between the microservices philosophy and development benefits—without incurring the penalty of operational complexity.
Sander explores the right (and wrong) reasons for going with a microservices architecture, as well as what a modularized application entails. You’ll see that splitting up an existing service or application into microservices isn’t always the clear winner. You’ll leave able to choose between the alternatives for the right reasons. There’s a place for both independently deployed microservices and larger applications with a strong internal modular structure. Choose wisely.
With Java 9, modularity comes to your doorstep (whether you ordered it or not). This isn't your average language feature: making the most out of it may involve rewiring your brain. In this session we explore the benefits of a modular codebase using Java 9 modules. Because who doesn’t like more reliable and secure applications, meanwhile killing the dreaded classpath?
After reviewing the basic concepts of modules, we'll explore modularity patterns that enhance your design and development skills. We all have existing software, so migration of codebases to a modular world is an important topic as well. Automatic modules and other new concepts are added to your toolbox to this end.
Want examples? We've got plenty in this practical and code-driven talk. Even if you intend to use Java 9 without modules, this talk helps you prevent common issues. You'll be ready for Java 9 before you know it.
Both speakers are currently writing “Java 9 Modularity” for O’Reilly, expected early 2017. They have extensive experience under the belt already with the Java 9 Jigsaw early access builds.
In September 2017 the long-awaited release of Java 9 gave us a new module system in Java. It also kick-started the release-train of frequent Java releases, with Java 11 being the first long-term supported Java version poised to take modules into the mainstream. So what has happened since the introduction of the module system?
This talk will provide an overview adoption of modules in open-source libraries, IDEs, build tools, and so on. It will also feature tools that have emerged to make working with modules easier. Expect an honest overview of the current state of modules in Java, with lots of demos to show what's possible. After this talk you can start developing your own modular Java application without hesitation!
With Java 9 modules coming to us soon, you want your existing code to be fully ready for the module system. Making code modular can be a daunting task, but Java 9 comes with a number features to ease migration. This includes automatic modules, the unnamed module and a number of command line arguments.
In this talk we will look at examples of migrating real code. It discusses common problems youll run into during migration, leading to practical tips and the ability to set realistic goals. Its also a good way to understand the module system itself and the various migration paths it supports. This talk is an excellent preparation to start migrating your own code.
* Understanding modules and the module path
* Automatic modules
* Mixing classpath and modulepath
* Dealing with reflection
* Escape switches
* Jdeps
All topics will be based on examples of often used libraries and frameworks.
This document discusses modularity in Java applications and platforms. It covers OSGi, a popular modular system for Java that allows bundles to be installed and updated dynamically. It also discusses Project Jigsaw, which aims to add built-in modularity to the Java platform starting in JDK 9 by defining Java modules. Project Penrose explores interoperability between OSGi and Jigsaw modular systems.
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)Martin Toshev
Seminar "Modularity of the Java Platform" of the Bulgarian Java User Group.
Topics of the seminar:
Modularity 101
Modularity on top of the platform: OSGi
Modularity of the platform: Jigsaw
OSGi and Jigsaw interoperability: Penrose
Are you interested into getting deep insight into the new features that Project Jigsaw offers in Java 9 ?
Project Jigsaw is one of the biggest changes introduced in Java since the launch of the Java programming language back in 1995. It has a great impact on the way we architect and develop Java applications.
Project Jigsaw represents a brand new modular system that brings lots of features and empowers developers to build modular applications using Java 9.
In this presentation you will see how the entire JDK was divided into modules and how the source code was reorganized around them.
You will learn all what you need to know in order to start developing reliable, secure and maintainable modular Java applications with Project Jigsaw.
You will see how to define modules and how to compile, package and run a Java application using Jigsaw.
You’ll learn how to take advantage of the new module path and how to create modular run-time images that represent smaller and compacter JREs that consist only of the modules you need.
Having a Java 7 or 8 application and you are intending to migrate it to Java 9? In this talk you’ll learn how to do it using top-down migration and bottom-up migration.
Are you afraid that your application code will break when switching to Java 9? No problem, you’ll see what you should do in order to make your application suitable for Java 9.
An introduction to the Java Platform Module System (JPMS). This talk is from April 2017, before the Java SE 9 release, so the final details may be subtly different, particularly once a standard becomes established for module names.
Brief description about Java modularity including OSGi and Jigsaw.
Nowadays the word "modularity" has been searched a lot in Google and several blog posts have been written about it. Specially with the #Jigsaw subject that Oracle's guys have been spreading in different conferences .
Here I try to summarise the idea in the Java environment mentioning what for me are the main implementations of java modularity : OSGi and Jigsaw.
Java 9 will introduce a new module system that will provide code encapsulation and a way to explicitly declare dependencies between modules. Some key changes include the ability to define modules using a module-info.java file, and new parameters for javac and java to support modules. There are still some unresolved issues around module declarations, artifacts, descriptors, graphs, reflection, and versioning that need to be addressed prior to final release. The new module system is aimed at addressing problems like large runtime footprints, classpath issues, and lack of visibility controls between packages.
Introduction to JDK-9 Modules and JLink Plugins
Modules
Module Dependencies
Jlink and Packaging
Jlink Plugins
Example Plugins
System Module Descriptor Plugin
Compress Plugin
Release-Info Plugin
The document provides an overview of new features in Java 9, including:
- The introduction of a module system that divides the JDK into smaller modules, allowing applications to only use necessary modules.
- Private methods can now be defined in interfaces to avoid redundant code.
- Multi-release JAR files allow libraries to support multiple Java versions.
- Various commands are described to work with the new module system, such as listing modules, describing modules, compiling modular code, and creating a custom JRE with only required modules.
It seems like keeping up to date with Java nowadays is an enormous task. Gone is the era of big, delayed Java releases that span years. We're now getting a new major release every six months. What's up with that? You're probably still developing on Java 8, even though Java 12 is already available.
Join this session to get a code-first overview of what's new in Java since Java 8. We'll give an overview of the module system (Java 9), the local-variable type inference feature (Java 10), the new HttpClient API (Java 11) and a sneak peek of Switch Expressions in Java 12. Expect lots of advice on what to expect when migrating beyond Java 8. It's time to embrace the newfound agility of the Java platform!
Open Services Gateway Initiative (OSGI)Peter R. Egli
OSGi is a component-based technology and was developed to provide a software platform that allows modularization and dynamic linking of application components.
OSGi components are called bundles and can be exported and imported by application bundles.
OSGi implementations like Apache Felix or Eclipse Equinox provide a runtime container which controls the lifecycle of bundles.
Even though OSGi is hardware independent, it is based on the Java Virtual Machine and as such extends the concepts of the underlying Java language.
An OSGi bundle's capabilities and properties are defined in a manifest file that is packed together with the bundle's Java class files. The manifest file allows compatibility checks by the OSGi runtime between the exporting bundle and the importing bundle.
This export and import mechanism allows highly flexible and dynamic application environments where applications and components are installed, linked and started at runtime without the need to restart the entire system.
Modularization With Project Jigsaw in JDK 9Simon Ritter
The document discusses Project Jigsaw and modularization in JDK 9. It introduces modularization and modules, explaining that modules group code and declare dependencies. It outlines changes in JDK 9 like encapsulating internal APIs and changing the binary structure. The goals of modularization are to make Java more scalable, flexible, secure and maintainable for large applications. Modules, compilation, execution and linking with modular JAR files are also summarized.
JavaOne 2017 presentation about migration existing code to Java 9 modules.
Demos used during the presentation can be found on GitHub: https://github.com/java9-modularity/java9-migration-demos
'Elevate your webapps with Scala & Lift', as presented on JEEConf 2012, Kiev, Ukraine
Also see: http://branchandbound.net/blog/conferences/2012/05/jeeconf-tripreport/
The new GraalVM from Oracle supports multiple language including JavaScript, Python, Ruby, R, C++ as well as Java and other JVM languages. This opens up interesting possibilities for polygot enterprise applications. Now you can use a Node library in a Java application or call an R statistical function from an EJB. Previously, this type of integration was extremely challenging. This session will provide recipes to get up and running along with best practices and some cool demos.
Code: https://github.com/rcuprak/graalvm_jee
Mit Java 8, Jigsaw und JSR 294 soll über die Java-Plattform ein vereinheitlichtes Modularisierungskonzept eingeführt und die seit 2005 apostrophierte "post-jar-File-Ära" eingeläutet werden.
Etablierte Konzepte und Vorgehensweisen zur Modularisierung wie OSGi und JEE werden in der Session den Ideen von Java 8 gegenübergestellt und der architektonische Aspekt in der technologischen Debatte hinterfragt.
OSGi is a modular system for Java that allows software to be split into components called bundles that can be installed, started, stopped, updated dynamically without requiring a restart. Bundles define dependencies and versions, and services can be published and discovered within a Java Virtual Machine. OSGi aims to support component-based development and addresses issues with modularity in standard Java.
In this Presentation, we have provided step by step Installation guide and error free solution for developers which helps in time efficient and user friendly installation of theme in Liferay 7.
Java 10 contains several new features including local variable type inference using the var keyword, time-based release versioning, improved support for Docker containers, and various library enhancements. It focuses on improving performance and usability. Some notable changes include local variable type inference for concise code, parallel full GC for the G1 collector to reduce latency, and application data sharing to improve startup times.
Dependency injection in Java, from naive to functionalMarian Wamsiedel
The presentation contains more approaches to implement inversion of control (dependency injection). There is a naive implementation, a standard guice implementation and two functional solutions.
The code samples are available on a github repository.
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)Martin Toshev
Seminar "Modularity of the Java Platform" of the Bulgarian Java User Group.
Topics of the seminar:
Modularity 101
Modularity on top of the platform: OSGi
Modularity of the platform: Jigsaw
OSGi and Jigsaw interoperability: Penrose
Are you interested into getting deep insight into the new features that Project Jigsaw offers in Java 9 ?
Project Jigsaw is one of the biggest changes introduced in Java since the launch of the Java programming language back in 1995. It has a great impact on the way we architect and develop Java applications.
Project Jigsaw represents a brand new modular system that brings lots of features and empowers developers to build modular applications using Java 9.
In this presentation you will see how the entire JDK was divided into modules and how the source code was reorganized around them.
You will learn all what you need to know in order to start developing reliable, secure and maintainable modular Java applications with Project Jigsaw.
You will see how to define modules and how to compile, package and run a Java application using Jigsaw.
You’ll learn how to take advantage of the new module path and how to create modular run-time images that represent smaller and compacter JREs that consist only of the modules you need.
Having a Java 7 or 8 application and you are intending to migrate it to Java 9? In this talk you’ll learn how to do it using top-down migration and bottom-up migration.
Are you afraid that your application code will break when switching to Java 9? No problem, you’ll see what you should do in order to make your application suitable for Java 9.
An introduction to the Java Platform Module System (JPMS). This talk is from April 2017, before the Java SE 9 release, so the final details may be subtly different, particularly once a standard becomes established for module names.
Brief description about Java modularity including OSGi and Jigsaw.
Nowadays the word "modularity" has been searched a lot in Google and several blog posts have been written about it. Specially with the #Jigsaw subject that Oracle's guys have been spreading in different conferences .
Here I try to summarise the idea in the Java environment mentioning what for me are the main implementations of java modularity : OSGi and Jigsaw.
Java 9 will introduce a new module system that will provide code encapsulation and a way to explicitly declare dependencies between modules. Some key changes include the ability to define modules using a module-info.java file, and new parameters for javac and java to support modules. There are still some unresolved issues around module declarations, artifacts, descriptors, graphs, reflection, and versioning that need to be addressed prior to final release. The new module system is aimed at addressing problems like large runtime footprints, classpath issues, and lack of visibility controls between packages.
Introduction to JDK-9 Modules and JLink Plugins
Modules
Module Dependencies
Jlink and Packaging
Jlink Plugins
Example Plugins
System Module Descriptor Plugin
Compress Plugin
Release-Info Plugin
The document provides an overview of new features in Java 9, including:
- The introduction of a module system that divides the JDK into smaller modules, allowing applications to only use necessary modules.
- Private methods can now be defined in interfaces to avoid redundant code.
- Multi-release JAR files allow libraries to support multiple Java versions.
- Various commands are described to work with the new module system, such as listing modules, describing modules, compiling modular code, and creating a custom JRE with only required modules.
It seems like keeping up to date with Java nowadays is an enormous task. Gone is the era of big, delayed Java releases that span years. We're now getting a new major release every six months. What's up with that? You're probably still developing on Java 8, even though Java 12 is already available.
Join this session to get a code-first overview of what's new in Java since Java 8. We'll give an overview of the module system (Java 9), the local-variable type inference feature (Java 10), the new HttpClient API (Java 11) and a sneak peek of Switch Expressions in Java 12. Expect lots of advice on what to expect when migrating beyond Java 8. It's time to embrace the newfound agility of the Java platform!
Open Services Gateway Initiative (OSGI)Peter R. Egli
OSGi is a component-based technology and was developed to provide a software platform that allows modularization and dynamic linking of application components.
OSGi components are called bundles and can be exported and imported by application bundles.
OSGi implementations like Apache Felix or Eclipse Equinox provide a runtime container which controls the lifecycle of bundles.
Even though OSGi is hardware independent, it is based on the Java Virtual Machine and as such extends the concepts of the underlying Java language.
An OSGi bundle's capabilities and properties are defined in a manifest file that is packed together with the bundle's Java class files. The manifest file allows compatibility checks by the OSGi runtime between the exporting bundle and the importing bundle.
This export and import mechanism allows highly flexible and dynamic application environments where applications and components are installed, linked and started at runtime without the need to restart the entire system.
Modularization With Project Jigsaw in JDK 9Simon Ritter
The document discusses Project Jigsaw and modularization in JDK 9. It introduces modularization and modules, explaining that modules group code and declare dependencies. It outlines changes in JDK 9 like encapsulating internal APIs and changing the binary structure. The goals of modularization are to make Java more scalable, flexible, secure and maintainable for large applications. Modules, compilation, execution and linking with modular JAR files are also summarized.
JavaOne 2017 presentation about migration existing code to Java 9 modules.
Demos used during the presentation can be found on GitHub: https://github.com/java9-modularity/java9-migration-demos
'Elevate your webapps with Scala & Lift', as presented on JEEConf 2012, Kiev, Ukraine
Also see: http://branchandbound.net/blog/conferences/2012/05/jeeconf-tripreport/
The new GraalVM from Oracle supports multiple language including JavaScript, Python, Ruby, R, C++ as well as Java and other JVM languages. This opens up interesting possibilities for polygot enterprise applications. Now you can use a Node library in a Java application or call an R statistical function from an EJB. Previously, this type of integration was extremely challenging. This session will provide recipes to get up and running along with best practices and some cool demos.
Code: https://github.com/rcuprak/graalvm_jee
Mit Java 8, Jigsaw und JSR 294 soll über die Java-Plattform ein vereinheitlichtes Modularisierungskonzept eingeführt und die seit 2005 apostrophierte "post-jar-File-Ära" eingeläutet werden.
Etablierte Konzepte und Vorgehensweisen zur Modularisierung wie OSGi und JEE werden in der Session den Ideen von Java 8 gegenübergestellt und der architektonische Aspekt in der technologischen Debatte hinterfragt.
OSGi is a modular system for Java that allows software to be split into components called bundles that can be installed, started, stopped, updated dynamically without requiring a restart. Bundles define dependencies and versions, and services can be published and discovered within a Java Virtual Machine. OSGi aims to support component-based development and addresses issues with modularity in standard Java.
In this Presentation, we have provided step by step Installation guide and error free solution for developers which helps in time efficient and user friendly installation of theme in Liferay 7.
Java 10 contains several new features including local variable type inference using the var keyword, time-based release versioning, improved support for Docker containers, and various library enhancements. It focuses on improving performance and usability. Some notable changes include local variable type inference for concise code, parallel full GC for the G1 collector to reduce latency, and application data sharing to improve startup times.
Dependency injection in Java, from naive to functionalMarian Wamsiedel
The presentation contains more approaches to implement inversion of control (dependency injection). There is a naive implementation, a standard guice implementation and two functional solutions.
The code samples are available on a github repository.
Writing NodeJS applications is an easy task for JavaScript developers. However, getting what is happening under the hood in NodeJS may be intimidating, but understanding it is vital for web developers.
Indeed, when you try to learn NodeJS, most tutorials are about the NodeJS ecosystem like Express, Socket.IO, PassportJS. It is really rare to see some tutorials about the NodeJS runtime itself.
By this meetup, I want to spot the light on some advanced NodeJS topics so as to help developers answering questions an experienced NodeJS developer is expected to answer. Understanding these topics is essential to make you a much more desirable developer. I want to explore several topics including the famous event-loop along with NodeJS Module Patterns and how dependencies actually work in NodeJS.
I hope that this meetup would help you to be more comfortable understanding advanced code written in NodeJS.
Modular JavaScript in an OSGi World - S Makmfrancis
What percentage of your web-app is written in JavaScript? Don’t be surprised if it’s more than half of your codebase. With the advent of HTML5 and single-page-applications driven by RESTful backends, the amount of JavaScript keeps growing. On the Java side, OSGi allows us to create modular, flexible applications. But how does this translate to the client-side? Isn’t a ‘single-page-application’ fundamentally at odds with modularity?
In this session we take a look at the currently available tools for modularity in JavaScript. There are several ways you can combine existing JavaScript module systems with OSGi-based development on the backend. We discuss tradeoffs between these different approaches based on real-world experience with large JavaScript front-ends and OSGi back-ends. In particular an example combining OSGi, RequireJS and AngularJS is presented. Along with practical advice based on current technology, we also look forward at relevant upcoming standards such as Web Components. After this session you’ll have a solid grasp of modular JavaScript development in an OSGi world.
Bio:
After getting his master's degree in Software Technology, Sander became a software developer/architect. Currently he works as Senior Software Engineer for Luminis Technologies, specializing in modular Java and JavaScript development. Additionally, data analysis and machine learning are part of his ever growing list of interests. Sander loves sharing knowledge, for example through his blog (at http://branchandbound.net) and by writing for the Dutch Java Magazine. He speaks regularly at various international developer conferences (including JavaOne, J-Fall, JEEConf), sharing his passion for Java, alternative JVM languages and related technologies.
The document provides guidelines for designing APIs. Some key points include:
1) Each API should clearly explain what the user can achieve and how to use it. Documentation is important.
2) Consider using annotations to mark APIs as deprecated or to specify thread safety and other implementation details.
3) Use factory methods instead of constructors when possible to increase flexibility and avoid tight coupling.
4) Make implementation classes immutable to avoid side effects and threading issues.
5) Provide consistent exceptions at the appropriate level of abstraction.
Pitfalls of machine learning in productionAntoine Sauray
Going from POC to production with Machine Learning can lead to many unexpected problems. We explore some of them in this presentation at the Nantes Machine Learning Meetup.
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]Alex Ershov
The document discusses 26 top Angular 8 interview questions, including questions about the difference between Promises and Observables, the purpose of ngOnInit versus the constructor, and what AOT (Ahead-of-Time compilation) is. It also covers questions about new features in Angular 8 like Bazel, Ivy, and changes to the lazy loading and location modules. Key topics covered include components, routing, RxJS, templates, and lifecycle hooks.
1. The document discusses object-oriented programming concepts like abstraction, encapsulation, inheritance, polymorphism, and dynamic binding.
2. It then provides details on the history and features of Java, including how Java code is compiled and run on the Java Virtual Machine.
3. Core object-oriented features of Java like classes, objects, constructors, and method overloading are explained.
Exploring Kotlin language basics for Android App developmentJayaprakash R
Kotlin is a new programming language that targets JVM, Android and JavaScript. It is 100% interoperable with Java and avoids NullPointerExceptions. Some key features include lambda expressions, immutable val properties, smart casting, and named arguments. Kotlin code can use existing Java frameworks and libraries. Data classes, sealed classes, and when expressions make the code cleaner. Best practices include using apply() for object initialization and named arguments instead of method chaining.
What the Gradle team have shipped since Gradle 3.0, featuring performance features like compile avoidance, user experience features like the Kotlin DSL, and brand new tools like the Java 9 support
original (better quality) on https://docs.google.com/presentation/d/1bnwj8CrFGo5KekONYSeIHySdkoXZiewJxkHcZjXnzkQ/
slides from OpenDaylight Summit Oct 2016 Seattle
Java 9: Deep Dive into Modularity and Dealing with Migration IssuesGlobalLogic Ukraine
The speaker gave an overview of Project Jigsaw, explained benefits of modularity, told about module-info.java contents, dwelt upon potential migration issues and suggested their resolution; also, he revealed to the audience how to reduce the deployment size by using jlink.
This presentation by Oleh Krupenia (Senior Software Engineer, Consultant at GlobalLogic) was delivered at GlobalLogic Kharkiv Java Conference 2018 on June 10, 2018.
The document provides an agenda and recap for an Angular workshop session. The agenda covers Angular component lifecycle, modularizing Angular applications, Angular routing, and hands-on examples. The recap summarizes key points from the previous session, including why Angular is used for single page applications, its building blocks like components and services, and TypeScript. It also discusses Angular component lifecycle hooks and provides an example flow. The hands-on section describes refactoring a weather application to add routing and modularization. Essential coding practices like separation of concerns and reusability are also covered.
An applet is a Java program that runs within a web browser. It is embedded in an HTML page using tags and runs on the client-side. Applets allow websites to be more dynamic and interactive. All applets extend the Applet class and run within a browser or applet viewer rather than as standalone programs. The code is downloaded from a web server when the page loads and output is handled using AWT methods rather than System.out. For security, applets have restricted access to client files and networks.
This document discusses modules in JavaScript. It defines what modules are, their benefits like abstraction, encapsulation, reusability and managing dependencies. It describes how earlier versions of JavaScript did not support modules natively and workarounds used like IIFE and Revealing Module Pattern. It also explains key aspects of modules like module format, module loader and build tools. Finally, it provides details on popular module formats like AMD, CommonJS, module loaders like SystemJS, RequireJS, configuration options of SystemJS like baseURL, bundles, map etc.
Java 9 ships in July, are you ready for Java 9 modules? Java 9 modules (aka Project Jigsaw) is the biggest fundamental change to the Java runtime. Code that use Oracle/Sun private APIs will break. This session will cover the basics of Java 9 modules and also the current state of tooling. The ramifications to existing and legacy applications will be covered along with the steps you’ll need to take to harness the power of modules and write more maintainable systems.
This document provides a style guide and best practices for developing AngularJS applications. It discusses topics such as wrapping code in immediately invoked function expressions (IIFEs) to avoid namespace collisions, using the controllerAs syntax over $scope, placing logic in services rather than controllers, and debugging techniques like inspecting scopes and using breakpoints. Common errors encountered in AngularJS development are also covered, along with their potential causes and solutions.
Similar to Desiging for Modularity with Java 9 (20)
It seems like keeping up to date with Java nowadays can be a daunting task. Gone is the era of big, delayed Java releases that span years. We’re now getting a new major release every six months. What’s up with that? You’re probably still developing on Java 8, even though Java 13 is almost released already. Attend this session to get a code-first overview of what’s new in Java since Java 8. You’ll get an overview of the module system (Java 9), the local variable type inference feature (Java 10), and the new HttpClient API (Java 11), plus a sneak peek of Java 12 and 13 preview features. It’s time to embrace the newfound agility of the Java platform!
How do we get our software out on the Internet of Things? Many assumptions in current deployment practices don't hold up. Devices can be occasionally connected, through low-bandwidth networks and are generally outside of direct control. Manually shuffling around binaries is not an option.
Apache ACE is an open-source Java provisioning tool tackling such challenges.You can manage Java apps and configs in a modular fashion. The foundations of ACE are OSGi, semantic versioning and reliable communication. Pushing out incremental updates and managing numerous devices becomes possible.
Slides for my talk event-sourced architectures with Akka. Discusses Akka Persistence as mechanism to do event-sourcing. Presented at Javaone 2014 and Jfokus 2015.
This document discusses TypeScript, a superset of JavaScript that adds optional static typing and class-based object-oriented programming. It allows developers to gradually introduce typing into JavaScript code for improved productivity and catch errors early. The document covers TypeScript features like interfaces, classes, modules, type definitions, and comparisons to alternatives like CoffeeScript and Dart. It concludes that TypeScript allows gradual adoption of typing while following the future ECMAScript standard.
Working with micro-services is arguably the best part of OSGi development. However, everyone agrees that tracking service dependencies with the bare-bones OSGi API is not ideal. So, you pick one of the available dependency managers: either Declarative Services, Felix Dependency manager, Blueprint or iPojo.
But how do you pick the right one? Easy! After this shoot-out you’ll know all about the performance, usability and other aspects of the existing dependency managers. We show the strengths and weaknesses of the implementations side-by-side. How usable is the API? What about performance, does it scale beyond trivial amounts of services? Does it matter which OSGi framework you run the dependency manager in?
Make up your mind with the facts presented in this session.
This document discusses how modularity was used to build an educational software system called PulseOn in a scalable way for the cloud. Some key points:
- PulseOn was divided into multiple modules (bundles) like personal dashboards, learning content, adaptive recommendations, etc. that communicated through well-defined interfaces.
- Technologies like OSGi, RESTful APIs, MongoDB, and HTML5/JavaScript were used to build these modular and interoperable components.
- The system was designed to automatically scale on demand across multiple servers using load balancers and auto-scaling groups.
- Open-source tools like Amdatu and Apache ACE helped with building and deploying modular cloud-
Cross-Build Injection attacks are a completely new class of attacks that take place at build time. In this presentation (which was presented at JavaOne 2012) I show what the problem is and what can be done about. As always, security doesn't come for free: you'll have to work to get it right!
(unfortunately, some graphics got mangled by the SlideShare conversion. Sorry!)
Hibernate Performance Tuning, presented on JEEConf 2012, Kiev, Ukraine.
Also see: http://branchandbound.net/blog/conferences/2012/05/jeeconf-tripreport/
Adaptation of presentation at http://www.slideshare.net/SanderMak/hibernate-performance-tuning
Introduction to Akka, as presented on May 3 2012 at the Belgian Java User Group (BeJUG). For more details see: http://www.bejug.org/confluenceBeJUG/display/BeJUG/ForkJoin+and+Akka
Demo code can be found at: http://bit.ly/bejug-akka
Introduction to JDK7's Fork/Join framework. Present on May 3 2012 at the Belgian Java User Group (BeJUG). For more information see: http://www.bejug.org/confluenceBeJUG/display/BeJUG/ForkJoin+and+Akka
Demo code can be found at http://bit.ly/bejug-fj
This session was presented at the JFall 2011 conference in The Netherlands. It introduces the Fork/Join framework that was introduced in Java 7. Example code can be found at http://bit.y/jfall-forkjoin
The document summarizes the 2011 Kaleidoscope (Kscope) conference. It was a large conference with over 1000 attendees across 4 hotels. There were over 300 sessions across 4 tracks: Database, Business Intelligence, Apex, and Fusion Middleware. The Fusion Middleware track focused on products like SOA Suite, BPM Suite, and helping attendees migrate away from older Forms applications. The document provides an overview of the sessions and topics covered within each track.
The document discusses new features in Java 7 including fork/join concurrency and invokedynamic. Fork/join concurrency allows tasks to be recursively split into subtasks to take advantage of multiple cores. Invokedynamic is a new bytecode that allows method calls to be resolved at runtime rather than compile-time, improving performance of dynamic languages on the JVM. It works by triggering a bootstrap method to lookup and return a method handle for the actual implementation.
Presentation for the Dutch Open University on Lift, the webframework written in Scala. Though the slides are light on content, the sample application that was used throughout the presentation can be found at https://github.com/sammy8306/Lift/tree/lift_ou/playground and should give more than enough insight into a working Lift application
The document discusses improvements in JDK 7 for supporting dynamic languages on the JVM. These include method handles, which provide lightweight method pointers, and invokedynamic, which allows dynamic method dispatch. The Multi Language Virtual Machine project aimed to better support dynamic languages by allowing separate compilation and late-binding of method calls.
Scala is a programming language that runs on the JVM and fuses functional and object-oriented paradigms. It aims to provide functional programming for programmers with an imperative mindset. Key features include functions as first-class values, pattern matching, traits for composition, and seamless interoperability with Java. While some features appear to be language features, many are actually implemented via libraries. The Scala community is growing with adoption by companies and increasing support in tools and publications.
This presentation describes an approach to analysis of common recursion patterns in purely functional code. The goal is to recognize common patterns and provide the user with hints how to improve them using standard FP techniques (map, fold etc.). This presentation was given as part of the Advanced Functional Programming Seminar at Utrecht University.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Infrastructure Challenges in Scaling RAG with Custom AI modelsZilliz
Building Retrieval-Augmented Generation (RAG) systems with open-source and custom AI models is a complex task. This talk explores the challenges in productionizing RAG systems, including retrieval performance, response synthesis, and evaluation. We’ll discuss how to leverage open-source models like text embeddings, language models, and custom fine-tuned models to enhance RAG performance. Additionally, we’ll cover how BentoML can help orchestrate and scale these AI components efficiently, ensuring seamless deployment and management of RAG systems in the cloud.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/building-and-scaling-ai-applications-with-the-nx-ai-manager-a-presentation-from-network-optix/
Robin van Emden, Senior Director of Data Science at Network Optix, presents the “Building and Scaling AI Applications with the Nx AI Manager,” tutorial at the May 2024 Embedded Vision Summit.
In this presentation, van Emden covers the basics of scaling edge AI solutions using the Nx tool kit. He emphasizes the process of developing AI models and deploying them globally. He also showcases the conversion of AI models and the creation of effective edge AI pipelines, with a focus on pre-processing, model conversion, selecting the appropriate inference engine for the target hardware and post-processing.
van Emden shows how Nx can simplify the developer’s life and facilitate a rapid transition from concept to production-ready applications.He provides valuable insights into developing scalable and efficient edge AI solutions, with a strong focus on practical implementation.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
3. Designing for Modularity with Java 9
What if we ...
... forget about the classpath
... embrace modules
... want to create truly modular software?
4. Designing for Modularity with Java 9
What if we ...
... forget about the classpath
... embrace modules
... want to create truly modular software?
Design Constraints Patterns
5. A Module Primer
module easytext.cli {
requires easytext.analysis;
}
module easytext.analysis {
exports analysis.api;
opens impl;
}
easytext.cli easytext.analysis
other
analysis.api
impl
reflection only!
6. A Module Primer
module easytext.cli {
requires easytext.analysis;
}
module easytext.analysis {
exports analysis.api;
opens impl;
}
Modules define dependencies
explicitly
easytext.cli easytext.analysis
other
analysis.api
impl
reflection only!
7. module easytext.cli {
requires easytext.analysis;
}
A Module Primer
module easytext.analysis {
exports analysis.api;
opens impl;
}
Packages are encapsulated by
default
easytext.cli easytext.analysis
other
analysis.api
impl
reflection only!
8. module easytext.cli {
requires easytext.analysis;
}
A Module Primer
module easytext.analysis {
exports analysis.api;
opens impl;
}
Packages can be “opened” for
deep reflection at run-time
easytext.cli easytext.analysis
other
analysis.api
impl
reflection only!
13. Encapsulation vs. decoupling
Analyzer i = new KincaidAnalyzer();
‣ Even with interfaces, an instance has to be
created…
‣ We need to export our implementation! :-(
module easytext.kincaid {
exports easytext.analysis.kincaid;
}
14. Reflection isn’t a workaround
Class myImpl = Class.forName(…);
MyInterface i = myImpl.newInstance();
‣ Package needs to be open
module easytext.kincaid {
opens easytext.analysis.kincaid;
}
15. Services to the rescue
easytext.gui
easytext.analysis.kincaid easytext.analysis.coleman
easytext.cli
Module System
uses uses
providesprovides
16. Providing a service
module easytext.analyzer.kincaid {
requires easytext.analysis.api;
provides javamodularity.easytext.analysis.api.Analyzer
with javamodularity.easytext.analysis.kincaid.KincaidAnalyzer;
}
17. Implementing a service
public class KincaidAnalyzer implements Analyzer {
public KincaidAnalyzer() { }
@Override
public double analyze(List<List<String>> sentences) {
…
}
}
‣ Just a plain Java class
‣ Not exported!
18. Consuming a service
module easytext.cli {
requires easytext.analysis.api;
uses javamodularity.easytext.analysis.api.Analyzer;
}
19. Consuming a service
Iterable<Analyzer> analyzers = ServiceLoader.load(Analyzer.class);
for (Analyzer analyzer: analyzers) {
System.out.println(
analyzer.getName() + ": " + analyzer.analyze(sentences));
}
module easytext.cli {
requires easytext.analysis.api;
uses javamodularity.easytext.analysis.api.Analyzer;
}
20. Finding the right service
ServiceLoader<Analyzer> analyzers =
ServiceLoader.load(Analyzer.class);
analyzers.stream()
.filter(provider -> …)
.map(ServiceLoader.Provider::get)
.forEach(analyzer -> System.out.println(analyzer.getName()));
‣ ServiceLoader supports streams
‣ Lazy instantiation of services
23. Providing a Guice service
public class ColemanModule extends AbstractModule {
@Override
protected void configure() {
Multibinder
.newSetBinder(binder(), Analyzer.class)
.addBinding().to(ColemanAnalyzer.class);
}
‣ Provider module should export a Guice Module
24. Providing a Guice service
‣ Consumers must be able to compile against the
Guice module
‣ Service impl package must be open
module easytext.algorithm.coleman {
requires easytext.algorithm.api;
requires guice;
requires guice.multibindings;
exports javamodularity.easytext.algorithm.coleman.guice;
opens javamodularity.easytext.algorithm.coleman;
}
javamodularity
│ └── easytext
│ └── algorithm
│ └── coleman
│ ├── ColemanAnalyzer.java
│ └── guice
│ └── ColemanModule.java
└── module-info.java
25. Consuming a Guice service
public class Main {
public static void main(String... args) {
Injector injector =
Guice.createInjector(
new ColemanModule(),
new KincaidModule());
CLI cli = injector.getInstance(CLI.class);
cli.analyze(args[0]);
}
}
26. Consuming a Guice service
‣ Require the implementation Guice modules
‣ Open package for Guice injection
module easytext.cli {
requires easytext.algorithm.api;
requires guice;
requires easytext.algorithm.coleman;
requires easytext.algorithm.kincaid;
opens javamodularity.easytext.cli;
}
27. Consuming a Guice service
‣ Now we can @Inject
public class CLI {
private final Set<Analyzer> analyzers;
@Inject
public CLI(Set<Analyzer> analyzers) {
this.analyzers = analyzers;
}
…
32. Services vs Guice
‣ @Inject vs using an API
‣ Developers might be more familiar the model
‣ Requires more coupling
‣ Adding an implementation requires code changes
Benefits of using Guice
Downsides of using Guice
39. Naming Modules
... is hard
Application modules
‣ Short & memorable
‣ <application>.<component>
‣ e.g. easytext.gui
40. Naming Modules
... is hard
Application modules
‣ Short & memorable
‣ <application>.<component>
‣ e.g. easytext.gui
vs. Library modules
‣ Uniqueness
‣ Reverse DNS
‣ com.mycompany.ourlib
‣ 'Root package'
42. API Modules
‣ Module with exported API only
‣ When multiple implementations are expected
‣ Can also contain 'default' implementation
43. API Modules
‣ Module with exported API only
‣ When multiple implementations are expected
‣ Can also contain 'default' implementation
‣ API modules export:
‣ Interfaces
‣ (Abstract) classes
‣ Exceptions
‣ Etc.
59. Breaking cycles
public class Author {
private String name;
private List<Book> books;
public Author(String name)
{
this.name = name;
}
// ..
}
60. Breaking cycles
public class Author {
private String name;
private List<Book> books;
public Author(String name)
{
this.name = name;
}
// ..
}
public class Book {
public Author author;
public String title;
public void printBook() {
System.out.printf(
"%s, by %snn%s",
title, author.getName(),
text);
}
61. Breaking cycles
public class Author {
private String name;
private List<Book> books;
public Author(String name)
{
this.name = name;
}
// ..
}
public class Book {
public Author author;
public String title;
public void printBook() {
System.out.printf(
"%s, by %snn%s",
title, author.getName(),
text);
}
62. Breaking cycles
public class Author {
private String name;
private List<Book> books;
public Author(String name)
{
this.name = name;
}
// ..
}
public class Book {
public Author author;
public String title;
public void printBook() {
System.out.printf(
"%s, by %snn%s",
title, author.getName(),
text);
}
65. Breaking cycles: abstraction
public class Author
implements Named {
// ..
public String getName() {
return this.name;
}
}
public interface Named {
String getName();
}
66. Optional dependencies
‣ Requires means compile-time and run-time dependency
‣ What if we want an optional dependency?
‣ Use it if available at run-time
‣ Otherwise, run without
67. Optional dependencies
‣ Requires means compile-time and run-time dependency
‣ What if we want an optional dependency?
‣ Use it if available at run-time
‣ Otherwise, run without
Compile-time only dependencies:
module framework {
requires static fastjsonlib;
}
68. Optional dependencies
‣ Requires means compile-time and run-time dependency
‣ What if we want an optional dependency?
‣ Use it if available at run-time
‣ Otherwise, run without
Compile-time only dependencies:
module framework {
requires static fastjsonlib;
}
Resolve fastjsonlib if available at run-time, ignore if not