This document discusses add-on development for ExpressionEngine. It covers what add-ons are, including extensions, modules, and plugins. It discusses necessary development skills like PHP, SQL, and HTML/CSS. It provides guidance on planning add-on development through researching, mapping features, designing templates and control panels. The document also covers writing code through following best practices, debugging, and improving performance. Developers are encouraged to turn on debugging, review queries, consider caching, remove deprecated code, and ask for help when needed.
Add-On Development: EE Expects that Every Developer will do his Dutyreedmaniac
Add-Ons are what make ExpressionEngine the flexible powerhouse that it is today. Being able to write your own simple plugins or incredibly expansive modules allows you to mold ExpressionEngine to nearly any task that your website might require. However, with that power comes a great responsibility to insure that your code is not slowing down the entire site or unduly stressing the server through bad code architecture.
There are simple tools already built into ExpressionEngine and PHP that you can use to see precisely what your Add-On is doing during page processing and where it might be doing more work than is absolutely necessary. Every developer should use these to optimize their work from the very beginning of development, prior to release. This workshop will explain these tools and how you can use them effectively. It will also delve deeper into optimization techniques and tricks that will keep your code light and clean, while finding a balance between functionality and performance.
Get started with building your first theme. We will cover the necessary files to get started, key functions to know, as well as some other solutions to jump start your development.
WordCamp NEO 2016 presentation "Custom Responsive Theme Workshop" by David Brattoli
While we could use many different frameworks, premium and free themes to build our sites, I have found you need a truly custom framework to build a base to build new themes quickly to meet your project needs. This method to create a framework and then to create a child theme for the look of the site, will allow you build future sites quickly and efficiently. The session will cover why we choose this method and framework, the challenges we faced, how we tackled the challenge, and what we ended up building to solve the problem. I'll also reveal the pitfalls we discovered and how we overcame those as well.
Coding samples can be found here:
http://bit.ly/wceno-crtw-samples
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesJer Clarke
These are the slides from my talk at WordCamp Montreal 2013.
Talk description:
==Keep your code organized! Templates, functions.php and custom plugins==
If you've written PHP for a theme you should know by now that you need to keep anything complicated outside the templates. Functions.php can be a good place for this but there are many pitfalls and considerations you should keep in mind before (over)using it. This talk will examine your choices for organizing the code that makes up a WP site, ensuring you have plugin code in plugins and theme code in themes (it's not hard!).
How to Prepare a WordPress Theme for Public ReleaseDavid Yeiser
A presentation for WordCamp Louisville on how to prepare a theme for distribution. It mainly follows the theme review process outlined at WordPress.org. It also discusses reasons to release a theme and briefly highlights ways to stand out from the crowd.
Add-On Development: EE Expects that Every Developer will do his Dutyreedmaniac
Add-Ons are what make ExpressionEngine the flexible powerhouse that it is today. Being able to write your own simple plugins or incredibly expansive modules allows you to mold ExpressionEngine to nearly any task that your website might require. However, with that power comes a great responsibility to insure that your code is not slowing down the entire site or unduly stressing the server through bad code architecture.
There are simple tools already built into ExpressionEngine and PHP that you can use to see precisely what your Add-On is doing during page processing and where it might be doing more work than is absolutely necessary. Every developer should use these to optimize their work from the very beginning of development, prior to release. This workshop will explain these tools and how you can use them effectively. It will also delve deeper into optimization techniques and tricks that will keep your code light and clean, while finding a balance between functionality and performance.
Get started with building your first theme. We will cover the necessary files to get started, key functions to know, as well as some other solutions to jump start your development.
WordCamp NEO 2016 presentation "Custom Responsive Theme Workshop" by David Brattoli
While we could use many different frameworks, premium and free themes to build our sites, I have found you need a truly custom framework to build a base to build new themes quickly to meet your project needs. This method to create a framework and then to create a child theme for the look of the site, will allow you build future sites quickly and efficiently. The session will cover why we choose this method and framework, the challenges we faced, how we tackled the challenge, and what we ended up building to solve the problem. I'll also reveal the pitfalls we discovered and how we overcame those as well.
Coding samples can be found here:
http://bit.ly/wceno-crtw-samples
Keep Your Code Organized! WordCamp Montreal 2013 Presentation slidesJer Clarke
These are the slides from my talk at WordCamp Montreal 2013.
Talk description:
==Keep your code organized! Templates, functions.php and custom plugins==
If you've written PHP for a theme you should know by now that you need to keep anything complicated outside the templates. Functions.php can be a good place for this but there are many pitfalls and considerations you should keep in mind before (over)using it. This talk will examine your choices for organizing the code that makes up a WP site, ensuring you have plugin code in plugins and theme code in themes (it's not hard!).
How to Prepare a WordPress Theme for Public ReleaseDavid Yeiser
A presentation for WordCamp Louisville on how to prepare a theme for distribution. It mainly follows the theme review process outlined at WordPress.org. It also discusses reasons to release a theme and briefly highlights ways to stand out from the crowd.
Novell Teaming offers excellent functionality out of the box. It also offers limitless possibilities for customization based on your organization's needs. Attend this session to learn how easily you can create custom branding elements for your Novell Teaming environment—and how you can create extensions from Novell Teaming to other applications. You'll receive step-by-step instructions on the process from Novell Teaming engineers and experts.
Mit Oracle Application Express entwickelt man im Browser Applikationen, die im Browser laufen. Damit ist der Browser eines der wichtigsten Werkzeuge eines APEX Entwicklers. Beim Entwickeln mit SQL oder PL/SQL nutzen wir die reiche Funktionalitäten von IDEs (SQL Developer, TOAD, PLSQL Developer, ...) um produktive zu arbeiten. Das bauen von Webapplikationen beschränkt sich aber nicht die Datenbank. Man wird auch mit Techniken wie HTML, CSS und JavaScript konfrontiert.
Obwohl APEX die Komplexität, die diese Techniken mit sich mitbringen, zu einem großen Teil mit dem deklarativen Aufbau des Frameworks verbergen kann, desto mehr man mit APEX entwickelt, desto mehr wird man gezwungen sich mit der darunterliegenden Technik zu befassen. Das ist der Moment, dass man als Entwickler den Browser nicht allein als Applikations-Fenster, sondern auch als modernes Entwickeltool einsetzt.
Debugging, Testen, Performance Tuning, dies sind nur rein paar Möglichkeiten die durch den Browser unterstützt werden. In meiner Präsentation werde ich die wichtigsten Funktionen und Features moderner Browser, die für uns APEX Entwickler das Leben einfacher machen, erläutern und demonstrieren.
Browser tools that make web development easierAlan Seiden
A departure from my usual PHP talks, I discussed browser-based tools that help with client-side tasks such as performance diagnostics, page analysis, HTTP flow analysis, the ability to step through javascript, and much more. Developers can work smarter with downloadable browser tools.
Introduction to Paul Irish and Divya Manian's HTML5 Boilerplate project. HTML5 Boilerplate helps you to quickly get up and running with front-end web project.
There is new slide for this at http://www.slideshare.net/catchinternet/contributing-to-wordpress-theme-review-at-wordpressorg
Guide to Start WordPress Theme Review. Useful for WordPress Theme Developers, wannabe WordPress Theme Developers and wannabe WordPress Theme Reviewer
Learn the basics of building WordPress themes. This presentation is appropriate for people who are somewhat familiar with PHP and databases.
To Learn More, check out http://techliminal.com
Originally this was proposed as "88 Slides About 44 Modules" but it was scaled back to "44 Slides About 22 Modules". It was meant as a quick and dirty introduction to small niche / utility modules that people may not have been aware of (with a couple hardcore useful dev modules mixed in.)
EECI 2010 - The Power of ExpressionEngine's Dynamic TemplatesFortySeven Media
Join us as we explore EE's various template and variable types. We'll find out the best ways to use and implement them through a plethora of real-world examples. Put the power back in your hands with dynamic templates.
Alfresco Share provides a rich platform for further development, allowing you to tweak and customize to your heart’s content, using only lightweight scripting and templating. But with great power, comes great responsibility, as they say. So this session looks at what it means to customize Share, before discussing how best to go about it, with tips and tricks based on real-world examples.
Novell Teaming offers excellent functionality out of the box. It also offers limitless possibilities for customization based on your organization's needs. Attend this session to learn how easily you can create custom branding elements for your Novell Teaming environment—and how you can create extensions from Novell Teaming to other applications. You'll receive step-by-step instructions on the process from Novell Teaming engineers and experts.
Mit Oracle Application Express entwickelt man im Browser Applikationen, die im Browser laufen. Damit ist der Browser eines der wichtigsten Werkzeuge eines APEX Entwicklers. Beim Entwickeln mit SQL oder PL/SQL nutzen wir die reiche Funktionalitäten von IDEs (SQL Developer, TOAD, PLSQL Developer, ...) um produktive zu arbeiten. Das bauen von Webapplikationen beschränkt sich aber nicht die Datenbank. Man wird auch mit Techniken wie HTML, CSS und JavaScript konfrontiert.
Obwohl APEX die Komplexität, die diese Techniken mit sich mitbringen, zu einem großen Teil mit dem deklarativen Aufbau des Frameworks verbergen kann, desto mehr man mit APEX entwickelt, desto mehr wird man gezwungen sich mit der darunterliegenden Technik zu befassen. Das ist der Moment, dass man als Entwickler den Browser nicht allein als Applikations-Fenster, sondern auch als modernes Entwickeltool einsetzt.
Debugging, Testen, Performance Tuning, dies sind nur rein paar Möglichkeiten die durch den Browser unterstützt werden. In meiner Präsentation werde ich die wichtigsten Funktionen und Features moderner Browser, die für uns APEX Entwickler das Leben einfacher machen, erläutern und demonstrieren.
Browser tools that make web development easierAlan Seiden
A departure from my usual PHP talks, I discussed browser-based tools that help with client-side tasks such as performance diagnostics, page analysis, HTTP flow analysis, the ability to step through javascript, and much more. Developers can work smarter with downloadable browser tools.
Introduction to Paul Irish and Divya Manian's HTML5 Boilerplate project. HTML5 Boilerplate helps you to quickly get up and running with front-end web project.
There is new slide for this at http://www.slideshare.net/catchinternet/contributing-to-wordpress-theme-review-at-wordpressorg
Guide to Start WordPress Theme Review. Useful for WordPress Theme Developers, wannabe WordPress Theme Developers and wannabe WordPress Theme Reviewer
Learn the basics of building WordPress themes. This presentation is appropriate for people who are somewhat familiar with PHP and databases.
To Learn More, check out http://techliminal.com
Originally this was proposed as "88 Slides About 44 Modules" but it was scaled back to "44 Slides About 22 Modules". It was meant as a quick and dirty introduction to small niche / utility modules that people may not have been aware of (with a couple hardcore useful dev modules mixed in.)
EECI 2010 - The Power of ExpressionEngine's Dynamic TemplatesFortySeven Media
Join us as we explore EE's various template and variable types. We'll find out the best ways to use and implement them through a plethora of real-world examples. Put the power back in your hands with dynamic templates.
Alfresco Share provides a rich platform for further development, allowing you to tweak and customize to your heart’s content, using only lightweight scripting and templating. But with great power, comes great responsibility, as they say. So this session looks at what it means to customize Share, before discussing how best to go about it, with tips and tricks based on real-world examples.
Professional Help for PowerShell ModulesJune Blender
Slides from talk at PowerShell Conference Europe 2016 (@PSConfEu). In this deck:
-- Why write PowerShell help?
-- How help for modules differs from cmdlet help
-- Mechanics:
---- Comment-based help vs. XML help
---- About topic format requirements and best practices
-- About Help Content
---- How to start an About topic
---- How to organize an About topic.
---- About topic checklist
-- How to support online help
Want to learn how to use Selenium from the ground up? This presentation will show you how to start from nothing and build out a well factored, maintainable, resilient, and parallelized set of tests that will run locally, on a Continuous Integration server, and in the cloud. These tests will not only work well, but exercise relevant functionality that matters to the business.
Sauce Labs hosted a Selenium bootcamp webinar with guest speaker Dave Haeffner. This presentation will give you a basis for the detail given in Dave's like titled E-book and get you started with Selenium.
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
1. Add-On Development:
EE Expects that Every
Developer will do his Duty
Paul Burdick, Lead Developer
solspace
http://solspace.com/downloads/eeci2009/presentation.txt
2. Summary of Talk
• What are Add-Ons?
• The Three Types of Add-Ons in EE
• Overview of Accessories in EE 2.x
• Add-On Development Skills
• Developing Add-Ons in ExpressionEngine
• Writing Code
• Debugging & Improving Performance
3. Summary of Talk
• What are Add-Ons?
• The Three Types of Add-Ons in EE
• Overview of Accessories in EE 2.x
• Add-On Development Skills
• Developing Add-Ons in ExpressionEngine
• Writing Code
• Debugging & Improving Performance
7. • Extends the base functionality of
ExpressionEngine
• Allows developers to interpose their own
code into EE's codebase.
• Restrained by where hooks are placed in
the code and what arguments are sent with
the extension call
8. • More and more Third Party developers are
adding hooks to their own code, allowing
extensions for Third Party Add-Ons. Pretty
darn cool.
• Typically no DB tables, but there are always
exceptions
• Settings Form CP
9. function settings()
{
$settings = array();
$settings['butter'] = "Quite Tasty";
$settings['buttery'] = array('r', array('yes' => "yes", 'no' => "no"), 'no');
// Complex:
// [variable_name] => array(type, values, default value)
// variable_name => short name for setting and key for language file variable
// types: t - textarea
// r - radio buttons
// s - select
// ms - multiselect
// f - function calls
// values: can be array (r, s, ms), string (t), function name (f)
// default: name of array member, string, nothing
//
// Simple:
// [variable_name] => 'Butter'
// Text input, with 'Butter' as the default.
return $settings;
}
14. • No settings, no tables, no CP, no install
• Text manipulation either via Template Tags
or Custom Fields
• Or, functionality "plugged" into your
Templates.
16. Examples of Extensions
• Edit Tab AJAX - AJAX enabled search for
Control Panel's Edit area
• FieldFrame - Easily create new custom field
types for ExpressionEngine.
• LG Add Sitename - Site Label in upper left of
your CP
17. Examples of Modules
• Structure - Create Static and Listing pages,
editable via a tree sitemap
• Tag - Folksonomy functionality for Weblog and
Gallery Entries
• User - EE's Member Functionality in Templates
18. Examples of Plugins
• EE Gravatar - Global Avatars for site members
• Image Sizer - Resizes and caches images on the
fly
• Markdown - Markdown formatting in EE
Custom Weblog Fields
20. • Accessories provide tools, references, or
abilities at the bottom of your EE Control
Panel in ExpressionEngine 2.0
• No CP page for each Accessory
• Can have own DB tables
• View files! Lovely lovely View files!
24. • Duh...
• PHP: Hypertext Preprocessor. You really
have to love recursive acronyms.
• Server side programming language.
Processed at runtime.
• No Compiling! Viewable Source!
25. • PHP files contain code, but they can also
have HTML, JS, XML, et cetera inside them.
• Extremely widespread on hosting
environments.
28. • Required for advanced Add-On development
• Active Record only *helps* build queries
29. MySQL
• Popular, open-source, relational database.
• Simple to setup and administrate.
• Fast for reading, decent for writing
• Dominant on hosted environments
30. MySQL Learning References
• MySQL Docs: http://dev.mysql.com/doc/
• Buy a book. ( O'Reilly Books are well done )
• Learn JOINs
• http://www.informit.com/articles/article.aspx?
p=30875&seqNum=5
• http://en.wikipedia.org/wiki/Join_(SQL)
32. View Files
• Essentially HTML files with PHP inside for
outputting data
• Part of ExpressionEngine 2.0 by default
• Available in ExpressionEngine1.x using Hermes
or custom include code
34. User Interfaces
• Build in static HTML, CSS, JS files before converting
to View files.
• Easier development.
• Easier bug testing.
• No need to create data variables/objects first.
• UI developer does not need to understand PHP.
36. • jQuery available in EE 1.x via an extension
(not enabled by default)
• jQuery available in EE 2.x with no additional
work
• Relatively easy to add other libraries or
custom JS if need be.
37. global $EXT;
if ( ! isset($EXT->version_numbers['Cp_jquery']))
{
return $OUT->show_user_error('general', $LANG->line('cp_jquery_requred')));
}
41. Research
• Previous Approaches
• Required Features
• Alternative Approach in ExpressionEngine?
• Can this be done in EE in any other way?
• Is a Module required? Could an Extension do it?
• Could a Plugin output weblog data in the way you
need?
42. Tell a Story
• How will Person A do Task 1?
• Question Previous Approaches.
• Is X Really the BEST way to do it?
• What Would Apple Do?
• Eliminate Steps, Make Process Intuitive.
• Follow your instincts.
43. Map Out Features
• Major
• Functionality required for module to serve
its market/purpose
• Minor
• Not Necessarily Required.
• Features are cuttable for a 1.0 release.
• Icing
• For specific clients or users
• Think and consider them
44. Database Structure
• Tables for your Major and Minor Features
• Normalization: Eliminate Data Duplication
• http://en.wikipedia.org/wiki/Database_normalization
• Indexes!
• Specific, Sensical Field Names
• 'event_title' vs 'event'
• 'event_short_name' vs 'name'
45. Tags Structure
• The Naming and Functionality of Template tags
• For Each Tag
• Describe
• Name
• Parameters
• Variable Pairs and Single Variables
• Consider this a precursor to your documentation
46. Tags Structure: Describe
• Descriptions for each Tag, Parameter, and Variable.
• Explain what each one does.
47. Tags Structure: Tag Name
• Simple and Obvious
• No Abbreviations, No Ambiguity
• {exp:module:g_entries} vs
{exp:module:gallery_entries}
48. Tags Structure: Parameters
• Prefix?
• form:id="" or form_id=""
• Use prefixes to break up parameters into
"groups" of functionality.
• notify:admin_email=""
• notify:user_email=""
49. Tags Structure: Variables
• No Ambiguity, No Abbreviations
• {group}{/group} vs
{category_group}{/category_group}
• {title} vs {event_title}
• Prevent collisions in nested tags
• Underscores recommended
50. Tags Structure:
Show to Other People
• Get Feedback
• Revise until the Spec feels solid.
53. Control Panel:
Break Up into Sections
• Data Adding, Deleting, and Manipulation
• Create/Modify/Delete Items
• Ex: Calendar, Wiki, Forum
• Build only one main interface
• Preferences/Settings/Permissions
• Per Site, Per Weblog, Per Member Group, Per X
• Actions
• Ex: Recount, Re-Cache, Clear Caches
• Version Number and Documentation Link
55. Control Panel: Design
• Build an HTML/CSS/JS mockup first
• Put into a View file
• PHP into HTML, Not HTML into PHP
• documentDOM in Hermes - Builds HTML in
PHP, specifically form fields
• Ignore IE6
• EE 2.x no longer supports it
• Solspace no longer supports it
• Neither should you.
56. Time Wasted on IE6
Making Software Support IE6 vs. Upgrading Users
57. Time Wasted on IE6
Making Software Support IE6 vs. Upgrading Users
92% 8%
60. Follow the EllisLab
Development Guidelines!
http://expressionengine.com/docs/development/guidelines/index.html
61. "Prolific and informative commenting
using proper comment style"
• We want to know your thinking! Why this way?
• Expect people to learn from your code.
• Helps you understand your *own* logic
62. Sanitize and Escape Everything
• Be Paranoid! Nothing is Immune! Constant
Vigilance!
• If you DID NOT set or get data yourself, assume
it is tainted, even EE variables
• If you DID set or get yourself, but not within ten
lines of code, assume it is tainted.
• Sanitize and Escape at the Query
• No Security Exceptions for SuperAdmins
63. Abstraction
• Use Twice, Write Once
• Create Libraries!
• Reduces Work and Mistakes
• Purpose of Hermes
65. Simplify: Reduce Code Work
• Do the Least Amount of Effort to produce results
• Bail Out First, Work Second
• Invalid variable type? Bail.
• No Permissions? Bail.
• Error? Bail.
• Don’t Do Serious Work Until You Know You Have
Work To Do
66. Simplify: Reduce DB Work
• Performing Multiple Queries are OK.
• Validate, Check Pagination, Then Retrieve Data
67. Simplify: Models
• Abstract common SELECTs into separate methods
• INSERTs/UPDATEs for a DB Table in one method
• Hermes has per Add-On model caching caching
built into it.
• Speaking of caching...
69. Weblog Module Class
• Very powerful code, no need to write your own.
• Code was written so that it could be used elsewhere.
• Returns Results based on tag parameters
• You can modify $TMPL->tagparams!
74. Turn on PHP Debugging
• Insure Display Errors Setting is On in php.ini
• Error Reporting is E_ALL
• No PHP Errors! Ever!
• Remove All Deprecated PHP Functions.
75. Turn on SQL Queries
• Admin => System Preferences => Output and Debugging
• Queries appear on both CP and User side of EE
• Review Queries
• Check the Add-On's CP
• Extensions: Check areas of usage in CP
• Check EVERY single tag in a Template.
• Eliminate Duplicates!
76. Turn on SQL Queries
• Are Certain Queries Necessary on EVERY load?
• Settings/Preferences
• Caching (Checks, Re-caching, Emptying)
• Statistics
• Evaluate Queries for Performance
• Run in phpMyAdmin or similar
• Try Making the Query More Efficient
• Add a WHERE clause on indexed field
• Remove Extraneous JOINs when possible
77. Turn on SQL Queries
• De-Normalization.
• Duplicating Data or Grouping It to Reduce Work
• http://en.wikipedia.org/wiki/Denormalization
• Best example? Statistics: Hit count.
• Abstract methods for data consistency (i.e. correct
values)
• Learn About Optimizing MySQL
• MySQL Performance Blog
• http://mysqlperformanceblog.com
79. Turn on Template Debugging
• Admin => System Preferences => Output and Debugging
• Outputs Elapsed Time during Add-On processing
• What Code is Taking the Longest to Process?
• $TMPL->log_item()
• $TMPL->log_item('Freeform Module: Run Query');
• Disable Processing
• Disable Parameter ( disable="feng_shui" )
• Auto-detect Variables and Remove Queries and
Processing
84. Deprecated Code
• Consider using trigger_error()
• trigger_error('Favorites Module: The Favorites Count
tag has been deprecated. Use the Entry Count tag
instead');
• Don't Leave It Around Forever, Discontinue Support,
Then Remove It
85. Ask for Help
• Plenty of EE, PHP, SQL Knowledge out there. Use it.
• Often just discussing a problem will lead to a solution.