38

Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Embed Size (px)

Citation preview

Page 1: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive
Page 2: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive
Page 3: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

IntroductionToJavaFXScenicView

JonathanGilesConsultingMemberofTechnicalStaffJavaClientGroupSeptember,2016

Page 4: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

SafeHarborStatementThefollowingisintendedtooutlineourgeneralproductdirection.Itisintendedforinformationpurposesonly,andmaynotbeincorporatedintoanycontract.Itisnotacommitmenttodeliveranymaterial,code,orfunctionality,andshouldnotberelieduponinmakingpurchasingdecisions.Thedevelopment,release,andtimingofanyfeaturesorfunctionalitydescribedforOracle’sproductsremainsatthesolediscretionofOracle.

Page 5: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.| 5

Warning:Thisisalmost lastyearsBOF.Ifyouattendedlastyear,youmaynotwantto

stickaround…

Note:I’vecondensedtheBOFthisyear.Weshouldbeoutofherein20minutes…

Page 6: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.| 6

ScenicViewinaNutshell

Page 7: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• ScenicViewisafreeJavaFX scenegraph analyser.

• IdevelopScenicView,–whentimepermits(orwhenaconferenceiscomingup!)– itisnot myjob(butitisveryusefulinmydayjob)!

• DownloadandfindoutmoreaboutScenicViewhere:http://www.scenic-view.org

7

ScenicViewinaNutshell

Page 8: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• WhatisScenicView?–OriginallybuiltbyAmyFowlerfordiagnosingruntimeissueswithUIlayout

– Itwasreallysimpletouse:justaddScenicView.show(scene) inyourcode

• ItookAmy’scodeandpolishedtheUIconsiderablybeforethefirstpublicreleaseofScenicViewonMay6,2012• Itlookedalittlelikethis:

8

ScenicView

Page 9: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.| 9

Treeshowingscenegraphstructureofrunning

application

Themostimportant

propertiesfortheselectednode

Applicationoverview

ScenicViewPre-1.0.0

Page 10: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.| 10

Whoknowsthedifferencebetween‘layoutbounds’and‘boundsinparent’?

Page 11: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

ScenicView ScenicViewcanalsodrawoverlaysintheapplication

itisobserving.

ThegreendashedrectangleshowsthelayoutBounds,andtheyellowfilledrectangleshowstheboundsInParent.

Thiscanbeveryusefulfordebugging.

Page 12: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• TheresponsetothepublicreleaseofScenicViewwasextremelypositive.• Mostfeedbackwasoftheform:“Iloveit,butitneedstodoX”• Xincluded:– Liveediting– Filtering– SelectingnodesbyclickingintheUI– Eventtracing

12

ScenicView

Page 13: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• AnderRuizcontactedmeafterthefirstrelease,andhadanumberofideas.• Evenbetter,hewaskeentohelpprogramthem!• TogetherwemadeavailableScenicView1.0.0onJune4,2012• ThefirstversionedreleaseofScenicView• Itlookedalittlelikethis:

13

ScenicView1.0.0

Page 14: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.| 14

Abilitytofilterthetreeareaby

typinginanIDorclassname.

Abilitytofilterthedetailsareabytypingina

propertyname

ScenicView1.0.0

Page 15: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• ThemajorcomplaintAnderandIheardfromusers:– PeopledidnotwanttohavetomodifytheircodebyaddingScenicView.show(scene).

• Thisprovedaninteresting(andcomplex)problemtoresolve!• Weneededawaytoconnecttoapplicationsatruntimewithoutanymodificationoftheircode.

• Wesettledontwosolutions

15

TheProblemwithScenicView1.0.0

Page 16: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• TheJavaagentAPIallowsforanexternallibrarytobecalledwhenanapplicationstarts.• Simplyaddthefollowingwhenstartingyourapplication:

-javaagent:ScenicView.jar• ScenicViewwillstartwhenyourapplicationstarts• Itwillautomaticallydiscoverallstagesinyourapplication

• Bestapproach:inyourIDEhavetwo‘run’profiles,onewithScenicViewenabledandtheotherwithout

16

Solution1:JavaAgents

Page 17: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• JavaprovidestheAttachAPItodiscoverrunningJavaapplications• Weusethistoinstallasmallsocketserverintoyourapplicationatruntime,throughwhichScenicViewcancommunicate

• ThismeansthatScenicViewcandiscoverallrunningJavaFX applicationsandyoudon’tneedtodoanything!• Tousethissolution,simplystartScenicViewdirectlyandit’llstartinthismode

17

Solution2:JavaAttachAPI

Page 18: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• ScenicView1.1.0wasreleasedonAugust14th,2012aftermuchtestinganduserfeedback• Thisreleaserequiredamassiveamountofreworkingandfoundationbuilding.

• WewereincrediblyrelievedtogetthisworkingonWindows,MacOSandLinux!• However,thingsareneverperfect,andScenicView1.1.1wasreleasedonAugust16th,2012• Thisimprovedourabilitytodebugpeoplesissues.

18

ScenicView1.1.0

Page 19: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• Still,weknewtherewasmoretodo,sowecarriedonandreleasedScenicView1.2.0onSeptember25th,2012.• Thisreleaseincluded:– Eventtracingsupport– JavaDoc browsingsupport– Streamlinedmenus(contextmenus)– Bugfixes!

19

ScenicView1.2.0

Page 20: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.| 20

Tabbedareafornew

functionality

ScenicView1.2.0

Page 21: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.| 21

EventtracingisenabledfromtheEventsmenu

EventsarerecordedonlyfromselectednodedownEventscanbesearchedusing

booleanstatementsClicktheinfobuttonforthe

entirestacktrace

Tableshowsallmatchingevents

ScenicView1.2.0:EventTracing

Page 22: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.| 22

BrowsershowsJavaDoc forcurrently

selectednode

ScenicView1.2.0:JavaDoc Browser

Page 23: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• ScenicView1.3.0wasreleasedonNovember12,2012• Whatwasnew?–Massiveperformancegains– Animationtracer– ImprovedCSSsupport– Versionupdatechecking–Macnativemenubar integration– Bugfixesandmiscellaneousimprovements

23

ScenicView1.3.0

Page 24: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• ScenicView1.3.0wasthelastreleasewithsupportforJavaFX2.x.• UnfortunatelyatthisstageAnderhadtodropoutduetoworkcommitments

24

BeyondScenicView1.3.0

Page 25: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• Releasedandopensourced atJavaOne 2014

• GPLlicensed• Coderepositoryisopenhere:https://bitbucket.org/scenicview/scenic-view

25

ScenicView8.0.0

Page 26: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• ReleasedSeptember2nd,2015• Primarilyconsistsoftwoverycoolcommunitycontributions:– ThreeDOM– CSSFX

26

ScenicView8.6.0

Page 27: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

3D‘explosion’viewofuserinterface

27

ThreeDOM

Page 28: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• Abilitytoedit/saveCSSfilesandhavethembedynamicallyreloadedatruntimewithoutneedingtorestartapplication.

28

CSSFX

Page 29: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• ReleasedAugust30th,2016• AtpresentthisissimplyabranchofthemainbranchwithminimalsetofpatchestoworkinJDK9

29

ScenicView9.0.0

Page 30: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

ScenicViewDemo

Page 31: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

GettingStarted- InSixSimpleSteps!

Thefollowingsoftwareisrequired:–Mercurial– Gradle– JDK8

You’llneedaBitbucket account– Accountsarefreefromhttp://bitbucket.org

1

2

Page 32: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, 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

Page 33: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

GettingStarted- InSixSimpleSteps!

Buildyourclone.Fromclonerootdirectory,run:– gradle cleanassemble

Runyourclone:– gradle run

5

6

Page 34: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• Whatelseistherelefttodo?• ShouldIpackmybagsandstopdevelopingScenicViewnow?• Isthereafeatureyou’dlovetohave?– Tellme!– [email protected]

• Someideas:– Pulseloggersupport(pulseduration,timesincelastpulse,etc)– Lessbugs,faster,betterUI,etc

34

TheFutureofScenicView

Page 35: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

• Evenbetter– pleasejoininandhelpmetodevelopit!• Forktheprojectonbitbucket anddopullrequests

35

TheFutureofScenicView

Page 36: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive

Copyright©2016, Oracleand/oritsaffiliates.Allrightsreserved.|

ThanksforAttending!

It’sDiscussionTime!Howtocontactme:[email protected]@JonathanGiles

Page 37: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive
Page 38: Introduction To JavaFX Scenic View - RainFocus · • Scenic View 1.1.0 was released on August 14th, 2012 after much testing and user feedback • This release required a massive