Top Banner
Look beyond PHP 02/29/2012 | fabien.potencier.org | @fabpot
52

Look beyond PHP

Feb 10, 2017

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Look beyond PHP

Look beyond PHP

02/29/2012 | fabien.potencier.org | @fabpot

Page 2: Look beyond PHP

Why?

Page 3: Look beyond PHP

A Web Developer

http://www.flickr.com/photos/dunechaser/160405823

Page 4: Look beyond PHP

A Web Developer

http://www.flickr.com/photos/dunechaser/142079357

Page 5: Look beyond PHP
Page 6: Look beyond PHP

Master PHP first

Page 7: Look beyond PHP

levenshtein()

Page 8: Look beyond PHP
Page 10: Look beyond PHP
Page 11: Look beyond PHP

spl_object_hash()

Page 12: Look beyond PHP

$o1 = new stdClass();

$o2 = new stdClass();

spl_object_hash($o1) !== spl_object_hash($o2);

spl_object_hash($o1) === spl_object_hash($o1);

Page 13: Look beyond PHP

Traits in PHP 5.4?

Page 14: Look beyond PHP

Learn the basics

Page 15: Look beyond PHP

JavaScript

Page 16: Look beyond PHP

HTTP / RFC 2616

http://tools.ietf.org/wg/httpbis/

Page 17: Look beyond PHP
Page 18: Look beyond PHP

Use the right tools...

Page 19: Look beyond PHP

IDE / Editor

Page 20: Look beyond PHP
Page 21: Look beyond PHP
Page 22: Look beyond PHP

Use the right tool for the jobUse software written in other languages...

don't reinvent the wheel

Page 30: Look beyond PHP
Page 31: Look beyond PHP

Learn from other's code...whatever the language

Page 32: Look beyond PHP

Python

Page 33: Look beyond PHP

from bottle import route, run

@route('/hello/:name')def index(name='World'): return '<b>Hello %s!</b>' % name

run(host='localhost', port=8080)

Page 34: Look beyond PHP

Jinja2... Twig

Page 35: Look beyond PHP

Logbook... Monolog

Page 36: Look beyond PHP

Webassets... Assetic

Page 39: Look beyond PHP
Page 40: Look beyond PHP
Page 41: Look beyond PHP

Rails

Django

CakePHP

ZF

Symfony2

Page 42: Look beyond PHP
Page 43: Look beyond PHP

This also applies todocumentation and processes

Page 44: Look beyond PHP

PEP vs PSR/RFC

Page 45: Look beyond PHP

PEP 20 - The Zen of Python

Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex.

Complex is better than complicated. Flat is better than nested.

Sparse is better than dense. Readability counts.

Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently.

Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess.

There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch.

Now is better than never. Although never is often better than *right* now.

If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea.

Namespaces are one honking great idea -- let's do more of those!

Page 46: Look beyond PHP

PSR-0

“Mandatory requirements that must be adhered to for autoloader interoperability.”

https://github.com/php-fig

Page 47: Look beyond PHP

Javadoc vs Phpdoc

Page 48: Look beyond PHP

ReST / Sphinx

Page 49: Look beyond PHP

What can we learn from others?

Page 50: Look beyond PHP

What should you learn now?

Page 51: Look beyond PHP

Be passionateBe Curious

Be curious

Page 52: Look beyond PHP

Thank You