540 likes | 717 Views
Extending PHP with the Microsoft Platform. Joe Stagner Opinionated Misfit Geek Microsoft Corporation Joe.Stagner@Microsoft.com www.JoeOn.net. Who am I and why am I here?. Programming for over 30 years. PHP developer since 1998.
E N D
Extending PHP with the Microsoft Platform Joe Stagner Opinionated Misfit Geek Microsoft Corporation Joe.Stagner@Microsoft.com www.JoeOn.net
Who am I and why am I here? • Programming for over 30 years. • PHP developer since 1998. • Other Web Dev, ASP, CGI, Perl, JSP/Java, LiveWire, ColdFusion • With Microsoft for 6 years. • Work mostly in the Web Platofrms Group • Been the “PHP Guy” at Microsoft for all 6 years.
My Goal ……. To add one more option to your choices.
Why isn’t this already redundant? • If (PHP != “LAMP”) • Microsoft Missed • The Community Missed • Slashdot Won
About Microsoft (From the PHP Developer’s Perspective.) • Don’t think of Microsoft as ASP.NET • Microsoft’s Platform Motivations • Products versus Platforms • But Think ECOSYSTEM • 90% of PHP Developers Code on Windows • 10% of PHP Developers DEPLOY on Windows
What’s Changed at Microsoft? • Scott Guthrie / DevDiv Organization • Platform Focus • Dynamic Languages • Python, Ruby, Phalanger • IIS Team • FastCGI • Hosting Team • Tools & Data Teams • Open Source ***
The PHP Developer • Is a natural pragmatist. • Is an integration specialist. • Tends to focus on the solution, not the plumbing. • Works in venue that’s changing at a staggering pace.
PHP on Windows - Problems / Solutions • Startup Cost • Ongoing Cost • Hosting • Threads ! • Reliability / Performance • Community
Microsoft Developer Start • Windows / IIS • SQL Server Express (Workgroup) • Visual Web Developer Express • Visual C# (VB) Express • Microsoft Ajax • WPF / E ***
PHP & Microsoft Ecosystem • PHP • Microsoft
Some Favorite PHP Applications PHP-Nuke PostNuke RunCMS Mambo Xoops MyPHPAdmin PHPBB2 VBulletin VBPortal cPanel Drupal e107 MD-Pro MyPHPNuke PHPWebSite TikiWiki Typo3 Xaraya b2Evolution bBlog Serendipity WordPress TextPattern OSCommerce OSCNuke Zen Cart eGroupWare phpGroupWare Site@School ATutor Moodle Segue Coppermine QwikiWikki SugarCRM WebCalendar
Software Options from Microsoft MS Access MS Outlook BizTalk SQL Server MS LCS Identity Integration Server MS Excel PowerPoint SharePoint SQL RS Business Manager ISA Server MS FrontPage MS Project MS CMS SQL AS Virtual Earth Data Analyzer MS InfoPath Small Business Accounting Exchange Server SQL NS Messenger MS Mobile Live Meeting MS Visio Commerce Server Project Server MapPoint Tablet PC MS OneNote MS Word MS CRM MOM App Center MS Starter Kits
More Software Options from Microsoft Active Directory IIS 6/7 Axapta Navision Info Bridge Media Center ADAM MSMQ Great Plains Retail Management WSH Info Card Authorization Manager Windows Server 2003 Small Business Manager Windows Unix Services DirectX WinFX Operations Manager Windows Mobile MS Solomon VBA / VSA ActiveX Windows Workflow MS Enterprise Reporting XML-WS WSE Application Center MSN Search Hosted Controls Presentation Foundation Windows Embedded Windows Media Server System Management Server Windows Index Server Host Integration Server Vista Longhorn
Why Develop & Run on Windows • Windows Ecosystem • Over 600,000 partners in the Microsoft Ecosystem. • Microsoft makes MUCH more than Windows • Microsoft is making huge investments interoperability standards and technologies. (WS-I, etc.) • Microsoft provides • …. a complete turn-key infrastructure • …. Individual best-of-breed applications for you to choose from
Why PHP for Windows Developers • The PHP Ecosystem • Nuke and Nuke-Like Application • Open source designs • Loose and Wild • The PHP community contributes to a variety of defacto standard facilities to connect everything • Zend and the PHP community are invested in Windows Specific PHP technology.
The State of PHP on Windows • PHP is PHP is PHP. (Mostly) • Winabler, Platform, FastCGI • Other 3rd parties offer……. • CodeGear Delphi for PHP • Phalanger = Managed Code PHP • http://www.php-compiler.net/ • JCX.Software • VS.PHP • Zend’s Windows Work Continues • Microsoft’s work for PHP Continues
Things PHP is not designed for. • Component Creation • Calling binary .DLLs • Simplifying Interoperability • Remote Instancing • Application Multithreading • Asynchronous Dependencies • Multi Phase Transactions • Aggregating Multi-Interfaced Objects • Type Encapsulation & Abstraction • Object Scope Promotion • Static Instance Access
PHP on Windows • PHP on IIS 6 • PHP Versions…. Why choose ? • PHP on IIS 7 • New application context ?
PHP on Windows • More Options • Managed Code (.NET) PHP • Phalanger http://php-compiler.net/ • Windows Applications • WinBinnder • NuSphere PHP Doc • PHP-GTK
Performance • What’s the problem anyway. • CGI on Windows ? • The PHP ISAPI Extension • Microsoft FastCGI • Microsoft / Zend Agreement
Performance • IIS • Binary Solutions • CGI, ISAPI • Winabler • Zend Platform • Phalanger • COM / .NET Bridge • FastCGI
Integration Options • The Windows File System • SMTP • X.500 • WDDX • MS-SQL Server, ADO, ODBC • ASP.NET Authorization Provider • Database’d session state • XML • LDAP
Integration Options • MSMQ / MQ Series • Sockets • RSS • XML-RPC • XML Web Services / SOAP • PHP Extensibility Mechanisms
Integration Options Finally some ADVANTAGE to HTTP’s stateless protocol. • HTTP Form Tricks • They can be Open • They can be Hidden • They can be Encrypted • Cookie Tricks • They can also be encrypted
Integration Options • Build your own. • PHP on Windows built with VC++ • PECL Extensions • PHP is Open Source
Integration Options • WinDNA / COM • Microsoft .NET
PHP and COM • What’s COM ? • PHP doesn’t REALLY speak COM. • COM is the Lingua Franca of Windows • VB • C++ (Ours and many others) • Delphi • Python • Perl • Cobol • Fortran
Creating a COM Object Instance <?php $myCOMObject =new COM("COMObject.COMClass"); $myCOMObject->someMethod(“Some Argument”); ?>
Creating a COM Veneer • Build it in Visual Basic 6 • Then call from PHP <?php $myCOMObject =new COM("COMObject.COMClass"); $myCOMObject->someMethod(“Some Argument”); ?>
VB C++ C# J# … Common Language Specification ASP .NET Web Forms Web Services Mobile Internet Toolkit Windows Forms ADO .NET and XML Base Class Library .NET Framework and Tools Visual Studio .NET Common Language Runtime Operating System
XSLT Serialization XPath The Shared Source CLI VS.NET System.Web (ASP.NET) System.WinForms UI SessionState C# Design ComponentModel HtmlControls Caching JScript Security WebControls System.Drawing Configuration VB Simple Web Services VC/MC++ Drawing2D Printing Protocols Imaging Text Debugger Discovery Description Designers System.Data (ADO.NET) System.Xml ADO SQL SDK Tools Design Adapters CorDBG System ECMA CLI ILAsm Collections IO Security Runtime InteropServices Configuration Net ServiceProcess ILDbDump Remoting Diagnostics Reflection Text SN Serialization Globalization Resources Threading ILDAsm Common Language Runtime MetaInfo JIT GC App Domain Loader PEVerify MSIL Common Type System Class Loader Platform Adaptation Layer Networking Boot Loader Threads Sync Timers Filesystem
System.Web System.Windows.Forms Services UI Design ComponentModel Description HtmlControls Discovery WebControls Protocols System.Drawing Caching Security Drawing2D Printing Configuration SessionState Imaging Text System.Data System.Xml OleDb SqlClient XSLT Serialization Common SQLTypes XPath System Collections IO Security Runtime InteropServices Configuration Net ServiceProcess Remoting Diagnostics Reflection Text Serialization Globalization Resources Threading Base Class Library
Microsoft .NET • COM Callable Wrapper • Runtime Callable Wrapper • PHP Restrictions • OLE 2 • Parameterless Constructors
XML Web Services • NuSOAP • PHP 5 – Native SOAP Extension • ezSOAP • PEAR::SOAP
XML WebServices
Microsoft AJAX • Free & Open Source • Client Libraries • ASP.NET Server Implementation • PHP Server Implementation • Cross Platform Client Implementation • ASP.NET Server Side -> Javascript • Or fully LAMP
Microsoft WPF/e • Rich Client Behavior • Cross Browser • Cross Platform • V.1 XAML & JavaScript • V.next C# and/or VB • Expression Tools
Joe’s Wish List • Great SQL Server 2005 access for PHP • A native Active Directory API PHP • An AzMan API for PHP • A PHP Bridge to ADAM • An ASP.NET 2.0 Auth Provider for PHP • A seamless session state bridge. • A CDO / Exchange Bridge for PHP • PHP-Nuke, Mambo, etc. etc. • On Windows • On Microsoft SQL • Optionally in Phalanger, using AD
Call to Action ! • Get your Visual Studio (FREE) • Get SQL Server Express (FREE) • Understand what products Microsoft makes. • Email Joe.Stagner@Microsoft.com • Read me at www.JoeOn.net