introduction to javafx scenic view
TRANSCRIPT
IntroductionToJavaFXScenicView
JonathanGilesPrincipleMemberofTechnicalStaffJavaClientGroupOctober,2015
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
SafeHarborStatementThefollowingisintendedtooutlineourgeneralproductdirection.Itisintendedforinformationpurposesonly,andmaynotbeincorporatedintoanycontract.Itisnotacommitmenttodeliveranymaterial,code,orfunctionality,andshouldnotberelieduponinmakingpurchasingdecisions.Thedevelopment,release,andtimingofanyfeaturesorfunctionalitydescribedforOracle’sproductsremainsatthesolediscretionofOracle.
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.| 5
Warning:Thisisalmost lastyearsBOF.Ifyouattendedlastyear,youmaynotwantto
stickaround…
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.| 6
ScenicViewistoJavaFX whatFirebugistowebsites
ScenicViewinaNutshell
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.| 7
ScenicViewinaNutshell
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• ScenicViewisafreeJavaFX scenegraph analyser.
• IdevelopScenicView,–whentimepermits,– itisnot myjob!
• DownloadandfindoutmoreaboutScenicViewhere:http://www.scenic-view.org
8
ScenicViewinaNutshell
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• WhatisScenicView?–OriginallybuiltbyAmyFowlerfordiagnosingruntimeissueswithUIlayout– Itwasreallysimpletouse:justaddScenicView.show(scene) inyourcode
• ItookAmy’scodeandpolishedtheUIconsiderablybeforethefirstpublicreleaseofScenicViewonMay6,2012• Itlookedalittlelikethis:
9
ScenicView
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.| 10
Treeshowingscenegraphstructureofrunning
application
Themostimportant
propertiesfortheselectednode
Applicationoverview
ScenicViewPre-1.0.0
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ScenicView ScenicViewcanalsodrawoverlaysintheapplication
itisobserving.
ThegreendashedrectangleshowsthelayoutBounds,andtheyellowfilledrectangleshowstheboundsInParent.
Thiscanbeveryusefulfordebugging.
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• TheresponsetothepublicreleaseofScenicViewwasextremelypositive.• Mostfeedbackwasoftheform:“Iloveit,butitneedstodoX”• Xincluded:– Liveediting– Filtering– SelectingnodesbyclickingintheUI– Eventtracing
12
ScenicView
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• AnderRuizcontactedmeafterthefirstrelease,andhadanumberofideas.• Evenbetter,hewaskeentohelpprogramthem!• TogetherwemadeavailableScenicView1.0.0onJune4,2012• ThefirstversionedreleaseofScenicView• Itlookedalittlelikethis:
13
ScenicView1.0.0
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.| 14
Abilitytofilterthetreeareaby
typinginanIDorclassname.
Abilitytofilterthedetailsareabytypingina
propertyname
ScenicView1.0.0
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• ThemajorcomplaintAnderandIheardfromusers:– PeopledidnotwanttohavetomodifytheircodebyaddingScenicView.show(scene).
• Thisprovedaninteresting(andcomplex)problemtoresolve!• Weneededawaytoconnecttoapplicationsatruntimewithoutanymodificationoftheircode.
• Wesettledontwosolutions
15
TheProblemwithScenicView1.0.0
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• TheJavaagentAPIallowsforanexternallibrarytobecalledwhenanapplicationstarts.• Simplyaddthefollowingwhenstartingyourapplication:
-javaagent:ScenicView.jar• ScenicViewwillstartwhenyourapplicationstarts• Itwillautomaticallydiscoverallstagesinyourapplication
• Bestapproach:inyourIDEhavetwo‘run’profiles,onewithScenicViewenabledandtheotherwithout
16
Solution1:JavaAgents
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• JavaprovidestheAttachAPItodiscoverrunningJavaapplications• Weusethistoinstallasmallsocketserverintoyourapplicationatruntime,throughwhichScenicViewcancommunicate
• ThismeansthatScenicViewcandiscoverallrunningJavaFX applicationsandyoudon’tneedtodoanything!• Tousethissolution,simplystartScenicViewdirectlyandit’llstartinthismode
17
Solution2:JavaAttachAPI
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• ScenicView1.1.0wasreleasedonAugust14th,2012aftermuchtestinganduserfeedback• Thisreleaserequiredamassiveamountofreworkingandfoundationbuilding.
• WewereincrediblyrelievedtogetthisworkingonWindows,MacOSandLinux!• However,thingsareneverperfect,andScenicView1.1.1wasreleasedonAugust16th,2012• Thisimprovedourabilitytodebugpeoplesissues.
18
ScenicView1.1.0
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• Still,weknewtherewasmoretodo,sowecarriedonandreleasedScenicView1.2.0onSeptember25th,2012.• Thisreleaseincluded:– Eventtracingsupport– JavaDoc browsingsupport– Streamlinedmenus(contextmenus)– Bugfixes!
19
ScenicView1.2.0
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.| 20
Tabbedareafornew
functionality
ScenicView1.2.0
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.| 21
EventtracingisenabledfromtheEventsmenu
EventsarerecordedonlyfromselectednodedownEventscanbesearchedusing
booleanstatementsClicktheinfobuttonforthe
entirestacktrace
Tableshowsallmatchingevents
ScenicView1.2.0:EventTracing
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.| 22
BrowsershowsJavaDoc forcurrently
selectednode
ScenicView1.2.0:JavaDoc Browser
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• ScenicView1.3.0wasreleasedonNovember12,2012• Whatwasnew?–Massiveperformancegains– Animationtracer– ImprovedCSSsupport– Versionupdatechecking–Macnativemenubar integration– Bugfixesandmiscellaneousimprovements
23
ScenicView1.3.0
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• ScenicView1.3.0wasthelastreleasewithsupportforJavaFX2.x.• UnfortunatelyatthisstageAnderhadtodropoutduetoworkcommitments
24
BeyondScenicView1.3.0
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• Releasedandopensourced atJavaOne 2014
• GPLlicensed• Coderepositoryisopenhere:https://bitbucket.org/scenicview/scenic-view
25
ScenicView8.0.0
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• ReleasedSeptember2nd,2015• Primarilyconsistsoftwoverycoolcommunitycontributions:– ThreeDOM– CSSFX
26
ScenicView8.6.0
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
3D‘explosion’viewofuserinterface
27
ThreeDOM
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• Abilitytoedit/saveCSSfilesandhavethembedynamicallyreloadedatruntimewithoutneedingtorestartapplication.
28
CSSFX
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• ItrackdownloadsofScenicView.• Theresultsarepleasing(asofOctober20th,2015):
29
Downloads
Version ReleaseDate Downloads
1.0.0 4th June,2012 208
1.0.1 7th June,2012 859
1.1.0 14th August,2012 575
1.1.1 16th August,2012 539
1.2.0 25th August,2012 932
1.3.0 9th November,2012 7164
8.0.0 29th September,2014 8103
8.6.0 2nd September,2015 1591
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ScenicViewDemo
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
GettingStarted- InSixSimpleSteps!
Thefollowingsoftwareisrequired:–Mercurial– Gradle– JDK8
You’llneedaBitbucket account– Accountsarefreefromhttp://bitbucket.org
1
2
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
GettingStarted- InSixSimpleSteps!
Forktherepo.Goheretocreateyourownfork– https://bitbucket.org/scenicview/scenic-view/fork
Cloneyourfork:– hgclonehttps://<username>@bitbucket.org/<username>/<forkname>– e.g.• hgclonehttps://[email protected]/jonathangiles/scenic-view
3
4
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
GettingStarted- InSixSimpleSteps!
Buildyourclone.Fromclonerootdirectory,run:– gradle cleanassemble
Runyourclone:– gradle run
5
6
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• Whatelseistherelefttodo?• ShouldIpackmybagsandstopdevelopingScenicViewnow?• Isthereafeatureyou’dlovetohave?– Tellme!– [email protected]
• Someideas:– Pulseloggersupport(pulseduration,timesincelastpulse,etc)– Lessbugs,faster,betterUI,etc
34
TheFutureofScenicView
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
• Evenbetter– pleasejoininandhelpmetodevelopit!• Forktheprojectonbitbucket anddopullrequests
35
TheFutureofScenicView
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|
ThanksforAttending!
It’sDiscussionTime!Howtocontactme:[email protected]@JonathanGiles
Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|