63
Distributing JavaFX™ Applications with Java™ WebStart and Artifactory Frederic Simon Yoav Landman JFrog Ltd.

Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Distributing JavaFX™ Applications with Java™ WebStart and Artifactory

Frederic SimonYoav LandmanJFrog Ltd.

Page 2: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

About Us“Where frogs can code”

> 10+ years experience in build and dev environments

> Promote hassle-free modular software development

> Serving the community since 2006 with OSS tools:• Artifactory Repository Manager• Jade Maven Plugins and AnnoMojo• Dependency Analyzer• Stellarium for Java• IDEA plugins

2

Page 3: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Agenda

> The current state> What we wish to achieve> Artifact repository managers overview> Overview of the process> What do they need to do?

• Developer• Repository Manager• End User

> Conclusion

3

Page 4: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Current State

4

Page 5: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Where are the Problems?

> Development of modular JavaFX applications is painful• Developer problems• End user problems

> As a result, not many JavaFX/WebStart applications use modules

5

Page 6: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Developer Problems

> Using JavaFX and other jars in the classpath• Locate libraries, versions, transitive deps, classpath hell

> Module distribution and sharing• No easy way to share modules via a searchable medium

> Application distribution to end-users• Signing dependencies, fiddle with URLs, reusing dependencies

> IDE-specific developlemnt• Not portable, no automated build integration

6

Page 7: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

End User Problems

> Keep downloading the same jars for every application

• No reuse of modules, even if signed by the same vendor

> Slow download and update times• Coarse grained updates and no module reuse

7

Page 8: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Sample Application - TwitterFX

> Module reuse

8

Page 9: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Demo

> Current developerʼs experience

9

Page 10: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Present Development Process

10

Page 11: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Present Development Process

10

Configure JavaFX project in IDE dialog boxes

Page 12: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Present Development Process

10

Configure JavaFX project in IDE dialog boxes

Find jars and their dependencies

Page 13: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Present Development Process

10

Configure JavaFX project in IDE dialog boxes

Find jars and their dependencies

Download jars

Page 14: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Present Development Process

10

Configure JavaFX project in IDE dialog boxes

Find jars and their dependencies

Download jars Add jars to VCS

Page 15: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Present Development Process

10

Configure JavaFX project in IDE dialog boxes

Find jars and their dependencies

Download jars

Add jars to your classpath (hell)

Add jars to VCS

Page 16: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Present Development Process

10

Configure JavaFX project in IDE dialog boxes

Find jars and their dependencies

Download jars

Add jars to your classpath (hell)

Edit jar references and/or the codebase for each new deployment

Add jars to VCS

Page 17: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Present Development Process

10

Configure JavaFX project in IDE dialog boxes

Find jars and their dependencies

Download jars

Add jars to your classpath (hell)

Edit jar references and/or the codebase for each new deployment

Sign and re-sign all jar with each update

Add jars to VCS

Page 18: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Present Development Process

10

Configure JavaFX project in IDE dialog boxes

Find jars and their dependencies

Download jars

Add jars to your classpath (hell)

Create an uber-jar

Edit jar references and/or the codebase for each new deployment

Sign and re-sign all jar with each update

Add jars to VCS

Page 19: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Present Development Process

10

Configure JavaFX project in IDE dialog boxes

Find jars and their dependencies

Download jars

Add jars to your classpath (hell)

Create an uber-jar

Edit jar references and/or the codebase for each new deployment

Sign and re-sign all jar with each update

Add jars to VCS

Tweak output JNLP file

Page 20: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Agenda

> The current state> What we wish to achieve> Artifact repository managers overview> Overview of the process> What do they need to do?

• Developer• Repository Manager• End User

> Conclusion

11

Page 21: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

What Do We Want to Achieve?

> Make life easy for developers• Easy to share JavaFX applications and libraries• Simple dependency management, module

resolution and updates• Standard process for distributing JavaFX modules• IDE independence

> Make life easy for end users• Faster download and auto-update times

12

Page 22: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Agenda

> The current state> What we wish to achieve> Artifact repository managers overview> Overview of the process> What do they need to do?

• Developer• Repository Manager• End User

> Conclusion

13

Page 23: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

About Artifact Repository Managers

> A proxy and resolver for artifacts (modules)> Avoid hitting public remote repositories

• Inefficient, unreliable, content quality, non-secured...

> Deploy, manage and share local artifacts> Full control over artifacts resolution and delivery

14

Page 24: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

What is Artifactory?

> Advanced OS Artifacts Repository Manager> Maven, Ivy+Ant, Buildr, Gradle, ... Java WebStart :)> First “real” UI driven repository manager (2006)

• Upload through UI, indexed searches…> Downloadable OSS + add-ons> Many exciting new features coming in the 2.1

release!

15

Page 25: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

The Developerʼs Experience

> Simple artifacts management through Ajax Web UI

16

Page 26: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Agenda

> The current state> What we wish to achieve> Artifact repository managers overview> Overview of the process> What do they need to do?

• Developer• Repository Manager• End User

> Conclusion

17

Page 27: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Our Mix of Tools

18

What do you get?

JavaFX Plugin

Page 28: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Tools Overview

> Maven JavaFX plugin• Build and deploy dynamic JavaFX/WebStart

applications> Artifactory

• Deploy and serve JNLP files and dependencies> WebStart Virtual Repository

• Transform JNLP file and sign the jars automatically> WebStart Client

• Consume the deployed dynamic WebStart app19

Page 29: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Maven Plugins

> JavaFX/JNLP plugin• Compiles JavaFX sources• Uses standard Maven resources for classpath

resolution• Creates Web Start JNLP files - standalone and/or

browser• Customizable metadata and JNLP template

> Available on http://repo.jfrog.org

20

Page 30: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Simple process and Productive Environment

21

JavaFX DeveloperSearch

Build, Test, Deploy

Retrieve, Deploy

Use

End Users

Page 31: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Agenda

> The current state> What we wish to achieve> Artifact repository managers overview> Overview of the process> What do they need to do?

• Developer• Repository Manager• End User

> Conclusion

22

Page 32: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

23

The Real DealFrom Developer to Repository Manager to End Users

Page 33: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Developerʼs ViewCreate, Find, Integrate, Build

24

Page 34: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Developerʼs ViewCreate, Find, Integrate, Build

24

Create a standard Maven project

Page 35: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Developerʼs ViewCreate, Find, Integrate, Build

24

Create a standard Maven project

Configure POM (dependencies, plugins, etc.)

Page 36: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Developerʼs ViewCreate, Find, Integrate, Build

24

Create a standard Maven project

Configure POM (dependencies, plugins, etc.)

Search dependencies in Artifactory

Page 37: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Developerʼs ViewCreate, Find, Integrate, Build

24

Create a standard Maven project

Configure POM (dependencies, plugins, etc.)

Search dependencies in Artifactory

Code your JavaFX application

Page 38: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Developerʼs ViewCreate, Find, Integrate, Build

24

Create a standard Maven project

Configure POM (dependencies, plugins, etc.)

Search dependencies in Artifactory

Code your JavaFX application

Customize JNLP template file

Page 39: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Developerʼs ViewCreate, Find, Integrate, Build

24

Create a standard Maven project

Configure POM (dependencies, plugins, etc.)

Search dependencies in Artifactory

Code your JavaFX application

Customize JNLP template file

Build the application

Page 40: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Demo

> Maven-based JavaFX development

25

Page 41: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Developerʼs ViewDeploy and Test

Page 42: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Developerʼs ViewDeploy and Test

Set up deployment in POM

Page 43: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Developerʼs ViewDeploy and Test

Set up deployment in POM

Deploy the JNLP file to Artifactory

Page 44: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Developerʼs ViewDeploy and Test

Set up deployment in POM

Deploy the JNLP file to Artifactory

Find and view the deployed file

Page 45: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Developerʼs ViewDeploy and Test

Set up deployment in POM

Deploy the JNLP file to Artifactory

Test the application from Maven

Find and view the deployed file

Page 46: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Demo

> Deploy to a local repository

27

Page 47: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Repository Manager ViewManage a WebStart Virtual Repository

28

Virtual Repo - http://myhost/artifactory/vr

RemoteLocal Local Local Remoteartifact

Page 48: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Repository Manager ViewManage a WebStart Virtual Repository

28

Create a key store for signing

Virtual Repo - http://myhost/artifactory/vr

RemoteLocal Local Local Remoteartifact

Page 49: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Repository Manager ViewManage a WebStart Virtual Repository

28

Create a key store for signing

Virtual Repo - http://myhost/artifactory/vr

RemoteLocal Local Local Remoteartifact

Create a Web Start Virtual Repository and assign it a key-pair

keypair

Page 50: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Repository Manager ViewManage a WebStart Virtual Repository

28

Observe deployed Web Start applications

Create a key store for signing

Virtual Repo - http://myhost/artifactory/vr

RemoteLocal Local Local Remoteartifact

Create a Web Start Virtual Repository and assign it a key-pair

keypair

Page 51: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Demo

> Virtual repository management

29

Page 52: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Repository ManagerDistribute JNLP Applications

30

Development Virtual Repo

RemoteLocal Local Local Remote

Artifact

Page 53: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Repository ManagerDistribute JNLP Applications

30

Development Virtual Repo

RemoteLocal Local Local Remote

Artifact

Promote JavaFx applications to a public virtual reposirtory

Public Virtual Repo

RemoteLocal Remote

promote

Page 54: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Repository ManagerDistribute JNLP Applications

30

Development Virtual Repo

RemoteLocal Local Local Remote

Artifact

Use the JNLP link and snippet in any web site

http:/

/pub-v

r-url

Promote JavaFx applications to a public virtual reposirtory

Public Virtual Repo

RemoteLocal Remote

promote

Page 55: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Demo

> Promotion and provisioning

31

Page 56: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

End UserUse the Web Site and WebStart Caching and Updates

32

Page 57: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

End UserUse the Web Site and WebStart Caching and Updates

• Reuse already downloaded dependent jars• Trust a single-source central provider• Faster updates

• Only selected modules are updated

32

Just click a JNLP link! :)

Page 58: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Demo

> End user experience

33

Page 59: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Agenda

> The current state> What we wish to achieve> Artifact repository managers overview> Overview of the process> What do they need to do?

• Developer• Repository Manager• End User

> Conclusion

34

Page 60: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Simple process and Productive Environment

35

JavaFX DeveloperSearch

Build, Test, Deploy

Retrieve, Deploy

Use

End Users

Page 61: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Conclusion

> With JavaFX making WebStart easy becomes more critical

> No messing with classpath and or extensions> No manual jar signing> JavaFX has built-in modularity> Easy module distribution and reuse with Artifact

Repository Managers

36

Page 62: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Resources

> Artifactory• http://www.jfrog.org/products.php

> JavaFX Maven plugin• Source

• http://subversion.jfrog.org/jfrog/jfrog-javafx-plugin/

• Plugin artifacts• Add http://repo.jfrog.org/artifactory/repo to your remote

repositories> Modular TwitterFx

• http://subversion.jfrog.org/jfrog/twitterfx/

37

Page 63: Frederic Simon Yoav Landman - Oracle · About Us “Where frogs can code” > 10+ years experience in build and dev environments > Promote hassle-free modular software development

Yoav LandmanFrederic [email protected]

http://www.jfrog.org