DEVELOPING PHP APPLICATIONS ON MICROSOFT PLATFORM
Tautvydas Dagys (Microsoft Lithuania)
What will we cover?
Web stack the Microsoft way
PHP on Windows
Tools, practices et al.
Microsoft web stack
A powerful set of tools, servers and technologies optimized for building and hosting next generation web applications
Microsoft.com/web
Included is…
Windows Server (W) IIS 7.x (I) SQL Server 2008 R2 (S) PHP?? (P) .NET (N)
Back to PHP…
PHP has beenaround on Windows
for a decade
Windows has been usedas a main
development environment
We worked with...
The community who provided valuable feedback and shaped development.
welcomed our efforts very enthusiastically
brought vast experience and guidance.
PHP on Windows - History
2006• PHP on Windows/IIS is
a joke
2007• IIS FastCGI
2008• http://windows.php.net• PHP 5.3
2009• PHP 5.3.0
released• WinCache
1.0 released
2010• IIS FastCGI 1.5• WinCache 1.1• Improvements in PHP
application
This is Now… Microsoft / Zend partnership (October ’06) FastCGI (September ’07) SQL Server PHP Driver (October ’07) Contribution to ADOdb† (July ‘08) Web Platform Installer (December ‘08) Web Application Gallery (March ‘09) Virtual Earth Integration Kit (May ’09) PHP 5.3 release (June ‘09) Windows Azure SDK (July ‘09) Windows Cache Extension (November ‘09) Zend Framework supports Azure (January ‘10)
† Microsoft’s first LGPL contribution ever
PHP 5.3 – new release
Completely rewritten from the ground up With Visual C++ 9.0 That means more optimized code
Code rewritten to be a good “Windows citizen”
98%+ test now pass on Windows New work in the installer
Installer is being rebuilt for Windows Windows is now a first-class platform in
PHP world
Does Anybody out there even Care?
5.3 Final – Released June 2009
Was Downloaded in the period of July 2009 to August 31, 640.000
Running PHP on Windows
PHP can be run on Windows in 3 modes
| CGI| FastCGI| ISAPI
CGI vs FastCGI
(CGI on Windows) == SLOW !!! New PHP process per request
FastCGI == (CGI on steroids) Re-use PHP processes in a process pool Single-threaded execution environment
Use the non-thread-safe PHP builds with IIS FastCGI
Q: What about PHP ISAPI?A: Do not use it! Use FastCGI instead.
Targeting SQL Server The SQL Server Driver for PHP is designed to enable reliable, scalable integration with SQL Server for PHP applications deployed on the Windows platform.
Native PHP 5 extension
Reading and writing of SQL Server data from within PHP scripts.
Compatible with all editions of SQL Server 2005 and SQL Server 2008 (including Express editions).
How about Cloud Computing?
Microsoft Cloud platform – Windows Azure PHP is a first class citizen on Windows
Azure You can deploy:
PHP + MySQL apps PHP + SQL Azure Apps PHP + Cloud Storage apps
Wordpress is working on Windows Azure deployments
Developing with PHP
#1: set up the dev box
Web platform installer to help you
Download from microsoft.com/web
Allows easy install of major compontents and tools
#1: set up the dev box• http://www.microsoft.com/web/platform
#2: hit the Zone
Either use Visual Studio with add-on from JCX Software
Expression Web 2.x and above support PHP
IntellisenseLocal web server
Color-coded syntaxIntegrated FTP
client
SuperPreview
Expression Web Photoshop import
Expression Web – PHP Syntax highlighting
Expression Web PHP IntelliSense
Expression Web SuperPreview
#3: utilize the platform
IIS has a number of addins to make your life easier
Database ManagerSEO Toolkit
URL Rewriter
Web deployment tool is not just for .NET apps!
#4: utilize the ecosystem
Microsoft has a rich ecosystem of apps in its Web Application Gallery
To which you can contributeby packing your apps as for webPI
Interop and PHP
Several projects under “Interoperability bridges” initiative
Projects used to provide a bridge between technologies in Windows and PHP world
And this is: oData SDK for PHP SQL Server Reporting Services SDK for PHP Silverlight samples SQL Server CRUD app generator Accelerators and Web slices for PHP Virtual Earth PHP toolkit
Get the tools and the platform for free!
3 Spark’s for your success: Microsoft DreamSpark – for Students Microsoft WebsiteSpark – for Web-agencies up
to 10 Employees Microsoft BizSpark – for Startups
www.dreamspark.com www.websitespark.com www.bizspark.com
Demo: PHP Development on WindowsShow me some staff
So what can you get from Windows Web platform?
Quick PHP Dev platform setup for Windows via WebPI
Professional tools: Visual Studio + JCX or Expression Web
IIS Server with FastCGI and bunch of extensions
SQL Server and SQL Server driver PHP interoperability bridges PHP Deployment on Windows Azure Growing community support
Hang on! You got those links?
PHP on Windows:
php.iis.net Php 5.3 Builds:windows.php.net IRC channel:irc.freenode.net/#php-dev-winPHP Windows Training
Kit:http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=c8498c9b-a85a-4afa-90c0-593d0e4850cbPHP Windows Azure
Training Kit:
http://www.microsoft.com/azure/trainingkit.mspx
Native SQL Driver for PHP:codeplex.com/sql2k5php Windows SDK:tinyurl.com/6z57rvPHP + Windows Azure: phpazure.codeplex.comPHP + ADO.NET Data
Services:
phpdataservices.codeplex.com
PHP + Wirtual Earth Services:
http://virtualearthphpkit.codeplex.com/
Konkursai programuotojams
Arba kaip nemokamai nukeliauti į Las Vegą?
European WinPHP Challenge
http://www.eurowinphp.com/ This year registration is closed on April 1 The rules:
The application must be build in PHP. The application must be deployed on
Windows. You can start coding at April 1st the judging
starts at 1st of June. You have to write a weekly blogpost about
your experiences of building your application.
Euro WinPHP’09 Challenge Winner-Juozas Kaziukėnas
Top Related