40
#codemotion @liuggio awesome PHP application in 2014 really really really really

really really really awesome php application with bdd behat and iterfaces

Embed Size (px)

Citation preview

Page 1: really really really awesome php application with bdd behat and iterfaces

#codemotion @liuggio

awesome PHP application in 2014

really

really

reallyreally

Page 2: really really really awesome php application with bdd behat and iterfaces

I’m @liuggioa programmer<?php

awesome application #codemotion @liuggio

Page 3: really really really awesome php application with bdd behat and iterfaces

Language design is hard …

the most famous computer scientists are also language designers.

BUT none of them ever worked on PHP

-- codinghorror

awesome application #codemotion @liuggio

Page 4: really really really awesome php application with bdd behat and iterfaces

LANGUAGE SUCKS7.380.000 resultsJava sucks

6.030.000 resultsRuby sucks

3.400.000 Python sucks

results

awesome application #codemotion @liuggio

Search “{language} SUCKS” on google:

Page 5: really really really awesome php application with bdd behat and iterfaces

61.526.124

Search “PHP SUCKS” on google:

TIMESawesome application #codemotion @liuggio

Page 6: really really really awesome php application with bdd behat and iterfaces

WHY PHP SUCKS

not real objects

big gap between the

community and the

un-polite core-team inconsistencylot-ot-underscore

stream_get_linedisk_free_space

is_objectmcal_day_of_weekset_error_handler

snmp_get_quick_printget_browser

base64_encodeimage_type_to_mime_type

msql_num_fieldsphp_unamestrip_tags

bind_textdomain_codesetcal_to_jdstr_rot13

no-underscore

readlinediskfreespaceissetjddayofweeksetlocalesnmpgetgetallheadersurlencodeimagetypesmysql_numfieldsphpversionstripslashesbindtextdomaingregoriantojdstrpos

awesome application #codemotion @liuggio

Page 7: really really really awesome php application with bdd behat and iterfaces

LOT OF GREAT COMPANIES USES IT

WordpressFacebook

awesome application #codemotion @liuggio

Page 8: really really really awesome php application with bdd behat and iterfaces

IS NOT THE OLD PLAIN-PHP THE ECOSYSTEM IS GREAT

GIT COMPOSER SYMFONY2

DDD/TDD/BDD PHP-FIG BEST PRACTICES

awesome application #codemotion @liuggio

Page 9: really really really awesome php application with bdd behat and iterfaces

The best programming language will not save you to write horrible code.

awesome application #codemotion @liuggio

Page 10: really really really awesome php application with bdd behat and iterfaces

Sufficiently talented coders

can write great applications

in terrible languages

awesome application #codemotion @liuggio

Page 11: really really really awesome php application with bdd behat and iterfaces

f**king awesome application

really

reallyreallyreally

really

Page 12: really really really awesome php application with bdd behat and iterfaces

@liuggio welcometothebundle.com

Page 13: really really really awesome php application with bdd behat and iterfaces

f**king awesome application

really

reallyreallyreally

really

Page 14: really really really awesome php application with bdd behat and iterfaces

Coding is 10% of the job

Communication and understanding

Read/Study

Coffee andrelated .

awesome application #codemotion @liuggio

Page 15: really really really awesome php application with bdd behat and iterfaces

developer =

worker with knowledge

awesome application #codemotion @liuggio

Page 16: really really really awesome php application with bdd behat and iterfaces

- Modular code- Version Control System (git)- Eager: conferences/books/code- Use frameworks- Contribute famous projects code - Live in the open-source ecosystem- Favourite the discussion- Study design trends (DDD \ BDD…?)- Live in a community, local user group- Test Driven Development

talented developers

awesome application #codemotion @liuggio

Page 17: really really really awesome php application with bdd behat and iterfaces

TDD

REFACTOR PASSFAIL

awesome application #codemotion @liuggio

Page 18: really really really awesome php application with bdd behat and iterfaces

- Modular code- Version Control System (git)- Eager: conferences/books/code- Use frameworks- Contribute famous projects code - Live in the open-source ecosystem- Favourite the discussion- Study design trends (DDD \ BDD…?)- Live in a community, local user group- Test Driven Development

TalentedNot talented

Page 19: really really really awesome php application with bdd behat and iterfaces

Innovation fuel growth

Page 20: really really really awesome php application with bdd behat and iterfaces

TALENTED CODERS

Have a passion driven mindset&&

Satisfy business with the best technology

=

awesome application #codemotion @liuggio

Page 21: really really really awesome php application with bdd behat and iterfaces

awesome application #codemotion @liuggio

After the first iteration with the client:

Page 22: really really really awesome php application with bdd behat and iterfaces

YOU

BLACK HOLE

After the second iteration with the client:

Page 23: really really really awesome php application with bdd behat and iterfaces

awesome application #codemotion @liuggio

After the third iteration with the client:

Page 24: really really really awesome php application with bdd behat and iterfaces

$$ function

awesome application #codemotion @liuggio

Translation problems

Page 25: really really really awesome php application with bdd behat and iterfaces

Application

presentation

awesome application #codemotion @liuggio

Domain model

RESTadapter

WEB

SCRIPT

ADAPTER-y

Use Case A

Use Case B

Page 26: really really really awesome php application with bdd behat and iterfaces

interfaces

awesome application #codemotion @liuggio

Page 27: really really really awesome php application with bdd behat and iterfaces

awesome application #codemotion @liuggio

Application

presentation

Domain model

RESTadapter

WEB

SCRIPT

ADAPTER-y

Use Case A

Use Case B

Page 28: really really really awesome php application with bdd behat and iterfaces

awesome application #codemotion @liuggio

Page 29: really really really awesome php application with bdd behat and iterfaces

Describe the

behaviours for each

`verb` and ‘noun’

Create the class

and the public

methods

Write a business

example

Explode the example in

lines

Given/When/Then

Discover and visualize

`verbs`, `nouns` and

behaviours

awesome application #codemotion @liuggio

a new cycle1

2

34 5

Page 30: really really really awesome php application with bdd behat and iterfaces

FAIL

Page 31: really really really awesome php application with bdd behat and iterfaces

FAIL

Page 32: really really really awesome php application with bdd behat and iterfaces

FAIL

Page 33: really really really awesome php application with bdd behat and iterfaces

Describe the

behaviours for each

`verb` and ‘noun’4

Page 34: really really really awesome php application with bdd behat and iterfaces

Create the class

and the public

methods5

Page 35: really really really awesome php application with bdd behat and iterfaces

PASS

awesome application #codemotion @liuggio

Page 36: really really really awesome php application with bdd behat and iterfaces

Application

presentation

Domain model

WEB

Class EmitBill

WWW

Page 37: really really really awesome php application with bdd behat and iterfaces

The best programming language will not save you to write horrible code.

awesome application #codemotion @liuggio

Page 38: really really really awesome php application with bdd behat and iterfaces

BUSINESS

awesome application #codemotion @liuggio

Page 39: really really really awesome php application with bdd behat and iterfaces

be a passionate developer

awesome application #codemotion @liuggio

Page 40: really really really awesome php application with bdd behat and iterfaces

Questions?ps: see the references I didn’t write any books (yet).

awesome application #codemotion @liuggio