SlideShare una empresa de Scribd logo
1 de 21
CODE FASTER AND
SMARTER PHP WITH IDES
   LIKE NETBEANS
  Jeremy Clarke • http://jeremyclarke.org
               Download these slides:
      http://slideshare.net/jeremyclarke
WHO IS JEREMY CLARKE?


• Communications   Studies at Concordia
 University.

• HTML+CSS     since 2003

• Montreal WordPress
                  Community/
 WordCamp organizer.
IDES: OVERVIEW
• Basic   code editors

• IDEs    as a concept

• NetBeans    and IDE features

• IDEs    and WordPress development

• IDE   issues and justifications

• PHPXref
BASIC CODE EDITORS
                                        Tabs
• Texteditor with         Syntax
 extra tools.           highlighting

• Lightweight   and
                           Line
 simple.                 Numbers
• Often many
 features, but always
 some missing.            Complex
                        Find/Replace

* Sublime Text 2 (pseudo-IDE) http://sublimetext.com/dev
3 PRINCIPLES OF IDES
• Handle    everything

 • The IDE should be the only application you need, all tools
  are built-in and integrated together.

• Understand      the code

 • Codeis parsed and modelled by the IDE so it can help you
  make decisions and correct your mistakes.

• Extreme     customizability

 • By   programmers, for programmers. Every aspect is optional.
NETBEANS OVERVIEW
• Written             by Sun in and for use with Java.

• Open            Source/Free Software.

• Similar
        to competitors Eclipse,
   Komodo, PHPStorm, Aptana etc.

• Has  hundreds of features, not all
   implemented perfectly*.                                                                http://netbeans.org/
   *Projects, tabs, split-window, multiple-window, navigator, bookmarks, code folding, macros, snippets, debugging, breakpoints,
  database access, SVN integration, syntax coloring (configurable), PHP error detection, code hints, code completion, PHPDoc
generation, inline PHPDoc display, quick-open file, find usages of function/variable, go to function, go to line, PHPUnit testing, IDE
  log, rename function/variable, configurable keyboard shortcuts, synonymous keyboard shortcuts. Infinitely more, I don’t even
                                                    pretend to know them all.
PROJECT-ORIENTED
• IDEs   open projects instead of single files.

•   A project includes all files used for a single site.

• The   whole project is parsed together, the IDE
    understands how the functions and variables interact.

• All  forms of search and auto-complete apply to the
    entire project.

• This   includes all of core WordPress, plugins and themes.
SYNTAX INTELLIGENCE
• Configurable   syntax color
 themes.                                      Matching variables
                               Syntax error
                                                 highlighted
• Visualhints for brackets
 and control structure
 pairs (if/endif;)

• Highlightother uses of
 variable and functions

• PHP/HTML/CSS     syntax
 error checking.
CODE COMPLETION
• Guesses object, function   Possible functions/arguments
 and variable names as
 you type.                              PHPDoc of selection
• Like
     spellcheck for code.
 Saves time and avoids
 errors.

• Setsup arguments to be
 quickly filled in.

• Exposes documentation
 as you code!
PHPDOC INTEGRATION
• PHPDoc    is default documentation for PHP, used by core WP.

• Reading
        (autocomplete) AND writing PHPDoc is built into
 NetBeans.

• Automatically   generate PHPDoc for new functions.




    Automatically-                   Filled-in function
  generated PHPDoc                    documentation
SOURCE NAVIGATION
• Navigator pane shows full list of
 functions in current file.

• Go to symbol: Jump to a function/
 class, guesses as you type.

• Go to file: Open any file in the
 project, guesses as you type.

• Go  to declaration: Select a function
 and a keyboard shortcut jumps you
 to it’s definition in the source,
 opening a new file if necessary.
DEEP SEARCH
    Find in Project                    Find Usages
Search entire project for any    List every time a function
string, results sorted by file.   or variable is used.
SUBVERSION INTEGRATION
• Changed/added/removed        lines highlighted as you edit.

• View   visual diff of changes to files.

• Update, commit     and revert files without leaving the app.




Note: SVN interface is awkward. Use keyboard shortcuts.
CUSTOMIZATION
• All   keyboard shortcuts are editable.

• Tweakcolor schemes and install
 new ones (e.g. Solarized).

• Enable/disable
               syntax checking,
 hints, autocompletion etc.

• Create
       custom templates and
 macros (e.g. ending semicolon).

• Settings
         import/export for backing                Download my color scheme:
 up and sharing color schemes,             simianuprising.com/netbeans-color-scheme

 macros, and keyboard shortcuts.
SIMPLIFY WINDOW LAYOUT
• Default
        view is cluttered, Close all panes you don’t
 immediately need.

• Re-enable panes if/when you learn how to use them, most
 features are better used as keyboard shortcuts.




              BAD                       GOOD
WORDPRESS AND IDES
• Entire WordPress  codebase (core, plugins, themes) is parsed
 by IDE, not just your code.

• Easiest   way to dive into core/plugin code and figure out how it
 works.

• Autocompletemeans not having to memorize every strange,
 legacy WP/PHP function and it’s argument order.

• PHPDoc   of core WP means all of WordPress has an
 integrated manual as you type.
IDE ISSUES
• Slower    to boot up and requires a powerful CPU+RAM.

• Simpler   text editors offer most features without extra weight.

• Many   unwanted/unnecessary features clutter up the interface.

• More   complicated software means steeper learning curve.
IDE JUSTIFICATIONS
• Professional
             photo, video and even accounting software is
 system-intensive. Programming can similarly benefit from giving
 your CPU a workout.

• Unwanted   features can be disabled or hidden to simplify UI.
 Core intelligence hides until needed.

• Programming  is complicated and hard. We should expect a
 learning curve on software that actually thinks for us.
APPENDIX 0: PHPXREF
• Perl
    script generates HTML that
 summarizes any PHP codebase.

• http://phpxref.sourceforge.net/

• Links
      for all variables and functions
 showing where they are defined
 and used.

• Generateyour own, or use one of
                                        * http://phpxref.ftwr.co.uk/wordpress
 many WordPress Xref ’s hosted
 online*.

• Next    best thing to a real IDE.
QUESTIONS?
CODE FASTER AND
SMARTER PHP WITH IDES
   LIKE NETBEANS
Jeremy Clarke • http://jeremyclarke.org

                  Creative Commons Share Alike
                   http://creativecommons.org/licenses/by-sa/3.0/



                 Download these slides:
        http://slideshare.net/jeremyclarke

Más contenido relacionado

Último

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 

Último (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Code faster and smarter PHP with IDEs Like Netbeans

  • 1. CODE FASTER AND SMARTER PHP WITH IDES LIKE NETBEANS Jeremy Clarke • http://jeremyclarke.org Download these slides: http://slideshare.net/jeremyclarke
  • 2. WHO IS JEREMY CLARKE? • Communications Studies at Concordia University. • HTML+CSS since 2003 • Montreal WordPress Community/ WordCamp organizer.
  • 3. IDES: OVERVIEW • Basic code editors • IDEs as a concept • NetBeans and IDE features • IDEs and WordPress development • IDE issues and justifications • PHPXref
  • 4. BASIC CODE EDITORS Tabs • Texteditor with Syntax extra tools. highlighting • Lightweight and Line simple. Numbers • Often many features, but always some missing. Complex Find/Replace * Sublime Text 2 (pseudo-IDE) http://sublimetext.com/dev
  • 5. 3 PRINCIPLES OF IDES • Handle everything • The IDE should be the only application you need, all tools are built-in and integrated together. • Understand the code • Codeis parsed and modelled by the IDE so it can help you make decisions and correct your mistakes. • Extreme customizability • By programmers, for programmers. Every aspect is optional.
  • 6. NETBEANS OVERVIEW • Written by Sun in and for use with Java. • Open Source/Free Software. • Similar to competitors Eclipse, Komodo, PHPStorm, Aptana etc. • Has hundreds of features, not all implemented perfectly*. http://netbeans.org/ *Projects, tabs, split-window, multiple-window, navigator, bookmarks, code folding, macros, snippets, debugging, breakpoints, database access, SVN integration, syntax coloring (configurable), PHP error detection, code hints, code completion, PHPDoc generation, inline PHPDoc display, quick-open file, find usages of function/variable, go to function, go to line, PHPUnit testing, IDE log, rename function/variable, configurable keyboard shortcuts, synonymous keyboard shortcuts. Infinitely more, I don’t even pretend to know them all.
  • 7. PROJECT-ORIENTED • IDEs open projects instead of single files. • A project includes all files used for a single site. • The whole project is parsed together, the IDE understands how the functions and variables interact. • All forms of search and auto-complete apply to the entire project. • This includes all of core WordPress, plugins and themes.
  • 8. SYNTAX INTELLIGENCE • Configurable syntax color themes. Matching variables Syntax error highlighted • Visualhints for brackets and control structure pairs (if/endif;) • Highlightother uses of variable and functions • PHP/HTML/CSS syntax error checking.
  • 9. CODE COMPLETION • Guesses object, function Possible functions/arguments and variable names as you type. PHPDoc of selection • Like spellcheck for code. Saves time and avoids errors. • Setsup arguments to be quickly filled in. • Exposes documentation as you code!
  • 10. PHPDOC INTEGRATION • PHPDoc is default documentation for PHP, used by core WP. • Reading (autocomplete) AND writing PHPDoc is built into NetBeans. • Automatically generate PHPDoc for new functions. Automatically- Filled-in function generated PHPDoc documentation
  • 11. SOURCE NAVIGATION • Navigator pane shows full list of functions in current file. • Go to symbol: Jump to a function/ class, guesses as you type. • Go to file: Open any file in the project, guesses as you type. • Go to declaration: Select a function and a keyboard shortcut jumps you to it’s definition in the source, opening a new file if necessary.
  • 12. DEEP SEARCH Find in Project Find Usages Search entire project for any List every time a function string, results sorted by file. or variable is used.
  • 13. SUBVERSION INTEGRATION • Changed/added/removed lines highlighted as you edit. • View visual diff of changes to files. • Update, commit and revert files without leaving the app. Note: SVN interface is awkward. Use keyboard shortcuts.
  • 14. CUSTOMIZATION • All keyboard shortcuts are editable. • Tweakcolor schemes and install new ones (e.g. Solarized). • Enable/disable syntax checking, hints, autocompletion etc. • Create custom templates and macros (e.g. ending semicolon). • Settings import/export for backing Download my color scheme: up and sharing color schemes, simianuprising.com/netbeans-color-scheme macros, and keyboard shortcuts.
  • 15. SIMPLIFY WINDOW LAYOUT • Default view is cluttered, Close all panes you don’t immediately need. • Re-enable panes if/when you learn how to use them, most features are better used as keyboard shortcuts. BAD GOOD
  • 16. WORDPRESS AND IDES • Entire WordPress codebase (core, plugins, themes) is parsed by IDE, not just your code. • Easiest way to dive into core/plugin code and figure out how it works. • Autocompletemeans not having to memorize every strange, legacy WP/PHP function and it’s argument order. • PHPDoc of core WP means all of WordPress has an integrated manual as you type.
  • 17. IDE ISSUES • Slower to boot up and requires a powerful CPU+RAM. • Simpler text editors offer most features without extra weight. • Many unwanted/unnecessary features clutter up the interface. • More complicated software means steeper learning curve.
  • 18. IDE JUSTIFICATIONS • Professional photo, video and even accounting software is system-intensive. Programming can similarly benefit from giving your CPU a workout. • Unwanted features can be disabled or hidden to simplify UI. Core intelligence hides until needed. • Programming is complicated and hard. We should expect a learning curve on software that actually thinks for us.
  • 19. APPENDIX 0: PHPXREF • Perl script generates HTML that summarizes any PHP codebase. • http://phpxref.sourceforge.net/ • Links for all variables and functions showing where they are defined and used. • Generateyour own, or use one of * http://phpxref.ftwr.co.uk/wordpress many WordPress Xref ’s hosted online*. • Next best thing to a real IDE.
  • 21. CODE FASTER AND SMARTER PHP WITH IDES LIKE NETBEANS Jeremy Clarke • http://jeremyclarke.org Creative Commons Share Alike http://creativecommons.org/licenses/by-sa/3.0/ Download these slides: http://slideshare.net/jeremyclarke

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n