php and zend framework on windows

Post on 12-May-2015

8.759 Views

Category:

Technology

5 Downloads

Preview:

Click to see full reader

DESCRIPTION

A presentation given by Roy Ganor and myself at local Microsoft PHP developer day in Microsoft Israel, covering some general Zend info, Zend Framework, some Zend Studio and a bit about Windows Azure. The talk also included a lot of live demo and code review

TRANSCRIPT

©All rights reserved. Zend Technologies, Inc.

PHP Development & Deploymentwith Zend and Microsoft

Roy GanorZend Studio Project Leader, Zend Technologies

Shahar EvronTechnical Product Manager, Zend Technologies

©All rights reserved. Zend Technologies, Inc.2 PHP on Windows

Welcome!

• Agenda

Introductions

An Overview of the Zend Stack

Rapid Development with Zend Framework and Zend Studio

Running on Windows Platforms with Zend Server

A little bit of Cloud for dessert

©All rights reserved. Zend Technologies, Inc.3 PHP on Windows

Who are we?

• Shahar Evron

A PHP programmer since 2002

▶ At Zend since 2005

▶ A Zend Framework contributor since 2006▶ Maintain Zend_Http_Client

▶ Technical Product Manager for Zend Server▶ The marketing department’s pet geek :)

©All rights reserved. Zend Technologies, Inc.4 PHP on Windows

Who are we?

• Roy Ganor

Project Lead at Zend/Eclipse

Contributing to the following projects:• PHP Development Tools

• Ajax Tools

• Data Tools

• Dynamic Languages Tools

Tools Matter!

©All rights reserved. Zend Technologies, Inc.

Introducing Zend’s PHP StackWIMP? WAMP? LAMP? MAMP? Zend!

©All rights reserved. Zend Technologies, Inc.9 PHP on Windows

An Integrated, Heterogeneous Stack

©All rights reserved. Zend Technologies, Inc.

A Complete Solution

©All rights reserved. Zend Technologies, Inc.

The Production Side…

Clustering supportAggregated app monitoring

Cross-server job queuing

App monitoring & diagnosticsPage caching, job queuing

Support, updates and hot fixes

Data caching and opcode accelerationIntegrated, native installers

Web admin console

©All rights reserved. Zend Technologies, Inc.

And the Development Side

Zend Server integrationZend Framework integrationTeam developmentTesting and debuggingSupport and updates

Basic code editingBasic debuggingEclipse plug-in

©All rights reserved. Zend Technologies, Inc.13 PHP on Windows

Introducing the Eclipse Foundation

A consortium of major software vendors, solution providers, corporations, educational and research institutions and individuals working together to create an eco-system that enhances, promotes and cultivates the Eclipse open platform with complementary products, services and capabilities

©All rights reserved. Zend Technologies, Inc.14 PHP on Windows

The Ecosystem

©All rights reserved. Zend Technologies, Inc.15 PHP on Windows

Eclipse Simultaneous Release

2005 2006 2007 2008 2009

6Projects

10Projects

21Projects

23Projects

33Projects

©All rights reserved. Zend Technologies, Inc.16 PHP on Windows

Zend Contribution

• PHP Development Tools

• Ajax Tools

• Dynamic Languages Tools

• Data Tools

©All rights reserved. Zend Technologies, Inc.

Introducing Zend Framework

©All rights reserved. Zend Technologies, Inc.18 PHP on Windows

Introducing Zend Framework

• Some History:Started as part of the PHP Collaboration Project in late ‘05

First public release: 0.2, Early ‘06

1.0 Released on July 2007

Currently in version 1.10 (today!)

Zend Framework 2.0 planning process started

• Open-source, business-friendly licensing

• Emphasis on high-quality, loose coupling and simplifying creation of modern Web Applications

©All rights reserved. Zend Technologies, Inc.

Zend Framework Rapid Adoption Continues

• Rapidly Growing Over 10M downloads

Over 200 contributors

• Commercial Contributions

• Enterprise Adoption

©All rights reserved. Zend Technologies, Inc.20 PHP on Windows

Is it really a framework?

• Zend Framework is: A Full Stack Application Framework ?

A Component Library ?

Both!

• Use-at-will Architecture Loose coupling between components

Pick and choose the components you need and use them with your own app or with a different framework

Build your application from the group up based on ZF’s MVC

©All rights reserved. Zend Technologies, Inc.21 PHP on Windows

Example: Zend_Mail

• Allows you to easily compose and send e-mail messages from your PHP applications Simplified control over recipients, headers, etc.

Easy creation of multipart/alternative HTML messages

Easy attachment handling

Supports different delivery transports

• Allows you to read e-mail messages from POP3, IMAP, Mbox and Maildir not demonstrated here :)

©All rights reserved. Zend Technologies, Inc.22 PHP on Windows

Example: Zend_Mail – Sending a message

// Load the Zend_Mail classrequire_once 'Zend/Mail.php';

// Instantiate a new message object$message = new Zend_Mail('utf-8');

// Use the fluent interface to set message properties$message->setFrom('shahar.e@zend.com', 'Shahar E') ->setSubject('Hello, world!') ->setBodyText("Hi, what's up?") ->addHeader('Importance', 'high') ->addTo('someone@example.com', 'Some One') ->addCc('other.guy@example.com', 'Other Guy') ->addBcc('t.person@example.com', 'The Third Person'); // Send the message!$message->send();

©All rights reserved. Zend Technologies, Inc.23 PHP on Windows

Example: Zend_Mail – Adding Attachments

// Load the Zend_Mail classrequire_once 'Zend/Mail.php';

// Instantiate a new message object$message = new Zend_Mail('utf-8');

// Use the fluent interface to set message properties$message->setFrom(‘do-no-repoy@example.com', ‘Report System') ->setSubject('The report you have requested is ready') ->addTo('shahar@localhost', 'Shahar Evron'); // Add a PDF attachment (Will be base64 encoded)$pdf = $message->createAttachment(

file_get_contents('report.pdf'));$pdf->type = 'application/pdf';$pdf->filename = 'report.pdf';

// ... Continued on next slide ...

©All rights reserved. Zend Technologies, Inc.24 PHP on Windows

Example: Zend_Mail – Adding Attachments

// Add a logo to the message - referenced from the message HTML body$img = $message->createAttachment(file_get_contents('logo.png'));$img->type = 'image/png';$img->id = 'logo-image-png@example.com';$img->filename = 'logo.png';$img->disposition = Zend_Mime::DISPOSITION_INLINE;

// Set the message body$message->setBodyHtml( "Hello Shahar,<br /><br />" . "The report you have requested is attached as a PDF file.<br /><br />" . "Enjoy!<br />" . '<img src="cid:logo-image-png@example.com" alt="Example.com Logo" />');

// Set the message MIME-type to multipart/related$message->setType(Zend_Mime::MULTIPART_RELATED);

// Send the message!$message->send();

©All rights reserved. Zend Technologies, Inc.25 PHP on Windows

Example: Zend_Mail – Adding Attachments

©All rights reserved. Zend Technologies, Inc.

Zend Framework – (Some) Components

26 PHP on Windows

Core

Registry

Log

Mail

Uri

Cache

Config

MVC

Controller

Layout

View

Application

Formats & Data AccessDb

Search

Json

Dom_Query

Ldap Feed

Web Services

XmlRpc

Rest

Soap

Http_Client

InfoCard

Yahoo Flickr

Twitter

Amazon

Akismet

Web Infrastructure

Session

Form

Tag

Internationalization

Locale

Currency

Translate

Measure

Loader Date

Security

Auth

Filter

Acl

Validate

OpenId Captcha

Navigation

ProgressBar

Dojo

Amf Queue

Development

Tool

Debug

WildFire

TestDelicious …

©All rights reserved. Zend Technologies, Inc.

Zend Framework and Zend StudioDemo Time!

©All rights reserved. Zend Technologies, Inc.33 PHP on Windows

Windows Azure Table Storage

• A Highly Scalable Cloud Database Billions of records, terabytes of data

• “Entities” and “Properties”

• Not exactly a relational database

• ACID (Atomic, Consist, Isolated, Durable) Transactions

• Query syntax somewhat reminding SQL (but not really)

• Schema-less some structure can be enforced in client side

• Can be partitioned across servers

©All rights reserved. Zend Technologies, Inc.

RecapWhat? Are we done so quickly!?

©All rights reserved. Zend Technologies, Inc.35 PHP on Windows

What have we learned?

• PHP Is Everywhere! PHP Is on Windows! No more excuses not to use it! :)

• PHP can become even more effective with the right tools

Get an IDE and use it’s capabilities

Get the framework that fits your needs, study it, and utilize it

Standardize on a runtime environment

• Plan for the future, if you’re successful it will hit you fast!

Plan for scaling

Production Monitoring & Reliability, Moving to the Cloud

©All rights reserved. Zend Technologies, Inc.

Thanks!Still have questions?

roy@zend.com or @royganor

shahar.e@zend.com or @shevron

©All rights reserved. Zend Technologies, Inc.37 PHP on Windows

Tips & Tricks

• Keep your slides clean: Avoid using more than 5 bullets

Try to keep your bullets as short as possible

• Why?People usually don’t read slides with a lot of text

Easier to memorize

Highlighted text can be displayed here

top related