SlideShare ist ein Scribd-Unternehmen logo
1 von 17
How ColdFusion saved me
from a week of grunt work

 Using SQL Server and Coldfusion
to generate 600 Word Documents.
Buy One Class – Get One Class 50% off
           until December 15
Why ColdFusion?
‱ Quick learning curve
‱ Similar style to HTML with opening and closing tags
‱ Supported by Adobe and frequently updated with new features

‱ ColdFusion isn’t free but also not that expensive
‱ Hosted ColdFusion accounts are about $30 a month
‱ Free Developer Edition
Can you guess what this does?


  <cfloop index="i" from="1" to="10">

         <cfoutput> <p> #i# </p> </cfoutput>

  </cfloop>
Can I get this outline as a Word Doc?




                     Ummm
    No.
<cfoutput>

      <h1>#database.h1#</h1>
      <h2>#database.h2#</h2>

      #database.classOutline#

</cfoutput>
I need all of our outlines in Word




                    
 super.
Can ColdFusion come to my rescue?




           Yup!
Step 1: Get the info from the database

<cfquery name="allOutlines" datasource="datasource"
               username="username" password="password">

       SELECT ID,
              Name,
              Days,
              H1,
              ClassOutline,
              FileName

       FROM   classroomTable

       ORDER BY Name

</cfquery>
Step 2: Output class info into a variable
<cfoutput query="allOutlines">

     <cfsavecontent variable="myDocument">

     <html xmlns:w="urn:schemas-microsoft-com:office:word">
     <!--- Head tag instructs Word to start up a certain way, specifically in
     print view. --->
         <head>
             <xml>
              <w:WordDocument>
                 <w:View>Print</w:View>
                 <w:SpellingState>Clean</w:SpellingState>
                 <w:GrammarState>Clean</w:GrammarState>
                 <w:Compatibility>
                   <w:BreakWrappedTables/>
                   <w:SnapToGridInCell/>
                   <w:WrapTextWithPunct/>
                   <w:UseAsianBreakRules/>
                 </w:Compatibility>
                 <w:DoNotOptimizeForBrowser/>
              </w:WordDocument>
             </xml>
         </head>
Step 3: Write variable into Word Doc
<body>

          <cfoutput>

            <h1>#allOutlines.Name#</h1>
            <p>#allOutlines.Days# <cfif allOutlines.Days GT "1">days<cfelse>day</cfif></p>

            #allOutlines.classOutline#

         </cfoutput>

</body>
</html>
</cfsavecontent>



<cfscript>

            FileWrite("Server:word-outlines#allOutlines.ID#-#allOutlines.FileName#.doc", "#myDocument#");

</cfscript>

</cfoutput>
This is my lonely directory
my directory with lots of friends

SUPER CODER!

Weitere Àhnliche Inhalte

Was ist angesagt?

Meta Programming with JavaScript
Meta Programming with JavaScriptMeta Programming with JavaScript
Meta Programming with JavaScriptjeresig
 
S1 Web Development
S1 Web DevelopmentS1 Web Development
S1 Web DevelopmentSabahtHussein
 
Upstate CSCI 450 jQuery
Upstate CSCI 450 jQueryUpstate CSCI 450 jQuery
Upstate CSCI 450 jQueryDanWooster1
 
Open course(programming languages) 20150318
Open course(programming languages) 20150318Open course(programming languages) 20150318
Open course(programming languages) 20150318JangChulho
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3masahiroookubo
 
Implementation of gui framework part1
Implementation of gui framework part1Implementation of gui framework part1
Implementation of gui framework part1masahiroookubo
 
Python Programming Essentials - M44 - Overview of Web Development
Python Programming Essentials - M44 - Overview of Web DevelopmentPython Programming Essentials - M44 - Overview of Web Development
Python Programming Essentials - M44 - Overview of Web DevelopmentP3 InfoTech Solutions Pvt. Ltd.
 
Implementation of gui framework part2
Implementation of gui framework part2Implementation of gui framework part2
Implementation of gui framework part2masahiroookubo
 
Html part 2
Html part 2Html part 2
Html part 2lokenra
 
Gd 305 1 133 No27 A.Txt.Xhtml
Gd 305 1 133 No27 A.Txt.XhtmlGd 305 1 133 No27 A.Txt.Xhtml
Gd 305 1 133 No27 A.Txt.XhtmlHOME
 
Java script
Java scriptJava script
Java scriptumesh patil
 
BizTalk Server 2010 - Invoking Restful Services - EPC Group
BizTalk Server 2010 - Invoking Restful Services - EPC GroupBizTalk Server 2010 - Invoking Restful Services - EPC Group
BizTalk Server 2010 - Invoking Restful Services - EPC GroupEPC Group
 
Html5 use cases
Html5 use casesHtml5 use cases
Html5 use casesyongwoo Jeon
 
w3schools%20javascript%20comments
w3schools%20javascript%20commentsw3schools%20javascript%20comments
w3schools%20javascript%20commentstutorialsruby
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to JqueryGurpreet singh
 
Html5 & less css
Html5 & less cssHtml5 & less css
Html5 & less cssGraham Johnson
 
HTTP 2.0 - Web Unleashed 2015
HTTP 2.0 - Web Unleashed 2015HTTP 2.0 - Web Unleashed 2015
HTTP 2.0 - Web Unleashed 2015dmethvin
 
How to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteHow to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteDaniel Kanchev
 
DrupalCon Barcelona 2015
DrupalCon Barcelona 2015DrupalCon Barcelona 2015
DrupalCon Barcelona 2015Daniel Kanchev
 
Word press beirut 9th meetup march
Word press beirut 9th meetup   marchWord press beirut 9th meetup   march
Word press beirut 9th meetup marchFadi Nicolas Zahhar
 

Was ist angesagt? (20)

Meta Programming with JavaScript
Meta Programming with JavaScriptMeta Programming with JavaScript
Meta Programming with JavaScript
 
S1 Web Development
S1 Web DevelopmentS1 Web Development
S1 Web Development
 
Upstate CSCI 450 jQuery
Upstate CSCI 450 jQueryUpstate CSCI 450 jQuery
Upstate CSCI 450 jQuery
 
Open course(programming languages) 20150318
Open course(programming languages) 20150318Open course(programming languages) 20150318
Open course(programming languages) 20150318
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3
 
Implementation of gui framework part1
Implementation of gui framework part1Implementation of gui framework part1
Implementation of gui framework part1
 
Python Programming Essentials - M44 - Overview of Web Development
Python Programming Essentials - M44 - Overview of Web DevelopmentPython Programming Essentials - M44 - Overview of Web Development
Python Programming Essentials - M44 - Overview of Web Development
 
Implementation of gui framework part2
Implementation of gui framework part2Implementation of gui framework part2
Implementation of gui framework part2
 
Html part 2
Html part 2Html part 2
Html part 2
 
Gd 305 1 133 No27 A.Txt.Xhtml
Gd 305 1 133 No27 A.Txt.XhtmlGd 305 1 133 No27 A.Txt.Xhtml
Gd 305 1 133 No27 A.Txt.Xhtml
 
Java script
Java scriptJava script
Java script
 
BizTalk Server 2010 - Invoking Restful Services - EPC Group
BizTalk Server 2010 - Invoking Restful Services - EPC GroupBizTalk Server 2010 - Invoking Restful Services - EPC Group
BizTalk Server 2010 - Invoking Restful Services - EPC Group
 
Html5 use cases
Html5 use casesHtml5 use cases
Html5 use cases
 
w3schools%20javascript%20comments
w3schools%20javascript%20commentsw3schools%20javascript%20comments
w3schools%20javascript%20comments
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to Jquery
 
Html5 & less css
Html5 & less cssHtml5 & less css
Html5 & less css
 
HTTP 2.0 - Web Unleashed 2015
HTTP 2.0 - Web Unleashed 2015HTTP 2.0 - Web Unleashed 2015
HTTP 2.0 - Web Unleashed 2015
 
How to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! SiteHow to Speed Up Your Joomla! Site
How to Speed Up Your Joomla! Site
 
DrupalCon Barcelona 2015
DrupalCon Barcelona 2015DrupalCon Barcelona 2015
DrupalCon Barcelona 2015
 
Word press beirut 9th meetup march
Word press beirut 9th meetup   marchWord press beirut 9th meetup   march
Word press beirut 9th meetup march
 

Ähnlich wie Coldfusion with Keith Diehl

Top5 scalabilityissues withappendix
Top5 scalabilityissues withappendixTop5 scalabilityissues withappendix
Top5 scalabilityissues withappendixColdFusionConference
 
10 java script projects full source code
10 java script projects full source code10 java script projects full source code
10 java script projects full source codeLaurence Svekis ✔
 
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...Doris Chen
 
Ajax Performance Tuning and Best Practices
Ajax Performance Tuning and Best PracticesAjax Performance Tuning and Best Practices
Ajax Performance Tuning and Best PracticesDoris Chen
 
Building high performance web apps.
Building high performance web apps.Building high performance web apps.
Building high performance web apps.Arshak Movsisyan
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaksColdFusionConference
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaksdevObjective
 
Web-Performance
Web-PerformanceWeb-Performance
Web-PerformanceWalter Ebert
 
crtical points for customizing Joomla templates
crtical points for customizing Joomla templatescrtical points for customizing Joomla templates
crtical points for customizing Joomla templatesamit das
 
JavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptxJavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptxVivekBaghel30
 
Codegnitorppt
CodegnitorpptCodegnitorppt
Codegnitorpptsreedath c g
 
OSCON 2014: OpenUI5 - The New Responsive Web UI Library
OSCON 2014: OpenUI5 - The New Responsive Web UI LibraryOSCON 2014: OpenUI5 - The New Responsive Web UI Library
OSCON 2014: OpenUI5 - The New Responsive Web UI LibraryAndreas Kunz
 
1 Introduction to PHP Overview This lab walks y.docx
1  Introduction to PHP Overview This lab walks y.docx1  Introduction to PHP Overview This lab walks y.docx
1 Introduction to PHP Overview This lab walks y.docxhoney725342
 
JavaScript DOM - Dynamic interactive Code
JavaScript DOM - Dynamic interactive CodeJavaScript DOM - Dynamic interactive Code
JavaScript DOM - Dynamic interactive CodeLaurence Svekis ✔
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Hugo Hamon
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentationalledia
 
Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101Ted Kulp
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkBo-Yi Wu
 

Ähnlich wie Coldfusion with Keith Diehl (20)

Top5 scalabilityissues withappendix
Top5 scalabilityissues withappendixTop5 scalabilityissues withappendix
Top5 scalabilityissues withappendix
 
Top5 scalabilityissues
Top5 scalabilityissuesTop5 scalabilityissues
Top5 scalabilityissues
 
10 java script projects full source code
10 java script projects full source code10 java script projects full source code
10 java script projects full source code
 
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
 
Ajax Performance Tuning and Best Practices
Ajax Performance Tuning and Best PracticesAjax Performance Tuning and Best Practices
Ajax Performance Tuning and Best Practices
 
Building high performance web apps.
Building high performance web apps.Building high performance web apps.
Building high performance web apps.
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaks
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaks
 
jQuery
jQueryjQuery
jQuery
 
Web-Performance
Web-PerformanceWeb-Performance
Web-Performance
 
crtical points for customizing Joomla templates
crtical points for customizing Joomla templatescrtical points for customizing Joomla templates
crtical points for customizing Joomla templates
 
JavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptxJavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptx
 
Codegnitorppt
CodegnitorpptCodegnitorppt
Codegnitorppt
 
OSCON 2014: OpenUI5 - The New Responsive Web UI Library
OSCON 2014: OpenUI5 - The New Responsive Web UI LibraryOSCON 2014: OpenUI5 - The New Responsive Web UI Library
OSCON 2014: OpenUI5 - The New Responsive Web UI Library
 
1 Introduction to PHP Overview This lab walks y.docx
1  Introduction to PHP Overview This lab walks y.docx1  Introduction to PHP Overview This lab walks y.docx
1 Introduction to PHP Overview This lab walks y.docx
 
JavaScript DOM - Dynamic interactive Code
JavaScript DOM - Dynamic interactive CodeJavaScript DOM - Dynamic interactive Code
JavaScript DOM - Dynamic interactive Code
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentation
 
Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101Geek Moot '09 -- Smarty 101
Geek Moot '09 -- Smarty 101
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC Framework
 

Mehr von Refresh Annapolis Valley

UX Fist Fighting - Designing For Usability
UX Fist Fighting - Designing For UsabilityUX Fist Fighting - Designing For Usability
UX Fist Fighting - Designing For UsabilityRefresh Annapolis Valley
 
STEAM Powered! MakerSpace / FabLab @AcadiaU
STEAM Powered! MakerSpace / FabLab @AcadiaUSTEAM Powered! MakerSpace / FabLab @AcadiaU
STEAM Powered! MakerSpace / FabLab @AcadiaURefresh Annapolis Valley
 
Predictive analytics in the agriculture industry
Predictive analytics in the agriculture industryPredictive analytics in the agriculture industry
Predictive analytics in the agriculture industryRefresh Annapolis Valley
 
Players and Builders: Digital Games and University Learning
Players and Builders: Digital Games and University LearningPlayers and Builders: Digital Games and University Learning
Players and Builders: Digital Games and University LearningRefresh Annapolis Valley
 
Building Startup Communities: Annapolis Valley
Building Startup Communities: Annapolis ValleyBuilding Startup Communities: Annapolis Valley
Building Startup Communities: Annapolis ValleyRefresh Annapolis Valley
 

Mehr von Refresh Annapolis Valley (20)

IP Matters
IP MattersIP Matters
IP Matters
 
3 Essential Wordpress Tips
3 Essential Wordpress Tips3 Essential Wordpress Tips
3 Essential Wordpress Tips
 
Wordpress introduction
Wordpress introductionWordpress introduction
Wordpress introduction
 
UX Fist Fighting - Designing For Usability
UX Fist Fighting - Designing For UsabilityUX Fist Fighting - Designing For Usability
UX Fist Fighting - Designing For Usability
 
STEAM Powered! MakerSpace / FabLab @AcadiaU
STEAM Powered! MakerSpace / FabLab @AcadiaUSTEAM Powered! MakerSpace / FabLab @AcadiaU
STEAM Powered! MakerSpace / FabLab @AcadiaU
 
The Ag + Tech Opportunity
The Ag + Tech OpportunityThe Ag + Tech Opportunity
The Ag + Tech Opportunity
 
Hello world - intro to node js
Hello world - intro to node jsHello world - intro to node js
Hello world - intro to node js
 
Emergent Learning & New Media
Emergent Learning & New MediaEmergent Learning & New Media
Emergent Learning & New Media
 
Just in time mentors
Just in time mentorsJust in time mentors
Just in time mentors
 
ValleyEvents.ca
ValleyEvents.caValleyEvents.ca
ValleyEvents.ca
 
Predictive analytics in the agriculture industry
Predictive analytics in the agriculture industryPredictive analytics in the agriculture industry
Predictive analytics in the agriculture industry
 
Mobile development frameworks
Mobile development frameworksMobile development frameworks
Mobile development frameworks
 
Just in time mentors
Just in time mentorsJust in time mentors
Just in time mentors
 
Players and Builders: Digital Games and University Learning
Players and Builders: Digital Games and University LearningPlayers and Builders: Digital Games and University Learning
Players and Builders: Digital Games and University Learning
 
Building Startup Communities: Annapolis Valley
Building Startup Communities: Annapolis ValleyBuilding Startup Communities: Annapolis Valley
Building Startup Communities: Annapolis Valley
 
New Media Legal Q&A
New Media Legal Q&ANew Media Legal Q&A
New Media Legal Q&A
 
She++
She++She++
She++
 
Valley Community Fiber Network
Valley Community Fiber NetworkValley Community Fiber Network
Valley Community Fiber Network
 
Valley Community Fiber Network
Valley Community Fiber NetworkValley Community Fiber Network
Valley Community Fiber Network
 
Valley Family Fun
Valley Family FunValley Family Fun
Valley Family Fun
 

KĂŒrzlich hochgeladen

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

KĂŒrzlich hochgeladen (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Coldfusion with Keith Diehl

  • 1. How ColdFusion saved me from a week of grunt work Using SQL Server and Coldfusion to generate 600 Word Documents.
  • 2.
  • 3. Buy One Class – Get One Class 50% off until December 15
  • 4. Why ColdFusion? ‱ Quick learning curve ‱ Similar style to HTML with opening and closing tags ‱ Supported by Adobe and frequently updated with new features ‱ ColdFusion isn’t free but also not that expensive ‱ Hosted ColdFusion accounts are about $30 a month ‱ Free Developer Edition
  • 5. Can you guess what this does? <cfloop index="i" from="1" to="10"> <cfoutput> <p> #i# </p> </cfoutput> </cfloop>
  • 6.
  • 7. Can I get this outline as a Word Doc? Ummm
 No.
  • 8.
  • 9. <cfoutput> <h1>#database.h1#</h1> <h2>#database.h2#</h2> #database.classOutline# </cfoutput>
  • 10. I need all of our outlines in Word 
 super.
  • 11. Can ColdFusion come to my rescue? Yup!
  • 12. Step 1: Get the info from the database <cfquery name="allOutlines" datasource="datasource" username="username" password="password"> SELECT ID, Name, Days, H1, ClassOutline, FileName FROM classroomTable ORDER BY Name </cfquery>
  • 13. Step 2: Output class info into a variable <cfoutput query="allOutlines"> <cfsavecontent variable="myDocument"> <html xmlns:w="urn:schemas-microsoft-com:office:word"> <!--- Head tag instructs Word to start up a certain way, specifically in print view. ---> <head> <xml> <w:WordDocument> <w:View>Print</w:View> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> </w:Compatibility> <w:DoNotOptimizeForBrowser/> </w:WordDocument> </xml> </head>
  • 14. Step 3: Write variable into Word Doc <body> <cfoutput> <h1>#allOutlines.Name#</h1> <p>#allOutlines.Days# <cfif allOutlines.Days GT "1">days<cfelse>day</cfif></p> #allOutlines.classOutline# </cfoutput> </body> </html> </cfsavecontent> <cfscript> FileWrite("Server:word-outlines#allOutlines.ID#-#allOutlines.FileName#.doc", "#myDocument#"); </cfscript> </cfoutput>
  • 15. This is my lonely directory
  • 16. my directory with lots of friends