look beyond php

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

Upload: fabien-potencier

Post on 10-Feb-2017

14.628 views

Category:

Technology


0 download

TRANSCRIPT

Look beyond PHP

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

Why?

A Web Developer

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

A Web Developer

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

Master PHP first

levenshtein()

spl_object_hash()

$o1 = new stdClass();

$o2 = new stdClass();

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

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

Traits in PHP 5.4?

Learn the basics

JavaScript

HTTP / RFC 2616

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

Use the right tools...

IDE / Editor

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

don't reinvent the wheel

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

Python

from bottle import route, run

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

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

Jinja2... Twig

Logbook... Monolog

Webassets... Assetic

Rails

Django

CakePHP

ZF

Symfony2

This also applies todocumentation and processes

PEP vs PSR/RFC

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!

PSR-0

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

https://github.com/php-fig

Javadoc vs Phpdoc

ReST / Sphinx

What can we learn from others?

What should you learn now?

Be passionateBe Curious

Be curious

Thank You