This document discusses 5 common PHP design patterns: Singleton, Factory, Observer, Decorator, and Strategy. For each pattern, it provides a brief definition, examples of when it may be used, and code samples demonstrating its implementation in PHP. The document aims to introduce PHP developers to fundamental design patterns in an accessible way and encourage applying these patterns to improve code organization and reusability. It also stresses that design patterns are language-agnostic solutions to recurring problems and have been used by developers for many years, even if unfamiliar to some PHP programmers.
Enterprise PHP: mappers, models and servicesAaron Saray
One of the greatest failures PHP has is not that it is a bad language, but that it isn't marketed as a good language. Since it's so easy to do it bad, a lot of people do just that. However, there is hope. Businesses ARE using PHP for Enterprise! You just need to apply a solid foundation to the language to get to that Enterprise level.
With our mind on the Enterprise sphere, it's time to take PHP programming to a more advanced level. To get the most out of this talk, you should already be familiar with object oriented programming concepts in PHP. To begin with, I'll talk about the need for a service layer, data mappers, and business object models. Then I'll demonstrate examples of how to do it right. As an added bonus, I'm not going to just tell you why it's best practice and a "good idea" - I'm going to SHOW you. This might be the first time in your life that you realize that changes in architecture, supporting infrastructure, and business requirements don't have to be as painful as you once thought!
With MPS you can design your own extensible DSLs and start using them right away to build end-user applications. Unique technology of projectional editing allows to overcome the limits of language parsers, and build much richer DSL editors, such as ones with tables and diagrams.
Enterprise PHP: mappers, models and servicesAaron Saray
One of the greatest failures PHP has is not that it is a bad language, but that it isn't marketed as a good language. Since it's so easy to do it bad, a lot of people do just that. However, there is hope. Businesses ARE using PHP for Enterprise! You just need to apply a solid foundation to the language to get to that Enterprise level.
With our mind on the Enterprise sphere, it's time to take PHP programming to a more advanced level. To get the most out of this talk, you should already be familiar with object oriented programming concepts in PHP. To begin with, I'll talk about the need for a service layer, data mappers, and business object models. Then I'll demonstrate examples of how to do it right. As an added bonus, I'm not going to just tell you why it's best practice and a "good idea" - I'm going to SHOW you. This might be the first time in your life that you realize that changes in architecture, supporting infrastructure, and business requirements don't have to be as painful as you once thought!
With MPS you can design your own extensible DSLs and start using them right away to build end-user applications. Unique technology of projectional editing allows to overcome the limits of language parsers, and build much richer DSL editors, such as ones with tables and diagrams.
There has been lots of talk on the importance of writing good and manageable code – code whose inherent beauty bring tears to the eyes of the developer that looks at it. This talk is not like that. This talk will focus on the techniques that are used by millions across the world to bring tears to the eyes of the maintaining developer, as well as a graphic stream of profanities.We will investigate some of the most common anti-patterns and half-measures that occur in real live code, and will marvel at the ingenuity and outright creativity necessary to create ugly messes of unmaintainable code that still manages to work for it’s users.
Chia sẻ về Clean Code tại XPDay Vietnam 2016.
Clean Code là gì?
Tại sao phải Clean Code?
Clean Code có khó không?
Một số ví dụ thực tế về áp dụng Clean Code.
Slides for application prototyping workshop on web and mobile application design.
We discussed
- product and project requirements definition
- rationale for wireframes, mockups, prototypes
- functional prototypes vs production sw
- tools: Balsamiq, myBalsamiq, Webflow
- MVP (minimum viable product) implementation in Javascript, HTML/CSS on node.js
To make it simple - Java Interfaces are nothing but APIs, without implementation, as they are nothing but component interfaces. Using Interfaces in the design, one can achieve loose coupling, but declaring the component interfaces and vary the implementations
Behat is a tool that makes behavior driven development (BDD) possible. With BDD, you write human-readable stories that describe the behavior of your Drupal site. These stories can then be auto-tested against your website, whether in the midst of development, or on a live site. And yes, it’s as cool as it sounds!
Behat, if embraced by enough Drupal folks, has the potential to vastly improve the way we build and test Drupal websites. Testing language can be developed by module maintainers, and allow nearly codefree testing to be developed by everyone, as needed, per site.
Behat IS NOT unit testing nor a specification testing tool. Behat is a Scenario-oriented BDD framework with functional testing capabilities as part of a communication process between stake-holders and developers. Think Agile User Stories meets Selenium.
Behat is currently used to test Drupal.org, allowing a variety of coders to work on a single site, and ensure that no existing functionality will break as they add new features. Or as it's migrated from one version to another. Imagine that on your site.
We will review Behat (and Mink, and related code), how to use it with Drupal, Drush, and the existing modules/code to support that. We will demo live testing, and so how easy it is to write tests, with and without code.
This Bootcamp ensures that you not only get the required knowledge to learn web development, it also provides hands-on experience as it encourages you to make your own project in real-time on the final two days. Thus, each of you can come out of this event with a viable project in hand that will be essential to strengthen your resumes
Was asked this question after Code Jugalbandi (codejugalbandi.org) - "Which is the best language that should I pick up next?" But there is a better question - How do I build my language portfolio?"
Templates: Where Should Its Elements Be? In the Template or on Another Module?OutSystems
Who doesn't love the time-saving nature of templates? But building a useful one requires some thought. Mostly, it's just following a recipe, but there are a few things to consider such as a theme's module, and screen applicability. In this session, we will address these points and others regarding the template customization.
We will cover whole of the web development basics comprising of HTML, CSS, JavaScript in this series.
Following are topics useful for any newbie to intermediate who is interested in learning Web Development
Expected Learning:
An effective way for visual regression testing. A robust, tried and tested tool to achieve end to end testing and catching bugs which the human eye may falter to catch.
Abstract:
Breaking CSS is easy, testing it is hard. PhantomCss is a great tool, tried and tested on industry level project which gives us the capability to do automated visual regression testing. It is based on screenshot comparison and has many useful features. Learn via a demo, how we set it up, and how to add a new test by simply adding a json node.
There has been lots of talk on the importance of writing good and manageable code – code whose inherent beauty bring tears to the eyes of the developer that looks at it. This talk is not like that. This talk will focus on the techniques that are used by millions across the world to bring tears to the eyes of the maintaining developer, as well as a graphic stream of profanities.We will investigate some of the most common anti-patterns and half-measures that occur in real live code, and will marvel at the ingenuity and outright creativity necessary to create ugly messes of unmaintainable code that still manages to work for it’s users.
Chia sẻ về Clean Code tại XPDay Vietnam 2016.
Clean Code là gì?
Tại sao phải Clean Code?
Clean Code có khó không?
Một số ví dụ thực tế về áp dụng Clean Code.
Slides for application prototyping workshop on web and mobile application design.
We discussed
- product and project requirements definition
- rationale for wireframes, mockups, prototypes
- functional prototypes vs production sw
- tools: Balsamiq, myBalsamiq, Webflow
- MVP (minimum viable product) implementation in Javascript, HTML/CSS on node.js
To make it simple - Java Interfaces are nothing but APIs, without implementation, as they are nothing but component interfaces. Using Interfaces in the design, one can achieve loose coupling, but declaring the component interfaces and vary the implementations
Behat is a tool that makes behavior driven development (BDD) possible. With BDD, you write human-readable stories that describe the behavior of your Drupal site. These stories can then be auto-tested against your website, whether in the midst of development, or on a live site. And yes, it’s as cool as it sounds!
Behat, if embraced by enough Drupal folks, has the potential to vastly improve the way we build and test Drupal websites. Testing language can be developed by module maintainers, and allow nearly codefree testing to be developed by everyone, as needed, per site.
Behat IS NOT unit testing nor a specification testing tool. Behat is a Scenario-oriented BDD framework with functional testing capabilities as part of a communication process between stake-holders and developers. Think Agile User Stories meets Selenium.
Behat is currently used to test Drupal.org, allowing a variety of coders to work on a single site, and ensure that no existing functionality will break as they add new features. Or as it's migrated from one version to another. Imagine that on your site.
We will review Behat (and Mink, and related code), how to use it with Drupal, Drush, and the existing modules/code to support that. We will demo live testing, and so how easy it is to write tests, with and without code.
This Bootcamp ensures that you not only get the required knowledge to learn web development, it also provides hands-on experience as it encourages you to make your own project in real-time on the final two days. Thus, each of you can come out of this event with a viable project in hand that will be essential to strengthen your resumes
Was asked this question after Code Jugalbandi (codejugalbandi.org) - "Which is the best language that should I pick up next?" But there is a better question - How do I build my language portfolio?"
Templates: Where Should Its Elements Be? In the Template or on Another Module?OutSystems
Who doesn't love the time-saving nature of templates? But building a useful one requires some thought. Mostly, it's just following a recipe, but there are a few things to consider such as a theme's module, and screen applicability. In this session, we will address these points and others regarding the template customization.
We will cover whole of the web development basics comprising of HTML, CSS, JavaScript in this series.
Following are topics useful for any newbie to intermediate who is interested in learning Web Development
Expected Learning:
An effective way for visual regression testing. A robust, tried and tested tool to achieve end to end testing and catching bugs which the human eye may falter to catch.
Abstract:
Breaking CSS is easy, testing it is hard. PhantomCss is a great tool, tried and tested on industry level project which gives us the capability to do automated visual regression testing. It is based on screenshot comparison and has many useful features. Learn via a demo, how we set it up, and how to add a new test by simply adding a json node.
Introduction to Design Patterns and SingletonJonathan Simon
This is Class 1 on a 6 week course I taught on Software Design Patterns.
This course provides an introduction into Design Patterns and delves into the Singleton Pattern.
Class based on "Head First Design Patterns."
Business analysis interview question and answersGaruda Trainings
Business Analysis is the process of understanding business change needs, assessing the impact of those changes, capturing, analyzing and documenting requirements and then supporting the communication and delivery of those requirements with relevant parties.The person who carries out this task is called a business analyst or BA.
Full-day tutorial for the dutch php conference 2011 giving a very quick tour around all the various areas of the ZCE syllabus and some tips on the exam styles
Top 85 business analyst interview questions and answers pdf
free pdf download ebook
business analyst cover letter, business analyst interview questions, business analyst job description, business analyst resume, business analyst skills, how to become business analyst
Basic design & visual arts (Elements of design)Ar.Shakti Nanda
Lecture and presentation on Elements of Design for students of architecture, fine art and photography. semester - I (2015), Sri Sri University, Odisha. 7+1 Elements of design explained (Point, Line, Shapes, Space, Form, Texture, Value, Colour) in details with examples for better understanding. Content compiled from books and internet.
Podczas drugiego XSolve Laboratory (xLab), wspólnie z doświadczonymi programistami XSolve, poznacie dobre praktyki programowania.
Celem warsztatu będzie przejście przez wzorce projektowe i architektoniczne oraz narzędzia wspomagające wytwarzanie oprogramowania odpornego na zmiany.
Poznacie realne problemy z prowadzonych przez nas projektów i na ich przykładach wspólnie przygotujemy SOLIDny kod, działający zgodnie z przyjętymi założeniami, przedstawionymi jako przypadki testowe.
Over the past several years, as the role of the browser has grown, rich desktop-like apps have emerged built entirely in the browser. To enable this movement, a new generation of powerful JavaScript frameworks have emerged including EmberJS, AngularJS, BackboneJS, and React. In this 30 minute crash course on front end frameworks, Bloc co-founder and CTO Dave Paola will cover the history of front end web development, the recent emergence of these new Javascript frameworks, and go over some of the pros and cons for learning them.
We'll hear from Bloc co-founder and CTO Dave Paola and Bloc Developer Christian Schlensker. Prior to Bloc, Dave was a developer at Kontagent, has over 15 years of software development experience, and has founded numerous other companies. Christian comes to Bloc from Pinchit and TAG where he was a developer. Prior to that, Christian was also a graphic designer.
In our experience, beginners are often overwhelmed by buzz words like "HTML5," "JavaScript," and "Ruby." Without an experienced guide, they can spend months going down rabbit-holes drilling into specific languages, and emerge frustrated that they can't build a real website. Dave will start by helping you visualize the front end web development landscape.
Comparing Angular, Ember, Backbone, and React
2
Once you understand the landscape, Dave will introduce the four major front end frameworks that have emerged over the past two years. He'll discuss the pros and cons of learning each one, from the point of view of a beginner. These four frameworks are: AngularJS, EmberJS, BackboneJS, and ReactJS.
Software developers are always using libraries developed by others. The functions of the libraries are from string processing to task queues. Have you ever considered developing your own software library? This talk is to discuss some issues related to "developing software libraries":
1. What are the benefits of developing a library?
2. What are the usual differences between library and non-library code? Have you heard of mechanism code vs policy code?
3. What are the characteristics of a good library?
4. Where can you easily find opportunities to develop libraries? How to start?
Getting started contributing to Apache SparkHolden Karau
Are you interested in contributing to Apache Spark? This workshop and associated slides walk through the basics of contributing to Apache Spark as a developer. This advice is based on my 3 years of contributing to Apache Spark but should not be considered official in any way.
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...Aaron Saray
Object Oriented Programming in enterprise level PHP is incredibly important. In this presentation, concepts like MVC architecture, data mappers, services, and domain and data models will be discussed. Simple demonstrations will be used to show patterns and best practices. In addition, using tools like Doctrine or integration with Salesforce or the AS/400 will also be discussed. There will be an emphasis on the practical application of these techniques as well - this isn't just a theoretical talk! This presentation is great for those just beginning to create enterprise applications as well as those who have had years of experience.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
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.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
5. What we're here to do...
● Talk about what Design Patterns are
○ you don't need a comp-sci phd
● Show you where you've seen them before
● Introduce 5 design patterns
○ real-people-talk descriptions
○ code samples
● Q&A
7. What are Design Patterns?
● Solving the same problem over and over
○ but the 'right' way
○ the old guys got it right
● Why is this important to PHP programmers?
○ PHP is easy to get into
○ We think we'll save the world, or own it?
■ FB is worth billions - and is PHP right?
8. Software Design has Three Parts
● "What"
○ business and functionality
● "How"
○ which design you choose
● "Work"
○ implementation - or using "how"
11. This isn't new...
● Non-PHP Programmers have seen this before
○ I vaguely remember something from college JAVA
● PHP Guys, you've seen this before
○ PEAR DB
○ Zend Registry
○ Zend URI Factory
○ Doctrine DAO
12. The Godfathers
● Gang of Four
○ Erich Gamma
○ Richard Helm
○ Ralph Johnson
○ John Vlissides
13.
14. What Design Patterns are NOT
● Not Plug n Play code
● You can't blindly copy these
● Unproven theory
○ Design Laws?
15. So, before we go on...
● Solving the same problem over and over
○ correctly
● Language agnostic
○ but we're going to focus on PHP
● These are not new - you've used them
● GoF
● Not Copy and Paste
17. #1 - Singleton Pattern
(purists, stop groaning)
● The Singleton Design Pattern is used to restrict the
number of times a specific object can be created to a
single time by providing access to a shared instance of
itself.
● Why might you use this?
○ Db
○ Heavy Front Build
○ Static Content
18. #1 continued
● Sometimes 1 instance isn't right...
○ could restrict to 5 instances
■ pool?
● Was someone next to you groaning?
○ "A proper registry of objects do away with this
pattern. Mrrr mRrrr mrrr! Rabble Rabble!"
○ programmers aren't responsible.
24. #2 - Factory Pattern
● The Factory Design Pattern provides a simple interface
to acquire a new instance of an object while sheltering
the calling code from the steps to determine which base
class is actually instantiated.
● Why might we use this?
○ Inventory system dealing with types of objects
○ View system requesting objects
○ Youtube vs Vimeo URL
27. #3 - Observer Pattern
● The Observer Design pattern facilitates the creation of
objects that watch the state of a targeted functionality
that is uncoupled from the core object.
● Why might we use this
○ Plugins
○ Don't want to modify shared code
○ Licensing
○ Enable / Disable auxiliary functions
32. #4 - Decorator Pattern
● The Decorator Design Pattern is best suited for altering
or "decorating" portions of an existing object's content or
functionality without modifying the structure of the
original object.
● Why might we use this?
○ quick small changes to internal content / values
○ modify user input (filter)
○ pretty output
36. #5 - Strategy Pattern
● The Strategy Design Pattern helps architect an object
that can make use of algorithms in other objects on
demand in lieu of containing the logic itself.
● Why might we use this?
○ reduce code duplication on similar models
○ no re-inventing the wheel
○ quickly add a different process without changing the
base object
■ Ex: YouTube changes the URL format
40. What's next?
● Put this into practice
● Refactor your code / Plan new code
● Learn more design patterns:
○ GoF: http://saray.me/KqqHm1
○ Me: http://saray.me/JIP98B
41. Aaron Saray
Open Source Developer
Milwaukee, WI
Questions?
http://aaronsaray.com
● Questions about @aaronsaray
PHP Design Patterns?
Milwaukee PHP Users Group
http://mkepug.org
@mkepug