Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Distributing JavaFX™ Applications with Java™ WebStart and Artifactory
Frederic SimonYoav LandmanJFrog Ltd.
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
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
Current State
4
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
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
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
Sample Application - TwitterFX
> Module reuse
8
Demo
> Current developerʼs experience
9
Present Development Process
10
Present Development Process
10
Configure JavaFX project in IDE dialog boxes
Present Development Process
10
Configure JavaFX project in IDE dialog boxes
Find jars and their dependencies
Present Development Process
10
Configure JavaFX project in IDE dialog boxes
Find jars and their dependencies
Download jars
Present Development Process
10
Configure JavaFX project in IDE dialog boxes
Find jars and their dependencies
Download jars Add jars to VCS
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
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
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
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
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
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
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
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
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
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
The Developerʼs Experience
> Simple artifacts management through Ajax Web UI
16
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
Our Mix of Tools
18
What do you get?
JavaFX Plugin
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
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
Simple process and Productive Environment
21
JavaFX DeveloperSearch
Build, Test, Deploy
Retrieve, Deploy
Use
End Users
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
23
The Real DealFrom Developer to Repository Manager to End Users
Developerʼs ViewCreate, Find, Integrate, Build
24
Developerʼs ViewCreate, Find, Integrate, Build
24
Create a standard Maven project
Developerʼs ViewCreate, Find, Integrate, Build
24
Create a standard Maven project
Configure POM (dependencies, plugins, etc.)
Developerʼs ViewCreate, Find, Integrate, Build
24
Create a standard Maven project
Configure POM (dependencies, plugins, etc.)
Search dependencies in Artifactory
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
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
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
Demo
> Maven-based JavaFX development
25
Developerʼs ViewDeploy and Test
Developerʼs ViewDeploy and Test
Set up deployment in POM
Developerʼs ViewDeploy and Test
Set up deployment in POM
Deploy the JNLP file to Artifactory
Developerʼs ViewDeploy and Test
Set up deployment in POM
Deploy the JNLP file to Artifactory
Find and view the deployed file
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
Demo
> Deploy to a local repository
27
Repository Manager ViewManage a WebStart Virtual Repository
28
Virtual Repo - http://myhost/artifactory/vr
RemoteLocal Local Local Remoteartifact
Repository Manager ViewManage a WebStart Virtual Repository
28
Create a key store for signing
Virtual Repo - http://myhost/artifactory/vr
RemoteLocal Local Local Remoteartifact
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
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
Demo
> Virtual repository management
29
Repository ManagerDistribute JNLP Applications
30
Development Virtual Repo
RemoteLocal Local Local Remote
Artifact
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
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
Demo
> Promotion and provisioning
31
End UserUse the Web Site and WebStart Caching and Updates
32
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! :)
Demo
> End user experience
33
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
Simple process and Productive Environment
35
JavaFX DeveloperSearch
Build, Test, Deploy
Retrieve, Deploy
Use
End Users
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
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
Yoav LandmanFrederic [email protected]
http://www.jfrog.org