SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
Count to 10 and Say Yes
     JOHN HENRY DONOVAN
      Engine Summit 7th June 2011
Introduction
We have all been there. A client emails and makes an unreasonable
feature request. Our first response after the explosion of expletives
would be to say no. But let's count to 10 and rescue the situation.
Lateral thinking
•	For me personally, lateral thinking plays a big part when designing
  architecture for a clients web application/site							
  	
•	It's problem solving at it's lowest common denominator				
  	
•	In ExpressionEngine these problems present themselves all the
  time. I call it problem solving but it is really solution finding	
  	
•	Lateral thinking comes into play the more you become aware of the
  flexibility that EE has to offer. Your solution depends on the tools
  and knowledge you have at hand. It's about taking something you
  know and applying or seeing it in a different way.						
  	
•	Lets examine one of the most common over thought items in EE
{if news_image == "black"}
	
	   	   <img src="/images/black-image.jpg" />
	   	

	   {if:elseif news_image == "red"}
	
	   	   <img src="/images/red-image.jpg" />
	   	
	   {if:elseif news_image == "yellow"}
	
	   	   <img src="/images/yellow-image.jpg" />
	   	

	   {if:elseif news_image == "green"}
	
	   	   <img src="/images/green-image.jpg" />
	   	

	   {if:elseif news_image == "blue"}
	
	   	   <img src="/images/blue-image.jpg" />
	   	

	   {if:else}
	
	   	   <img src="/images/pink-image.jpg" />
	   	

	   {/if}
<img src="/images/{news_image}-image.jpg" />
The Member Export Tool
"We want to be able to export our members into Excel. Looking at
them in EE is all well and good but I want the data available to our
non-webeditors also. We have an a piece of software here in the
office that we want to import our members into"
The Member Export Tool
IMMEDIATE THOUGHTS

•	I just built you a whole website in ExpressionEngine, why do you
 need to do this??
•	There must be an add-on that does what they want
•	Punt the cat down the stairs
The Member Export Tool
LETS THINK ABOUT THIS

•	What are the exact reasons behind the client wanting this
•	There must be a gap in the workflow I created for them
•	It is something out of scope so lets do our best to make his flawless
•	Lets cover all angles
•	Lets turn this into a project that we can charge a client for and be
 happy with the outcome
The Member Export Tool
SPEC

•	Export as a downloadable CSV file
•	Choose today's date
•	Choose a specific date
•	Choose a date range
•	Make it all template based
•	Protect it from the public
http://www.mydomain.com/member-export/index
/member-export/index
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">

		       <title>Member Data Custom Export Tool</title>
		
		       <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
		       <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
		       <script src="/global/js/daterangepicker.jQuery.js"></script>
		
		       <link href="/global/css/ui.daterangepicker.css" type="text/css" rel="stylesheet" />
		       <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/redmond/jquery-ui.css"
type="text/css" rel="stylesheet" />
		
		       <!-- demo-related styles -->
		       <link rel="stylesheet" type="text/css" media="all" href="{stylesheet=_includes/style}" />
		
		       <script type="text/javascript">	
			          $(function(){
		
				                $('input#range').daterangepicker( {
						                         text: 'My Range',
						                         dateStart: '2010-01-01',
						                         dateEnd: 'Today',
						                         dateFormat:'yy-mm-dd',
						                         rangeSplitter:'/',
						                         onClose: function(){
						                         	
                               var actionDate="/member-export/exporter/"+$("input#range").val();
						                         	
                               $("#export-tool").attr("action",actionDate);
						                         	
							                        }
  					               } );
			           });
		       </script>
	
	   </head>
/member-export/index (continued)



		      <body>
		
		      {if logged_out}
		
			         <h1>Bugger off!</h1>
			         <p>You must be a site administrator to view this page.</p>
			
		      {if:else}
		
		      <h1>Member Data Custom Export Tool</h1>
		      <form action="" id="export-tool">
			         <input type="text" value="Choose dates" id="range" />
			         <input class="submit" type="submit" value="Download"/>
		      </form>	
		
		      {/if}
		
	   </body>
</html>
The Member Export Tool
               member-export




                  exporter




    today        specific date   date range



            member-export.csv
/member-export/exporter

	 {if segment_3 == "" AND segment_4 == ""}
		    <h1>Bugger off!</h1>
		    <p>You must be a site administrator to view this page.</p>
	 {/if}
	
	
	 <!-- Check for todays date and show correct embed -->
	 {if segment_3 == "{current_time format='%Y-%m-%d'}" AND segment_4 == ""}
	 {embed="member-export/today" date1="{current_time format='Y-%m-%d'}"}
	 {/if}
	
	 <!-- Check for a specific date and show correct embed -->
	 {if segment_3 != "{current_time format='Y-%m-%d'}" AND segment_4 == "" AND segment_3 != ""}
	 {embed="member-export/specific-date" date1="{segment_3}"}
	 {/if}
	
	
	 <!-- Check for a date range and show correct embed -->
	 {if segment_3 != "" && segment_4 != ""}
	 {embed="member-export/date-range" date1="{segment_3}" date2="{segment_4}"}
	 {/if}
The Member Export Tool
               member-export




                  exporter




    today        specific date   date range



            member-export.csv
/member-export/today

	   {exp:ajw_export sql="SELECT
	   m.member_id AS 'Website Member Id',
	   date_format(from_unixtime(join_date), '%d/%m/%Y') AS 'Join Date',
	   m.username AS 'Username',
	   m.email AS 'Email',
	   m.url AS 'URL',
	   m_field_id_1 AS 'Subscribed to Newsletter'
	   FROM exp_members AS m LEFT JOIN exp_member_data AS d ON d.member_id = m.member_id
	   WHERE date_format(from_unixtime(join_date), '%d-%m-%Y')='{embed:date1}'
	   ORDER BY m.member_id DESC"
	   format="csv" filename="member-export.csv"
	   }
/member-export/specific-date

{exp:ajw_export sql="SELECT
	 m.member_id AS 'Website Member Id',
	 date_format(from_unixtime(join_date), '%d/%m/%Y') AS 'Join Date',
	 m.username AS 'Username',
	 m.email AS 'Email',
	 m.url AS 'URL',
	 m_field_id_1 AS 'Subscribed to Newsletter'
	 FROM exp_members AS m LEFT JOIN exp_member_data AS d ON d.member_id = m.member_id
	 WHERE date_format(from_unixtime(join_date), '%d-%m-%Y')='{embed:date1}'
	 ORDER BY m.member_id DESC"
	 format="csv" filename="member-export.csv"
	 }
/member-export/date-range

	 {exp:ajw_export sql="SELECT
	 m.member_id AS 'Website Member Id',
	 date_format(from_unixtime(join_date), '%d/%m/%Y') AS 'Join Date',
	 m.username AS 'Username',
	 m.email AS 'Email',
	 m.url AS 'URL',
	 m_field_id_1 AS 'Subscribed to Newsletter'
	 FROM exp_members AS m LEFT JOIN exp_member_data AS d ON d.member_id = m.member_id
	 WHERE date_format(from_unixtime(join_date), '%Y-%m-%d') BETWEEN '{embed:date1}' AND
'{embed:date2}'
	 ORDER BY m.member_id DESC"
	 format="csv" filename="member-export.csv"
	 }
http://www.mydomain.com/member-export/index
Screenshare time!
Thanks
JOHN HENRY DONOVAN
    http://johnhenry.ie
      @johnhenry_ie

Weitere ähnliche Inhalte

Was ist angesagt?

20111014 mu me_j_querymobile
20111014 mu me_j_querymobile20111014 mu me_j_querymobile
20111014 mu me_j_querymobileErik Duval
 
WordPress Third Party Authentication
WordPress Third Party AuthenticationWordPress Third Party Authentication
WordPress Third Party AuthenticationAaron Brazell
 
jQuery 1.7 Events
jQuery 1.7 EventsjQuery 1.7 Events
jQuery 1.7 Eventsdmethvin
 
Working with Javascript in Rails
Working with Javascript in RailsWorking with Javascript in Rails
Working with Javascript in RailsSeungkyun Nam
 
WordPress as a Content Management System
WordPress as a Content Management SystemWordPress as a Content Management System
WordPress as a Content Management SystemValent Mustamin
 
Architecture, Auth, and Routing with uiRouter
Architecture, Auth, and Routing with uiRouterArchitecture, Auth, and Routing with uiRouter
Architecture, Auth, and Routing with uiRouterChristopher Caplinger
 
Cakefest 2010: API Development
Cakefest 2010: API DevelopmentCakefest 2010: API Development
Cakefest 2010: API DevelopmentAndrew Curioso
 
Client side development with knockout.js
Client side development with knockout.jsClient side development with knockout.js
Client side development with knockout.jsValdis Iljuconoks
 
Single Page Web Apps with Backbone.js and Rails
Single Page Web Apps with Backbone.js and RailsSingle Page Web Apps with Backbone.js and Rails
Single Page Web Apps with Backbone.js and RailsPrateek Dayal
 
Сергей Иващенко - Meet Magento Ukraine - Цены в Magento 2
Сергей Иващенко - Meet Magento Ukraine - Цены в Magento 2Сергей Иващенко - Meet Magento Ukraine - Цены в Magento 2
Сергей Иващенко - Meet Magento Ukraine - Цены в Magento 2Atwix
 
Devoxx 2014-webComponents
Devoxx 2014-webComponentsDevoxx 2014-webComponents
Devoxx 2014-webComponentsCyril Balit
 
Turn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modulesTurn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modulesjerryorr
 
Introduction to Zend_Pdf
Introduction to Zend_PdfIntroduction to Zend_Pdf
Introduction to Zend_Pdfdennisdc
 
Dicas de palestra
Dicas de palestraDicas de palestra
Dicas de palestraFabio Akita
 
Angular 2.0 Routing and Navigation
Angular 2.0 Routing and NavigationAngular 2.0 Routing and Navigation
Angular 2.0 Routing and NavigationEyal Vardi
 
Laravel admin20170819
Laravel admin20170819Laravel admin20170819
Laravel admin20170819yehlu
 

Was ist angesagt? (18)

20111014 mu me_j_querymobile
20111014 mu me_j_querymobile20111014 mu me_j_querymobile
20111014 mu me_j_querymobile
 
WordPress Third Party Authentication
WordPress Third Party AuthenticationWordPress Third Party Authentication
WordPress Third Party Authentication
 
jQuery 1.7 Events
jQuery 1.7 EventsjQuery 1.7 Events
jQuery 1.7 Events
 
Working with Javascript in Rails
Working with Javascript in RailsWorking with Javascript in Rails
Working with Javascript in Rails
 
WordPress as a Content Management System
WordPress as a Content Management SystemWordPress as a Content Management System
WordPress as a Content Management System
 
Architecture, Auth, and Routing with uiRouter
Architecture, Auth, and Routing with uiRouterArchitecture, Auth, and Routing with uiRouter
Architecture, Auth, and Routing with uiRouter
 
Cakefest 2010: API Development
Cakefest 2010: API DevelopmentCakefest 2010: API Development
Cakefest 2010: API Development
 
Client side development with knockout.js
Client side development with knockout.jsClient side development with knockout.js
Client side development with knockout.js
 
Single Page Web Apps with Backbone.js and Rails
Single Page Web Apps with Backbone.js and RailsSingle Page Web Apps with Backbone.js and Rails
Single Page Web Apps with Backbone.js and Rails
 
jQuery Plugin
jQuery PluginjQuery Plugin
jQuery Plugin
 
Сергей Иващенко - Meet Magento Ukraine - Цены в Magento 2
Сергей Иващенко - Meet Magento Ukraine - Цены в Magento 2Сергей Иващенко - Meet Magento Ukraine - Цены в Magento 2
Сергей Иващенко - Meet Magento Ukraine - Цены в Magento 2
 
Devoxx 2014-webComponents
Devoxx 2014-webComponentsDevoxx 2014-webComponents
Devoxx 2014-webComponents
 
Turn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modulesTurn your spaghetti code into ravioli with JavaScript modules
Turn your spaghetti code into ravioli with JavaScript modules
 
[ WrocLoveRb 2012] user perspective testing using ruby
[ WrocLoveRb 2012] user perspective testing using ruby[ WrocLoveRb 2012] user perspective testing using ruby
[ WrocLoveRb 2012] user perspective testing using ruby
 
Introduction to Zend_Pdf
Introduction to Zend_PdfIntroduction to Zend_Pdf
Introduction to Zend_Pdf
 
Dicas de palestra
Dicas de palestraDicas de palestra
Dicas de palestra
 
Angular 2.0 Routing and Navigation
Angular 2.0 Routing and NavigationAngular 2.0 Routing and Navigation
Angular 2.0 Routing and Navigation
 
Laravel admin20170819
Laravel admin20170819Laravel admin20170819
Laravel admin20170819
 

Andere mochten auch

Enterprise Risk Management
Enterprise Risk ManagementEnterprise Risk Management
Enterprise Risk ManagementClayton Scott
 
Government encourages education loan
Government encourages education loanGovernment encourages education loan
Government encourages education loanMonica Sharma
 
Jquery for post a form
Jquery for post a formJquery for post a form
Jquery for post a formRakesh Kumar
 
Good mobile design of financial industry websites
Good mobile design of financial industry websitesGood mobile design of financial industry websites
Good mobile design of financial industry websitesEdgar Cerecerez
 
Amir33202057 2013 03-17-19-06-07
Amir33202057 2013 03-17-19-06-07Amir33202057 2013 03-17-19-06-07
Amir33202057 2013 03-17-19-06-07Dushyant Kumar
 
From User to Global: A Spectrum of Experience
From User to Global: A Spectrum of ExperienceFrom User to Global: A Spectrum of Experience
From User to Global: A Spectrum of ExperienceRen Pope
 
Small business solutions worldwide
Small business solutions worldwideSmall business solutions worldwide
Small business solutions worldwideSB Zone
 
Automated Test Design: Single Use Vs Reusable Tests
Automated Test Design: Single Use Vs Reusable TestsAutomated Test Design: Single Use Vs Reusable Tests
Automated Test Design: Single Use Vs Reusable TestsJosh Grant
 
Starting up - Lessons learned from the trenches
Starting up - Lessons learned from the trenchesStarting up - Lessons learned from the trenches
Starting up - Lessons learned from the trenchesIstvan Hoka
 
Digital economy with the speed of s4 hana
Digital economy with the speed of s4 hanaDigital economy with the speed of s4 hana
Digital economy with the speed of s4 hanaKyyba Inc.
 
EarthLink Top 5 Questions Asked of EarthLInk Network Engineers 2016
EarthLink Top 5 Questions Asked of EarthLInk Network Engineers 2016EarthLink Top 5 Questions Asked of EarthLInk Network Engineers 2016
EarthLink Top 5 Questions Asked of EarthLInk Network Engineers 2016Eric Hyman
 
4月23日説明会
4月23日説明会4月23日説明会
4月23日説明会tetsuro ooki
 
Business Intelligence: A Financial Perspective
Business Intelligence: A Financial PerspectiveBusiness Intelligence: A Financial Perspective
Business Intelligence: A Financial Perspectiveopensky Data Systems
 
Are you and your computer guy praying 3
Are you and your computer guy praying 3Are you and your computer guy praying 3
Are you and your computer guy praying 3Phil Hutchins
 
Currency matters trading platform vision v1.1
Currency matters trading platform vision v1.1Currency matters trading platform vision v1.1
Currency matters trading platform vision v1.1HBS Technologies
 
HubSpot Activation on BlueCamroo
HubSpot Activation on BlueCamrooHubSpot Activation on BlueCamroo
HubSpot Activation on BlueCamrooMegan Ng
 

Andere mochten auch (20)

Enterprise Risk Management
Enterprise Risk ManagementEnterprise Risk Management
Enterprise Risk Management
 
Government encourages education loan
Government encourages education loanGovernment encourages education loan
Government encourages education loan
 
Jquery for post a form
Jquery for post a formJquery for post a form
Jquery for post a form
 
Good mobile design of financial industry websites
Good mobile design of financial industry websitesGood mobile design of financial industry websites
Good mobile design of financial industry websites
 
Amir33202057 2013 03-17-19-06-07
Amir33202057 2013 03-17-19-06-07Amir33202057 2013 03-17-19-06-07
Amir33202057 2013 03-17-19-06-07
 
Q1.0 [Quiz Quirks]
Q1.0 [Quiz Quirks]Q1.0 [Quiz Quirks]
Q1.0 [Quiz Quirks]
 
From User to Global: A Spectrum of Experience
From User to Global: A Spectrum of ExperienceFrom User to Global: A Spectrum of Experience
From User to Global: A Spectrum of Experience
 
Ship It!
Ship It!Ship It!
Ship It!
 
Small business solutions worldwide
Small business solutions worldwideSmall business solutions worldwide
Small business solutions worldwide
 
Automated Test Design: Single Use Vs Reusable Tests
Automated Test Design: Single Use Vs Reusable TestsAutomated Test Design: Single Use Vs Reusable Tests
Automated Test Design: Single Use Vs Reusable Tests
 
Digitalisierung mit UNIT4
Digitalisierung mit UNIT4Digitalisierung mit UNIT4
Digitalisierung mit UNIT4
 
Starting up - Lessons learned from the trenches
Starting up - Lessons learned from the trenchesStarting up - Lessons learned from the trenches
Starting up - Lessons learned from the trenches
 
Digital economy with the speed of s4 hana
Digital economy with the speed of s4 hanaDigital economy with the speed of s4 hana
Digital economy with the speed of s4 hana
 
EarthLink Top 5 Questions Asked of EarthLInk Network Engineers 2016
EarthLink Top 5 Questions Asked of EarthLInk Network Engineers 2016EarthLink Top 5 Questions Asked of EarthLInk Network Engineers 2016
EarthLink Top 5 Questions Asked of EarthLInk Network Engineers 2016
 
4月23日説明会
4月23日説明会4月23日説明会
4月23日説明会
 
Business Intelligence: A Financial Perspective
Business Intelligence: A Financial PerspectiveBusiness Intelligence: A Financial Perspective
Business Intelligence: A Financial Perspective
 
Are you and your computer guy praying 3
Are you and your computer guy praying 3Are you and your computer guy praying 3
Are you and your computer guy praying 3
 
Serveau software f
Serveau software fServeau software f
Serveau software f
 
Currency matters trading platform vision v1.1
Currency matters trading platform vision v1.1Currency matters trading platform vision v1.1
Currency matters trading platform vision v1.1
 
HubSpot Activation on BlueCamroo
HubSpot Activation on BlueCamrooHubSpot Activation on BlueCamroo
HubSpot Activation on BlueCamroo
 

Ähnlich wie Count to 10 and Say Yes

Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoRob Bontekoe
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshowsblackman
 
Once Source to Rule Them All
Once Source to Rule Them AllOnce Source to Rule Them All
Once Source to Rule Them AllDavid Yeiser
 
Design Patterns for JavaScript Web Apps - JavaScript Conference 2012 - OPITZ ...
Design Patterns for JavaScript Web Apps - JavaScript Conference 2012 - OPITZ ...Design Patterns for JavaScript Web Apps - JavaScript Conference 2012 - OPITZ ...
Design Patterns for JavaScript Web Apps - JavaScript Conference 2012 - OPITZ ...OPITZ CONSULTING Deutschland
 
Python Code Camp for Professionals 1/4
Python Code Camp for Professionals 1/4Python Code Camp for Professionals 1/4
Python Code Camp for Professionals 1/4DEVCON
 
Rails GUI Development with Ext JS
Rails GUI Development with Ext JSRails GUI Development with Ext JS
Rails GUI Development with Ext JSMartin Rehfeld
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...IT Event
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and ImprovedTimothy Fisher
 
Pengenalan AngularJS
Pengenalan AngularJSPengenalan AngularJS
Pengenalan AngularJSEdi Santoso
 
More Secrets of JavaScript Libraries
More Secrets of JavaScript LibrariesMore Secrets of JavaScript Libraries
More Secrets of JavaScript Librariesjeresig
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup PerformanceJustin Cataldo
 
Your Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages SuckYour Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages SuckAnthony Montalbano
 
Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015Phil Leggetter
 
关于 Html5 那点事
关于 Html5 那点事关于 Html5 那点事
关于 Html5 那点事Sofish Lin
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012crokitta
 

Ähnlich wie Count to 10 and Say Yes (20)

Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshow
 
Once Source to Rule Them All
Once Source to Rule Them AllOnce Source to Rule Them All
Once Source to Rule Them All
 
Taking your Web App for a walk
Taking your Web App for a walkTaking your Web App for a walk
Taking your Web App for a walk
 
Design Patterns for JavaScript Web Apps - JavaScript Conference 2012 - OPITZ ...
Design Patterns for JavaScript Web Apps - JavaScript Conference 2012 - OPITZ ...Design Patterns for JavaScript Web Apps - JavaScript Conference 2012 - OPITZ ...
Design Patterns for JavaScript Web Apps - JavaScript Conference 2012 - OPITZ ...
 
Python Code Camp for Professionals 1/4
Python Code Camp for Professionals 1/4Python Code Camp for Professionals 1/4
Python Code Camp for Professionals 1/4
 
Rails GUI Development with Ext JS
Rails GUI Development with Ext JSRails GUI Development with Ext JS
Rails GUI Development with Ext JS
 
Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...Max Voloshin - "Organization of frontend development for products with micros...
Max Voloshin - "Organization of frontend development for products with micros...
 
Site optimization
Site optimizationSite optimization
Site optimization
 
Xxx
XxxXxx
Xxx
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
 
Pengenalan AngularJS
Pengenalan AngularJSPengenalan AngularJS
Pengenalan AngularJS
 
More Secrets of JavaScript Libraries
More Secrets of JavaScript LibrariesMore Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup Performance
 
Your Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages SuckYour Custom WordPress Admin Pages Suck
Your Custom WordPress Admin Pages Suck
 
Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015
 
关于 Html5 那点事
关于 Html5 那点事关于 Html5 那点事
关于 Html5 那点事
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
 
Borrador del blog
Borrador del blogBorrador del blog
Borrador del blog
 

Kürzlich hochgeladen

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Kürzlich hochgeladen (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

Count to 10 and Say Yes

  • 1. Count to 10 and Say Yes JOHN HENRY DONOVAN Engine Summit 7th June 2011
  • 2.
  • 3. Introduction We have all been there. A client emails and makes an unreasonable feature request. Our first response after the explosion of expletives would be to say no. But let's count to 10 and rescue the situation.
  • 4. Lateral thinking • For me personally, lateral thinking plays a big part when designing architecture for a clients web application/site • It's problem solving at it's lowest common denominator • In ExpressionEngine these problems present themselves all the time. I call it problem solving but it is really solution finding • Lateral thinking comes into play the more you become aware of the flexibility that EE has to offer. Your solution depends on the tools and knowledge you have at hand. It's about taking something you know and applying or seeing it in a different way. • Lets examine one of the most common over thought items in EE
  • 5. {if news_image == "black"} <img src="/images/black-image.jpg" /> {if:elseif news_image == "red"} <img src="/images/red-image.jpg" /> {if:elseif news_image == "yellow"} <img src="/images/yellow-image.jpg" /> {if:elseif news_image == "green"} <img src="/images/green-image.jpg" /> {if:elseif news_image == "blue"} <img src="/images/blue-image.jpg" /> {if:else} <img src="/images/pink-image.jpg" /> {/if}
  • 7. The Member Export Tool "We want to be able to export our members into Excel. Looking at them in EE is all well and good but I want the data available to our non-webeditors also. We have an a piece of software here in the office that we want to import our members into"
  • 8. The Member Export Tool IMMEDIATE THOUGHTS • I just built you a whole website in ExpressionEngine, why do you need to do this?? • There must be an add-on that does what they want • Punt the cat down the stairs
  • 9. The Member Export Tool LETS THINK ABOUT THIS • What are the exact reasons behind the client wanting this • There must be a gap in the workflow I created for them • It is something out of scope so lets do our best to make his flawless • Lets cover all angles • Lets turn this into a project that we can charge a client for and be happy with the outcome
  • 10. The Member Export Tool SPEC • Export as a downloadable CSV file • Choose today's date • Choose a specific date • Choose a date range • Make it all template based • Protect it from the public
  • 11.
  • 12.
  • 14. /member-export/index <!DOCTYPE HTML> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <title>Member Data Custom Export Tool</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script> <script src="/global/js/daterangepicker.jQuery.js"></script> <link href="/global/css/ui.daterangepicker.css" type="text/css" rel="stylesheet" /> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/redmond/jquery-ui.css" type="text/css" rel="stylesheet" /> <!-- demo-related styles --> <link rel="stylesheet" type="text/css" media="all" href="{stylesheet=_includes/style}" /> <script type="text/javascript"> $(function(){ $('input#range').daterangepicker( { text: 'My Range', dateStart: '2010-01-01', dateEnd: 'Today', dateFormat:'yy-mm-dd', rangeSplitter:'/', onClose: function(){ var actionDate="/member-export/exporter/"+$("input#range").val(); $("#export-tool").attr("action",actionDate); } } ); }); </script> </head>
  • 15. /member-export/index (continued) <body> {if logged_out} <h1>Bugger off!</h1> <p>You must be a site administrator to view this page.</p> {if:else} <h1>Member Data Custom Export Tool</h1> <form action="" id="export-tool"> <input type="text" value="Choose dates" id="range" /> <input class="submit" type="submit" value="Download"/> </form> {/if} </body> </html>
  • 16. The Member Export Tool member-export exporter today specific date date range member-export.csv
  • 17. /member-export/exporter {if segment_3 == "" AND segment_4 == ""} <h1>Bugger off!</h1> <p>You must be a site administrator to view this page.</p> {/if} <!-- Check for todays date and show correct embed --> {if segment_3 == "{current_time format='%Y-%m-%d'}" AND segment_4 == ""} {embed="member-export/today" date1="{current_time format='Y-%m-%d'}"} {/if} <!-- Check for a specific date and show correct embed --> {if segment_3 != "{current_time format='Y-%m-%d'}" AND segment_4 == "" AND segment_3 != ""} {embed="member-export/specific-date" date1="{segment_3}"} {/if} <!-- Check for a date range and show correct embed --> {if segment_3 != "" && segment_4 != ""} {embed="member-export/date-range" date1="{segment_3}" date2="{segment_4}"} {/if}
  • 18. The Member Export Tool member-export exporter today specific date date range member-export.csv
  • 19. /member-export/today {exp:ajw_export sql="SELECT m.member_id AS 'Website Member Id', date_format(from_unixtime(join_date), '%d/%m/%Y') AS 'Join Date', m.username AS 'Username', m.email AS 'Email', m.url AS 'URL', m_field_id_1 AS 'Subscribed to Newsletter' FROM exp_members AS m LEFT JOIN exp_member_data AS d ON d.member_id = m.member_id WHERE date_format(from_unixtime(join_date), '%d-%m-%Y')='{embed:date1}' ORDER BY m.member_id DESC" format="csv" filename="member-export.csv" }
  • 20. /member-export/specific-date {exp:ajw_export sql="SELECT m.member_id AS 'Website Member Id', date_format(from_unixtime(join_date), '%d/%m/%Y') AS 'Join Date', m.username AS 'Username', m.email AS 'Email', m.url AS 'URL', m_field_id_1 AS 'Subscribed to Newsletter' FROM exp_members AS m LEFT JOIN exp_member_data AS d ON d.member_id = m.member_id WHERE date_format(from_unixtime(join_date), '%d-%m-%Y')='{embed:date1}' ORDER BY m.member_id DESC" format="csv" filename="member-export.csv" }
  • 21. /member-export/date-range {exp:ajw_export sql="SELECT m.member_id AS 'Website Member Id', date_format(from_unixtime(join_date), '%d/%m/%Y') AS 'Join Date', m.username AS 'Username', m.email AS 'Email', m.url AS 'URL', m_field_id_1 AS 'Subscribed to Newsletter' FROM exp_members AS m LEFT JOIN exp_member_data AS d ON d.member_id = m.member_id WHERE date_format(from_unixtime(join_date), '%Y-%m-%d') BETWEEN '{embed:date1}' AND '{embed:date2}' ORDER BY m.member_id DESC" format="csv" filename="member-export.csv" }
  • 23.
  • 25. Thanks JOHN HENRY DONOVAN http://johnhenry.ie @johnhenry_ie