Introduction to ColdCourse

1,203 views
1,141 views

Published on

Presentation to Adogo on ColdCourse. You can also view the recording of this presentation.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,203
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
3
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Introduction to ColdCourse

  1. 1. SES URL’s for ColdFusion with ColdCourse Adobe Developers of Greater Orlando adogo.us September 2007 <ul><ul><li>Search Engine Safe URLs for Fusebox, Mach-II, Model-Glue, ColdBox and more. </li></ul></ul>
  2. 2. What's this ColdCourse thing? <ul><li>An addon for MVC frameworks to allow for pretty URLs </li></ul><ul><li>Executes before the framework </li></ul><ul><li>Works with any CF MVC framework if some conventions used </li></ul><ul><li>Based on ColdFusion on Wheels routing engine </li></ul>
  3. 3. What else does it do? <ul><li>Single config file to setup. </li></ul><ul><li>Caches found courses </li></ul><ul><li>Optional single location for all resources </li></ul><ul><li>Provides redirects (301 Moved Permanently) </li></ul>
  4. 4. Sample Course User navigates to: http://localhost/home/about URL routing rules (.htaccess for apache, isapi filter for IIS) change this to http://localhost/index.cfm/home/about In index.cfm, before the framework is included ColdCourse evaluates this and executes the following. <cfset url['fuseaction'] = “home.about” /> because it matches a default course: <cfset addCourse(“:controller/:action”) /> Since most frameworks rely on a single variable passed through the URL, they don't care if it was set by the URL, or set to the URL scope.
  5. 5. More Complex Example User navigates to: http://localhost/users/BrianLeGros The following routing rule is declared <cfset addCourse(“users/:username”, controller=”user”, action=”view”) /> ColdCourse does the following: <cfset url['fuseaction'] = “user.view” /> <cfset url['username'] = “BrianLegros” /> This would in effect be the same as http://localhost/index.cfm?fuseaction=user.view&username=BrianLegros
  6. 6. Any Problems With This? <ul><li>Every course needs a “controller” and an “action”. </li></ul><ul><li>Relative links and paths within existing applications </li></ul><ul><li>Legacy POST actions must be changed. </li></ul><ul><li>Calls from within a framework? </li></ul>
  7. 7. How does that Work? <ul><li>Code example </li></ul>
  8. 8. Thanks! <ul><ul><li>Resources : </li></ul></ul><ul><ul><li>ColdFusion on Wheels - cfwheels.com </li></ul></ul><ul><ul><li>Ruby On Rails - rubyonrails.com </li></ul></ul><ul><ul><li>ColdCourse available at coldcourse.riaforge.com </li></ul></ul><ul><ul><li>Code available at http://svn.adogo.us </li></ul></ul>

×