The document discusses modularization in Java 8 and OSGi. It describes what modules are and why they are needed, including for managing dependencies and versioning. It outlines the characteristics of a good module system and compares how Java 8's Project Jigsaw and OSGi handle modularization. Key points include how both aim to address issues like class loading performance and dependency management, but OSGi has existing tools and does not require language changes.
Architecture | Modular Enterprise Applications | Mark NuttallJAX London
This document discusses modularity and OSGi, including:
- What modularity is and why Java needs it to reduce entanglement over time
- An overview of Enterprise OSGi and how it brings enterprise technologies to OSGi
- New features in OSGi Service Platform Release 4 such as a standard application model and bundle repository
- A demonstration of a colors application that uses OSGi bundles and services
Java EE | Modular EJBs for Enterprise OSGi | Tim WardJAX London
This document discusses integrating Enterprise Java Beans (EJBs) with the OSGi framework. It covers how EJBs can be exposed as OSGi services, issues around classloading and dependencies, and how the Apache Aries project integrates transaction management and Java Persistence API support for modular EJBs running in OSGi. It provides an example of a comment service implemented as an EJB bundle in Aries to demonstrate that the approach works.
Modularity of The Java Platform Javaday (http://javaday.org.ua/)Martin Toshev
Project Jigsaw aims to provide modularity for the Java platform by defining modules for the JDK and restructuring it. This will address problems caused by the current monolithic design and dependency mechanism. OSGi also provides modularity on top of Java by defining bundles and a runtime. Project Penrose explores interoperability between Jigsaw and OSGi modules.
The document discusses the 7th generation of Java (Java SE 7) including its history and key features. Some of the main points covered include:
- Java SE 7 was released in July 2011 and included new features like strings in switch statements, binary literals, multi-catch exceptions, and try-with-resources statements.
- It also focused on improving dynamic language support with JSR 292 and the invokedynamic bytecode, as well as various concurrency and collections updates.
- Other additions included further enhancements to I/O with the NIO.2 APIs, security updates, and internationalization improvements.
Using the OSGi Application Model on Mobile Devices with CLDC JVM - Dimitar Va...mfrancis
The document discusses using the OSGi application model on mobile devices with CLDC JVMs. It describes the benefits of using OSGi, technical constraints of CLDC, and proposes solutions like running bundles as standalone applications, MIDlets, or in a MIDlet suite. It also addresses limitations like class loading and missing classes/methods, and how an OSGi framework and bundles can be implemented to work within these constraints.
In this core java training session, you will learn get introduction to Java. Topics covered in this session are:
• History of Java – A Programmer’s Perspective
• Salient Features of Java
• Major Java Editions
For more information about this course visit on this link: https://www.mindsmapped.com/courses/software-development/learn-java-fundamentals-hands-on-training-on-core-java-concepts/
This document discusses Java platforms for mobile Linux devices. It describes various Java implementations like J2ME, Java ME CDC, and embedded Java variants. It also discusses GUI frameworks like MIDP, AWT, and Swing. The document introduces the JaLiMo initiative which aims to create a complete free Java stack for mobile Linux by integrating existing projects. It discusses challenges in porting Java, building for embedded targets, and potential solutions like using Maven and packaging plugins.
The document discusses modularization in Java 8 and OSGi. It describes what modules are and why they are needed, including for managing dependencies and versioning. It outlines the characteristics of a good module system and compares how Java 8's Project Jigsaw and OSGi handle modularization. Key points include how both aim to address issues like class loading performance and dependency management, but OSGi has existing tools and does not require language changes.
Architecture | Modular Enterprise Applications | Mark NuttallJAX London
This document discusses modularity and OSGi, including:
- What modularity is and why Java needs it to reduce entanglement over time
- An overview of Enterprise OSGi and how it brings enterprise technologies to OSGi
- New features in OSGi Service Platform Release 4 such as a standard application model and bundle repository
- A demonstration of a colors application that uses OSGi bundles and services
Java EE | Modular EJBs for Enterprise OSGi | Tim WardJAX London
This document discusses integrating Enterprise Java Beans (EJBs) with the OSGi framework. It covers how EJBs can be exposed as OSGi services, issues around classloading and dependencies, and how the Apache Aries project integrates transaction management and Java Persistence API support for modular EJBs running in OSGi. It provides an example of a comment service implemented as an EJB bundle in Aries to demonstrate that the approach works.
Modularity of The Java Platform Javaday (http://javaday.org.ua/)Martin Toshev
Project Jigsaw aims to provide modularity for the Java platform by defining modules for the JDK and restructuring it. This will address problems caused by the current monolithic design and dependency mechanism. OSGi also provides modularity on top of Java by defining bundles and a runtime. Project Penrose explores interoperability between Jigsaw and OSGi modules.
The document discusses the 7th generation of Java (Java SE 7) including its history and key features. Some of the main points covered include:
- Java SE 7 was released in July 2011 and included new features like strings in switch statements, binary literals, multi-catch exceptions, and try-with-resources statements.
- It also focused on improving dynamic language support with JSR 292 and the invokedynamic bytecode, as well as various concurrency and collections updates.
- Other additions included further enhancements to I/O with the NIO.2 APIs, security updates, and internationalization improvements.
Using the OSGi Application Model on Mobile Devices with CLDC JVM - Dimitar Va...mfrancis
The document discusses using the OSGi application model on mobile devices with CLDC JVMs. It describes the benefits of using OSGi, technical constraints of CLDC, and proposes solutions like running bundles as standalone applications, MIDlets, or in a MIDlet suite. It also addresses limitations like class loading and missing classes/methods, and how an OSGi framework and bundles can be implemented to work within these constraints.
In this core java training session, you will learn get introduction to Java. Topics covered in this session are:
• History of Java – A Programmer’s Perspective
• Salient Features of Java
• Major Java Editions
For more information about this course visit on this link: https://www.mindsmapped.com/courses/software-development/learn-java-fundamentals-hands-on-training-on-core-java-concepts/
This document discusses Java platforms for mobile Linux devices. It describes various Java implementations like J2ME, Java ME CDC, and embedded Java variants. It also discusses GUI frameworks like MIDP, AWT, and Swing. The document introduces the JaLiMo initiative which aims to create a complete free Java stack for mobile Linux by integrating existing projects. It discusses challenges in porting Java, building for embedded targets, and potential solutions like using Maven and packaging plugins.
This document discusses the LLVM compiler system and its approach. LLVM aims to build modular compiler components that implement modern techniques, integrate well together, have few dependencies, and integrate with existing tools. This allows compilers built with LLVM components to share code and improvements, choose the best components, and be constructed quickly. The document provides llvm-gcc as an example client that uses GCC's front-end but replaces the optimizer and code generator with LLVM's modern ones to gain benefits like interprocedural optimizations, aggressive loop optimizations, and retargetable code generation.
This document discusses the evolution of Java EE from J2EE and how Java EE 5 makes enterprise application development easier. Some key ways it does this include introducing annotations for declarative programming, simplifying packaging rules, and introducing new APIs and frameworks like EJB 3.0, JPA, JAX-WS 2.0, and JSF 1.2. The document also covers features of Java EE 5 like dependency injection and how annotations are used throughout the platform.
1) The document discusses Java concepts across 5 doses: the Java Community Process, Java characteristics, terminology, platforms, and frameworks.
2) It covers key Java characteristics like being cross-platform, using object-oriented programming, having robust and good performance, and automatic memory management.
3) Important Java terminology is defined, like the Java Virtual Machine (JVM), Java Runtime Environment (JRE), and Java Development Kit (JDK).
4) The main Java platforms - Java SE, Java ME, and Java EE - are outlined, describing their uses for general applications, limited devices, and enterprise software respectively.
5) Popular Java frameworks for testing, building, GUIs, IDE
How to implement a simple dalvik virtual machineChun-Yu Wang
This slide is an introduction to Android Dalvik Virtual Machine on a short course.
We use two hand-made JVM and DVM which called Simple JVM and Simple DVM respectively, to tell student how they work. A Foo Class was provided as a target for verifying the execution results of those VM. We hope it will help student to understand JVM and DVM quickly.
ZF2 Modular Architecture - Taking advantage of itSteve Maraspin
Zend Framework 1 had modules. Their name is pretty much everything Zend Framework 2 modules share with them, though. The whole framework architecture has been rewritten to encourage software reuse and extension. In this talk I’ll share our experiences on ZF2 module creation and usage.
Java 9 introduced several new features including JShell, modules, and services. JShell allows developers to test Java code interactively from the command line. Modules allow Java code to be modularized by defining explicit dependencies and encapsulating packages. Services allow modules to discover implementations of an interface at runtime through a service loader. The modularization of Java aims to improve maintainability, security, and performance of Java applications.
The document summarizes the evolution of Java 7 including:
1. An overview of the history and prerequisites that led to the creation of Java, including how it was initially developed in 1991 for consumer devices.
2. A discussion of the different versions of Java released from JDK 1.0 to Java 7, highlighting improvements in each version.
3. Examples demonstrating new features in Java 7 like strings in switch statements, binary literals, multi-catch exceptions, and try-with-resources statements.
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.
This document provides an overview of the J2EE Struts framework with Hibernate. It introduces Java and describes its major versions. It then discusses J2EE and its need for developing enterprise applications. Key J2EE components like servlets, JSP, Struts, and Hibernate are explained at a high level. Hibernate is presented as an object-relational mapping tool that simplifies data persistence compared to traditional JDBC. The document concludes with a thank you.
Chapter 1. java programming language overviewJong Soon Bok
This document provides an overview of the Java programming language and environment. It discusses what Java is, its uses as both a programming language and platform, and the key components of the Java platform including the JRE and JDK. It also covers downloading and installing the JDK, configuring the environment, and creating a simple "Hello World" Java program. The document includes many screenshots to illustrate the various steps and configurations.
Java 9 Modules: The Duke Yet Lives That OSGi Shall DeposeNikita Lipsky
Modules appear in Java 9 at last, but why? After all, OSGi has been around for more than 15 years and serves as the foundation of many desktop, server, and IoT applications. Its authors state that OSGi solves various dependency management problems in the most powerful way - at run time.
In this session, we will explore the problems that OSGi tries to solve, understand its approach, and identify its failures. Then we will figure out which of those problems the authors of Jigsaw ignored (and why), and which ones they solved (and how). Finally, we will talk about the challenges that Jigsaw brings with itself to the Java ecosystem and what we the developers have to do about them.
https://2017.javazone.no/program/83eb9ed50ba74946ad418a3abea0467a
In this Java tutorial, we are going to learn about java evolution, development of Java language, java features, Java frameworks, and Java support systems. Java tutorial covers various development tools, classes in Java programming, and Java methods which comprises the Java environment. This tutorial on java will help you get a quick insight into the Java programming language and thus, help you learn java language.
The document provides an introduction and history of Java, outlining how it was developed in the 1990s as a platform-independent language by James Gosling at Sun Microsystems, and discusses some key advantages of Java like being object-oriented, portable, robust, and having built-in support for security and multithreading. It also describes the Java Development Kit (JDK) which contains tools for developing Java programs and the Java Runtime Environment (JRE) which allows running of Java applications and includes the Java Virtual Machine.
The document provides information about Java, including:
- Java is an object-oriented programming language that is platform independent and can be used to create applications for web, desktops, mobile devices, and more.
- Java was originally developed in the early 1990s by James Gosling at Sun Microsystems for use in set-top boxes, but became popular for building web applications and is now widely used.
- The Java Development Kit (JDK) includes tools like javac, java, javadoc and others needed to develop, compile, run and document Java programs, as well as class libraries and documentation. The JVM executes compiled Java code.
Overview of Maven and its concepts
Maven and its ecosystem
Good and bad practices
Usecases
Maven, and the future of Maven 3.x
---
Delta prez @GenevaJug :
New slides : 64,65,90,95
Updated slides : 49-51;66;91;92;118
Thx @fcamblor
The document discusses and compares Dalvik VM and Java VM. It states that Dalvik VM is used in Android and executes optimized .dex files and Dalvik bytecodes, while Java VM executes .class files. It also mentions that Dalvik VM uses register-based architecture while Java VM uses stack-based architecture. The document further discusses advantages of Dalvik VM like minimal memory footprint and how .class files are converted to .dex files. It provides comparisons between key aspects of both VMs.
Maven provides standardized tools and processes for managing software projects. It uses conventions for project layout and dependencies, and a plugin-based architecture to automate common development tasks like building, testing, and packaging. While offering high customization, Maven aims to standardize best practices for project management.
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJAX London
The talk will cover a bit of background first to set things up: what is a module, why do we need a module system, summary of Java's existing support for modularity. Then it will move on to give a comparison of OSGi's and Jigsaw's dependency models. Pros and cons of each model in different environments will be discussed. Finally, opportunities and challenges for interoperability: from the perspective of both application developers (who may need to integrate modules from both kinds) and from library module developers (who may need to target both module systems)
Rod Johnson created the Spring Framework, an open-source Java application framework. Spring is considered a flexible, low-cost framework that improves coding efficiency. It helps developers perform functions like creating database transaction methods without transaction APIs. Spring removes configuration work so developers can focus on writing business logic. The Spring Framework uses inversion of control (IoC) and dependency injection (DI) principles to manage application objects and dependencies between them.
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
This document discusses the LLVM compiler system and its approach. LLVM aims to build modular compiler components that implement modern techniques, integrate well together, have few dependencies, and integrate with existing tools. This allows compilers built with LLVM components to share code and improvements, choose the best components, and be constructed quickly. The document provides llvm-gcc as an example client that uses GCC's front-end but replaces the optimizer and code generator with LLVM's modern ones to gain benefits like interprocedural optimizations, aggressive loop optimizations, and retargetable code generation.
This document discusses the evolution of Java EE from J2EE and how Java EE 5 makes enterprise application development easier. Some key ways it does this include introducing annotations for declarative programming, simplifying packaging rules, and introducing new APIs and frameworks like EJB 3.0, JPA, JAX-WS 2.0, and JSF 1.2. The document also covers features of Java EE 5 like dependency injection and how annotations are used throughout the platform.
1) The document discusses Java concepts across 5 doses: the Java Community Process, Java characteristics, terminology, platforms, and frameworks.
2) It covers key Java characteristics like being cross-platform, using object-oriented programming, having robust and good performance, and automatic memory management.
3) Important Java terminology is defined, like the Java Virtual Machine (JVM), Java Runtime Environment (JRE), and Java Development Kit (JDK).
4) The main Java platforms - Java SE, Java ME, and Java EE - are outlined, describing their uses for general applications, limited devices, and enterprise software respectively.
5) Popular Java frameworks for testing, building, GUIs, IDE
How to implement a simple dalvik virtual machineChun-Yu Wang
This slide is an introduction to Android Dalvik Virtual Machine on a short course.
We use two hand-made JVM and DVM which called Simple JVM and Simple DVM respectively, to tell student how they work. A Foo Class was provided as a target for verifying the execution results of those VM. We hope it will help student to understand JVM and DVM quickly.
ZF2 Modular Architecture - Taking advantage of itSteve Maraspin
Zend Framework 1 had modules. Their name is pretty much everything Zend Framework 2 modules share with them, though. The whole framework architecture has been rewritten to encourage software reuse and extension. In this talk I’ll share our experiences on ZF2 module creation and usage.
Java 9 introduced several new features including JShell, modules, and services. JShell allows developers to test Java code interactively from the command line. Modules allow Java code to be modularized by defining explicit dependencies and encapsulating packages. Services allow modules to discover implementations of an interface at runtime through a service loader. The modularization of Java aims to improve maintainability, security, and performance of Java applications.
The document summarizes the evolution of Java 7 including:
1. An overview of the history and prerequisites that led to the creation of Java, including how it was initially developed in 1991 for consumer devices.
2. A discussion of the different versions of Java released from JDK 1.0 to Java 7, highlighting improvements in each version.
3. Examples demonstrating new features in Java 7 like strings in switch statements, binary literals, multi-catch exceptions, and try-with-resources statements.
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.
This document provides an overview of the J2EE Struts framework with Hibernate. It introduces Java and describes its major versions. It then discusses J2EE and its need for developing enterprise applications. Key J2EE components like servlets, JSP, Struts, and Hibernate are explained at a high level. Hibernate is presented as an object-relational mapping tool that simplifies data persistence compared to traditional JDBC. The document concludes with a thank you.
Chapter 1. java programming language overviewJong Soon Bok
This document provides an overview of the Java programming language and environment. It discusses what Java is, its uses as both a programming language and platform, and the key components of the Java platform including the JRE and JDK. It also covers downloading and installing the JDK, configuring the environment, and creating a simple "Hello World" Java program. The document includes many screenshots to illustrate the various steps and configurations.
Java 9 Modules: The Duke Yet Lives That OSGi Shall DeposeNikita Lipsky
Modules appear in Java 9 at last, but why? After all, OSGi has been around for more than 15 years and serves as the foundation of many desktop, server, and IoT applications. Its authors state that OSGi solves various dependency management problems in the most powerful way - at run time.
In this session, we will explore the problems that OSGi tries to solve, understand its approach, and identify its failures. Then we will figure out which of those problems the authors of Jigsaw ignored (and why), and which ones they solved (and how). Finally, we will talk about the challenges that Jigsaw brings with itself to the Java ecosystem and what we the developers have to do about them.
https://2017.javazone.no/program/83eb9ed50ba74946ad418a3abea0467a
In this Java tutorial, we are going to learn about java evolution, development of Java language, java features, Java frameworks, and Java support systems. Java tutorial covers various development tools, classes in Java programming, and Java methods which comprises the Java environment. This tutorial on java will help you get a quick insight into the Java programming language and thus, help you learn java language.
The document provides an introduction and history of Java, outlining how it was developed in the 1990s as a platform-independent language by James Gosling at Sun Microsystems, and discusses some key advantages of Java like being object-oriented, portable, robust, and having built-in support for security and multithreading. It also describes the Java Development Kit (JDK) which contains tools for developing Java programs and the Java Runtime Environment (JRE) which allows running of Java applications and includes the Java Virtual Machine.
The document provides information about Java, including:
- Java is an object-oriented programming language that is platform independent and can be used to create applications for web, desktops, mobile devices, and more.
- Java was originally developed in the early 1990s by James Gosling at Sun Microsystems for use in set-top boxes, but became popular for building web applications and is now widely used.
- The Java Development Kit (JDK) includes tools like javac, java, javadoc and others needed to develop, compile, run and document Java programs, as well as class libraries and documentation. The JVM executes compiled Java code.
Overview of Maven and its concepts
Maven and its ecosystem
Good and bad practices
Usecases
Maven, and the future of Maven 3.x
---
Delta prez @GenevaJug :
New slides : 64,65,90,95
Updated slides : 49-51;66;91;92;118
Thx @fcamblor
The document discusses and compares Dalvik VM and Java VM. It states that Dalvik VM is used in Android and executes optimized .dex files and Dalvik bytecodes, while Java VM executes .class files. It also mentions that Dalvik VM uses register-based architecture while Java VM uses stack-based architecture. The document further discusses advantages of Dalvik VM like minimal memory footprint and how .class files are converted to .dex files. It provides comparisons between key aspects of both VMs.
Maven provides standardized tools and processes for managing software projects. It uses conventions for project layout and dependencies, and a plugin-based architecture to automate common development tasks like building, testing, and packaging. While offering high customization, Maven aims to standardize best practices for project management.
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJAX London
The talk will cover a bit of background first to set things up: what is a module, why do we need a module system, summary of Java's existing support for modularity. Then it will move on to give a comparison of OSGi's and Jigsaw's dependency models. Pros and cons of each model in different environments will be discussed. Finally, opportunities and challenges for interoperability: from the perspective of both application developers (who may need to integrate modules from both kinds) and from library module developers (who may need to target both module systems)
Rod Johnson created the Spring Framework, an open-source Java application framework. Spring is considered a flexible, low-cost framework that improves coding efficiency. It helps developers perform functions like creating database transaction methods without transaction APIs. Spring removes configuration work so developers can focus on writing business logic. The Spring Framework uses inversion of control (IoC) and dependency injection (DI) principles to manage application objects and dependencies between them.
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
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.
This document discusses JBoss Modules, which provides a module system for loading and running modules in Application Server 7. It describes modules as collections of code and resources that implement specific domain requirements. JBoss Modules defines each module as having its own classloader, allowing isolation and preventing conflicts between modules. It manages module dependencies by only loading required imports and exporting specified APIs. The presentation demonstrates how JBoss Modules loads and executes modules quickly and efficiently to serve as the core of Application Server 7.
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.
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)Mihail Stoynov
This talk is for a very important new feature in Java SE 9. Code named Jigsaw, this feature modularizes the Java SE platform.
The coolest thing we do here is to create a custom JRE
Code: https://bitbucket.org/stybz/jigsaw.sty/
PPT: https://www.slideshare.net/mihailstoynov/modules-in-java-finally-openjdk-jigsaw
Video: https://www.youtube.com/watch?v=W5LeNPtPrqw
This document discusses modularity improvements in OSGi Framework R3, RFC 70, and RFC 79. It defines modularity as isolation between system components that can be independently examined, modified, and maintained. OSGi aims to provide modularity through class loading boundaries and package sharing between bundles. The examples show how different versions of packages can be exported and imported between bundles to satisfy various dependency and compatibility needs.
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.
Java 7 Modularity: a View from the Gallerynjbartlett
The document discusses Java modularity and Project Jigsaw. It summarizes that Project Jigsaw aims to modularize the Java Development Kit (JDK) to address issues like its large size, slow startup times, and difficulties evolving APIs and managing dependencies. It also discusses the potential for module systems like Jigsaw and OSGi to fragment the Java ecosystem if they are not compatible.
Introduction to Spock: A Unit Testing FrameworkKnoldus Inc.
When it comes to true unit tests, having a mocking framework such as Spock for Java is essential. Using a mocking framework ensures that your unit tests are fast, self-contained, and deterministic. A mocking framework can help you fake external systems, pre-program your classes with expected responses, and test hard-to-replicate error conditions.
In this, we will cover the Spock testing framework, an emerging framework that can be used to test both Java and Groovy code. Unlike Mockito, Spock is a complete testing framework that can function on its own (Mockito works in addition to JUnit).
You’ll understand:
~ How Spock tests leverage existing JUnit infrastructure
~ Spock annotations and where they apply
~ Spock mocks and stubs and how to take advantage of them
And you’ll be able to:
~ Set up test fixtures
~ Run testing methods before and after tests and test classes
~ Mock classes and interfaces set expectations, and validate them
JAVA was developed by Sun Microsystems Inc in 1991, later acquired by Oracle Corporation. It was developed by James Gosling and Patrick Naughton. It is a simple programming language. Writing, compiling and debugging a program is easy in java. It helps to create modular programs and reusable code.
This document compares features between Java and C# programming languages. It outlines that C# supports features like events, delegates, properties, operator overloading, and pointers that are absent in Java. Meanwhile, Java supports features like checked exceptions and strictfp keyword that are not present in C#. There are also some philosophical differences between the two languages, such as how methods are handled and whether exceptions are checked. Overall, the document provides a detailed overview of similarities and differences between the Java and C# programming languages.
OSGi Community Event 2018 Presentation by BJ Hargrave (IBM)
Abstract: Java 9 introduced the Java Platform Module System (JPMS) as a way to modularize the Java platform and it can be also be used by developers to modularize their own applications, although JPMS lack a number of important features for software running on the Java platform.
As people look to support the latest versions of the Java platform, changes introduced in Java 9 related to JPMS led to the needs for some features in the OSGi Core specification. OSGi framework implementations like Eclipse Equinox and Apache Felix and tools like Bnd were updated to support these new features.
This session will explore the Java 9+ support added to OSGi Core R7 and Bnd and help you learn how to navigate the world of Java 9+ and OSGi.
Java 9 introduced the Java Platform Module System (JPMS) as a way to modularize the Java platform and it can be also be used by developers to modularize their own applications, although JPMS lack a number of important features for software running on the Java platform.
As people look to support the latest versions of the Java platform, changes introduced in Java 9 related to JPMS led to the needs for some features in the OSGi Core specification. OSGi framework implementations like Eclipse Equinox and Apache Felix and tools like Bnd were updated to support these new features.
Here are the steps to filter the resource properties in the example:
1. Define the my.filter.value property in a filter file (e.g. src/main/filters/filter.properties):
my.filter.value=hello
2. Define the command.line.prop property in the pom.xml:
<properties>
<command.line.prop>hello</command.line.prop>
</properties>
3. The settings.offline property will be filtered from the <offline>true</offline> value defined in settings.xml
4. Add filtering configuration to the pom.xml:
<build>
<filters>
<filter>src
Apache maven and its impact on java 9 (Java One 2017)Robert Scholte
Maven is a build tool that manages projects and dependencies. It aims to make the build process easy and provide a uniform system. With Java 9, Maven faces challenges due to the module system's differences from the classpath. Specifically, the modulepath does not support all file types like the classpath. This causes issues for Maven which relies on dependencies being on the classpath. Additionally, automatic modules generated from JAR files can cause problems for projects. Maven cannot directly generate module descriptors but tools like Jdeps can assist with initial descriptors. Overall, while challenges exist, Maven can still be used for most projects with Java 9.
JAVA was developed by Sun Microsystems Inc in 1991, later acquired by Oracle Corporation. It was developed by James Gosling and Patrick Naughton. It is a simple programming language. Writing, compiling and debugging a program is easy in java. It helps to create modular programs and reusable code.
Similar to OpenJDK Penrose Presentation (JavaOne 2012) (20)
The NodeMCU is an inexpensive WiFi-enabled microcontroller board based on the ESP8266 chip that allows for programming of input/output pins to create inexpensive Internet of Things devices. For under $4, it can be programmed using C or Lua to build projects like remote doorbells, flood detectors, WiFi sniffers, or devices that control based on ambient light or trigger based on parking, and connects to WiFi to interface over HTTP.
This document summarizes a presentation about maximizing the power of OSGi. It introduces Declarative Services, which allows defining components and services in a simple way using annotations. Configuration Admin allows configuring components through OSGi configurations. The HTTP Whiteboard allows exposing components as web services. The Coordinator Service allows grouping related operations together. Finally, OSGi Subsystems allow packaging multiple OSGi bundles together for deployment.
Provisioning with OSGi Subsystems and Repository using Apache Aries and FelixDavid Bosschaert
This presentation takes a closer look at deploying OSGi-based applications using OSGi Subsystems and OSGi Repositories. You will see how you to package multi-bundle applications as a subsystem, deploy them and use repositories to handle dependencies. A large part of the presentation is a demo that shows it all in action using open source technology.
Note that in the screenshots Apache Aries Subsystems Core is using a pre-release version. This bundle is now released under 1.1.0.
See here in Maven Central: http://search.maven.org/#artifactdetails%7Corg.apache.aries.subsystem%7Corg.apache.aries.subsystem.core%7C1.1.0%7Cbundle
What's cool in the new and updated OSGi Specs (EclipseCon 2014)David Bosschaert
Presentation given by Carsten Ziegeler and me at EclipseCon 2014 in Burlingame (CA) about ongoing specification work in OSGi, covering the Core Platform Expert Group (CPEG) and the Enterprise Expert Group (EEG)
What's cool in the new and updated OSGi Specs (2013)David Bosschaert
Presentation given at EclipseCon Europe 2013 in Ludwigsburg (Germany) about ongoing specification work in OSGi, covering the Core Platform Expert Group (CPEG) and the Enterprise Expert Group (EEG)
Presentation on OSGi Cloud Ecosystems (RFC 183) as given at EclipseCon Boston 2013. The RFC itself is available at http://www.osgi.org/Download/File?url=/download/osgi-early-draft-2013-03.pdf
OSGi Enterprise Expert Group (OSGi Users Forum Germany)David Bosschaert
The document discusses the OSGi Enterprise Expert Group (EEG) and their work. The EEG works on OSGi specifications for enterprise use cases. Their previous releases include R4.2 and R5. R5 included new specifications for repositories, resolvers, subsystems, and migration support. The EEG is now working on R6, with focuses on cloud, Java EE integration, and updates to existing specifications.
OSGi Cloud Ecosystems (OSGi Users Forum Germany)David Bosschaert
This document discusses OSGi Cloud Ecosystems, which provide a highly dynamic OSGi environment where cloud nodes/VMs, bundles, and services can dynamically come and go. In an OSGi Cloud Ecosystem, multiple OSGi frameworks run in separate VMs/cloud nodes and are bound together via an ecosystem-wide discovery mechanism. A provisioner orchestrates the ecosystem by remotely deploying bundles to frameworks based on application topology and runtime conditions. This allows building composite cloud applications where each entity runs on a different node and can scale dynamically.
Presentation on OSGi Cloud Ecosystems as presented during EclipseCon Europe 2012 (http://www.eclipsecon.org/europe2012/sessions/osgi-and-cloud-computing)
The OSGi R5 Enterprise release is available now from www.osgi.org (at this moment as a draft, final soon). This presentation walks through what's new in this specification, what to use it for and where to get it.
The OSGi Enterprise Expert Group provided an update on their work. They have released an Enterprise Specification focusing on Java EE and component integration. Their next release will focus on bundle aggregation, dependency resolution, and enhancements to Blueprint and JMX. They are also working on support for Java service loading, cloud computing, and JCA integration.
The document summarizes the OSGi 4.2 Enterprise Specification, which includes specifications for component models, distributed services, database access, web applications, and other supporting technologies. Key aspects include Blueprint for easier OSGi development, Remote Services for exposing and consuming services over the network, JPA and JDBC for database access, and integration with Java EE technologies like JNDI, JTA, and JMX. Examples of using these specifications include the Apache Aries Trader application and isolated examples from implementing projects. Future work may include specifications for subsystems, applications, package management, and asynchronous messaging.
Distributed Services - OSGi 4.2 and possible future enhancementsDavid Bosschaert
In the first part of this talk David Bosschaert will explain the Distributed OSGi specification, which is new in OSGi 4.2. The talk will outline the design principles and also show how to distribute OSGi services in practise by a short demo. In the second part of this talk Marc Schaaf will present some preliminary results regarding research on how asynchronous messaging could be integrated into OSGi. The talk will discuss some possible integration approaches and will outline the current approach taken in this research project. A short demo is included showing how developers could use it.
This document describes a demonstration of distributed OSGi using Apache CXF's reference implementation. The demo shows a consumer OSGi container invoking a service on a provider container, with the service registered in the provider container and discovered by the consumer container using remote service metadata and discovery. It also directs readers to a talk on Thursday at 2:55pm in the Grand Ballroom B for more details on the distributed OSGi specification.
2. Agenda
• Level setting
o Introduction to modularity
o Modules and the JRE
o The Jigsaw project
o OSGi
• Introduction to Project Penrose
o Goal of the project
o Structure of the project
o Technical roadmap
• Technical work
o Achievements
o Observations
o To be done
• Advice and call to arms
3. What is a module?
Why do we need a module system?
• Modules facilitate software engineering & enhanced runtime capabilities
o Decomposition of complex systems
o Software assemblies of pre-built modules
o Provisioning / deployment, including module repositories
o Versioning and configuration management
• The module system is used to manage the modules, including installing, activating,
resolving module requirements and conflicts.
• Interacting with the module system provides a higher level abstraction than the
language provides directly.
4. Modules in Java
• The module as a unit of encapsulation...
• The Java language already has two kinds of module: classes and packages.
o classes encapsulate fields and methods
o packages encapsulate classes and resources
• Problem: neither of these is a deployable unit (too granular, too tightly coupled).
• Java's unit of deployment is the JAR file.
o No encapsulation, therefore not a module!
• Problem: need an entity that is a deployable unit of encapsulation.
5. Desirable characteristics of a module
• A module should be highly coherent
• A module should be loosely coupled to other modules.
• A module should be explicit about what it provides to other modules.
• A module should be explicit about what it depends on from other modules.
6. Why modules for the Java runtime (JRE)?
• Presently the JRE is a monolithic entity
o in general the runtime must assume your application will use anything and
everything
o class loaders provide runtime type definition and isolation
o download time and start-up time are directly impacted by the number of types
available in the runtime
• Application start-up time includes a linear search through the class path to find
system and application code
o e.g. Oracle 1.7 Windows bootclass path contains nearly 20k classes
o resources.jar rt.jar jsse.jar jce.jar charsets.jar
o rt.jar index alone is ~1Mb
• To the JRE, your application's jars’ indexes are disjoint & unsorted
o there are JRE implementation 'tricks' like look aside tables and shared classes
that can help
o class loading is a BIG time hog to amortize over the length of the run
7. Why modules for the Java runtime (JRE)? - continued
• Dependency management
o avoid “JAR hell” → trying satisfy competing requirements by simple path ordering
o type name space comprising (unversioned) package name is often insufficient
o e.g. my app depends upon foo-v2.jar and bar-v2.jar but foo-v2.jar depends
upon bar-v1.jar
- classpath foo-v2.jar; bar-v2.jar; bar-v1.jar –> my app “wins”
- classpath foo-v2.jar; bar-v1.jar; bar-v2.jar –> foo “wins”
• Module level visibility
o public, protected, private and package-private level visibility means some
implementation types (com.sun.) need to be marked public to be called by java.
APIs.
o convention asks people not to depend upon them...
• Version control
o ability to define the compatibility of a module based on numbering scheme
o different module versions for different target devices / resource goals
8. Introducing Project Jigsaw
• Project Jigsaw is an effort currently underway at OpenJDK
o defining a simple module system for Java
o modularizing the JRE itself
o originally intended as an implementation detail for the JRE / applications, but
being adopted as a Java standard (JSR)
• Working within constraints of backwards compatibility
o existing Java APIs “cannot” be changed
o Some packages contain wildly different functionality
e.g. java.util contains collection hierarchy and Locale infrastructure
• Introduces language changes to define modules
module com.example @ 1.0 {
src/com/example/myclass.java
requires jdk.base;
src/com/example/myclassimpl.java requires foo @ 2.0;
src/module-info.java requires bar @ 2.0;
}
9. Introducing OSGi
• Existing, mature, standards-based modularity solution for Java applications.
• Rich modularity model based on code-level (package) dependencies, module-level
dependencies, and services.
• First practical solution for effective component reuse
o well supported by multiple implementations, tooling, etc.
• Millions use applications built with OSGi
o most application servers are based on OSGi
• No language changes. Bundle-ManifestVersion: 2
Bundle-SymbolicName: com.ex.mybundle
o defines info in META-INF/MANIFEST.MF Bundle-Version: 1.0.0
Import-Package: com.example.bar
Export-Package: com.example.foo
10. Multiple dependency resolution
• The module system must resolve bundle dependencies, possibly in the face of multiple
valid alternatives
o e.g. my app depends upon (foo-v2.jar and (bar-v1.jar or bar-v2.jar)) and foo-
v2.jar depends upon bar-v1.jar
o if my app touches bar first, the module system may chose bar-v2.jar
o if my app touches foo first, the module system will chose bar-v1.jar
• OSGi's dynamic dependency resolution attempts to find the best fit for currently invoked
bundles at runtime
o modules are apparent at runtime
o runtime activation lifecycle: installed, resolved, starting, active, stopping, uninstalled
• Jigsaw resolves module dependencies during build, installation, or runtime
o gives opportunity for load time optimizations such as pre-verify, indexing, etc.
o Equinox OSGi implementation has similar optimizations.
11. Agenda
• Level setting
o Introduction to modularity
o Modules and the JRE
o The Jigsaw project
o OSGi
• Introduction to Project Penrose
o Goal of the project
o Structure of the project
o Technical roadmap
• Technical work
o Achievements
o Observations
o To be done
• Advice and call to arms
12. Project Penrose - the road to reality
• Both Jigsaw and OSGi are here to stay!
o Try to get the best of both worlds
o It need not be a zero-sum game
• OSGi is established and will continue to be well used
• Jigsaw is underway and a key component to the Java SE plans
• Project Penrose's goal is to demonstrate interoperability between Jigsaw and OSGi
OSGi support — It must be demonstrated by prototype to be feasible to modify an OSGi micro-
kernel such that OSGi bundles running in that kernel can depend upon Java modules. The
kernel must be able to load Java modules directly and resolve them using its own resolver,
except for core system modules. Core system modules can only be loaded using the module
system’s reification API. Java Module-System Requirements
13. Project Penrose - structure
• Penrose is structured to allow collaboration between OSGi and Jigsaw developers
o OSGi (Equinox) and Jigsaw are governed by different foundations, companies
and licenses
o Need to allow separation of developers
• Two Penrose code repositories
o Main code repository is downstream from Jigsaw
§ Provides opportunity to be experimental without disrupting Jigsaw
progress
§ Kept in sync with Jigsaw changes, easy to pass code upstream
§ “show me” working code, rather than arguments on Jigsaw lists
o Second code repository specifically for Penrose tools, demos, etc.
o These are licensed under GPLv2 + classpath exception
o Code developed in Penrose will be delivered through Jigsaw
14. Project Penrose - structure
• Two Penrose mailing lists
o Developer mailing list (penrose-dev)
§ Conversations around coding work on main Penrose repository
§ Incudes details of Jigsaw implementation and Penrose's modifications
§ This is licensed GPLv2
o Discuss mailing list (penrose-discuss)
§ Conversations around interoperability requirements, design and new APIs
§ No implementation code is exchanged directly on this list
§ This is dual licensed GPLv2 and BSD
• Java Specification Request (JSR)
o Looking forward to a JSR in which design discussions can take place
15. Project Penrose: technical roadmap
• Goal #0 : toleration
o ensure that OSGi frameworks continue to run unmodified on a Jigsaw enabled runtime
o creating modules / bundles that have both Jigsaw & OSGi metadata on the same JAR
• Goal #1 : interoperability of module info metadata
o ensure Jigsaw metadata can be enhanced with OSGi concepts
o teach OSGi to read Jigsaw module info
o mapping Jigsaw metadata into OSGi format for the framework to understand, e.g.
requires ⇒ Require-Bundle:
o resolve Jigsaw modules using the OSGi resolver
• Goal #2 : OSGi implementation exploit of Jigsaw modularity
o enhance OSGi to use Jigsaw publication repositories, API, etc
• Goal #3+ : Full interop
o a blend of OSGi and Jigsaw cross delegation on module phases
16. Agenda
• Level setting
o Introduction to modularity
o Modules and the JRE
o The Jigsaw project
o OSGi
• Introduction to Project Penrose
o Goal of the project
o Structure of the project
o Technical roadmap
• Technical work
o Achievements
o Observations
o To be done
• Advice and call to arms
17. Achievements in Level 0 : Toleration
• Achievement #1: pass the OSGi tests on a Jigsaw enabled runtime
o Equinox 3.7.2 – the OSGi reference implementation
o OSGi 4.3 Compliance Tests – with minor patch for test case error
o Running on Windows XP SP3 & Ubuntu 11.04
• Achievement #2: run a Java application as either OSGi or Jigsaw modules
o Took Java 2D demo
o Broke it into multiple functional units, and run the demo as OSGi bundles OR
Jigsaw modules
18. Observations: Jigsaw Module Metadata
• Jigsaw's module-info.java files compile into module-info.class files
o ultimate .jar module contains binary metadata
• Number of issues with these files
o cannot (or very hard) to extend
§ other module systems or tools may need to store additional module-
related data
o binary files are not easy to read
§ you need to use a tool
§ or create your own .class file reader
§ may make troubleshooting harder too
• Goal to create an readable, easily parsed metadata format
o extensible
o expressive enough for Jigsaw and OSGi
19. Achievements in Level 1: Module Metadata in
Penrose
• Penrose proposes using module-info.json
o Plain Text module definitions
o In JSON
• JSON offers
o Better extensibility, additions can be made inline
o Easier to read from modular JAR files
for humans
for tools
o For performance, implementations can still cache their own binary
representations
20. JSON Module Metadata
module-info.java (Jigsaw) module-info.json (Penrose)
"module" : {
module org.astro @ 1.2 { "name" : "org.astro",
"version" : "1.2",
exports org.astro;
"exports" :
}
[{
"name" : "org.astro",
"org.osgi.version" : "1.2.3"
In the Jar file: }]
}
binary module-info.class
Note the extension on the exports
In the Jar file:
plain text module-info.json
21. Demos
The current set of Penrose demos shows:
• Modules that use JSON metadata (no module-info.java/.class files)
• Modules that work both in JavaSE and in OSGi
o currently duplicate module information
o unified module information in the future
22. To be done Level 2/3: Deep integration with OSGi
This pilot needs to start, some areas to look at:
• Loading JavaSE modules in OSGi as bundles
o OSGi will most likely be extended to understand JavaSE Module Metadata.
• Define extensions to JavaSE module metadata to cover OSGi information
o Package Versions, Package Imports, etc...
• Wiring to existing JavaSE modules in OSGi package imports
23. Agenda
• Level setting
o Introduction to modularity
o Modules and the JRE
o The Jigsaw project
o OSGi
• Introduction to Project Penrose
o Goal of the project
o Structure of the project
o Technical roadmap
• Technical work
o Achievements
o Observations
o To be done
• Advice and call to arms
24. Final words of advice
• Stop using internal APIs and implementation classes
o You will be broken in a modular world
o Be modest in your API usage and we can likely help with a tailored JRE
• If you need a modularity story that works before Java 9 (expected summer 2015) then the
answer is OSGi
o Penrose will ensure OSGi continues to work beyond Java 9 too
• OSGi has greater expressiveness
o Experience of modularity has resulted in a rich set of behaviors
o While you may not need it now, do you want to change system when you do need it?
• We would like to see the JSR created right now so that a Java Community Expert Group can
get to work on designing the Java Module System.
• Come and participate in OpenJDK Jigsaw or Penrose projects!