Www.cfunited.com Geolocation with ColdFusion Oğuz Demirkapı CTO | NicheClick Media.
Www.cfunited.com Build/Deploy/Upgrade Joshua Cyr twiter.com/jcyr.
-
Upload
easter-garrison -
Category
Documents
-
view
216 -
download
2
Transcript of Www.cfunited.com Build/Deploy/Upgrade Joshua Cyr twiter.com/jcyr.
www.cfunited.com
Build/Deploy/UpgradeBuild/Deploy/Upgrade
Joshua Cyr
www.usefulconcept.com
www.besavvy.com
twiter.com/jcyr
2www.cfunited.com
All About Joshua CyrAll About Joshua Cyr
• Developer - Savvy Content Manager• CF User Group Manager• CF Since Version 2• Past Team Allaire Member• BS in Business Administration• Lives in Beautiful New Hampshire
www.usefulconcept.com
www.besavvy.com
twitter.com/jcyr
www.plurk.com/user/jcyr
3www.cfunited.com
AgendaAgenda
Common Issues In Development, Deployment, Upgrades and Support
Useful Resources to Alleviate Issues
Remind People of RIAdventure Conference/Cruise!
4www.cfunited.com
DevelopmentDevelopment
Deployment Considerations
A. Operating Systems
B. ColdFusion Engines
C. Shared VS Private Hosting
D. Mappings
E. Licensing
F. Organizing Files
5www.cfunited.com
We Support What CF SupportsWe Support What CF Supports
Two Big Issues
A. Case Sensitivity
B. File Paths (use / or var)
Resource:http://www.coldfusionmuse.com/index.cfm/2008/6/21/portable-coldfusion-linux-and-windows
Typically we should support anything that the CF engine supports. That’s the beauty of CF!
6www.cfunited.com
ColdFusion EnginesColdFusion Engines
A. ColdFusion 7,8,9, BlueDragon, Railo, Smith, Others
B. Not all features supported in all engines. Difficult to test on all without proper resources/software.
Resource:http://www.compoundtheory.com/?action=displayPost&ID=334
7www.cfunited.com
Shared VS PrivateShared VS Private
Shared Hosting Potential Gotchas
A. Not all hosts created equal. Many restrict fundamental tags (godaddy).
B. Sandbox Security (cftemp folder, semi obscure permissions issues, etc.)
C. Security Concerns (db user/pass, application scope, file paths, etc.)
D. Server Stability
8www.cfunited.com
Shared VS PrivateShared VS Private
A. Private Server Gotchas
B. Your Server vs Client Server
C. Limited Distribution Potential
D. Clients Server may be less accessible then shared hosting
9www.cfunited.com
MappingsMappings
A. CF 8+ Makes Life MUCH Easier
B. Often Not Available w/ hosts. Sometimes hosts make bad mapping /transfer
Resource:http://www.numtopia.com/terry/blog/archives/2007/09/coldfusion_8_mapping_application_name.cfm
10www.cfunited.com
LicensingLicensing
A. Using 3rd Party Code Saves Time
B. Check Those Licenses.
C. Can you distribute?
11www.cfunited.com
Organizing FilesOrganizing Files
A. File Organization Helps Upgrades
B. Config Files
C. Templates / Layout
D. Main Code
E. External Libraries
12www.cfunited.com
DeploymentDeployment
A. Hosted vs Distributed
B. Users: Experienced vs Not
C. Database
D. Configuration
13www.cfunited.com
DeploymentDeployment
A. Hosted Apps
B. Potentially one codebase to maintain (not always)
C. Liability of servers/uptime.
D. Additional Revenue Model
14www.cfunited.com
DeploymentDeployment
A. Distributed Apps
B. Many Customers/Users Require
C. Potentially Difficult Upgrades
D. Loss of Server Environment Control
15www.cfunited.com
DatabaseDatabase
A. Which Databases Should You Support?
B. MYSQL MSSSQL most Common
C. Oracle, Postgres, Derby?
D. SQL files VS Auto Build
E. DB Support: Your SQL vs ORM
16www.cfunited.com
Auto BuildAuto Build
1. CF9 ORM with Hibernate
2. DataMgr will take XML file and build tables/columns/default data from it in almost any db. http://datamgr.riaforge.org/
17www.cfunited.com
Auto Build – CF9 ORMAuto Build – CF9 ORM
Application.cfc:
<cfset this.name = "ArtGallery">
<cfset this.ormenabled = "true">
<cfset this.ormsettings={datasource="cfartgallery", dbcreate="dropcreate"}>
18www.cfunited.com
Example employee.cfcExample employee.cfc
<cfcomponent persistent="true" output="false">
<cfproperty name=“employeeID" type="numeric" fieldtype="id" datatype="integer" generator="identity">
<cfproperty name=“firstname" type="string" />
<cfproperty name=“lastname" type="string“ />
<cfproperty name=“title" type="string“ />
…
</cfcomponent>
19www.cfunited.com
DataMGR Auto Build / Create XMLDataMGR Auto Build / Create XML
A. The file to create xml: (createxml.cfm)
<!--- set up objects ---><cfset DataMgr = CreateObject("component","DataMgr").init("dev_sourcedb")><cfset mytablelist = DataMgr.getDatabaseTables()>
<!--- load in tables from source database ---><cfloop list="#mytablelist#" index="iTables"> <cfset DataMgr.loadTable('#iTables#')></cfloop>
<!--- get the xml from the source db ---><cfset synch = createobject("component","DataSynch").init(DataMgr)><cfset myxml = synch.getXML()>
<!--- create the xml file from the source db ---><cffile action = "write" file = "#expandpath('.')#/myxml.xml" output = "#myxml#">
20www.cfunited.com
Auto Build / Create Tables - DataAuto Build / Create Tables - Data
A. The file to make db: (loaddb.cfm)
<!--- load datamgr ---><cfset DataMgr = CreateObject("component","DataMgr").init("dev_desinationdb")>
<!--- get the xml file which describes our tables and data ---><cffile action = "read" file = "#expandpath('.')#/myxml.xml" variable="myxml">
<!--- create or update the db with all tables, columns and data. ---><cfset loaddb = DataMgr.loadXML(myxml, true, true)>
21www.cfunited.com
Auto Build / UpgradeAuto Build / Upgrade
DataMgr will:A. Update default values for new columns.B. Make sure default records stay (reinsert if
needed)C. Add new Columns / Tables to existing DB
Wont:D. Create IndexesE. Scripts for data manipulation on version
differences.
22www.cfunited.com
Database SupportDatabase Support
A. Write and Test Code On Each DB?
B. ORM’s make make life much easier.
23www.cfunited.com
ConfigurationConfiguration
A. Config file should be intuitive.
B. Only One primary file!
C. Saves MANY support issues.
24www.cfunited.com
Upgrade IssuesUpgrade Issues
A. How To Upgrade DB?
B. New Default Data?
C. Which Files Need Replacing?
D. Clear Which Not to be Over Written?
E. Backwards Compatibility
25www.cfunited.com
RIAdventureRIAdventure
A. Come to my Cruise!
B. www.riadventure.com
C. December 6th – 13th
D. Western Caribbean Cruise
E. CF/Flex/Air/Mobile (Adobe RIA)
26www.cfunited.com
QuestionsQuestions
What did I miss?
www.usefulconcept.com
www.besavvy.com
Resources:http://datamgr.riaforge.org/ (datamgr)
http://www.transfer-orm.com/ (transfer orm)
http://datafaucet.riaforge.org/ (datafaucet orm)
http://www.compoundtheory.com/?action=displayPost&ID=334 (Multi CF Engine Testing)