ASPNET for PHP Developers
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

ASPNET for PHP Developers

  • 2,703 views
Uploaded on

ASPNET for PHP Developers

ASPNET for PHP Developers

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,703
On Slideshare
2,702
From Embeds
1
Number of Embeds
1

Actions

Shares
Downloads
39
Comments
0
Likes
2

Embeds 1

http://www.slideshare.net 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • KEY MESSAGE: SLIDE BUILDS: None SLIDE SCRIPT: Hello and Welcome to this MSDN session on {insert session title}. My name is {insert name} [Do not use the term FIELDCONTENT] SLIDE TRANSITION: ADDITIONAL INFORMATION FOR PRESENTER:

Transcript

  • 1. ASP.NET for PHP Developers Joe Stagner ( [email_address] ) Developer Technologist Microsoft Corporation
  • 2. Session Prerequisites
    • Knowledge of PHP
    • Some familiarity with ASP.NET
    • Some familiarity with C#
    Level 200
  • 3. Demonstrations
    • Demo 1 – ASP.NET Event Model
    • Demo 2 – Validation,
    • Session State & Error Handling
    • Demo 3 – Database Access
    • Demo 4 – Authentication
    • Demo 5 – XML in ASP.NET
  • 4. Agenda
    • Architecture Comparison
    • ASP.NET and PHP Functionality
    • Migration Considerations
  • 5. Architecture Comparison
    • Microsoft .NET with ASP.NET
    PHP pages running on most major web servers Presentation Business Logic Data MySQL PHP and Apache CLR C# Assembly ADO.NET. Can still use COM+ Components. MySQL common, but support for most databases PHP Platform SQL Server 2000 Stored Procedures OpenXML. Web Forms Server Controls Code-Behind. ASP.NET IIS
  • 6. Architecture Comparison
    • Analogous Functionality
    • Lower Architectural Level
      • Platform Independent Processor/Engine
      • A Series of Technologies
  • 7.
    • Both Support OOP
    • PHP (4.x)
      • Only Supports Partial Encapsulation
      • No Overloading
      • No abstraction
    • ASP.NET
      • Offers Private, Public, Protected accessibility
      • Supports overloading and polymorphism
    • PHP (5)
      • Good OOP Support
    Architecture Comparison
  • 8.
    • Compilation
      • PHP
        • Compiled to Zend Opcodes when requested
        • Zend Engine generates and serves HTML
      • ASP.NET
        • Compiled to MSIL (Microsoft Intermediate Language) on the first request
        • MISL processed by the CLR (Common Runtime Language) to machine code
        • Subsequent requests use that same machine code (no recompilation)
    Architecture Comparison
  • 9.
    • Feature Comparison
      • Coding language
      • Component Model
      • Type System
      • Output Caching
      • Database Access
      • Database Output
      • External Packages
      • XML
    Architecture Comparison
  • 10.
    • Feature Comparison (cont.)
      • Eventing
      • XML Web Services
      • Session State
      • Regular Expressions
      • Debugging
      • Error Handling
      • IDE
    Architecture Comparison
  • 11.
    • PHP
      • Perl style syntax
      • Loosely typed variable declaration
      • Code Rendering Blocks <?php … ?>
    • ASP.NET
      • VB or C# syntax
      • Strongly typed variable declaration
      • Code Rendering Blocks <% … %>
      • Code Behind
    Comparing Syntax and Common Tasks
  • 12.
    • HTML Server Controls
      • May contain properties, methods, and events
      • Tag identifies the control to create
      • Must contain the ‘runat=server’ attribute
    • Web Server Controls
      • Provides browser specific HTML
      • Provides an abstract way of creating controls that may be rendered in a browser specific way.
    Server Controls
  • 13.
    • PHP
      • Handles event through the PostBack mechanism
      • May manually detect events with client side script.
    • ASP.NET
      • Server Controls invoke server side events.
      • Event handling happens in through ASP.NET on the server.
    Event Handling
  • 14. Demo Programming the Event Model
  • 15.
    • Session State
    • ViewState
    • Cookies
    Page State
  • 16. Validation
    • Validation Controls
      • RequiredFieldValidator
      • RegularExpressionValidator
      • CustomValidator
    • Client-side Validation
    • Displaying Validation Errors
    • ControlToValidate
  • 17. Session State
    • Session State Store Modes
      • In-Process Mode (InProc)
      • State Server Mode (StateServer)
      • SQL Server Mode (SQLServer)
    • ASP.NET’s cookieless feature (cookieless=“true”)
  • 18. Configuration
    • Hierarchy of .config Files
      • machine.config
      • Web.config
    • XML-based
    • Live changes
    • Extensible
  • 19. Error handling
    • Try – Catch – Finally
    • Customizing error pages
    <configuration> <system.web> <customErrors mode=&quot;RemoteOnly&quot; defaultRedirect=“/CustomError.htm&quot;/> <error statusCode=&quot;500&quot; redirect=&quot;/error/callsupport.htm&quot;/> <error statusCode=&quot;404&quot; redirect=&quot;/error/notfound.aspx&quot;/> </system.web> </configuration>
    • Application-wide with Global.aspx
    private void Application_Error(object sender,System.EventArgs e) { // use Request.Url.ToString() to get URL // use Server.GetLastError().ToString() for a Stack Trace // write the error message to the NT Event Log }
  • 20. Demo Validation, Session State and Error Handling
  • 21. Data Access
    • ADO.NET
    • Dataset object
    • Databinding
  • 22. Demo Database Access
  • 23. Authentication Types
    • ACL
    • URL
    • Authentication Element
      • None
      • Windows
      • Forms
      • Passport
  • 24. Demo Authentication
  • 25. Catalog browsing
    • Middle tier
      • Call: SqlConnection, SqlDataAdapter and SqlCommand
      • Return: DataSet or SqlDataReader
    • Presentational tier
      • DataBind query results to data controls
      • Repeater and DataList objects
      • ItemTemplate to set presentation
  • 26. XML
    • PHP
      • Uses a SAX parser
      • No native DTD support
      • Numerous third party packages available
    • ASP.NET
      • Supports DOM parsing
      • .NET provides support for all W3C recommendations
      • Extensive support for UDDI, WDSL, and SOAP
  • 27. Demo Working with XML & XML Web Services
  • 28. Integreted IDE
    • Debugging
      • Visual Studio .NET provides excellent ASP.NET debugging tools.
      • Allows for breakpoint setting in the events
      • One debugging session crosses all three logical tiers (presentation/script, component, and sql)
  • 29. Deployment
    • XCOPY / Drag ‘n Drop
    • Windows Installer
  • 30. ASP.NET Can – PHP Can’t
    • 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
  • 31. Migration Considerations
    • Business logic
      • Separate business logic from presentation code
      • Create .NET components
    • Presentation
      • Generate Pages
      • Use Server Controls
      • .aspx and .cs files
      • Presentation logic calls .NET components
  • 32. Migration Considerations
    • Output caching
      • Cache pages
      • Reduce load on database, web server
      • Increased performance
    • Fragment Caching
  • 33. Migration Considerations
    • Data caching
      • Expiration
      • Scavenging
      • File and Key Dependencies
  • 34. For More Information…
    • MSDN Web site at
      • msdn.microsoft.com
    • Other MS web sites
      • www.asp.net
  • 35. 3 rd Party Applications
    • A broad range of applications on ASP.NET
    • Commercial and Non-Commercial licensing
    • Fully customizable
    • Initial applications
      • DotNetNuke (portal builder)
      • Telligent Community Server
      • Forums, Blogs, Gallery
    www.communityserver.org www.dotnetnuke.com
  • 36. MSDN Essential Resources for Developers Training & Events MSDN Webcasts, MSDN Online Seminars, Tech-Ed, PDC, Developer Days Subscription Services Online Information Membership Programs Print Publications Library, OS, Professional, Enterprise, Universal Delivered via CD-ROM, DVD, Web MSDN Online, MSDN Flash, How-To Resources, Download Center MSDN User Groups MSDN Magazine MSDN News
  • 37. How-To Resources Simple, Step-By-Step Procedures
    • Embedded Development How-To Resources
    • General How-To Resources
    • Integration How-To Resources
    • JScript .NET How-To Resources
    • .NET Development How-To Resources
    • Office Development Resources
    • Security How-To Resources
    • Visual Basic ® .NET How-To Resources
    • Visual C# ™ .NET How-To Resources
    • Visual Studio ® .NET How-To Resources
    • Web Development How-To Resources (ASP, IIS, XML)
    • Web Services How-To Resources
    • Windows Development How-To Resources
    • http://msdn.microsoft.com/howto
  • 38. MSDN Webcasts Interactive, Live Online Event
    • Interactive, Synchronous, Live Online Event
    • Discuss the Hottest Topics from Microsoft
    • Open and Free For The General Public
    • Takes Place Every Tuesdays
    • http://www.microsoft.com/usa/webcasts
  • 39. MSDN Subscriptions THE way to get Visual Studio .NET Visual Studio .NET MSDN Subscriptions NEW
    • Professional
    • Tools to build applications and XML Web services for Windows and the Web
    MSDN Professional $1199 new $899 renewal/upgrade MSDN Enterprise $2199 new $1599 renewal/upgrade MSDN Universal $2799 new $2299 renewal/upgrade
    • Enterprise Developer
    • Enterprise lifecycle tools
    • Team development support
    • Core .NET Enterprise Servers
    • Enterprise Architect
    • Software and data modeling
    • Enterprise templates
    • Architectural guidance
  • 40. Where Can I Get MSDN?
    • Visit MSDN Online at msdn.microsoft.com
    • Register for the MSDN Flash Email Newsletter at
      • msdn.microsoft.com/flash
    • Become an MSDN CD Subscriber at msdn.microsoft.com/subscriptions
    • MSDN online seminars
      • msdn.microsoft.com/training/seminars
    • Attend More MSDN Events
  • 41. MS Press Essential Resources for Developers Microsoft® Visual Studio® .NET is here! This is your chance to start building the next big thing. Develop your .NET skills, increase your productivity with .NET Books from Microsoft Press® www.microsoft.com/mspress
  • 42. Become A Microsoft Certified Solution Developer
    • What Is MCSD?
      • Premium certification for professionals who design and develop custom business solutions
    • How Do I attain MCSD Certification?
      • It requires passing four exams to prove competency with Microsoft solution architecture, desktop applications, distributed application development, and development tools
    • Where Do I Get More Information?
      • For more information about certification requirements, exams, and training options, visit www.microsoft.com/mcp
  • 43. Training Training Resources for Developers
    • Course Title:
      • Course Number:
      • Availability:
      • Detailed Syllabus: www.microsoft.com/traincert
    • Course Title:
      • Course Number:
      • Availability:
      • Detailed Syllabus: www.microsoft.com/traincert
    To locate a training provider for this course, please access www.microsoft.com/traincert Microsoft Certified Technical Education Centers are Microsoft’s premier partners for training services
  • 44. Finding me.
    • [email_address]
    • http://www.ManagedCode.com
    • http://blogs.msdn.com/JoeStagner
    • http://www.MSDNEvents.com
  • 45.