Adding Dependency Injection to Legacy ApplicationsSam Hennessy
Dependency Injection (DI) is a fantastic technique, but what if you what to use dependency injection in your legacy application. Fear not! As someone who as done this very thing, I will show how you can successful and incrementally add DI to any application. I will present a number of recipes and solutions to common problems and give a tour of the various PHP DI projects and how they can help.
All projects start with a lot of enthusiasm. As many projects grow the technical debt gets bigger and the enthusiasm gets less. Almost any developer can develop a great project, but the key is maintaining an ever evolving application with minimal technical debt without loosing enthusiasm.
During this talk you will be taken on the journey of application design. The starting point is an application that looks fine but contains lots of potential pitfalls. We will address the problems and solve them with beautiful design. We end up with testable, nicely separated software with a clear intention.
Un gioco in cui vincono tutti o due piccioni con una fava ;)
Lavorare rivolti alla creazione di valore per il cliente e da questo ottenere una libreria quasi pronta per essere pubblicata
Silex is a brand new PHP 5.3 micro framework built on top of the Symfony2 de decoupled components. In this session, we will discover how to build and deploy powerful REST web services with such a micro framework and its embedded tools.
The first part of this talk will introduce the basics of the REST architecture. We fill focus on the main concepts of REST like HTTP methods, URIs and open formats like XML and JSON.
Then, we will discover how to deploy REST services using most of interesting Silex tools like database abstraction layer, template engine and input validation. We will also look at unit and functional testing frameworks with PHPUnit and HTTP caching with Edge Side Includes and Varnish support to improve performances.
Build Solutions Not Puzzles - Write Sensible Code. Write code that can clearly communicate your intension. A few guideline and tips for writing readable and maintainable code.
Adding Dependency Injection to Legacy ApplicationsSam Hennessy
Dependency Injection (DI) is a fantastic technique, but what if you what to use dependency injection in your legacy application. Fear not! As someone who as done this very thing, I will show how you can successful and incrementally add DI to any application. I will present a number of recipes and solutions to common problems and give a tour of the various PHP DI projects and how they can help.
All projects start with a lot of enthusiasm. As many projects grow the technical debt gets bigger and the enthusiasm gets less. Almost any developer can develop a great project, but the key is maintaining an ever evolving application with minimal technical debt without loosing enthusiasm.
During this talk you will be taken on the journey of application design. The starting point is an application that looks fine but contains lots of potential pitfalls. We will address the problems and solve them with beautiful design. We end up with testable, nicely separated software with a clear intention.
Un gioco in cui vincono tutti o due piccioni con una fava ;)
Lavorare rivolti alla creazione di valore per il cliente e da questo ottenere una libreria quasi pronta per essere pubblicata
Silex is a brand new PHP 5.3 micro framework built on top of the Symfony2 de decoupled components. In this session, we will discover how to build and deploy powerful REST web services with such a micro framework and its embedded tools.
The first part of this talk will introduce the basics of the REST architecture. We fill focus on the main concepts of REST like HTTP methods, URIs and open formats like XML and JSON.
Then, we will discover how to deploy REST services using most of interesting Silex tools like database abstraction layer, template engine and input validation. We will also look at unit and functional testing frameworks with PHPUnit and HTTP caching with Edge Side Includes and Varnish support to improve performances.
Build Solutions Not Puzzles - Write Sensible Code. Write code that can clearly communicate your intension. A few guideline and tips for writing readable and maintainable code.
How do you create applications with an incredible level of extendability without losing readability in the process? What if there's a way to separate concerns not only on the code, but on the service definition level? This talk will explore structural and behavioural patterns and ways to enrich them through tricks of powerful dependency injection containers such as Symfony2 DIC component.
Est-ce que nous allons parler de gestion des ressources humaines au PHP tour ? Non, je vous vais vous parler des modèles anémiques et des modèles riches. Depuis des années frameworks et ORM nous conditionnent à utiliser des modèles anémiques, une classe avec de simples setters et getters. A travers l’histoire d’Estelle, une RH, qui veut une application pour gérer ses salariés, je vais vous montrer comment changer nos vieilles habitudes afin de nous focaliser sur le métier que nous implémentons. Nous verrons ensemble quels outils utiliser, comme par exemple, le design pattern command bus, l’opérateur NEW de doctrine pour vos Data Transfert Object dans une application Symfony.
Example de code : https://github.com/arnolanglade/code-me-hr
Hacking Your Way To Better Security - Dutch PHP Conference 2016Colin O'Dell
The goal of this talk is to educate developers on common security vulnerabilities, how they are exploited, and how to protect against them. We'll explore several of the OWASP Top 10 attack vectors like SQL injection, XSS, CSRF, session hijacking, and insecure direct object references. Each topic will be approached from the perspective of an attacker to see how these vulnerabilities are detected and exploited using several realistic examples. Once we've established an understanding of how these attacks work, we'll look at concrete steps you can take to secure web applications against such vulnerabilities. The knowledge gained from this talk can also be used for participating in "Capture the Flag" security competitions.
Design Patterns avec PHP 5.3, Symfony et PimpleHugo Hamon
Cette conférence présente deux grands motifs de conception : l'observateur et l'injection de dépendance. Ce sujet allie à la fois théorie et pratique. Le composant autonome EventDispatcher de Symfony ainsi que le conteneur d'injection de dépendance Pimple sont mis à l'honneur avec des exemples pratiques d'usage. Ces cas pratiques combinent du code de l'ORM Propel ainsi que le composant autonome Zend\Search\Lucene du Zend Framework 2
Xlab #1: Advantages of functional programming in Java 8XSolve
Presentation from xlab workshop about functional programming components introduced to the Java 8. How to operate the streams and lambdas in theory and practice.
Lithium: The Framework for People Who Hate FrameworksNate Abele
This is the presentation was given at ConFoo on March 11th by Nate Abele and Joël Perras, and is an introduction to the architectural problems with other frameworks that Lithium was designed to address, and how it addresses them. It also introduces programming paradigms like functional and aspect-oriented programming which address issues that OOP doesn't account for.
Finally, the talk provides a quick overview of the innovative and unparalleled features that Lithium provides, including the data layer, which supports both relational and non-relational databases.
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)James Titcumb
Have you ever used PHP's built in reflection, only to find you can't do quite what you wanted? What about finding types for parameters or properties? What about reflecting on classes that aren't loaded, so that you can modify them directly?
Better Reflection is an awesome new library that uses magical time-warp techniques* (*actual magic or time-warp not guaranteed) to improve on PHP's built-in reflection by providing additional functionality. In this talk we'll cover what reflection is all about, explore the cool features of Better Reflection already implemented, the difficulties we faced actually writing the thing, and how you can use Better Reflection in your projects to maximise your reflection-fu.
The IoC Hydra - Dutch PHP Conference 2016Kacper Gunia
Slides from my talk presented during Dutch PHP Conference in Amsterdam - 25 June 2016
More Domain-Driven Design related content at: https://domaincentric.net/
Have you ever wondered how all this CQRS / ES concepts could be applied to a PHP project? Let's take a look at some code of our last project: a warehouse management system.
This talk will show how we understand DDD and how we apply it at Ulabox, what changes in application's architecture and code when we apply CQRS and how to deal with event sourcing, when there're no persisted entities, only events that generate projections used in the read model.
Speaker: Manel Sellés (@manelselles), software engineer, DDD-TDD fan and Symfony Expert Certified by Sensiolabs. Currently developing enterprise logistics software at Ulabox.com
In 2010, I told everyone how to start unit testing Zend Framework applications. In 2011, let’s take this a step further by testing services, work flows and performance. Looking to raise the bar on quality? Let this talk be the push you need to improve your Zend Framework projects.
Symfony World - Symfony components and design patternsŁukasz Chruściel
There are so many Symfony components already, and they have some pretty neat perks. But have you seen them in action?
Design patterns are not a silver bullet. They will never resolve your problem on their own. On the other hand, design patterns provide a common ground for developers without going into details and could be used as building bricks to solve some more advanced problems.
During my presentation, I will take a closer look and explain the appliance of selected design patterns. What is more, I will take advantage of the Symfony ecosystem to implement them with ease.
I will do the presentation on sample code that developers will understand at all levels of expertise.
What should you test with your unit tests? Some people will say that unit behaviour is best tested through it's outcomes. But what if communication between units itself is more important than the results of it? This session will introduce you to two different ways of unit-testing and show you a way to assert your object behaviours through their communications.
Come to this talk prepared to learn about the Doctrine PHP open source project. The Doctrine project has been around for over a decade and has evolved from database abstraction software that dates back to the PEAR days. The packages provided by the Doctrine project have been downloaded almost 500 million times from packagist. In this talk we will take you through how to get started with Doctrine and how to take advantage of some of the more advanced features.
How do you create applications with an incredible level of extendability without losing readability in the process? What if there's a way to separate concerns not only on the code, but on the service definition level? This talk will explore structural and behavioural patterns and ways to enrich them through tricks of powerful dependency injection containers such as Symfony2 DIC component.
Est-ce que nous allons parler de gestion des ressources humaines au PHP tour ? Non, je vous vais vous parler des modèles anémiques et des modèles riches. Depuis des années frameworks et ORM nous conditionnent à utiliser des modèles anémiques, une classe avec de simples setters et getters. A travers l’histoire d’Estelle, une RH, qui veut une application pour gérer ses salariés, je vais vous montrer comment changer nos vieilles habitudes afin de nous focaliser sur le métier que nous implémentons. Nous verrons ensemble quels outils utiliser, comme par exemple, le design pattern command bus, l’opérateur NEW de doctrine pour vos Data Transfert Object dans une application Symfony.
Example de code : https://github.com/arnolanglade/code-me-hr
Hacking Your Way To Better Security - Dutch PHP Conference 2016Colin O'Dell
The goal of this talk is to educate developers on common security vulnerabilities, how they are exploited, and how to protect against them. We'll explore several of the OWASP Top 10 attack vectors like SQL injection, XSS, CSRF, session hijacking, and insecure direct object references. Each topic will be approached from the perspective of an attacker to see how these vulnerabilities are detected and exploited using several realistic examples. Once we've established an understanding of how these attacks work, we'll look at concrete steps you can take to secure web applications against such vulnerabilities. The knowledge gained from this talk can also be used for participating in "Capture the Flag" security competitions.
Design Patterns avec PHP 5.3, Symfony et PimpleHugo Hamon
Cette conférence présente deux grands motifs de conception : l'observateur et l'injection de dépendance. Ce sujet allie à la fois théorie et pratique. Le composant autonome EventDispatcher de Symfony ainsi que le conteneur d'injection de dépendance Pimple sont mis à l'honneur avec des exemples pratiques d'usage. Ces cas pratiques combinent du code de l'ORM Propel ainsi que le composant autonome Zend\Search\Lucene du Zend Framework 2
Xlab #1: Advantages of functional programming in Java 8XSolve
Presentation from xlab workshop about functional programming components introduced to the Java 8. How to operate the streams and lambdas in theory and practice.
Lithium: The Framework for People Who Hate FrameworksNate Abele
This is the presentation was given at ConFoo on March 11th by Nate Abele and Joël Perras, and is an introduction to the architectural problems with other frameworks that Lithium was designed to address, and how it addresses them. It also introduces programming paradigms like functional and aspect-oriented programming which address issues that OOP doesn't account for.
Finally, the talk provides a quick overview of the innovative and unparalleled features that Lithium provides, including the data layer, which supports both relational and non-relational databases.
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)James Titcumb
Have you ever used PHP's built in reflection, only to find you can't do quite what you wanted? What about finding types for parameters or properties? What about reflecting on classes that aren't loaded, so that you can modify them directly?
Better Reflection is an awesome new library that uses magical time-warp techniques* (*actual magic or time-warp not guaranteed) to improve on PHP's built-in reflection by providing additional functionality. In this talk we'll cover what reflection is all about, explore the cool features of Better Reflection already implemented, the difficulties we faced actually writing the thing, and how you can use Better Reflection in your projects to maximise your reflection-fu.
The IoC Hydra - Dutch PHP Conference 2016Kacper Gunia
Slides from my talk presented during Dutch PHP Conference in Amsterdam - 25 June 2016
More Domain-Driven Design related content at: https://domaincentric.net/
Have you ever wondered how all this CQRS / ES concepts could be applied to a PHP project? Let's take a look at some code of our last project: a warehouse management system.
This talk will show how we understand DDD and how we apply it at Ulabox, what changes in application's architecture and code when we apply CQRS and how to deal with event sourcing, when there're no persisted entities, only events that generate projections used in the read model.
Speaker: Manel Sellés (@manelselles), software engineer, DDD-TDD fan and Symfony Expert Certified by Sensiolabs. Currently developing enterprise logistics software at Ulabox.com
In 2010, I told everyone how to start unit testing Zend Framework applications. In 2011, let’s take this a step further by testing services, work flows and performance. Looking to raise the bar on quality? Let this talk be the push you need to improve your Zend Framework projects.
Symfony World - Symfony components and design patternsŁukasz Chruściel
There are so many Symfony components already, and they have some pretty neat perks. But have you seen them in action?
Design patterns are not a silver bullet. They will never resolve your problem on their own. On the other hand, design patterns provide a common ground for developers without going into details and could be used as building bricks to solve some more advanced problems.
During my presentation, I will take a closer look and explain the appliance of selected design patterns. What is more, I will take advantage of the Symfony ecosystem to implement them with ease.
I will do the presentation on sample code that developers will understand at all levels of expertise.
What should you test with your unit tests? Some people will say that unit behaviour is best tested through it's outcomes. But what if communication between units itself is more important than the results of it? This session will introduce you to two different ways of unit-testing and show you a way to assert your object behaviours through their communications.
Come to this talk prepared to learn about the Doctrine PHP open source project. The Doctrine project has been around for over a decade and has evolved from database abstraction software that dates back to the PEAR days. The packages provided by the Doctrine project have been downloaded almost 500 million times from packagist. In this talk we will take you through how to get started with Doctrine and how to take advantage of some of the more advanced features.
Refactoring, Agile Entwicklung, Continuous Integration – all diese für nachhaltigen Erfolg wichtigen Vorgehensweisen setzen Erfahrung mit Unit Testing voraus. Abseits von den üblichen "Bowling"-Beispielen möchten wir gerne einen Crashkurs inkl. Best Practices für das erfolgreiche Unit Testing durchführen. Anhand eines Beispielprojekts auf Basis des Zend Frameworks werden wir nach der Installation von PHPUnit auf allen Notebooks gemeinsam eine kleine Applikation aufbauen, die durchgehend Test-driven entwickelt wird.
I present four design patterns that make your development easier and better. Design patterns are a fantastic way to make more readable code, as they make use of common ideas that many developers know and use. These patterns are tried and tested in the enterprise world.
The first one is dependency injection. This covers putting the variables that a class needs to function preferably inside a constructor.
The second one is the factory pattern. A factory moves the responsibility of instantiating an object to a third-party class.
The third one is dependency injection. This allows us to place a class' dependencies at one time, making it easy to come back and see what the class needs to survive.
Finally, we discuss the chain of responsibility. This allows complex operations to be handled by a chain of classes. Each class in the chain determines whether it is capable of handling the request and, if so, it returns the result.
n 2010, I told everyone how to start unit testing Zend Framework applications. In 2011, let’s take this a step further by testing services, work flows and performance. Looking to raise the bar on quality? Let this talk be the push you need to improve your Zend Framework projects.
Writing readable code is one of the most important aspects of web development. A developer should write code which another human is able to understand without the help of too many comments.
This talk will show you how to tidy up your code and write readable PHP.
Software development is riddled with explicit and implicit costs. Every decision you make has a cost attached to it. When you're writing code, you're making an investment, the size of which will for a long time define the costs of your future growth. Making right decision about these investments is very tricky and the cost of wrong decisions might be crippling for both business and teams that support it.
Extreme Programming and Test Driven Development in particular are practices that are aiming at supporting development effort by making it easier to introduce change. That said, sometimes those tools can become a problem of its own when applied in the wrong way or for the wrong context. Understanding software cost forces is a very important skill of successful teams and something that helps understand how to apply XP and TDD in different contexts.
Харьковский WordPress MeetUp #2: http://wp.org.ua/?p=191
Какими навыками должен обладать WordPress Гуру (junior, middle, senior) и какие этапы роста проходит WP-разработчик, а также опишет путь от настройки простейшего блога для друга и мелкого фриланса до участия в масштабных Open Source проектах и карьеры в крупной компании. Доклад даст нужное направление для развития новичкам и поможет упорядочить мысли более опытным разработчикам.
Видео будет доступно немного позже.
Watch Erik's presentation on PHP Unit Testing to gain familiarity with unit tests and unit testing here at Tagged, with the testing framework currently in place and also learn how to write (better) unit tests. Download his slides here or email him at ejohannessen@tagged.com.
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceIvan Chepurnyi
It is a pity, but I have to admit, that Magento 2 has issues in layout generation process. You'll learn during the talk about the benefits of compiling XML structures into PHP code, and even use the compilation of PHP code into PHP code to speed up your modules complex logic.
This DrupalCon 2019 Amsterdam talk provides a look beyond the world of PHP and Javascript. It explores how other languages such as Ruby, Java, Rust and Perl handle things and highlights some interesting features of those languages. Not all the things that other languages can do can be done in PHP or Javascript but the concepts and ideas can still be used.
4Developers 2015: Be pragmatic, be SOLID - Krzysztof MenżykPROIDEA
Krzysztof Menżyk
Language: Polish
Wiemy jak projektować dobry kod obiektowy? Ilu z nas zna 5 zasad SOLID? Ilu z nas przestrzega ich w codziennej pracy z kodem? Nie tylko wyjaśnię co to SOLID, ale również pokażę, że to nie sucha teoria a praktyczne rady, które warto aplikować w naszych projektach.
Podczas prezentacji szczegółowo omówię każdą z pięciu zasad. Pokażę konkretne przykłady, które naruszają ww. zasady. Zaprezentuję przykładowe rozwiązania i techniki refaktorowania kodu. Omówię również, w jakich sytuacjach można pominąć niektóre z zasad oraz jaki może to mieć wpływ na projekt.
Similar to Why is crud a bad idea - focus on real scenarios (20)
The eCommerce Platforms in the Global Setup Divante
A feature-by-feature comparison of top-notch eCommerce platforms like Shopware 6, Magento 2, Spryker, commercetools, and Salesforce Commerce Cloud.
Selecting the right platform for the company’s global eCommerce is probably the most important decision at the early stage. Depending on the current and future needs, the selected eCommerce application will define your company’s direction and the elements required for fast development.
We compare five eCommerce solutions by analyzing six major aspects that should be considered when selecting a platform for global eCommerce. These functionalities were selected due to their impact on rollouts and future global eCommerce management, they include: country and language; structure and design; order and product management; customer and group management; pricing, taxes, and currencies; payments and shipping.
If you're interested in making your online store expansion efficient, read the ebook Global Rollouts for eCommerce: https://bit.ly/global_rollouts_for_ecommerce
It's a comprehensive book for CTOs, CMOs, and CDOs facing the challenge of global eCommerce rollouts: a practical guide to planning and expanding online stores using existing and emerging technologies.
The eCommerce Trends 2020 report is a comprehensive guide through emerging technologies in the world of online sales. It is based on the extensive research, run by Divante and Kantar, among over 250 eCommerce experts representing 8 countries. The report is complemented with trends rankings, implementation examples, and opinions from 20 independent experts.
Key learnings:
- Going Mobile for higher CR
- The future lies in AI
- Security is at stake
- Asia sets the new standard
- Technology natives win
and more!
Download full version: https://divante.com/ecommerce-trends
Async & Bulk REST API new possibilities of communication between systemsDivante
Async & Bulk REST API - new possibilities of communication between systems - Marek Borzęcki, Team Leader at Divante
Presentation originally presented at Magento Lightning Talks meetup on October 3rd, 2019, in Divante HQ.
Learn more at Divante at https://divante.com
Check out more Magento Lightning Talks at https://divante.com/blog/tag/magento-lightning-talks/
Magento Functional Testing Framework a way to seriously write automated tests...Divante
Magento Functional Testing Framework - a way to seriously write automated tests in your project? - Łukasz Adamczyk, QA at Divante
Presentation originally presented at Magento Lightning Talks meetup on October 3rd, 2019, in Divante HQ.
Learn more at Divante at https://divante.com
Check out more Magento Lightning Talks at https://divante.com/blog/tag/magento-lightning-talks/
Die Top 10 Progressive Web Apps in der ModernbrancheDivante
Wir Ihnen 10 Beispiele von Online-Shops aus der Modebranche, die Progressive Web Apps nutzen. Erfahren Sie mehr über deren Geschichten und die geschäftlichen Vorteile, die durch den Mobile-First-Ansatz und Progressive Web Apps erzielt werden.
How to reduce customer churn?
There are many ways to do that. First of all, customers should trust you. Sound easy but in the end, it’s extremely hard for a brand to gain trust. The market is very competitive and customers requirements are constantly growing. If you interesting about customer churn and how to stop it, we created a report about it.
Our new report is here!
eCommerce Trends is our annual report, we've been doing for 6 years. This year we reached out to 10k eCommerce Managers and asked them to fill in our survey. Of those asked, 150 responded and we created this report based on the results.
What's inside?
Market Overview
B2C eCommerce Sales
Top eRetailers (Based on Revenue)
Top eCommerce Sites (Based on Traffic)
Capital Market
eCommerce Startups to Watch
Survey Results
eCommerce Investments 2018
eCommerce Investments 2019
Changes in Investments 2018-2019
Which Investments Had the Biggest ROI in 2018?
Most Impactful eCommerce Trends for the Next 5 years
Trends Matrix
Inspirations
Marketplaces: Better Prices, Free or Discounted Shipping and a Broader Selection
Voice Interfaces
Big Data & Business Intelligence: IoT as a Source
Chatbots: Growing Popularity
Microservices & Headless: Micro Frontends
Content Marketing & Digital Content
CRM: AI & Social CRM
Mobile CRO
Free Shipping/Returns
Mobile Approach: PWA
Personalization: Hyper-Personalization
Social Commerce: See. Tap. Shop.
Customer Lifetime Value and Referral Programs
Methodology
Research Methodology
Demography
TL;DR - Quick Summary of the Report
Content Marketing: Still Important
Personalization & Loyalty for the Win
Cryptocurrencies and the GDPR: Things of the Past
Content Marketing With the Biggest ROI
Voice Interfaces & Big Data Revolutionize eCommerce
Quick Wins vs. Highest ROI
What do experts say?
Download full version: https://go.divante.co/ecommerce-trends-2019/
How to successfully onboard end-clients to a B2B Platform - Magento Imagine ...Divante
Magento Imagine 2018 Presentation
Developing eCommerce since 2004, I‘ve seen how successful B2B clients digitize their businesses and how they onboard users
eCommerce trends from 2017 to 2018 by Divante.coDivante
We asked managers about their eCommerce investments last year and about investment plans for this year.
What are the most important trends, game changers and quick wins.
Download full version from: http://go.divante.co/ecommerce-trends-2018/
Trends we asked about:
Content Marketing
Big Data
Business Intelligence
Email Automation
Chatbots (Conversational Commerce)
Digital Content
Social Commerce
Cloud Hosting
Multimedia Content – better photos/…
Marketplaces
Omnichannel
Personalization
In-Store PickUp
Predictive Analytics
General Data Protection Regulation…
Automated Pricing Optimization
Automated Promotion Management
Free Shipping / Returns
In-Store Digital Touchpoints
Mobile App
Same Day Delivery
Drop Shipping
Order Management Systems
Other AI based tools
Own Brands
Personal Shopping
Price Intelligence
Progressive Web App (PWA)
Programmatic Ad Buying
Recommendation Systems
Customized Products
Data-driven Loyalty
Microservices Architecture
Online Security
Wearables
Algorithmic Driven Supply & Demand
Cross Border Commerce
Cryptocurrencies (Bitcoin / Ethereum)
mPayments
Open API Economy
Security
Subscription Business Models
Visual Search
Beacon Technology
Headless Approach
Serverless Architecture
IoT
Push Notification
Virtual Reality
Alexa and other voice interfaces
Drones
3D printing
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentationDivante
Vue.js, mobile first, offline second eCommerce frontend, we're developing under MIT - http://vuestorefront.io. Become a contributor today - https://github.com/DivanteLtd/vue-storefront
1.Wireless Communication System_Wireless communication is a broad term that i...JeyaPerumal1
Wireless communication involves the transmission of information over a distance without the help of wires, cables or any other forms of electrical conductors.
Wireless communication is a broad term that incorporates all procedures and forms of connecting and communicating between two or more devices using a wireless signal through wireless communication technologies and devices.
Features of Wireless Communication
The evolution of wireless technology has brought many advancements with its effective features.
The transmitted distance can be anywhere between a few meters (for example, a television's remote control) and thousands of kilometers (for example, radio communication).
Wireless communication can be used for cellular telephony, wireless access to the internet, wireless home networking, and so on.
This 7-second Brain Wave Ritual Attracts Money To You.!nirahealhty
Discover the power of a simple 7-second brain wave ritual that can attract wealth and abundance into your life. By tapping into specific brain frequencies, this technique helps you manifest financial success effortlessly. Ready to transform your financial future? Try this powerful ritual and start attracting money today!
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesSanjeev Rampal
Talk presented at Kubernetes Community Day, New York, May 2024.
Technical summary of Multi-Cluster Kubernetes Networking architectures with focus on 4 key topics.
1) Key patterns for Multi-cluster architectures
2) Architectural comparison of several OSS/ CNCF projects to address these patterns
3) Evolution trends for the APIs of these projects
4) Some design recommendations & guidelines for adopting/ deploying these solutions.
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC
Ellisha Heppner, Grant Management Lead, presented an update on APNIC Foundation to the PNG DNS Forum held from 6 to 10 May, 2024 in Port Moresby, Papua New Guinea.
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBrad Spiegel Macon GA
Brad Spiegel Macon GA’s journey exemplifies the profound impact that one individual can have on their community. Through his unwavering dedication to digital inclusion, he’s not only bridging the gap in Macon but also setting an example for others to follow.
2. Petr Heinz
More than 8 years of programming experience.
Loves clean code, regular expressions and
clever design.
Dedicated last year to developing the Shopsys
Framework, open source e-commerce
framework made with passion on Symfony 3.
✉ petr.heinz@shopsys.com
4. Create, Read, Update and Delete
Four basic functions of an persistent storage, often used as an API.
Can be mapped to SQL statements:
INSERT SELECT UPDATE DELETE
Can be mapped to HTTP methods (used in REST APIs):
PUT GET POST DELETE
5. Example: Article
class Article {
private $author, $text, $state, $published;
public function setAuthor(Author $author) {
$this->author = $author;
}
public function getAuthor() {
return $this->author;
}
public function setText($text) {
$this->text = $text;
}
// ...
}
class ArticleController {
public function create(...) {
// ...
}
public function update(...) {
// ...
$article->setAuthor($author);
$article->setText($text);
$article->setState($state);
$article->setPublished($published);
}
public function delete(...) {
// ...
}
}
6. Entities Must Follow Business Rules
Entities are often constrained by business rules and the consistency must be kept.
● Company customer must have VAT ID filled in his account.
● Sold out product must be hidden.
● Article in published state must have published date.
This is difficult to achieve in the previous example. That’s because all article
attributes can be changed independently. Developers are not restricted in the way
they interact with the object.
7. Example: Article without setters
class Article {
const STATE_UNPUBLISHED = 1;
const STATE_PUBLISHED = 2;
const STATE_DELETED = 3;
private $author, $text, $state, $published;
public function __construct(Author $author, $text, $state, DateTime $published = null) {
// ...
}
public function update(Author $author, $text, $state, DateTime $published = null) {
// ...
}
public function delete() {
$this->state = self::STATE_DELETED;
}
}
8. Example: Article without setters
class Article {
// ...
public function update(Author $author, $text, $state, DateTime $published = null) {
if ($this->state === self::STATE_DELETED) {
throw new ArticleIsDeletedException($this);
}
$this->author = $author;
$this->text = $text;
$this->state = $state;
if ($state === self::STATE_PUBLISHED) {
$this->published = $published ?: new DateTime();
} elseif ($state === self::STATE_UNPUBLISHED) {
$this->published = null;
}
}
}
10. Object Oriented Programming
Objects have both data (their properties) and behavior (their methods).
Objects model real-world behavior, concepts and relationships.
Encapsulation principle tells us to hide the details about the data and focus solely
on the behavior - the public methods of our objects (“Tell, Don’t Ask”).
In PHP it is easy to combine procedural and object-oriented programming.
11. Example: Bank Account Object
class BankAccount {
private $balance;
public function __construct(Money $balance) {
$this->balance = $balance;
}
public function deposit(Money $amount) {
$this->balance = $this->balance->add($amount);
}
public function withdraw(Money $amount) {
if ($this->balance->isLessThan($amount)) {
throw new InsufficientFundsException($balance, $amount);
}
$this->balance = $this->balance->subtract($amount);
}
}
13. Let’s Define Some Terms First
Domain: Most common definition: “A sphere of knowledge or activity.”
It’s basically the subject area of your application (eg. an online store or news site).
Domain Model: System of abstractions describing part of the domain that can be
used to solve problems. Simplification of the real world.
Domain Object: Object that is part of the domain model (eg. Product, Order, …).
Business Logic: High-level logic reflecting the real-world business rules.
14. Anemic Domain Model
No business logic in domain objects
Clearly separates logic and data
Violates object encapsulation
Works well for simple applications
Leads to procedural programming
Called an anti-pattern by M. Fowler
Business logic mainly in domain objects
Domain objects encapsulate inner data,
offer meaningful behavior
Data integrity kept by the encapsulation
Better choice for complex domain
models
Rich Domain Model
15. Anemic Domain Model Rich Domain Model
class Worker {
function getVelocity() {
return $this->velocity;
}
function setVelocity($velocity) {
$this->velocity = $velocity;
}
}
class WorkerService {
function work(Worker $w, Task $t, $time) {
$progress = $t->getProgress();
$progress += $w->getVelocity() * $time;
$t->setProgress($progress);
}
}
class Worker {
function __construct($velocity) {
$this->velocity = $velocity;
}
function work(Task $task, $time) {
$progress = $this->velocity * $time;
$task->makeProgress($progress);
}
}
17. Setters Do Not Exist in the Real World
Setters have no meaning in the real world:
● A writer does not set a “published” state to an article, he/she publishes it.
● Customers do not set a “paid” status to an order, they pay for it.
● Your happy boss does not set a higher salary to you, he/she raises it.
There is always a better, more expressive, alternative to a setter.
Expressive statements lead to more readable code.
18. Nobody Expects The Setters To Do Stuff
Similarly to adding logic to a CRUD
update, you might feel the need to add
some business logic to your setter.
The problem with this is that nobody
expects setters to do anything beside
setting the property.
An unexpected behavior leads to bugs.
class Order {
// ...
public function setStatus($status) {
if (!$this->isValidStatus($status)) {
throw new InvalidArgumentException();
}
$this->status = $status;
if ($status === self::STATUS_PAID) {
$this->mailService->sendOrderPaidMail(
$this->orderNumber, $this->customer
);
}
}
}
19. Nobody Expects The Setters To Do Stuff
Similarly to adding logic to a CRUD
update, you might feel the need to add
some business logic to your setter.
The problem with this is that nobody
expects setters to do anything beside
setting the property.
An unexpected behavior leads to bugs.
class Order {
// ...
public function pay() {
$this->status = self::STATUS_PAID;
$this->mailService->sendOrderPaidMail(
$this->orderNumber, $this->customer
);
}
public function cancel() {
$this->status = self::STATUS_CANCELLED;
}
}
20. An Update in CRUD Is Similar to a Setter
Generic update method in CRUD is similar to a setter:
● It does not have a real-world meaning.
● There are better alternatives based on real scenarios to be implemented.
For example, by “updating” an article we mean “rewriting” it and possibly
“publishing”, “unpublishing” or “deleting” it.
22. Focus on Real Scenarios
By building your application around you domain objects and their behavior you
can get expressive code that is easier to understand, use and maintain.
Concept of “setting” or “updating” to too generic to be meaningful.
Your API should be focused on real scenarios, real use-cases. This will keep the
API clean and intuitive and it will help you keep the integrity of your data.
23. Think About the Way You Program
There is no best way, no silver bullet. And there probably never will be one.
Keep in mind the techniques of object-oriented programming, encapsulation
principle, focusing on the behavior.
Knowing about the two extremes will help you improve the design of your
application and choose the proper solution for your project.
24. Need CRUD methods? Add a Layer.
If you for some reason want to
allow classical CRUD methods,
you can build it on top of your
internal API.
You can use Adapter pattern for
this task.
class Article {
// ...
public function update(...) {
if ($this->state === self::STATE_DELETED) {
throw new ArticleIsDeletedEx($this);
}
$this->author = $author;
$this->text = $text;
$this->state = $state;
if ($state === self::STATE_PUBLISHED) {
$this->published = $published ?: new DateTime();
} elseif ($state === self::STATE_UNPUBLISHED) {
$this->published = null;
}
}
}
25. Need CRUD methods? Add a Layer.
If you for some reason want to
allow classical CRUD methods,
you can build it on top of your
internal API.
You can use Adapter pattern for
this task.
class ArticleCrudAdapter {
// ...
public function update(...) {
if ($this->article->isDeleted()) {
throw new ArticleIsDeletedEx($this->article);
}
$this->article->rewrite($text, $author);
switch ($state) {
case Article::STATE_PUBLISHED:
$this->article->publish($published); break;
case Article::STATE_UNPUBLISHED:
$this->article->unpublish(); break;
case Article::STATE_DELETED:
$this->article->delete(); break;
}
}
}
26. It Is About the Balance
Every way has its tradeoffs and, as always, it is about the balance.
Focusing on real-world use-cases helps to maintain integrity and usability.
Integration with other libraries or components is easier with generic methods.
When developing Shopsys Framework we try to keep that in mind, and take
inspiration from Rich Domain Model.
See for yourself, join closed beta: https://www.shopsys-framework.com