Joe Staner Zend Con 2008

61
Joe Stagner Opinionated Misfit Geek Microsoft Corporation Developer Tools & Platforms http://www.MisfitGeek.com [email protected] ASPHP Make ‘em Talk ! Bridging PHP & ASP.NET Applications

description

PHP, LAMP, Windows, ASP.NET ?????? Sometimes you can't choose just one.In this session, long time PHP developer and Microsoft MisfitGeek with explore the plethora of ways you can make PHP and ASP.NET interoperate.

Transcript of Joe Staner Zend Con 2008

Page 1: Joe Staner Zend Con 2008

Joe Stagner

Opinionated Misfit GeekMicrosoft Corporation

Developer Tools & Platformshttp://www.MisfitGeek.com

[email protected]

ASPHP Make ‘em Talk !

Bridging PHP & ASP.NET Applications

Page 2: Joe Staner Zend Con 2008

Why is Microsoft Interested in PHP

( ... and why am I here ? )

Page 3: Joe Staner Zend Con 2008

Microsoft & PHP

ZendCon & PHPTek / PHPWorks

Zend Partnership

FastCGI

PHP Expression Support

MS SQL Drivers for PHP

CodePlex PHP Projects (Like AJAX PHP)

ADODB ***

URL Rewrite

IIS.NET Guidance

Page 4: Joe Staner Zend Con 2008

New Stuff from My Team

Silverlight 2.0 b

Dynamic Data

ADO.NET Data Services

MVC

Web Forms “4.0”

Page 5: Joe Staner Zend Con 2008

Why Run On or Integrate With Windows?

Page 6: Joe Staner Zend Con 2008

PHP-Nuke

PHPBB2

MD-Pro

b2Evolution

OSCNuke

Moodle

VBulletin

PostNuke

MyPHPNuke

bBlog

Zen Cart

Segue

VBPortal Drupal

Coppermine

phpGroupWare

PHPWebSite

eGroupWare

Serendipity

Xoops

Site@School

TextPattern

Typo3

QwikiWikki

RunCMS Mambo

cPanel

TikiWiki

WordPress

SugarCRM

MyPHPAdmin

e107

Xaraya

OSCommerce

ATutor

WebCalendar

Some Favorite PHP Applications

Page 7: Joe Staner Zend Con 2008

PHP and the Microsoft Developer Ecosystem.

Windows Ecosystem– Over 600,000 partners in the MS 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

– Rapidly growing Service Offerings

– FUTURE TECHNOLOGIES

Page 8: Joe Staner Zend Con 2008

MS Access

MS Excel

MS FrontPage

MS InfoPath

Live Meeting

MS OneNote

PowerPoint

MS Outlook

MS Project

Small Business

Accounting

MS Visio

MS Word

SharePointBusiness

Manager

MS CRM

Project Server

MS CMS

Commerce

Server

Exchange

Server

MS LCS

MapPoint

Messenger

Virtual Earth

MOM

BizTalk SQL Server

SQL RS

SQL AS

SQL NS

App Center

Identity

Integration

Server

ISA Server

Data Analyzer

MS Mobile

Tablet PC

MS Starter

Kits

Software Options from Microsoft

Page 9: Joe Staner Zend Con 2008

Great Plains

Axapta

Small

Business

Manager

MS

Enterprise

Reporting

Navision

Retail

Management

MS SolomonWindows

Mobile

Windows

Embedded

Active

Directory

ADAM

Authorization

Manager

Operations

Manager

IIS 6/7

Windows

Server 2003

XML-WS

WSE

Media Center

Windows

Media

Server

Application

Center

System

Management

Server

Windows

Unix

Services

Host

Integration

Server

Windows

Workflow

Vista

Longhorn

Presentation

Foundation

(Avalon)

MSN

Search

Windows

Index

Server

VBA / VSA

Info Bridge

WSH

DirectX

ActiveX

Hosted

Controls

MSMQ Info Card

WinFX

More Software Options from Microsoft

Page 10: Joe Staner Zend Con 2008

Slverlight

More Software Options from Microsoft

WF or BizTalk

Live Services

Virtual Earth

Media Services

Page 11: Joe Staner Zend Con 2008

Does PHP on Windows Actually WORK ?

Page 12: Joe Staner Zend Con 2008

On Windows

Tools (Windows Only)

– VS.PHP

– Phalanger

– NuSphere PHPEd, Delphi for PHP

Tools (Cross Platform)

– Zend Studio

– ActiveState Komodo

Drivers

– MSPHPSQL

Page 14: Joe Staner Zend Con 2008

PHP & IIS

Versions & App Pools

Page 15: Joe Staner Zend Con 2008

Example

Membership Integration

Page 16: Joe Staner Zend Con 2008

ASP.NET Membership

Native MS SQL Provider

– SQL Server or SQL Express

– 3rd party ASP.NET Membership Provider

MySQL

Oracle

XML

Page 17: Joe Staner Zend Con 2008

Open Source Providers

Page 18: Joe Staner Zend Con 2008

ASP.NET Membership Integration

ASP.NET– Complete Managed API

PHP on Windows– Microsoft SQL Server Driver for PHP (Willow)

– Web Services

– .NET / COM

PHP On Linux– FreeTDS

– Sockets

– Web Services

Page 19: Joe Staner Zend Con 2008

Setting Up ASP.NET Membership

aspnet_regsql.exe

Page 20: Joe Staner Zend Con 2008

Complete Schema

Applications

Membership

Roles

Usage

demonstrated in

the MS SQL

Provider Source

Code.

Page 21: Joe Staner Zend Con 2008

Enable SQL for TCP/IP

Page 22: Joe Staner Zend Con 2008

Open the Windows Firewall

Page 23: Joe Staner Zend Con 2008

ASP.NET Authentication from PHP on Windows

Page 24: Joe Staner Zend Con 2008

Authentication from PHP/Linux

MS SQL In Windows

– Security Configuration Required

Free TDS On Linux

– MS SQL via ODBC over TCP/IP

Platform Specific PHP Code

Page 25: Joe Staner Zend Con 2008

Other Integrations

Page 26: Joe Staner Zend Con 2008

Office Documents from PHP on Windows

Page 27: Joe Staner Zend Con 2008

Microsoft Silverlight

CLIENT !

Cross Platform

Rich Media

You're hearing all about it !!!

Page 28: Joe Staner Zend Con 2008

Other Integrations

Page 29: Joe Staner Zend Con 2008

Silverlight from PHP on Windows & Linux

Page 30: Joe Staner Zend Con 2008

Other Integrations

Page 31: Joe Staner Zend Con 2008

Microsoft AJAX

Intergrated with ASP.NET Server

Complealty Independent Client Framework

Server Implementation Samples for Non-

MS

Completely Free

Completely Open Source

Page 32: Joe Staner Zend Con 2008

Microsoft AJAX PHP on Windows & Linux

Page 33: Joe Staner Zend Con 2008

Other Integrations

Page 34: Joe Staner Zend Con 2008

XML Web Services

PHP 5 – Native SOAP Extension

PEAR::SOAP

NuSOAP

ezSOAP

Page 35: Joe Staner Zend Con 2008

.NET Web Services from PHP

Page 36: Joe Staner Zend Con 2008

Other Integrations

Page 37: Joe Staner Zend Con 2008

PHP and COMWhat’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

Page 38: Joe Staner Zend Con 2008

Creating a COM Object

Instance

<?php

$myCOMObject =new

COM("COMObject.COMClass");

$myCOMObject->someMethod(“Some Argument”);

?>

Page 39: Joe Staner Zend Con 2008

COM Objects from PHP on Windows

Page 40: Joe Staner Zend Con 2008

Other Integrations

Page 41: Joe Staner Zend Con 2008

Operating System

Common Language Runtime

Base Class Library

ADO .NET and XML

ASP .NETWeb Forms Web Services

Mobile Internet Toolkit

Windows

Forms

Common Language Specification

VB C++ C# J# …V

isu

al S

tud

io .N

ET

.NET Framework and Tools

Page 42: Joe Staner Zend Con 2008

VS.NET

Common Language Runtime

System

System.Data (ADO.NET) System.Xml

Design

ADO

Adapters

SQL

Globalization

Diagnostics

Configuration

Collections

Resources

Reflection

Net

IO

Threading

Text

ServiceProcess

Security Runtime

InteropServices

Remoting

Serialization

XPath

XSLT Serialization

System.Drawing

JITGC

MSIL

App Domain Loader

Common Type System Class Loader

System.Web (ASP.NET)

Configuration

SessionState

Caching

Security

Simple Web Services

Description

Protocols

UI

HtmlControls

WebControls

Discovery

C#

VC/MC++ Imaging

Drawing2D

Text

Printing

JScript

VB

Platform Adaptation LayerBoot Loader

SyncThreads

Networking

Timers Filesystem

System.WinForms

Design ComponentModel

Debugger

Designers

SDK Tools

CorDBG

ILAsm

ILDbDump

SN

ILDAsm

MetaInfo

PEVerify

EC

MA

CLI

The Shared Source CLI

Page 43: Joe Staner Zend Con 2008

Base Class Library

System

System.Data System.Xml

System.Web

Globalization

Diagnostics

Configuration

Collections

Resources

Reflection

Net

IO

Threading

Text

ServiceProcess

Security

Common

OleDb

SQLTypes

SqlClient

XPath

XSLT

Runtime

InteropServices

Remoting

Serialization

Serialization

Configuration SessionState

Caching Security

Services

Description

Discovery

Protocols

UI

HtmlControls

WebControls

System.Drawing

Imaging

Drawing2D

Text

Printing

System.Windows.Forms

Design ComponentModel

Page 44: Joe Staner Zend Con 2008

Microsoft .NET

COM Callable Wrapper

Runtime Callable Wrapper

PHP Restrictions

– OLE 2

Parameterless Constructors

Page 45: Joe Staner Zend Con 2008

.NET Objects from PHP on Windows

Page 46: Joe Staner Zend Con 2008

Other Integrations

Page 47: Joe Staner Zend Con 2008

Microsoft Services

Most are Free

Most are Platform Independent

Most are Ad Free

Page 48: Joe Staner Zend Con 2008

.Microsoft Services from PHP

Page 49: Joe Staner Zend Con 2008

Other Integrations

Page 50: Joe Staner Zend Con 2008

Phalanger

Page 51: Joe Staner Zend Con 2008

WHY - Helpers you might need.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

Page 52: Joe Staner Zend Con 2008

Integration Options

The Windows File System

SMTP

X.500

WDDX

MS-SQL Server, ADO, ODBC

– What about the new auth provider?

– What about database’d session state

XML

LDAP

Page 53: Joe Staner Zend Con 2008

Integration Options

Sockets

RSS

XML-RPC

XML Web Services / SOAP

PHP Extensibility Mechanisms

Page 54: Joe Staner Zend Con 2008

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

Page 55: Joe Staner Zend Con 2008

Integration Options

Build your own.

PHP on Windows built with VC++ (6)

PECL Extensions

PHP is Open Source

Page 56: Joe Staner Zend Con 2008

A PHP Project Wish ListA native Active Directory API PHP

An AzMan API for PHP

A PHP Bridge to ADAM

An ASP.NET 2.0 Authentication Provider for PHP

A seamless session state bridge.

A CDO / Exchange Bridge for PHP

PHP-Nuke, Mambo, etc. etc. – On Microsoft SQL

– Optionally in Phalanger

– Optionally using AD

Page 57: Joe Staner Zend Con 2008

Call to Action !

•Get your FREE Visual Studio

•Understand what products Microsoft makes.

•Email [email protected]

•Read me at http://www.MisfitGeek.com

Page 58: Joe Staner Zend Con 2008
Page 59: Joe Staner Zend Con 2008

Thanks •Andrew Stopford

Page 60: Joe Staner Zend Con 2008

© 2007 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Q&A

THANKS !

Page 61: Joe Staner Zend Con 2008

© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions,

it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.

MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.