Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PHP like a super hero
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Elton Minetto
August 27, 2012
Technology
8
1.4k
PHP like a super hero
Dicas de como iniciar no PHP e tornar-se um expert na linguagem
Elton Minetto
August 27, 2012
Tweet
Share
More Decks by Elton Minetto
See All by Elton Minetto
Criando Kubernetes Operators com o operator-sdk
eminetto
0
130
Developer productivity for fun and profit - Enterprise edition
eminetto
0
81
Criando Kubernetes Operators com o operator-sdk
eminetto
0
130
Developer productivity for fun and profit - Developer edition
eminetto
3
520
Observabilidade de APIs
eminetto
1
950
Reflexões sobre Design de Software
eminetto
1
480
Discussões sobre microsserviços
eminetto
0
120
Introdução a Go
eminetto
1
270
Go, o que, por que e como?
eminetto
0
350
Other Decks in Technology
See All in Technology
モダンUIでフルサーバーレスなAIエージェントをAmplifyとCDKでサクッとデプロイしよう
minorun365
4
190
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
5
3.1k
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
640
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.3k
Amazon Bedrock Knowledge Basesチャンキング解説!
aoinoguchi
0
140
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
400
GSIが複数キー対応したことで、俺達はいったい何が嬉しいのか?
smt7174
3
150
GitLab Duo Agent Platform × AGENTS.md で実現するSpec-Driven Development / GitLab Duo Agent Platform × AGENTS.md
n11sh1
0
130
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
180
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
Data Hubグループ 紹介資料
sansan33
PRO
0
2.7k
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
340
The Curious Case for Waylosing
cassininazir
0
230
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
51
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
710
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
160
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
180
Context Engineering - Making Every Token Count
addyosmani
9
650
Game over? The fight for quality and originality in the time of robots
wayneb77
1
120
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