developer insights for application upgrade to coldfusion 2016

45
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Developer Insights for Application Upgrade to CF2016 Himavanth Rachamsetty | Computer Scientist

Upload: coldfusionconference

Post on 12-Jan-2017

52 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Developer Insights for Application Upgrade to CF2016Himavanth Rachamsetty | Computer Scientist

Page 2: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Out of the box

Applications – 30% faster

BlogCFC on CF11 vs CF2016

Page 3: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Out of the box – Cached Queries

822%

Page 4: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Out of the box …

File & List functions 65%

CFLoop 22%

Argument Validation 5%

Page 5: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ColdFusion 2016

Page 6: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ColdFusion 2016

Page 7: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance through Application Upgrade

Arrays

Structs

Struct Serialization

Session Storage

Page 8: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Application Upgrade – Sample Application

CFM pages getArts.cfm getArtists.cfm addArt.cfm

CFC getArts() getArtists()

Page 9: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Application Upgrade – Sample Application

Utils.cfc

Page 10: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance through Application Upgrade

Arrays

Structs

Struct Serialization

Session Storage

Page 11: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Arrays

ArrayNew ( dimension); arrayNew (1);

Page 12: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Arrays

ArrayNew ( dimension); arrayNew (1);

application.arts = arts;

ArrayNew(dimension, synchronized) arrayNew (1, false);

Page 13: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Arrays

ArrayNew ( dimension); arrayNew (1);

application.arts = arts;

ArrayNew(dimension, synchronized) arrayNew (1, false);

Performance difference

93%

Page 14: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Arrays

[“art1”,”art2”] and not [“art1”,”art2”,”NewArt”]

Solution 1

Solution 2

Page 15: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Arrays

[“art1”,”art2”] and not [“art1”,”art2”,”NewArt”]

2500%

Solution 2

Page 16: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance through Application Upgrade

Arrays

Structs

Struct Serialization

Session Storage

Page 17: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Structs

Solution 1Solution 2

No order Ordered

Page 18: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance through Application Upgrade

Arrays

Structs

Struct Serialization

Session Storage

Page 19: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Struct Serialization

Page 20: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance through Application Upgrade

Arrays

Structs

Struct Serialization

Session Storage

Page 21: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Session Storage

This.sessionManagement = true;

Session.mySessionVariable = sessionData;

InMemory

Page 22: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Session Storage - InMemory

Memory

Memory

Memory

Replication

Replication

Page 23: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Session Storage - REDIS

REDIS

Page 24: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Session Storage

Redis Session Storage

Page 25: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance through Application Upgrade

Arrays (unsynchronized) - 93%

Arrays (pass by reference) - 2500%

Ordered Structs

Struct Serialization based on Metadata

REDIS Session Storage

Page 26: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Other Benefits

PDF

Safe Navigation & DBVarName

Security Code Analyzer

Page 27: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Other Benefits - PDF

Page 28: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Other Benefits - PDF

<CFDocument format=“pdf” src=“https://www.infoq.com” />

CFDocument Original

Page 29: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Other Benefits - PDF

<CFHTML2PDF source=“https://www.infoq.com” />

Page 30: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Other Benefits - PDF

CFHTMLTOPDF

Original

Page 31: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Other Benefits

PDF

Safe Navigation

Security Code Analyzer

Page 32: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Cleaner Code

x = getX();

y = x.getY();

Page 33: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Cleaner Code

x = getX();if( isDefined(“x”) )

y = x.getY();

Page 34: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Cleaner Code – Safe navigation

x = getX();if( isDefined(“x”) )

y = x.getY();

VS

x = getX();y=x?.getY();

Page 35: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Cleaner Code

x = getX();if( isDefined(“x”) ){

y = x.getY();if( isDefined(“y”) ){

z = y.getZ();if( isDefined(“z”) )

myData = z.getData();}

}

Page 36: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Cleaner Code

x = getX();if( isDefined(“x”) ){

y = x.getY();if( isDefined(“y”) ){

z = y.getZ();if( isDefined(“z”) )

myData = z.getData();}

}

myData = x?.getY()?.getZ()?.getData();

Page 37: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Cleaner Code – stored procedures

<CFSTOREDPROC PROCEDURE=“testProcedure"datasource=“testDatasource"><CFPROCPARAM type="In" cfsqltype="CF_SQL_VARCHAR" value="ONE"

> <CFPROCPARAM type="In" cfsqltype="CF_SQL_VARCHAR" value="TWO"

></CFSTOREDPROC>

Page 38: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Cleaner Code – dbvarname

<CFSTOREDPROC PROCEDURE=“testProcedure"datasource=“testDatasource"><CFPROCPARAM type="In" cfsqltype="CF_SQL_VARCHAR" value="ONE"

dbvarname="@p_VarName1"> <CFPROCPARAM type="In" cfsqltype="CF_SQL_VARCHAR" value="TWO" dbvarname="@p_VarName2">

</CFSTOREDPROC>

Page 39: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Other Benefits

PDF

Safe Navigation

Security Code Analyzer

Page 40: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Security

Security Code Analyzer

Page 41: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Better Security contd...

Security Code Analyzer

Page 42: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Better Security contd...

Security Code Analyzer

Page 43: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Benefits

Performance – Out of the Box

Performance – With Application Upgrade

Others (PDF, Safe Navigation, Security Code Analyzer)

Page 44: Developer Insights for Application Upgrade to ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Q & A

Thank [email protected]

Page 45: Developer Insights for Application Upgrade to ColdFusion 2016