SlideShare a Scribd company logo
ColdFusion Internals 
Paul Nibin K J 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Introduction 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
2 
Client 
Web Server
Agenda 
 Life of a CFM request 
 Classloading in ColdFusion 
 How does RESTful web service work? 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
3
Life of a request 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 4
Life of request in ColdFusion 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
5
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
Template Classloader 
In filter chain 
6 
1. 
Request 
Validation 
• Validates 
the 
request. 
2. Path 
Resolution 
• Resolve 
s 
absolute 
CFM 
Path 
3.Application 
Resolution 
• Locates 
Applicati 
-on. 
• Creates 
Applicati 
-on 
scope. 
• Invokes 
life cycle 
method 
4. Parse 
• Parse 
the CFM 
file . 
• Generat 
e AST 
using the 
grammar 
. 
5.Bytecod 
e 
Generatio 
n • Translat 
e the 
AST to 
java byte 
code
1. Request Validation 
 You are part of request validation too. 
 You can configure the following validations through settings. 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
7 
 Request Size Limits 
 Request Limits
2. Path Resolution 
http://localhost/employee/addEmployee.cfm 
/employee/addEmployee.cfm 
C:inetpubwwwrootemployeeaddEmployee.cfm 
Request URL 
Virtual Path 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
8 
Absolute 
Path 
Connector 
You can cache the web server path using an admin setting.
3. Application Resolution 
 Finds the Application.cfc 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
9 
 Creates Application Scope 
 Invokes Life cycle methods 
 OnApplicationStart() 
 OnRequestStart() 
 OnError()
3. Application Resolution 
 Finds the Application.cfc 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
10 
 Creates Application Scope 
 Invokes Life cycle methods 
 OnApplicationStart() 
 OnRequestStart() 
 OnError() 
Start 
Check for the 
Application.cfc in 
current directory. 
Found 
Application.cf 
c? 
Found Application 
Check for the 
Application.cfc in 
parent directory. 
Yes 
No 
Setting to specify till what level 
ColdFusion should search for 
Application.cfc
Unnamed applications 
http://localhost/axis1Test/basic.cfc?wsdl 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
axis1Test 
11 
Application.cfc 
<cfcomponent> 
<cfset this.wssettings.version.publish=“1”> 
</cfcomponent> 
basic.cfc 
axis2Test 
Application.cfc 
<cfcomponent> 
<cfset this.wssettings.version.publish=“2”> 
</cfcomponent> 
basic.cfc 
http://localhost/axis2Test/basic.cfc?wsdl 
ColdFusion disables the creation of un named applications using an 
admin setting.
4. Parsing 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
12 
<cfscript> 
function hello() { 
writeOutput("hello"); 
} 
hello(); 
</cfscript> 
Template 
Reader 
Abstract Syntax Tree (AST)
4. Parsing 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
13 
<cfscript> 
function hello() { 
writeOutput("hello"); 
} 
hello(); 
</cfscript> 
Template 
Reader 
Abstract Syntax Tree (AST)
Template Reader 
 Reads the CFM and creates a stream. 
Encoding? 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
14
Automatic encoding identification 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
15 
Start 
Use 
encoding 
Is BOM 
present? 
Guess 
encoding 
(icu4j) 
Is guess 
probability 
100%? 
End 
Yes 
Yes 
No 
Save the file with 
BOM 
<cfprocessingdirective 
..> 
Use system 
encoding 
End 
No 
-Dfile.encoding=“”
5. Byte code generation 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
AST 
<cfusion_Root>wwwrootWEB-INF 
16 
Byte Code 
Engineering Library 
(BCEL) 
cfclasses 
Byte Code
Template Classloader 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
17 
Start 
Is 
class 
in 
cache 
? 
Check Last 
Modified Date of 
CFM 
Is 
Modifie 
d? 
Parse 
Generate 
byte code 
Load byte 
code 
End 
Use cached Class 
No 
Yes 
No 
Yes 
Clear template 
cache 
Enable trusted 
cache
Summary 
 ColdFusion filter chain has 5 main phases 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
18 
1. Request Validation 
o Settings in administrator 
2. Path Resolution 
o Cache web server path setting 
3. Application Resolution 
o Finding Application.cfc 
o Unnamed applications 
4. Parsing 
o File encoding 
5. Bytecode generation 
o Template Classloader
Classloading 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 19
Class Loading 
 -Dcoldfusion.classPath = {application.home}/lib/updates, 
{application.home}/lib,{application.home}/lib/axis2,{application.home}/gat 
eway/lib/,… 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
20 
 In jvm.config 
ClassLoader 
cfusion/lib 
cfusion/lib/update 
s 
cfusion/lib/axis 
2
Prior to CF10 
Create a folder in cfusionlib. 
Copy your jars to the new folder. 
Edit jvm.config to add the new folder to the end of coldfusion.classPath 
property 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
21 
Cons 
 Conflicts 
 May hamper normal server functioning. 
 Any changes in jar files need server restart to take effect.
CF10 and afterwards 
 CF10 introduced enhanced java integration. 
 Application setting available to specify custom classpath. 
 <cfset this.javaSettings = {LoadPaths = [".java_lib",".javamyjar.jar"], 
reloadOnChange = false}> 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
22 
Pros 
 Complete isolation 
 Will not affect server functioning 
 Allows reloading
RESTful web services 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 23
RESTful web services 
 The W3C defines a Web service as: 
a software system designed to support interoperable 
machine-to-machine interaction over a network. 
 A webservice becomes RESTful when the following 4 constraints are 
satisfied. 
1. Addressability 
2. Multiple Representations 
3. Uniform and constrained interfaces 
4. Stateless communication 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
How does RESTful web service work? 
 Two logical sections 
Registratio 
n 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
Usage
Why? 
Traditional web service 
POST /students/StudentsService HTTP/1.1 
Host: http://localhost:8500 
Content-Type: soap/xml 
<Envelope> 
<Header></Header> 
<Body> 
<GetStudent> 
<Id>112</Id> 
</GetStudent> 
</Body> 
<Envelope> 
RESTful web service 
GET /students/112 HTTP/1.1 
Host: http://localhost:8500 
Accepts: text/html 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Registration Workflow 
 Registration is the process of making your service ready for use. 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
27 
Register 
application 
Scanning 
for REST 
CFC 
Generate 
skeleton 
Annotate 
skeleton 
Register 
with Jersey 
 Inputs: Application Root Path and Service Name
Settings 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
28 
Register 
application 
Scanning 
for REST 
CFC 
• restsettings.cfclocatio 
n 
Generate 
skeleton 
• restsettings.skipCFCWithE 
rror 
Annotate 
skeleton 
Register 
with Jersey
Usage Workflow 
 Inputs: HTTP request 
 The URL of the request 
 HTTP Headers 
 Body of the request 
 Query params, Cookies, Matrix params etc.. 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
29
Explaning the URL 
 http:// + localhost:8500 + /rest + /examples + /helloworld 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
30 
http • The protocol 
localhost:8500 • Server address and port 
• Context path used to identify the request as a 
REST request rest 
examples • The application name used during registration 
helloworld • restPath defined in the CFC
Request Workflow 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
31 
Identify 
REST 
request 
Identifies 
application 
Identifies 
CFC 
Identifies 
function 
Invokes 
Function
Settings 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
32 
Identify 
REST 
request 
• Change context 
path in web.xml 
Identifies 
application 
• Can make 
application default if 
needed 
Identifies 
CFC 
Identifies 
function 
Invokes 
Function 
• use custom 
serializer to modify 
response
Summary 
 RESTful web services introduction 
 Why RESTful web service needs to be registered first? 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
33 
 Registration workflow 
o Settings 
 Request Workflow 
 Settings
Q & A 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 34 
pnibinkj@adobe.com 
http://blogs.coldfusion.com/
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

More Related Content

What's hot

Language Enhancement in ColdFusion 8 - CFUnited 2007
Language Enhancement in ColdFusion 8 - CFUnited 2007Language Enhancement in ColdFusion 8 - CFUnited 2007
Language Enhancement in ColdFusion 8 - CFUnited 2007
Rupesh Kumar
 
Maven
MavenMaven
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
Eric Berry
 
Testing soap UI
Testing soap UITesting soap UI
Testing soap UI
Razia Sultana
 
Eclipse Con2009 Practical Process Orchestration
Eclipse Con2009 Practical Process OrchestrationEclipse Con2009 Practical Process Orchestration
Eclipse Con2009 Practical Process Orchestration
Dietmar Schmidt
 
Web development with ASP.NET Web API
Web development with ASP.NET Web APIWeb development with ASP.NET Web API
Web development with ASP.NET Web API
Damir Dobric
 
Spring - CDI Interop
Spring - CDI InteropSpring - CDI Interop
Spring - CDI Interop
Ray Ploski
 
Jcconf 2015 Taipei -- Bluemix java liberty -auto-configration
Jcconf 2015 Taipei -- Bluemix java liberty -auto-configrationJcconf 2015 Taipei -- Bluemix java liberty -auto-configration
Jcconf 2015 Taipei -- Bluemix java liberty -auto-configration
Joseph Chang
 
Computer networking mcis 6163 project
Computer networking mcis 6163 projectComputer networking mcis 6163 project
Computer networking mcis 6163 project
Anakinzs
 
Java Servlets Tutorial | Introduction to Servlets | Java Certification Traini...
Java Servlets Tutorial | Introduction to Servlets | Java Certification Traini...Java Servlets Tutorial | Introduction to Servlets | Java Certification Traini...
Java Servlets Tutorial | Introduction to Servlets | Java Certification Traini...
Edureka!
 
Jboss App Server
Jboss App ServerJboss App Server
Jboss App Server
acosdt
 
Oracle OSB Tutorial 3
Oracle OSB Tutorial 3Oracle OSB Tutorial 3
Oracle OSB Tutorial 3
Rakesh Gujjarlapudi
 
Manual 5
Manual 5Manual 5
Manual 5
arifhossen
 
Oracle WebLogic Server 11g for IT OPS
Oracle WebLogic Server 11g for IT OPSOracle WebLogic Server 11g for IT OPS
Oracle WebLogic Server 11g for IT OPS
Rakesh Gujjarlapudi
 
Glassfish JEE Server Administration - Module 4 Load Balancer
Glassfish JEE Server Administration - Module 4 Load BalancerGlassfish JEE Server Administration - Module 4 Load Balancer
Glassfish JEE Server Administration - Module 4 Load Balancer
Danairat Thanabodithammachari
 
WebServices in ServiceMix with CXF
WebServices in ServiceMix with CXFWebServices in ServiceMix with CXF
WebServices in ServiceMix with CXF
Adrian Trenaman
 
Jenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentJenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated Deployment
Dan Stine
 
Brief introduction into SQL injection attack scenarios
Brief introduction into SQL injection attack scenariosBrief introduction into SQL injection attack scenarios
Brief introduction into SQL injection attack scenarios
Payampardaz
 
CakePHP
CakePHPCakePHP
CakePHP
Walther Lalk
 

What's hot (19)

Language Enhancement in ColdFusion 8 - CFUnited 2007
Language Enhancement in ColdFusion 8 - CFUnited 2007Language Enhancement in ColdFusion 8 - CFUnited 2007
Language Enhancement in ColdFusion 8 - CFUnited 2007
 
Maven
MavenMaven
Maven
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Testing soap UI
Testing soap UITesting soap UI
Testing soap UI
 
Eclipse Con2009 Practical Process Orchestration
Eclipse Con2009 Practical Process OrchestrationEclipse Con2009 Practical Process Orchestration
Eclipse Con2009 Practical Process Orchestration
 
Web development with ASP.NET Web API
Web development with ASP.NET Web APIWeb development with ASP.NET Web API
Web development with ASP.NET Web API
 
Spring - CDI Interop
Spring - CDI InteropSpring - CDI Interop
Spring - CDI Interop
 
Jcconf 2015 Taipei -- Bluemix java liberty -auto-configration
Jcconf 2015 Taipei -- Bluemix java liberty -auto-configrationJcconf 2015 Taipei -- Bluemix java liberty -auto-configration
Jcconf 2015 Taipei -- Bluemix java liberty -auto-configration
 
Computer networking mcis 6163 project
Computer networking mcis 6163 projectComputer networking mcis 6163 project
Computer networking mcis 6163 project
 
Java Servlets Tutorial | Introduction to Servlets | Java Certification Traini...
Java Servlets Tutorial | Introduction to Servlets | Java Certification Traini...Java Servlets Tutorial | Introduction to Servlets | Java Certification Traini...
Java Servlets Tutorial | Introduction to Servlets | Java Certification Traini...
 
Jboss App Server
Jboss App ServerJboss App Server
Jboss App Server
 
Oracle OSB Tutorial 3
Oracle OSB Tutorial 3Oracle OSB Tutorial 3
Oracle OSB Tutorial 3
 
Manual 5
Manual 5Manual 5
Manual 5
 
Oracle WebLogic Server 11g for IT OPS
Oracle WebLogic Server 11g for IT OPSOracle WebLogic Server 11g for IT OPS
Oracle WebLogic Server 11g for IT OPS
 
Glassfish JEE Server Administration - Module 4 Load Balancer
Glassfish JEE Server Administration - Module 4 Load BalancerGlassfish JEE Server Administration - Module 4 Load Balancer
Glassfish JEE Server Administration - Module 4 Load Balancer
 
WebServices in ServiceMix with CXF
WebServices in ServiceMix with CXFWebServices in ServiceMix with CXF
WebServices in ServiceMix with CXF
 
Jenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentJenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated Deployment
 
Brief introduction into SQL injection attack scenarios
Brief introduction into SQL injection attack scenariosBrief introduction into SQL injection attack scenarios
Brief introduction into SQL injection attack scenarios
 
CakePHP
CakePHPCakePHP
CakePHP
 

Similar to ColdFusion Internals

The app server, web server and everything in between
The app server, web server and everything in betweenThe app server, web server and everything in between
The app server, web server and everything in between
ColdFusionConference
 
Extending Java From ColdFusion - CFUnited 2010
Extending Java From ColdFusion - CFUnited 2010Extending Java From ColdFusion - CFUnited 2010
Extending Java From ColdFusion - CFUnited 2010
Rupesh Kumar
 
Accelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using CachingAccelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using Caching
Pavan Kumar
 
2014 cf summit_clustering
2014 cf summit_clustering2014 cf summit_clustering
2014 cf summit_clustering
ColdFusionConference
 
Developing html5 mobile applications using cold fusion 11
Developing html5 mobile applications using cold fusion 11Developing html5 mobile applications using cold fusion 11
Developing html5 mobile applications using cold fusion 11
ColdFusionConference
 
Alpha Five v10.NEW APPLICATION SERVER. CODELESS AJAX
Alpha Five v10.NEW APPLICATION SERVER. CODELESS AJAXAlpha Five v10.NEW APPLICATION SERVER. CODELESS AJAX
Alpha Five v10.NEW APPLICATION SERVER. CODELESS AJAX
Richard Rabins
 
PaaSVSContainerization
PaaSVSContainerizationPaaSVSContainerization
PaaSVSContainerization
Seyed Ehsan Beheshtian
 
Api manager preconference
Api manager preconferenceApi manager preconference
Api manager preconference
ColdFusionConference
 
IBM Bluemix cloudfoundry platform
IBM Bluemix cloudfoundry platformIBM Bluemix cloudfoundry platform
IBM Bluemix cloudfoundry platform
Daniela Zuppini
 
FATC UK - Real time collaborative Flex apps
FATC UK - Real time collaborative Flex appsFATC UK - Real time collaborative Flex apps
FATC UK - Real time collaborative Flex apps
Michael Chaize
 
Accelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using CachingAccelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using Caching
ColdFusionConference
 
5 pcf
5 pcf5 pcf
Apigility-powered API's on IBM i
Apigility-powered API's on IBM iApigility-powered API's on IBM i
Apigility-powered API's on IBM i
chukShirley
 
IIS 6.0 and asp.net
IIS 6.0 and asp.netIIS 6.0 and asp.net
IIS 6.0 and asp.net
Rishi Kothari
 
REST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptxREST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptx
Jason452803
 
flask.pptx
flask.pptxflask.pptx
flask.pptx
asif290119
 
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAXBuilding an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Richard Rabins
 
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
MongoDB
 
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
Andrew Ripka
 
JCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptxJCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptx
Grace Jansen
 

Similar to ColdFusion Internals (20)

The app server, web server and everything in between
The app server, web server and everything in betweenThe app server, web server and everything in between
The app server, web server and everything in between
 
Extending Java From ColdFusion - CFUnited 2010
Extending Java From ColdFusion - CFUnited 2010Extending Java From ColdFusion - CFUnited 2010
Extending Java From ColdFusion - CFUnited 2010
 
Accelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using CachingAccelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using Caching
 
2014 cf summit_clustering
2014 cf summit_clustering2014 cf summit_clustering
2014 cf summit_clustering
 
Developing html5 mobile applications using cold fusion 11
Developing html5 mobile applications using cold fusion 11Developing html5 mobile applications using cold fusion 11
Developing html5 mobile applications using cold fusion 11
 
Alpha Five v10.NEW APPLICATION SERVER. CODELESS AJAX
Alpha Five v10.NEW APPLICATION SERVER. CODELESS AJAXAlpha Five v10.NEW APPLICATION SERVER. CODELESS AJAX
Alpha Five v10.NEW APPLICATION SERVER. CODELESS AJAX
 
PaaSVSContainerization
PaaSVSContainerizationPaaSVSContainerization
PaaSVSContainerization
 
Api manager preconference
Api manager preconferenceApi manager preconference
Api manager preconference
 
IBM Bluemix cloudfoundry platform
IBM Bluemix cloudfoundry platformIBM Bluemix cloudfoundry platform
IBM Bluemix cloudfoundry platform
 
FATC UK - Real time collaborative Flex apps
FATC UK - Real time collaborative Flex appsFATC UK - Real time collaborative Flex apps
FATC UK - Real time collaborative Flex apps
 
Accelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using CachingAccelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using Caching
 
5 pcf
5 pcf5 pcf
5 pcf
 
Apigility-powered API's on IBM i
Apigility-powered API's on IBM iApigility-powered API's on IBM i
Apigility-powered API's on IBM i
 
IIS 6.0 and asp.net
IIS 6.0 and asp.netIIS 6.0 and asp.net
IIS 6.0 and asp.net
 
REST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptxREST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptx
 
flask.pptx
flask.pptxflask.pptx
flask.pptx
 
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAXBuilding an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
 
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
 
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
 
JCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptxJCON_15FactorWorkshop.pptx
JCON_15FactorWorkshop.pptx
 

More from ColdFusionConference

Cf ppt vsr
Cf ppt vsrCf ppt vsr
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server Databases
ColdFusionConference
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
ColdFusionConference
 
Don't just pdf, Smart PDF
Don't just pdf, Smart PDFDon't just pdf, Smart PDF
Don't just pdf, Smart PDF
ColdFusionConference
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an Architect
ColdFusionConference
 
Security And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerSecurity And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API Manager
ColdFusionConference
 
Monetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISMonetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APIS
ColdFusionConference
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016
ColdFusionConference
 
ColdFusion in Transit action
ColdFusion in Transit actionColdFusion in Transit action
ColdFusion in Transit action
ColdFusionConference
 
Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016
ColdFusionConference
 
Where is cold fusion headed
Where is cold fusion headedWhere is cold fusion headed
Where is cold fusion headed
ColdFusionConference
 
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusionConference
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
ColdFusionConference
 
Restful services with ColdFusion
Restful services with ColdFusionRestful services with ColdFusion
Restful services with ColdFusion
ColdFusionConference
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
ColdFusionConference
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and web
ColdFusionConference
 
Why Everyone else writes bad code
Why Everyone else writes bad codeWhy Everyone else writes bad code
Why Everyone else writes bad code
ColdFusionConference
 
Securing applications
Securing applicationsSecuring applications
Securing applications
ColdFusionConference
 
Testing automaton
Testing automatonTesting automaton
Testing automaton
ColdFusionConference
 
Rest ful tools for lazy experts
Rest ful tools for lazy expertsRest ful tools for lazy experts
Rest ful tools for lazy experts
ColdFusionConference
 

More from ColdFusionConference (20)

Cf ppt vsr
Cf ppt vsrCf ppt vsr
Cf ppt vsr
 
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server Databases
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
 
Don't just pdf, Smart PDF
Don't just pdf, Smart PDFDon't just pdf, Smart PDF
Don't just pdf, Smart PDF
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an Architect
 
Security And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerSecurity And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API Manager
 
Monetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISMonetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APIS
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016
 
ColdFusion in Transit action
ColdFusion in Transit actionColdFusion in Transit action
ColdFusion in Transit action
 
Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016
 
Where is cold fusion headed
Where is cold fusion headedWhere is cold fusion headed
Where is cold fusion headed
 
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
Restful services with ColdFusion
Restful services with ColdFusionRestful services with ColdFusion
Restful services with ColdFusion
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and web
 
Why Everyone else writes bad code
Why Everyone else writes bad codeWhy Everyone else writes bad code
Why Everyone else writes bad code
 
Securing applications
Securing applicationsSecuring applications
Securing applications
 
Testing automaton
Testing automatonTesting automaton
Testing automaton
 
Rest ful tools for lazy experts
Rest ful tools for lazy expertsRest ful tools for lazy experts
Rest ful tools for lazy experts
 

Recently uploaded

Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 

Recently uploaded (20)

Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 

ColdFusion Internals

  • 1. ColdFusion Internals Paul Nibin K J © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 2. Introduction © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 2 Client Web Server
  • 3. Agenda  Life of a CFM request  Classloading in ColdFusion  How does RESTful web service work? © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 3
  • 4. Life of a request © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 4
  • 5. Life of request in ColdFusion © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 5
  • 6. © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Template Classloader In filter chain 6 1. Request Validation • Validates the request. 2. Path Resolution • Resolve s absolute CFM Path 3.Application Resolution • Locates Applicati -on. • Creates Applicati -on scope. • Invokes life cycle method 4. Parse • Parse the CFM file . • Generat e AST using the grammar . 5.Bytecod e Generatio n • Translat e the AST to java byte code
  • 7. 1. Request Validation  You are part of request validation too.  You can configure the following validations through settings. © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 7  Request Size Limits  Request Limits
  • 8. 2. Path Resolution http://localhost/employee/addEmployee.cfm /employee/addEmployee.cfm C:inetpubwwwrootemployeeaddEmployee.cfm Request URL Virtual Path © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 8 Absolute Path Connector You can cache the web server path using an admin setting.
  • 9. 3. Application Resolution  Finds the Application.cfc © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 9  Creates Application Scope  Invokes Life cycle methods  OnApplicationStart()  OnRequestStart()  OnError()
  • 10. 3. Application Resolution  Finds the Application.cfc © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 10  Creates Application Scope  Invokes Life cycle methods  OnApplicationStart()  OnRequestStart()  OnError() Start Check for the Application.cfc in current directory. Found Application.cf c? Found Application Check for the Application.cfc in parent directory. Yes No Setting to specify till what level ColdFusion should search for Application.cfc
  • 11. Unnamed applications http://localhost/axis1Test/basic.cfc?wsdl © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. axis1Test 11 Application.cfc <cfcomponent> <cfset this.wssettings.version.publish=“1”> </cfcomponent> basic.cfc axis2Test Application.cfc <cfcomponent> <cfset this.wssettings.version.publish=“2”> </cfcomponent> basic.cfc http://localhost/axis2Test/basic.cfc?wsdl ColdFusion disables the creation of un named applications using an admin setting.
  • 12. 4. Parsing © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 12 <cfscript> function hello() { writeOutput("hello"); } hello(); </cfscript> Template Reader Abstract Syntax Tree (AST)
  • 13. 4. Parsing © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 13 <cfscript> function hello() { writeOutput("hello"); } hello(); </cfscript> Template Reader Abstract Syntax Tree (AST)
  • 14. Template Reader  Reads the CFM and creates a stream. Encoding? © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 14
  • 15. Automatic encoding identification © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 15 Start Use encoding Is BOM present? Guess encoding (icu4j) Is guess probability 100%? End Yes Yes No Save the file with BOM <cfprocessingdirective ..> Use system encoding End No -Dfile.encoding=“”
  • 16. 5. Byte code generation © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. AST <cfusion_Root>wwwrootWEB-INF 16 Byte Code Engineering Library (BCEL) cfclasses Byte Code
  • 17. Template Classloader © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 17 Start Is class in cache ? Check Last Modified Date of CFM Is Modifie d? Parse Generate byte code Load byte code End Use cached Class No Yes No Yes Clear template cache Enable trusted cache
  • 18. Summary  ColdFusion filter chain has 5 main phases © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 18 1. Request Validation o Settings in administrator 2. Path Resolution o Cache web server path setting 3. Application Resolution o Finding Application.cfc o Unnamed applications 4. Parsing o File encoding 5. Bytecode generation o Template Classloader
  • 19. Classloading © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 19
  • 20. Class Loading  -Dcoldfusion.classPath = {application.home}/lib/updates, {application.home}/lib,{application.home}/lib/axis2,{application.home}/gat eway/lib/,… © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 20  In jvm.config ClassLoader cfusion/lib cfusion/lib/update s cfusion/lib/axis 2
  • 21. Prior to CF10 Create a folder in cfusionlib. Copy your jars to the new folder. Edit jvm.config to add the new folder to the end of coldfusion.classPath property © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 21 Cons  Conflicts  May hamper normal server functioning.  Any changes in jar files need server restart to take effect.
  • 22. CF10 and afterwards  CF10 introduced enhanced java integration.  Application setting available to specify custom classpath.  <cfset this.javaSettings = {LoadPaths = [".java_lib",".javamyjar.jar"], reloadOnChange = false}> © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 22 Pros  Complete isolation  Will not affect server functioning  Allows reloading
  • 23. RESTful web services © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 23
  • 24. RESTful web services  The W3C defines a Web service as: a software system designed to support interoperable machine-to-machine interaction over a network.  A webservice becomes RESTful when the following 4 constraints are satisfied. 1. Addressability 2. Multiple Representations 3. Uniform and constrained interfaces 4. Stateless communication © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 25. How does RESTful web service work?  Two logical sections Registratio n © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Usage
  • 26. Why? Traditional web service POST /students/StudentsService HTTP/1.1 Host: http://localhost:8500 Content-Type: soap/xml <Envelope> <Header></Header> <Body> <GetStudent> <Id>112</Id> </GetStudent> </Body> <Envelope> RESTful web service GET /students/112 HTTP/1.1 Host: http://localhost:8500 Accepts: text/html © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  • 27. Registration Workflow  Registration is the process of making your service ready for use. © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 27 Register application Scanning for REST CFC Generate skeleton Annotate skeleton Register with Jersey  Inputs: Application Root Path and Service Name
  • 28. Settings © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 28 Register application Scanning for REST CFC • restsettings.cfclocatio n Generate skeleton • restsettings.skipCFCWithE rror Annotate skeleton Register with Jersey
  • 29. Usage Workflow  Inputs: HTTP request  The URL of the request  HTTP Headers  Body of the request  Query params, Cookies, Matrix params etc.. © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 29
  • 30. Explaning the URL  http:// + localhost:8500 + /rest + /examples + /helloworld © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 30 http • The protocol localhost:8500 • Server address and port • Context path used to identify the request as a REST request rest examples • The application name used during registration helloworld • restPath defined in the CFC
  • 31. Request Workflow © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 31 Identify REST request Identifies application Identifies CFC Identifies function Invokes Function
  • 32. Settings © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 32 Identify REST request • Change context path in web.xml Identifies application • Can make application default if needed Identifies CFC Identifies function Invokes Function • use custom serializer to modify response
  • 33. Summary  RESTful web services introduction  Why RESTful web service needs to be registered first? © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 33  Registration workflow o Settings  Request Workflow  Settings
  • 34. Q & A © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 34 pnibinkj@adobe.com http://blogs.coldfusion.com/
  • 35. © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.