It's a fun, fancybuzzword, but I can't reallygiveahwholepresentationonhowyoucanapplyitsprinciplestoyourownorganizationwithoutfirstestablishingsomesharedcontext.
Forwhat I meanwhen I sayitinserviceofthatgoal, let's startwiththemostbasicdefinitionoftheterm I couldfindasitappliestosoftware.
Soasweseehere, modernizationcanbeunderstoodastheconversion, rewritingorportingof a legacysystemto a modernlanguagesoftware, libraryprotocolorhardwareplatform.
That's anokaystart, butitstillleavesuswithquite a lotofunansweredquestions.
Whatdoesitmeanforsomethingtoevenbemodern?
There's still a lotofwiggleroominthatdefinitionthat I justgave.
There's a lotofdifferentreasonsthatyou, as a developer, mightwanttodothis.
Butforbetterorworse, it's somethingthatalmostallofuswillatsomepoint I needtodonow.
Someofyoumightbefamiliarwithelectron, butbeforeyoureallygettothegoodstuff, I think I'm gonnado a briefoverviewjusttomakesurethatweallhavethesamebaseunderstandingofwhatitISSElectronis a JavaScriptframeworkthatallowsyoutowritedesktopapplicationswithWebtechnologieslikeJavaScript, HTMLandCSS.
ItcouldbeusedonWindows, MacandLennox, aswellas a varietyofotherarchitecturesandplatformslikeWindowsonArmandevenraspberrypi.
Itworksbyintegratingchromium a nodeinadditionto a layerof C plus, plusanobjective C, whichallowsittocreatefullyformedDo I Do I CZaswellastakeadvantageoffilesystemandnetworkingcapabilitieswithnote.
Withelectron, youonlyneedtowriteyouruponce, andthenitwillworkonallapplicableplatforms, andwecan't reallyunderstandhowmodernizationaffectsuserswithoutfirstdiscussing a P I versioningan a p.
I isfundamentallyah, contractthatyou, as a maintainerestablishwiththepeopleconsumingyour A P.
I abouthowit's goingtobehavewhendevelopershavetheirAPeyesconsumed, theconsumersareimplicitlysigningtheirendof a contract, andyou, asthemaintainer, areimplicitlysigningyourend.
Youcanthinkofan A P I a littlebitlikebuying a newcarwhenyoubuythatcar.
You'veprobablygot a setofexpectationsforhowthatcar's gonnabehaveandhowvariouscontrolsonthecarorgoingtoaffectthatcar's movement.
Sonow, backtooneofthequestions I hadonearlierslide.
Howdoyousettheseexpectations?
Oneofthemorecommonwaystosetexpectationsforan A P I contractisknown a semanticversioningDecember, andthisapproachtoversionINGaversionisspecifiedwiththreenumericcomponents.
Firstmajor, thenminor.
Finally, Patch.
Asitsnamesuggests, eachoneofthesecomponentsconferssemanticmeaningandallows a consumertoquicklyunderstandhowupdatingtheirappto a newversionisgoingtoaffecttheirAPSpotentialbehavior.
Majorversionbumpsaremadewhenyouaddincompatibleorbreaking a P.
First, offplatformmodernizationoperatingsystemsmaintaintheirownuniqueAP I surfaces, whichdon't alwaysadheretothekindof a P I contractyoumightbeaccustomedto.
WhatwechosetoDioistoremovethismethodfromelectronversionsevenwithoutreplacementsinceatthetimeitwasinanearlybetaandsowewouldn't bebreakingour A P I contractbydoingso.
Nextstopislanguagemodernization, languagemodernizationisthatrelatingtotheprogramminglanguageinwhich a frameworkorlibraryisconsumed.
That's importantinthecaseofelectron, becausewhileelectronis a Javascriptframework, itsunderlyingarchitectureisactuallywrittenin a combinationofObjective C and C plusplusandsomodernization.
Someyoumightbemorefamiliarwithincludepromises, a sinkawaitoptionalcatch, bindingornowishcoalescing.
Someofthesecapabilitiesgettoelectronforfreewhenweupdateourdependencieslike V eight, butwe'llsavethatforlaterandfocusonthemorecostlyupdatesrightnow.
A notableeffortintheelectroncodebasethispastspringwasknownasthePromiseofVacationInitiative, whichtookmostofourasynchronousAPeyesandtransformtheirusagefromcallbacktopromisebased.
Weundertookthisinitiativefor a varietyofthereasons I'vealreadyoutlined.
Bywriting a rapperoveritspromisefunctionality, wecouldenableourAPeyestocleanlyreturnpromisesatthe C plus, plusanobjectivesealevelwithoutneedingtopaperoverthemattheJavascriptlevelwithsomethingfromnodelikeyoutoldourpromise, Fisobasicallypromises, butwithsurprisemultithreading.
Um, thislooks a littlehorrifying, I recognize, buthonestly, itwasprettyfunonarguably a lotbetterforconsumers.
Wealsocreated a documenttotruckprogressofthismigrationandconformtoourownsempercontractbyensuringthatthechangeswerebackwardscompatiblewherepossible, whichmeansthattheysupportedbothcallbacksandpromisessimultaneouslyforatleastonemajorversion.
Weactuallyfoundthatifyoucalledone a p I injusttherightway, a nativePromisechainwouldtriggeranuncatchablepromisedrejectionthattheuserwouldonlyeverseeas a silentfailurebecausewe'd actuallyintroduced a waytowritenontypesafe c++.
Here's DecemberminorbumpsandnodealsonecessitateminorbumpsandelectronandmajorbumpsandnodenecessitatemajorbumpsanelectronByupgradingnode, weensurethatwestayontopofsecurityupdatesandseeperformanceimprovementsthankstothegreatworkofthebenchmarkingworkinggroupwithinnotesgovernanceChromiumis a bitof a differentstoryandthattheydon't reallyadheretothesame A p I contractwe d'ohandtheydon't supportolderversionspassed a fairlyshorttail.
Wedidn't reallydothatwellforelectronversionsix, andsoonepointweendeduphavingtoscramble a littlebitandhadtouse a slowlylessonstableversionofnodeversion.
You, as a developerprobablywanttogiveyouruserstheabilitytousewhateveryou'vedefinedasthelatestandthegreatest, andyouruserswanttoaccessthesespicy, latestandgreatestwithoutcommunication.
However, thestwoconvergingdesiresarelike a chemicalreactionthat, givenjustthewrongmeasurementof a singleingredient, canaccidentallyexplodethewholelab.
That's a nontrivialpossibility, consideringthatyouneedtotakeintoaccountdifferentplatformsopinions, conventionsonwhatyouyourselvesarefunctioning, capableofdelivering.
Theonlywaytosetexpectationsandensuretheyearusersarealignedwithyoureffortsistocommunicatewith, um, usfarinadvanceonwiththishigh a degreeofdetailaspossible.
Yourusersshouldalsobemadeawareofwhen a changeisscheduledtotakeeffectOnwardversionsthatchangeisgoingtotakeeffectandwhatthey'reneedgoingtoneedtoconsiderindoingworkfordealingwithyourchanges.
A teamoffivemightandprobablyisgonnabeincredible.
Butthey'regonnahavetoconsiderthisworkin a fundamentallydifferentwaythan a teamof, say, 50 mightandfinally, context.
Whenyoumakechangestoyour A P I surface, there's goingtobe a reasonthatyou'redoingso.
Unlessthere's a securityrelatedorsimilarconcernrequiringdiscretion.