Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PHP like a super hero
Search
Elton Minetto
August 27, 2012
Technology
1.4k
8
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHP like a super hero
Dicas de como iniciar no PHP e tornar-se um expert na linguagem
Elton Minetto
August 27, 2012
More Decks by Elton Minetto
See All by Elton Minetto
Criando Kubernetes Operators com o operator-sdk
eminetto
0
180
Developer productivity for fun and profit - Enterprise edition
eminetto
0
120
Criando Kubernetes Operators com o operator-sdk
eminetto
0
170
Developer productivity for fun and profit - Developer edition
eminetto
3
570
Observabilidade de APIs
eminetto
1
1.1k
Reflexões sobre Design de Software
eminetto
1
530
Discussões sobre microsserviços
eminetto
0
180
Introdução a Go
eminetto
1
320
Go, o que, por que e como?
eminetto
0
400
Other Decks in Technology
See All in Technology
【Data Engineering Summit2026_登壇資料】医療ビッグデータ×AIエージェントを支えるデータ基盤とハーネスエンジニアリング
jmdc_presentation
0
160
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
140
日本語に強いオープンな大規模言語モデル「LLM-jp」
odashi
4
1.1k
「事実」を「計測」して、「解釈」する 〜AWS Lambdaのメモリ最適解の見つけ方〜
maimyyym
0
160
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
180
AI時代のPRレビューにどう向き合うか?
kairim0
1
240
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
150
1つのリクエストを追って理解する - llm-dのP/D分離
akhino
1
150
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
150
Conditional PED-ANOVA: Hyperparameter Importance in Hierarchical & Dynamic Search Spaces
pfn
PRO
0
130
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
690
Snapshot Testing in Practice: Predictable and Reliable SwiftUI Views
fespinoza
0
220
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Exploring anti-patterns in Rails
aemeredith
4
540
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
Between Models and Reality
mayunak
4
500
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Mind Mapping
helmedeiros
1
400
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
380
Making Projects Easy
brettharned
120
6.8k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
560
How STYLIGHT went responsive
nonsquared
100
6.3k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
Code Reviewing Like a Champion
maltzj
529
40k
Transcript
PHP like a Super Hero elton luís minetto @eminetto
Quem são vocês?
Quem sou eu? Graduado e pós-graduado em Ciência da Computação
Trabalho com PHP/MySQL desde 2000. Trabalho com Linux desde 1997. Professor desde 2004. Autor do livro Frameworks para Desenvolvimento em PHP - Editora Novatec, autor do e-book Zend Framework na prática Sócio da Coderockr
Motivação
None
PHP? Por onde começo?
None
PHP Namespaces Traits Orientação a objetos Banco de Dados Controle
de versões Testes Frameworks ORM REST SOA Integração contínua Xdebug APC Memcached Object Calisthenics
None
First things first...
PHP
PHP Namespaces
1.<?php 2.namespace Core\Service; 4.use Zend\Http\Client as HttpClient; 5.use Zend\Http\Request; 6.class
Auth 7.{ 8. public function __construct($apiKey, $apiUri, $rpcUri) 9. { 10. $this->httpClient = new HttpClient(); 11. } 12. }
PHP Traits http://diogobesson.com.br/programacao/php-traits/
PHP Servidor embutido php -S localhost:8080 -t /var/www/projeto
PHP phar http://phpmaster.com/packaging-your-apps-with-phar/
PHP Composer http://getcomposer.org
composer.json 1.{ 2. "minimum-stability": "dev", 3. "require": { 4. "silex/silex":
"1.0.*", 5. "dms/dms": "dev-master", 6. "doctrine/common": "*", 7. "doctrine/dbal": "*", 8. "doctrine/orm": "*", 9. "symfony/validator": "*", 10. "symfony/class-loader": "*", 11. "symfony/console": "*", 12. "monolog/monolog": "*", 13. "jms/metadata": "*", 14. "jms/serializer-bundle": "*", 15. "sybio/image-workshop": "*" 16. } 17.}
Instalar dependências 1.curl -s https://getcomposer.org/installer | php 2.php composer.phar install
Atualizar dependências 1.php composer.phar update
PHP Funções nativas
Orientação a objetos
Bancos de dados
Bancos de dados SQL - MySQL, sqlite, PostgreSQL
Bancos de dados NoSQL - MongoDB, CouchDB, Cassandra, Redis, Hadoop
Controle de versões
Controle de versões Git, SVN, Mercurial
None
None
None
None
Testes unitários PHPunit Mostrar os testes do modulo Api rodando.
Provocar um erro colocando um novo parâmetro no método authenticate do service Auth
Segurança e programação segura
Segurança e programação segura https://www.owasp.org/index.php/Main_Page
1.$inputFilter->add($factory->createInput(array( 2. 'name' => 'title', 3. 'required' => true, 4.
'filters' => array( 5. array('name' => 'StripTags'), 6. array('name' => 'StringTrim'), 7. ), 8. 'validators' => array( 9. array( 10. 'name' => 'StringLength', 11. 'options' => array( 12. 'encoding' => 'UTF-8', 13. 'min' => 1, 14. 'max' => 100, 15. ), 16. ), 17. ), 18. )));
Participe, seja social Participe de eventos Participe de grupos de
usuários regionais Escreva um blog Participe de fóruns e listas de discussão
Ok? É isso
None
Design patterns Frameworks Zend Framework Symfony Code Igniter Slim Silex
Doctrine
None
Design patterns
Frameworks
Frameworks Full-Stack Zend Framework, CakePHP, Symfony, Code Igniter
Micro Frameworks Slim, Silex, Respect
ORM Doctrine
Aprenda mais de um sistema operacional Linux, Windows, MacOSX
Tem mais? Manda!
SOA, Rest, RPC
Injeção de Dependências
Performance
Performance - Xdebug Profiling Debug
Mostrar cachegrind.png
Performance - Cache APC, Memcached
None
Performance - Avaliação Siege, Apache ab, ySlow
Integração contínua
Cloud computing Amazon Web Services Heroku, PHPCloud
Object Calisthenics Nove regras para melhorar o código http://slidesha.re/KTZM97
Certificação
None
None
O mais importante!
Divirta-se no processo
http://www.phptherightway.com
Contato @eminetto http://eltonminetto.net http://coderockr.com