SlideShare a Scribd company logo
1 of 35
Download to read offline
Firebug Extension for
  AJAX Development



Zend_Log
• If you’re not using Firebug when coding for
  the web, you’re missing out...
• And making it harder on yourself...
• For no good reason
• Debugger
• Real-time HTML/DOM editing
• Real-time CSS editing
• Request/Response/Network Analysis
• Interactive Javascript
• Great Plug-ins, like FirePHP and YSlow
• Getting Started
• getfirebug.com
• Inactive
• Active
Interactive Console
• Network Analysis
Drill-down
• Real-time HTML editing
• Was not working for me when I tried it,
  but I have done it before. It should work.
• Real-time CSS editing
• Also not working when I put this together
• But, normally they work and are
  AWESOME!
Interactive JS Debugger
Breakpoints

Watch List

  Variable
 Inspector

   Stack
 Inspector
FirePHP
              Firebug Extension for
               AJAX Development




• Getting Started
• www.firephp.org
FirePHP
               Firebug Extension for
                AJAX Development




• Two parts:
• Browser plug-in
• PHP API
FirePHP
               Firebug Extension for
                AJAX Development

• Standalone Library
• Zend_Log_Writer_Firebug
• Zend_Db_Profiler_Firebug
• Other Integrations: Agavi, BIGACE,
  CakePHP, CodeIgniter, Drupal,
  ExpressionEngine, eZ, Joomla, Kohana,
  Nette Framework, PEAR, PRADO, Probus,
  Project Zero, REDAXO, Seagull
Standalone Library
Standalone Library
That’s the beginning



               Member variable filters
Log your classes, but hide sensitive data automatically
Exception Handling
Exception Stack Trace
Error Handler
Assertion Handler




 Assert fail still shows warning...
Message Groups
Log Tables of Data
Variable Dumping
  (var_dump ++)

                      Where is it???
In the Server part of the Net request:
Zend Framework

• Doesn’t require you to download the
  standard library
• Protocol is built into Zend Framework
• Use it with Zend_Log
• Use it with Zend_Db_Profiler_Firebug
Zend Framework
Zend Framework

• Zend_Log works using the Observer
  pattern
• Log writers are added to Zend_Log
• Each writer can log different levels, to
  different places, using different methods
• i.e., file, database, Twitter, or FirePHP
Zend Framework
• Create your writer
• Add the writer to the Zend_Log object
• Do this in your bootstrap before dispatch
Zend Framework

• Zend_Log lets you set your own logging
  levels and map those to FirePHP log types
• $logger->addPriority('ULTRA', 8);
• $writer->setPriorityStyle(8, 'TRACE');
• $logger->ultra('Ultra Message - With
  trace');
Zend_Log

• Logging exceptions happens automatically
• Just pass the Exception object and FirePHP
  will show the exception and stack trace
• Zend_Log, like log4j, lets you set up
  multiple writers, with global or local filters,
  formats, etc
• One log call can result in many logs in many
  places if that’s what you want
How it all works
• FirePHP sends data using HTTP headers
• It detects FirePHP running. If it’s not there,
  it sends nothing
• Sniff the wire in IE. Nothing there.
With great power...

• FirePHP logging is very powerful and very
  useful.
• If someone is looking at your site with
  FirePHP installed, they will see your
  messages... unless...
A couple of options
• Turn off logging in production
 • $writer->setEnabled(false);
• Turn off logging in production, but enable if
  users who should be able to see this stuff
  are logged in
• Allows developers to “debug” in
  production
• “Debugging” in production requires smart
  logging
Smart Logging
• Logs can help you track down exactly what
  happened
• Or they can be confusing and useless
• File logging is a must when you need to
  track down problems after they happened
  and reproducing the problem is difficult,
  expensive, or impossible
FirePHP Logging
• FirePHP logs are temporal
• More detail can be useful for FirePHP logs
  than would be practical with file logs
• Zend_Log means you don’t need to make
  more than one log call
• Use filters/priorities to determine if you
  want FirePHP, file logging, or both
Questions?

• Email: slideshare@davidstockton.com
• http://framework.zend.com/manual/en/
• http://getfirebug.com/
• http://firephp.org/

More Related Content

What's hot

Automating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and PerlAutomating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and Perl
nohuhu
 
Chef + AWS + CodeIgniter
Chef + AWS + CodeIgniterChef + AWS + CodeIgniter
Chef + AWS + CodeIgniter
ciconf
 

What's hot (20)

GraphQL-PHP: Dos and don'ts
GraphQL-PHP: Dos and don'tsGraphQL-PHP: Dos and don'ts
GraphQL-PHP: Dos and don'ts
 
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
 
How to Supercharge your PHP Web API
How to Supercharge your PHP Web APIHow to Supercharge your PHP Web API
How to Supercharge your PHP Web API
 
Automating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and PerlAutomating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and Perl
 
Chef + AWS + CodeIgniter
Chef + AWS + CodeIgniterChef + AWS + CodeIgniter
Chef + AWS + CodeIgniter
 
Caching strategies with lucee
Caching strategies with luceeCaching strategies with lucee
Caching strategies with lucee
 
WordPress Speed & Performance from Pagely's CTO
WordPress Speed & Performance from Pagely's CTOWordPress Speed & Performance from Pagely's CTO
WordPress Speed & Performance from Pagely's CTO
 
Using Apache Camel as AKKA
Using Apache Camel as AKKAUsing Apache Camel as AKKA
Using Apache Camel as AKKA
 
Lucee writing your own debugging template
Lucee   writing your own debugging templateLucee   writing your own debugging template
Lucee writing your own debugging template
 
Lucee writing your own debugging template
Lucee   writing your own debugging templateLucee   writing your own debugging template
Lucee writing your own debugging template
 
Why ruby and rails
Why ruby and railsWhy ruby and rails
Why ruby and rails
 
PHP, LAMP Stack & WordPress
PHP, LAMP Stack & WordPressPHP, LAMP Stack & WordPress
PHP, LAMP Stack & WordPress
 
Dev-Friendly Ops
Dev-Friendly OpsDev-Friendly Ops
Dev-Friendly Ops
 
Nodeconf npm 2011
Nodeconf npm 2011Nodeconf npm 2011
Nodeconf npm 2011
 
YAPC::EU 2015 - Perl Conferences
YAPC::EU 2015 - Perl ConferencesYAPC::EU 2015 - Perl Conferences
YAPC::EU 2015 - Perl Conferences
 
Jenkins2: How Jenkins 2 works and how to automate it
Jenkins2: How Jenkins 2 works and how to automate itJenkins2: How Jenkins 2 works and how to automate it
Jenkins2: How Jenkins 2 works and how to automate it
 
Day 8 - jRuby
Day 8 - jRubyDay 8 - jRuby
Day 8 - jRuby
 
Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014
 
Ansible API
Ansible APIAnsible API
Ansible API
 
Flink in action
Flink in actionFlink in action
Flink in action
 

Similar to FireBug And FirePHP

Gearman: A Job Server made for Scale
Gearman: A Job Server made for ScaleGearman: A Job Server made for Scale
Gearman: A Job Server made for Scale
Mike Willbanks
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Howard Greenberg
 
Let's creating your own PHP (tejimaya version)
Let's creating your own PHP (tejimaya version)Let's creating your own PHP (tejimaya version)
Let's creating your own PHP (tejimaya version)
Kousuke Ebihara
 

Similar to FireBug And FirePHP (20)

Logging Application Behavior to MongoDB
Logging Application Behavior to MongoDBLogging Application Behavior to MongoDB
Logging Application Behavior to MongoDB
 
Sentry (SF Python, Feb)
Sentry (SF Python, Feb)Sentry (SF Python, Feb)
Sentry (SF Python, Feb)
 
Gearman: A Job Server made for Scale
Gearman: A Job Server made for ScaleGearman: A Job Server made for Scale
Gearman: A Job Server made for Scale
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
 
Conditional Logging Considered Harmful - Sean Reilly
Conditional Logging Considered Harmful - Sean ReillyConditional Logging Considered Harmful - Sean Reilly
Conditional Logging Considered Harmful - Sean Reilly
 
HyperDB, MySQL Performance, & Flavors of MySQL
HyperDB, MySQL Performance, & Flavors of MySQLHyperDB, MySQL Performance, & Flavors of MySQL
HyperDB, MySQL Performance, & Flavors of MySQL
 
CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011
 
Top ten-list
Top ten-listTop ten-list
Top ten-list
 
Java Logging
Java LoggingJava Logging
Java Logging
 
PHP Frameworks Review - Mar 19 2015
PHP Frameworks Review - Mar 19 2015PHP Frameworks Review - Mar 19 2015
PHP Frameworks Review - Mar 19 2015
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Let's creating your own PHP (tejimaya version)
Let's creating your own PHP (tejimaya version)Let's creating your own PHP (tejimaya version)
Let's creating your own PHP (tejimaya version)
 
Codeigniter framework
Codeigniter framework Codeigniter framework
Codeigniter framework
 
7 Top PHP Development Tools For PHP Coding
7 Top PHP Development Tools For PHP Coding7 Top PHP Development Tools For PHP Coding
7 Top PHP Development Tools For PHP Coding
 
Php
PhpPhp
Php
 
They why behind php frameworks
They why behind php frameworksThey why behind php frameworks
They why behind php frameworks
 
ReactPHP + Symfony
ReactPHP + SymfonyReactPHP + Symfony
ReactPHP + Symfony
 
appengine ja night #25 Google App Engine for PHP (English)
appengine ja night #25 Google App Engine for PHP (English)appengine ja night #25 Google App Engine for PHP (English)
appengine ja night #25 Google App Engine for PHP (English)
 
Php internal architecture
Php internal architecturePhp internal architecture
Php internal architecture
 
Log4e
Log4eLog4e
Log4e
 

More from David Stockton

Increasing code quality with code reviews (poetry version)
Increasing code quality with code reviews (poetry version)Increasing code quality with code reviews (poetry version)
Increasing code quality with code reviews (poetry version)
David Stockton
 

More from David Stockton (19)

Phone calls and sms from php
Phone calls and sms from phpPhone calls and sms from php
Phone calls and sms from php
 
The Art of Transduction
The Art of TransductionThe Art of Transduction
The Art of Transduction
 
Using queues and offline processing to help speed up your application
Using queues and offline processing to help speed up your applicationUsing queues and offline processing to help speed up your application
Using queues and offline processing to help speed up your application
 
Intermediate OOP in PHP
Intermediate OOP in PHPIntermediate OOP in PHP
Intermediate OOP in PHP
 
Building APIs with Apigilty and Zend Framework 2
Building APIs with Apigilty and Zend Framework 2Building APIs with Apigilty and Zend Framework 2
Building APIs with Apigilty and Zend Framework 2
 
API All the Things!
API All the Things!API All the Things!
API All the Things!
 
Intermediate OOP in PHP
Intermediate OOP in PHPIntermediate OOP in PHP
Intermediate OOP in PHP
 
Hacking sites for fun and profit
Hacking sites for fun and profitHacking sites for fun and profit
Hacking sites for fun and profit
 
Beginning OOP in PHP
Beginning OOP in PHPBeginning OOP in PHP
Beginning OOP in PHP
 
Common design patterns in php
Common design patterns in phpCommon design patterns in php
Common design patterns in php
 
Intermediate oop in php
Intermediate oop in phpIntermediate oop in php
Intermediate oop in php
 
Grokking regex
Grokking regexGrokking regex
Grokking regex
 
Hacking sites for fun and profit
Hacking sites for fun and profitHacking sites for fun and profit
Hacking sites for fun and profit
 
Hacking sites for fun and profit
Hacking sites for fun and profitHacking sites for fun and profit
Hacking sites for fun and profit
 
Increasing code quality with code reviews (poetry version)
Increasing code quality with code reviews (poetry version)Increasing code quality with code reviews (poetry version)
Increasing code quality with code reviews (poetry version)
 
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSHTame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
 
Mercurial Distributed Version Control
Mercurial Distributed Version ControlMercurial Distributed Version Control
Mercurial Distributed Version Control
 
Regular expressions and php
Regular expressions and phpRegular expressions and php
Regular expressions and php
 
PHP 5 Magic Methods
PHP 5 Magic MethodsPHP 5 Magic Methods
PHP 5 Magic Methods
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+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...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
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...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
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
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
+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...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

FireBug And FirePHP

  • 1. Firebug Extension for AJAX Development Zend_Log
  • 2. • If you’re not using Firebug when coding for the web, you’re missing out... • And making it harder on yourself... • For no good reason
  • 3. • Debugger • Real-time HTML/DOM editing • Real-time CSS editing • Request/Response/Network Analysis • Interactive Javascript • Great Plug-ins, like FirePHP and YSlow
  • 4. • Getting Started • getfirebug.com • Inactive • Active
  • 6.
  • 9. • Real-time HTML editing • Was not working for me when I tried it, but I have done it before. It should work. • Real-time CSS editing • Also not working when I put this together • But, normally they work and are AWESOME!
  • 10. Interactive JS Debugger Breakpoints Watch List Variable Inspector Stack Inspector
  • 11. FirePHP Firebug Extension for AJAX Development • Getting Started • www.firephp.org
  • 12. FirePHP Firebug Extension for AJAX Development • Two parts: • Browser plug-in • PHP API
  • 13. FirePHP Firebug Extension for AJAX Development • Standalone Library • Zend_Log_Writer_Firebug • Zend_Db_Profiler_Firebug • Other Integrations: Agavi, BIGACE, CakePHP, CodeIgniter, Drupal, ExpressionEngine, eZ, Joomla, Kohana, Nette Framework, PEAR, PRADO, Probus, Project Zero, REDAXO, Seagull
  • 16. That’s the beginning Member variable filters Log your classes, but hide sensitive data automatically
  • 20. Assertion Handler Assert fail still shows warning...
  • 23. Variable Dumping (var_dump ++) Where is it??? In the Server part of the Net request:
  • 24. Zend Framework • Doesn’t require you to download the standard library • Protocol is built into Zend Framework • Use it with Zend_Log • Use it with Zend_Db_Profiler_Firebug
  • 26. Zend Framework • Zend_Log works using the Observer pattern • Log writers are added to Zend_Log • Each writer can log different levels, to different places, using different methods • i.e., file, database, Twitter, or FirePHP
  • 27. Zend Framework • Create your writer • Add the writer to the Zend_Log object • Do this in your bootstrap before dispatch
  • 28. Zend Framework • Zend_Log lets you set your own logging levels and map those to FirePHP log types • $logger->addPriority('ULTRA', 8); • $writer->setPriorityStyle(8, 'TRACE'); • $logger->ultra('Ultra Message - With trace');
  • 29. Zend_Log • Logging exceptions happens automatically • Just pass the Exception object and FirePHP will show the exception and stack trace • Zend_Log, like log4j, lets you set up multiple writers, with global or local filters, formats, etc • One log call can result in many logs in many places if that’s what you want
  • 30. How it all works • FirePHP sends data using HTTP headers • It detects FirePHP running. If it’s not there, it sends nothing • Sniff the wire in IE. Nothing there.
  • 31. With great power... • FirePHP logging is very powerful and very useful. • If someone is looking at your site with FirePHP installed, they will see your messages... unless...
  • 32. A couple of options • Turn off logging in production • $writer->setEnabled(false); • Turn off logging in production, but enable if users who should be able to see this stuff are logged in • Allows developers to “debug” in production • “Debugging” in production requires smart logging
  • 33. Smart Logging • Logs can help you track down exactly what happened • Or they can be confusing and useless • File logging is a must when you need to track down problems after they happened and reproducing the problem is difficult, expensive, or impossible
  • 34. FirePHP Logging • FirePHP logs are temporal • More detail can be useful for FirePHP logs than would be practical with file logs • Zend_Log means you don’t need to make more than one log call • Use filters/priorities to determine if you want FirePHP, file logging, or both
  • 35. Questions? • Email: slideshare@davidstockton.com • http://framework.zend.com/manual/en/ • http://getfirebug.com/ • http://firephp.org/