1 / 40

ColdFusion Basics

ColdFusion Basics. A goal properly set is halfway reached. Zig Ziggler. Perspective. Mystery Guest #1 Mystery Guest #2 Mystery Guest #3. The Evolution of a Developer. Different Approaches. AJAX (Browser). AIR (Desktop w/Flex). Usability. Tags. Script. < cfscript >

deana
Download Presentation

ColdFusion Basics

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. ColdFusion Basics A goal properly set is halfway reached. ZigZiggler

  2. Perspective Mystery Guest #1 Mystery Guest #2 Mystery Guest #3

  3. The Evolution of a Developer

  4. Different Approaches AJAX (Browser) AIR (Desktop w/Flex)

  5. Usability Tags Script <cfscript> ma = [1,3,5,22]; myTotal = 0; for(i=1;i<=arrayLen(ma);i++){ myTotal += ma[i]; } // writeOutput(myTotal); </cfscript> <cfoutput>#myTotal#</cfoutput> <cfset ma = [1,3,5,22]> <cfsetmyTotal = 0> <cfloop index=“i” from=“1” to=“#arrayLen(ma)#”> <cfsetmyTotal = myTotal + ma[i]> </cfloop> <cfoutput>#myTotal#</cfoutput>

  6. Different Approaches Networking SOAP REST RSS Forms HTML (submit) AJAX (submit) PDF Application Frameworks CF on Wheels ColdBox Fusebox Machii Model Glue SOS(Flex/AIR) Cairngorm Mate PureMVC Switz

  7. Different Approaches Methodologies Procedural Stand Alone Object Oriented Inversion of Control Libraries (Data CF) DataMgr Transfer (AJAX) EXTJS jQuery Moho Prototype Spry YUI

  8. Focus on the task at hand!

  9. Variables

  10. Variables • Simple Variable Types • “Text” • Numbers • Binary

  11. Variables Lists

  12. Variables Arrays

  13. Variables Structures

  14. Variables Recordsets (queries)

  15. Variables XML

  16. Loops

  17. Loops List Loops

  18. Loops Array Loops

  19. Loops Recordset (query) Loops

  20. Loops • while a = ArrayNew(1); loop = 1; while (loop LE 10) { a[loop] = loop * 5; loop = loop + 1; }

  21. Loops • do … while a = ArrayNew(1); loop = 1; do { a[loop] = loop * 5; loop = loop + 1; } while (loop LE 10);

  22. Loops • For Loops for ( loop=1; loop LE 10; loop = loop+1) { if(a[loop] EQ "") continue; WriteOutput(loop); } // continue skip to next loop start // break exit loop immediately

  23. Loops • Structure Loops myStruct=StructNew(); myStruct.productName=“wheat flour"; mystruct.quality="fine"; myStruct.quantity=50; for (keyName in myStruct) { WriteOutput("myStruct." & Keyname & " has the value: " & myStruct[keyName] &"<br>"); }

  24. Conditional Logic

  25. Conditional Logic • if • else if • else

  26. Conditional Logic • switch • case • defaultCase

  27. Packaging

  28. Packaging • Include Files • Custom Tags • Custom Components (objects/CFCs)

  29. Packaging • Include Files • Example: Layout Header / Footer

  30. Packaging • Custom Tags • Example: Layout • Includes Header and Footer • Example: Custom Layout with Application Setting

  31. Packaging • CFCs (custom components) • Example: Custom User • Login/Logout • Revise with DataMgr

  32. Applications

  33. Applications • Application • Session • Request

  34. Applications • onApplicationStart() • onSessionStart() • onRequestStart() • onRequest() • onRequestEnd() • onSessionEnd() • OnApplicationEnd() • onError() • onMissingTemplate()

  35. Applications • THIS.name • THIS.applicationTimeout • THIS.clientManagement • THIS.clientStorage • THIS.customTagPath • THIS.loginStorage • THIS.mappings • THIS.sessionManagement • THIS.sessionTimeout • THIS.setClientCookies • THIS.setDomainCookies • THIS.scriptProtect • THIS.secureJSON • THIS.secureJSONPrefix • THIS.welcomeFileList

  36. What Else? • Learn SQL? • Application Frameworks • Library Frameworks

  37. Resources • Books • CFWack 1 through 3 • ColdFusion 8 Developer Tutorial • Training and Knowledge Sites • Lynda.com • CommunityMX.com • Conferences (like this one)

  38. Resources • blogs • Adobe Dev Center • User Groups • Forums

  39. Resources • Popular CFML sites • Riaforge.org • cfMeetup • HouseOfFusion.com • Cflib.org

  40. ColdFusion Basics A goal properly set is halfway reached. ZigZiggler

More Related