1 / 26

Build/Deploy/Upgrade

Build/Deploy/Upgrade. Joshua Cyr www.usefulconcept.com www.besavvy.com t witer.com/ jcyr. All 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

jera
Download Presentation

Build/Deploy/Upgrade

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Build/Deploy/Upgrade Joshua Cyr www.usefulconcept.com www.besavvy.com twiter.com/jcyr

  2. All 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

  3. Agenda Common Issues In Development, Deployment, Upgrades and Support Useful Resources to Alleviate Issues Remind People of RIAdventureConference/Cruise!

  4. Development Deployment Considerations • Operating Systems • ColdFusion Engines • Shared VS Private Hosting • Mappings • Licensing • Organizing Files

  5. We Support What CF Supports Two Big Issues • Case Sensitivity • 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!

  6. ColdFusion Engines • ColdFusion 7,8,9, BlueDragon, Railo, Smith, Others • 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

  7. Shared VS Private Shared Hosting Potential Gotchas • Not all hosts created equal. Many restrict fundamental tags (godaddy). • Sandbox Security (cftemp folder, semi obscure permissions issues, etc.) • Security Concerns (db user/pass, application scope, file paths, etc.) • Server Stability

  8. Shared VS Private • Private Server Gotchas • Your Server vs Client Server • Limited Distribution Potential • Clients Server may be less accessible then shared hosting

  9. Mappings • CF 8+ Makes Life MUCH Easier • 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

  10. Licensing • Using 3rd Party Code Saves Time • Check Those Licenses. • Can you distribute?

  11. Organizing Files • File Organization Helps Upgrades • Config Files • Templates / Layout • Main Code • External Libraries

  12. Deployment • Hosted vs Distributed • Users: Experienced vs Not • Database • Configuration

  13. Deployment • Hosted Apps • Potentially one codebase to maintain (not always) • Liability of servers/uptime. • Additional Revenue Model

  14. Deployment • Distributed Apps • Many Customers/Users Require • Potentially Difficult Upgrades • Loss of Server Environment Control

  15. Database • Which Databases Should You Support? • MYSQL MSSSQL most Common • Oracle, Postgres, Derby? • SQL files VS Auto Build • DB Support: Your SQL vs ORM

  16. Auto Build • CF9 ORM with Hibernate • DataMgr will take XML file and build tables/columns/default data from it in almost any db. http://datamgr.riaforge.org/

  17. Auto Build – CF9 ORM Application.cfc: <cfset this.name = "ArtGallery"> <cfsetthis.ormenabled = "true"> <cfsetthis.ormsettings={datasource="cfartgallery", dbcreate="dropcreate"}>

  18. Example employee.cfc <cfcomponentpersistent="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>

  19. DataMGR Auto Build / Create XML • The file to create xml: (createxml.cfm)<!--- set up objects ---><cfsetDataMgr = CreateObject("component","DataMgr").init("dev_sourcedb")><cfsetmytablelist = DataMgr.getDatabaseTables()><!--- load in tables from source database ---><cfloop list="#mytablelist#" index="iTables">      <cfsetDataMgr.loadTable('#iTables#')></cfloop><!--- get the xml from the source db ---><cfset synch = createobject("component","DataSynch").init(DataMgr)><cfsetmyxml = synch.getXML()><!--- create the xml file from the source db ---><cffile action = "write" file = "#expandpath('.')#/myxml.xml" output = "#myxml#">

  20. Auto Build / Create Tables - Data • The file to make db: (loaddb.cfm)<!--- load datamgr ---><cfsetDataMgr = 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. ---><cfsetloaddb =  DataMgr.loadXML(myxml, true, true)>

  21. Auto Build / Upgrade DataMgr will: • Update default values for new columns. • Make sure default records stay (reinsert if needed) • Add new Columns / Tables to existing DB Wont: • Create Indexes • Scripts for data manipulation on version differences.

  22. Database Support • Write and Test Code On Each DB? • ORM’s make make life much easier.

  23. Configuration • Config file should be intuitive. • Only One primary file! • Saves MANY support issues.

  24. Upgrade Issues • How To Upgrade DB? • New Default Data? • Which Files Need Replacing? • Clear Which Not to be Over Written? • Backwards Compatibility

  25. RIAdventure • Come to my Cruise! • www.riadventure.com • December 6th – 13th • Western Caribbean Cruise • CF/Flex/Air/Mobile (Adobe RIA)

  26. Questions 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/ (datafaucetorm) http://www.compoundtheory.com/?action=displayPost&ID=334 (Multi CF Engine Testing)

More Related