39

Introduction To JavaFX Scenic View

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction To JavaFX Scenic View
Page 2: Introduction To JavaFX Scenic View
Page 3: Introduction To JavaFX Scenic View

IntroductionToJavaFXScenicView

JonathanGilesPrincipleMemberofTechnicalStaffJavaClientGroupOctober,2015

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Page 4: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

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

Page 5: Introduction To JavaFX Scenic View

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

Warning:Thisisalmost lastyearsBOF.Ifyouattendedlastyear,youmaynotwantto

stickaround…

Page 6: Introduction To JavaFX Scenic View

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

ScenicViewistoJavaFX whatFirebugistowebsites

ScenicViewinaNutshell

Page 7: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.| 7

ScenicViewinaNutshell

Page 8: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

• ScenicViewisafreeJavaFX scenegraph analyser.

• IdevelopScenicView,–whentimepermits,– itisnot myjob!

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

8

ScenicViewinaNutshell

Page 9: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

• WhatisScenicView?–OriginallybuiltbyAmyFowlerfordiagnosingruntimeissueswithUIlayout– Itwasreallysimpletouse:justaddScenicView.show(scene) inyourcode

• ItookAmy’scodeandpolishedtheUIconsiderablybeforethefirstpublicreleaseofScenicViewonMay6,2012• Itlookedalittlelikethis:

9

ScenicView

Page 10: Introduction To JavaFX Scenic View

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

Treeshowingscenegraphstructureofrunning

application

Themostimportant

propertiesfortheselectednode

Applicationoverview

ScenicViewPre-1.0.0

Page 11: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

ScenicView ScenicViewcanalsodrawoverlaysintheapplication

itisobserving.

ThegreendashedrectangleshowsthelayoutBounds,andtheyellowfilledrectangleshowstheboundsInParent.

Thiscanbeveryusefulfordebugging.

Page 12: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

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

12

ScenicView

Page 13: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

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

13

ScenicView1.0.0

Page 14: Introduction To JavaFX Scenic View

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

Abilitytofilterthetreeareaby

typinginanIDorclassname.

Abilitytofilterthedetailsareabytypingina

propertyname

ScenicView1.0.0

Page 15: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

• ThemajorcomplaintAnderandIheardfromusers:– PeopledidnotwanttohavetomodifytheircodebyaddingScenicView.show(scene).

• Thisprovedaninteresting(andcomplex)problemtoresolve!• Weneededawaytoconnecttoapplicationsatruntimewithoutanymodificationoftheircode.

• Wesettledontwosolutions

15

TheProblemwithScenicView1.0.0

Page 16: Introduction To JavaFX Scenic View

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

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

• JavaprovidestheAttachAPItodiscoverrunningJavaapplications• Weusethistoinstallasmallsocketserverintoyourapplicationatruntime,throughwhichScenicViewcancommunicate

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

17

Solution2:JavaAttachAPI

Page 18: Introduction To JavaFX Scenic View

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

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

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

Tabbedareafornew

functionality

ScenicView1.2.0

Page 21: Introduction To JavaFX Scenic View

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

EventtracingisenabledfromtheEventsmenu

EventsarerecordedonlyfromselectednodedownEventscanbesearchedusing

booleanstatementsClicktheinfobuttonforthe

entirestacktrace

Tableshowsallmatchingevents

ScenicView1.2.0:EventTracing

Page 22: Introduction To JavaFX Scenic View

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

BrowsershowsJavaDoc forcurrently

selectednode

ScenicView1.2.0:JavaDoc Browser

Page 23: Introduction To JavaFX Scenic View

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

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

• ScenicView1.3.0wasthelastreleasewithsupportforJavaFX2.x.• UnfortunatelyatthisstageAnderhadtodropoutduetoworkcommitments

24

BeyondScenicView1.3.0

Page 25: Introduction To JavaFX Scenic View

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

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

• ReleasedSeptember2nd,2015• Primarilyconsistsoftwoverycoolcommunitycontributions:– ThreeDOM– CSSFX

26

ScenicView8.6.0

Page 27: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

3D‘explosion’viewofuserinterface

27

ThreeDOM

Page 28: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

• Abilitytoedit/saveCSSfilesandhavethembedynamicallyreloadedatruntimewithoutneedingtorestartapplication.

28

CSSFX

Page 29: Introduction To JavaFX Scenic View

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

Page 30: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

ScenicViewDemo

Page 31: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

GettingStarted- InSixSimpleSteps!

Thefollowingsoftwareisrequired:–Mercurial– Gradle– JDK8

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

1

2

Page 32: Introduction To JavaFX Scenic View

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

Page 33: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

GettingStarted- InSixSimpleSteps!

Buildyourclone.Fromclonerootdirectory,run:– gradle cleanassemble

Runyourclone:– gradle run

5

6

Page 34: Introduction To JavaFX Scenic View

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

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

• Evenbetter– pleasejoininandhelpmetodevelopit!• Forktheprojectonbitbucket anddopullrequests

35

TheFutureofScenicView

Page 36: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

ThanksforAttending!

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

Page 37: Introduction To JavaFX Scenic View

Copyright©2015, Oracleand/oritsaffiliates.Allrightsreserved.|

Page 38: Introduction To JavaFX Scenic View
Page 39: Introduction To JavaFX Scenic View