php in the real world

49
Ivo Jansch De Montfort University, March 26 2009 “PHP in the real world” For lack of a less cliche title

Upload: ivo-jansch

Post on 28-Nov-2014

5.605 views

Category:

Technology


3 download

DESCRIPTION

Guest Lecture I did a few months ago at DeMontfort University in Leicester.

TRANSCRIPT

Page 1: PHP in the Real World

Ivo JanschDe Montfort University, March 26 2009

“PHP in the real world”For lack of a less cliche title

Page 2: PHP in the Real World

About me

CTO at Ibuildings

Development using PHP (websites, applications)

~85 people

Big projects (high traffic, multi-tier, clusters, high availability, large teams)

Consultancy (training, audits)

European focus (from offices in NL and UK)

Geek!

Author of several Open Source projects

Blogger

Column in php|architect magazine

Interested in PHP, Web 2.0, Science

2

Page 3: PHP in the Real World

Contents

A look at PHP

PHP Development Lifecycle

Case Studies

PHP and Other Technologies

Open Source

Open Discussion

3

Page 4: PHP in the Real World

A look at PHPPast & Present

4

Page 5: PHP in the Real World

Where did PHP come from?

5

Page 6: PHP in the Real World

Welcome to the real world!

6

Page 7: PHP in the Real World

Where are we now?

7

Page 8: PHP in the Real World

History of PHP

8

PHP

Internet Domains

20M

15M

10M

5M

Rasmus Lerdorf

Introduces PHP/FI

Zeev Suraski, Andi Gutmans lead development

of PHP 3

PHP 4 Released

•! 1M Internet domains •! Zend Engine •! Zend Founded

Yahoo! Standardizes on PHP

PHP 5.0 •! XML,

SOAP, OOP

Zend Studio IBM, Oracle Endorse PHP

1995 1997 1999 2000 2002 2004 2005 2006

Page 9: PHP in the Real World

Why use PHP?

Used by more than 25 million domains

Made for the web

Open Source

Documentation

Platform independent (Linux, Windows, Unix, …)

Backed by Zend, Microsoft, IBM etc.

Easy to learn

Versatile

Short time-to-market

9

Page 10: PHP in the Real World

PHP is everywhere

10

Page 11: PHP in the Real World

PHP’s Quest

11

Enterprise

SME

SOHO

Page 12: PHP in the Real World

PHP is everywhere

Top 10 internet sites in March 2009:

1. Google2. Facebook3. Windows Live4. Yahoo5. YouTube6. BBC7. Ebay8. MSN9. Wikipedia10. Bebo

Source: Alexa.com

12

Page 13: PHP in the Real World

PHP is everywhere

Top 10 internet sites in March 2009:

1. Google Python/C2. Facebook PHP3. Windows Live .NET4. Yahoo PHP5. YouTube Python6. BBC Java/PHP7. Ebay Java/PHP8. MSN .NET9. Wikipedia PHP10. Bebo Java

13

Page 14: PHP in the Real World

Common PHP misconceptions

“PHP is for hobbyists”Low learning curve

Proper software engineering => proper quality

“PHP is insecure”PHP is a language; it’s the programmer that implements security

“PHP is not a real language”It’s a dynamic scripting language; but a powerful one

14

Page 15: PHP in the Real World

PHP Development Life Cycle(or at least, the Ibuildings version)

15

Page 16: PHP in the Real World

Cowboy Coding

16

Page 17: PHP in the Real World

PHP Software Lifecycle

17

Analyses & Consultancy

Development Process

Project Delivery

Quality Assurance

Deployment & Hosting

Support & Change Management

Page 18: PHP in the Real World

Project Delivery Practices

Iterative development Process

Based on fixed time and resources

Flexible scoping (functionality) & quality

Project start phase

Project planning (releases/iterations/tasks)

Optional discovery & consultancy phase

Analysis & overall software design (Architecture)

Building custom development environment

Steps for each iteration

Meeting to define iteration scope (in stories)

Estimate development effort

Development

Meeting with presentation of deliverables

18

Page 19: PHP in the Real World

Flexible Scoping

19

Functionality

Cost Time Functionality

Cost Time

FIXED

FLEXIBLE

•! 100% of requirements are delivered

(even the unimportant ones)

•! Less or no flexibility in changing the requirements or priorities after

developments starts.

•! Projects are delivered too late in many

cases.

•! Budget spending is difficult to manage.

•! All business-critical requirements are

delivered on time and within budget.

•! Worst-case: Some non-critical requirements are not delivered.

•! Based on fixed delivery dates and thus

fixed costs.

•! All of the budget is spend on that what

is most important for your business.

“You know exactly what you

get, but just not when or at what cost.”

“You know you’ll get all

business critical parts on time and within budget.”

Page 20: PHP in the Real World

Iterative Development

20

Releases

1 2 3 4

Iterations

1 2 3

Stories

Create an article lookup form in which the user can lookup an article by number, name of prior orders. The form displays results dynamically as

the user is entering arguments.

Measured in fixed months (2 to 3

months)

Measured in fixed weeks (avg 3

weeks)

Measured in estimated hours

(1 to 16 hours)

Stories are business

focused and simple

Page 21: PHP in the Real World

The first step

21

Page 22: PHP in the Real World

The first step

21

Think!

Page 23: PHP in the Real World

Architecture

Software selection (frameworks, packages)

Non functional requirements!

Think ahead

Beware of over engineering (YAGNI)

22

Page 24: PHP in the Real World

Quality Assurance

QA process integral part of iterative development process

Flexible quality target levels

Based on actual quality requirements of clients

‘Test first’ principle applied (Test Driven Development)

Software documentation

Bug tracking & knowledge base system

Debugging and profiling tools

Testing method & practices

Automated testing (Unit testing and Web testing)

Manual testing

User Interface testing

Client environment testing (Browsers and Operating Systems)

23

Page 25: PHP in the Real World

A word on Frameworks

Why use a framework?Don’t reinvent the wheel

Good programmers are lazy

Even quicker time to market

Provides structure

Proven concepts

24

Page 26: PHP in the Real World

Frameworks

Zend Framework

http://framework.zend.com

Component framework

“Use at will architecture”

Symfony

http://symfony-project.org

Full Stack framework

Doesn’t reinvent the wheel

ATK

http://www.atk-framework.com

Backend framework

Code minimization

25

Page 27: PHP in the Real World

Teamwork

26

Page 28: PHP in the Real World

Teamwork

Important:

Standardization of processes

26

Page 29: PHP in the Real World

Teamwork

Important:

Standardization of processes

Source Control (SVN)

26

Page 30: PHP in the Real World

Teamwork

Important:

Standardization of processes

Source Control (SVN)

Documentation

26

Page 31: PHP in the Real World

Teamwork

Important:

Standardization of processes

Source Control (SVN)

Documentation

Communication

26

Page 32: PHP in the Real World

Teamwork

Important:

Standardization of processes

Source Control (SVN)

Documentation

Communication

Communication

26

Page 33: PHP in the Real World

Teamwork

Important:

Standardization of processes

Source Control (SVN)

Documentation

Communication

Communication

Communication

Communication

Communication

Communication

26

Page 34: PHP in the Real World

Case StudiesA few example PHP projects

27

Page 35: PHP in the Real World

Common Challenges

Performance & Scalability

Security

Maintainability

Time to Market

28

Page 36: PHP in the Real World

PHP and other technologiesThere’s still hope for Java

29

Page 37: PHP in the Real World

Legacy applications

30

Legacy app

Adapter Service

Legacy app

Adapter Service

Web application

Case: Amsterdam RAI

System-i/AS400

legacy application

Page 38: PHP in the Real World

‘Caffeinated PHP’

The Negatives

PHP does not always have all of the functionality needed

Java development/implementation is more difficult than many situations require

The Positives

PHP will do most of what you need to do, easier.

Java can fill almost any feature void in PHP for a web-based deployment

Source: Kevin Schroeder (Zend)

31

Page 39: PHP in the Real World

Open SourceA bit of background information

32

Page 40: PHP in the Real World

Open Source in a nutshell

Access to Source Code

Freedom to change

Freedom to distribute

Freedom to use

Open Source Definition – www.opensource.org

Speech versus Beer

33

Page 41: PHP in the Real World

Well-known examples

34

Page 42: PHP in the Real World

Open Source in the Industry

35

Page 43: PHP in the Real World

History

< 1980 Software was always open

80s, 90s Rise of commercial software, EULAs

1985 FSF founded by Richard Stallman

1991 Linus Torvalds’ first version of Linux

1997 Eric Raymond’s “The Cathedral & The Bazaar”

1998 Term ‘Open Source’ coined Netscape / Mozilla release OSI founded

1999 Red Hat goes IPO

2000-now Adoption by industry

36

Page 44: PHP in the Real World

Business Models

Knowledge model

Support

Training

Bespoke development

Licence model

Commercial license

Dual licensing

Indirect model

Projects, implementation

Lead generator for other products

Marketing instrument

37

Page 45: PHP in the Real World

TakeawaysIf you were sleeping, just remember this

38

Page 46: PHP in the Real World

Takeaways

Ibuildings is cool

PHP is a serious language

PHP is used in big, real world projects

It’s important to have a good life cycle for PHP projects

PHP can be used in conjunction with other technologies

39

Page 47: PHP in the Real World

Shameless Plug

php|architect's Guide to Enterprise PHP Development

ISBN: 978-0-9738621-8-8

Order at phparch.com or amazon.co.uk

40

Page 48: PHP in the Real World

Questions ?

41

Page 49: PHP in the Real World

Thank you!

Contact details:

http://www.ibuildings.com http://www.jansch.nl

[email protected]

Photos and logos (c) by their owners (taken from Google Images)