Slide 1

Slide 1 text

The MicroPHP Manifesto Ed Finkler Fictive Kin @funkatron Wednesday, May 23, 12

Slide 2

Slide 2 text

1. I am a PHP Programmer Wednesday, May 23, 12 I like PHP, and I like making things in PHP.

Slide 3

Slide 3 text

Not a framework X/Y/Z developer Wednesday, May 23, 12 Learning most big stack frameworks is as complex as learning a new programming language. - New nomenclature, new approaches

Slide 4

Slide 4 text

PHP is complicated enough Wednesday, May 23, 12 PHP itself is riddled with pitfalls and quirks. - Inconsistent naming, param order, behavior - Trapping Errors & Exceptions; - Incomplete implementations - functional code; namespaces & functions - Complex boilerplate for OOP - Behavior of isset() and empty()

Slide 5

Slide 5 text

2. I like building small things Wednesday, May 23, 12 Small stuff is good. It’s easier to understand. It’s harder to screw up.

Slide 6

Slide 6 text

Small things with simple purposes Wednesday, May 23, 12 Don’t make a single “module”/piece try to do too much

Slide 7

Slide 7 text

Solve single problems Wednesday, May 23, 12 Self-contained pieces to solve individual problems

Slide 8

Slide 8 text

Work together & solve big problems Wednesday, May 23, 12 Each piece should work with other pieces to accomplish bigger things - Fixing bugs is easier because you can look at an individual piece and see what its doing

Slide 9

Slide 9 text

3. I want less code, not more Wednesday, May 23, 12 More code, more problems

Slide 10

Slide 10 text

Manage less code Wednesday, May 23, 12 Bigger codebases get harder to manage. GREPs get slower. - Navigating through complex file structures takes longer - Tracing execution through dozens of files is hard - Keeping it all straight in your brain gets challenging - Bigger libraries & longer code can overflow the brain buffer - “Unwieldy over 200 lines”

Slide 11

Slide 11 text

Support less code Wednesday, May 23, 12 If your app is using it, you have to support it. every line of code. - bugs - security Imagine explaining how your code works to another dev who’s never seen it: how long would it take? How hard would it be?

Slide 12

Slide 12 text

Justify every line Wednesday, May 23, 12 Each line matters. Treat it as such.

Slide 13

Slide 13 text

4. I like simple, readable code Wednesday, May 23, 12

Slide 14

Slide 14 text

I want code that is easy to understand Wednesday, May 23, 12 Understanding things quickly means getting stuff done faster - time to productivity is shortened - time to fix bugs is shortened You don’t need a Certified Developer – you need smart, adaptive people who love learning and building things

Slide 15

Slide 15 text

I want code that is easy to verify Wednesday, May 23, 12 Code should be testable! Simpler code is more testable!

Slide 16

Slide 16 text

So where is web dev going? Wednesday, May 23, 12 - presentation/UI handled by client - clients powerful enough to do this - do as little regarding server - PHP really is glue now - Connect clients to backends

Slide 17

Slide 17 text

Stuff to look at: https://github.com/funkatron/FUnit https://github.com/fictivekin/Resty.php Wednesday, May 23, 12

Slide 18

Slide 18 text

Fin microphp.org·fictivekin.com·gimmebar.com·devhell.info Wednesday, May 23, 12