1 / 35

Designing & Developing Web-Based Solutions in ASP.NET

Designing & Developing Web-Based Solutions in ASP.NET. Week 1. Today’s Agenda. Course Overview Introductions Lab/Lecture: WebForms + Code Behind XML, web.config State Management Web Site Deployment Homework Description. Topic Schedule. Week 2 Themes & Master Pages

hertz
Download Presentation

Designing & Developing Web-Based Solutions in ASP.NET

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Designing & Developing Web-Based Solutions in ASP.NET Week 1

  2. Today’s Agenda • Course Overview • Introductions • Lab/Lecture: • WebForms + Code Behind • XML, web.config • State Management • Web Site Deployment • Homework Description Designing & Developing Web-Based Solutions in ASP.NET

  3. Topic Schedule Week 2 Themes & Master Pages Week 3 Nav, Resources, Binding, Validation Week 4 User Controls, Files, Streams Week 5 Custom Server Controls Week 6 JavaScript, AJAX, Web Services Week 7 AJAX Toolkit, WCF, JQuery Week 8 Caching & Performance Week 9 Silverlight Week 10 Special Topics, DEMOS Designing & Developing Web-Based Solutions in ASP.NET

  4. Class Schedule 5:30-6:00 Office Hours 6:00 Review (Quiz answers) 6:15 Lecture/Lab 7:00 Break 7:10 Attendance 7:15 Lecture/Lab 8:00 Break 8:10 Assisted Lab 8:55-9:00 Assignment (posted on web) Designing & Developing Web-Based Solutions in ASP.NET

  5. Grading • 80% Attendance Required!!! • Take home quizzes 50% • Reading • Videos & Online Tutorials • Class Website Project 50% • Implement a topic from each week • 10 features required + last day 2 Minute demo Designing & Developing Web-Based Solutions in ASP.NET

  6. Website Project Ideas • Personal • Photo Album / Family Tree • Interactive Resume • Small Business • Employee/Client Tracker, eCommerce, Blog • Hobby Site • Forum, Gadgets (special calculators) • Game / Fan Site • Cards, Tic-tac-toe, Crossword, ww.Swirve.com style • Sports stats, Interactive Little League Schedule Designing & Developing Web-Based Solutions in ASP.NET

  7. Introductions - Instructor • Chuck Walters • Education • BS Computer Science, UW ‘95 (comp E minor) • ATA: Engineering Rendering ’90 (drafting & CAD) • A&P: Airframe Mechanics ’89 • Companies • Electronic Arts, Wizards of the Coast, Tooned In, Manley and Associates, Tektronix, Attachmate, The Whole Experience, Microsoft, Digini, Gamegineer Designing & Developing Web-Based Solutions in ASP.NET

  8. Introductions - Instructor • C/C++/Asm • Games: Racing, FPS, Sports, … • C# Projects • Game dev support tools, Magic the Gathering Online, Video Conferencing, Cribbage in Silverlight • Cell • Brew arcade game, ProteinFolder cell web site • Web • JNI, Swing, Java script, server monitors, … Designing & Developing Web-Based Solutions in ASP.NET

  9. Shipped Titles Designing & Developing Web-Based Solutions in ASP.NET

  10. Introductions – Students (2 min) • Name • Background (Education – Work) • Reason Attending • Personal - work • Most Interesting Topic • Web Site Project Idea Designing & Developing Web-Based Solutions in ASP.NET

  11. Basic XML Designing & Developing Web-Based Solutions in ASP.NET

  12. XML Formatted Files • Files formatted in XML • HTML • WebForms • .aspx • .ascx • web.config • <MyMasterPage>.master Designing & Developing Web-Based Solutions in ASP.NET

  13. XML –Samples • <Client></Client> // Begin & End • <Client/> // Empty Node • <Client Name=“Joe”/> // Attr only - Shortcut • <!--Client></Client--> // Comment Out • <Client Name=“Joe”> // Override if Attr set <Name>Joe</Name> // Element of Client - // Default Format <Address/> // empty, can remove with // XML, stays w/ SOAP </Client> Designing & Developing Web-Based Solutions in ASP.NET

  14. Anatomy Review Web Forms Designing & Developing Web-Based Solutions in ASP.NET

  15. WebForms – The Basics • WebForm + Code Behind • Webform • xml template used to construct html page • CodeBehind • Uses webform to render html page • Handle events on the server • Filenames • Webform = *.aspx • Codebehind = *.aspx.cs Designing & Developing Web-Based Solutions in ASP.NET

  16. WebForm – Page Directive • Page Directive • <% Page Language=“C#” CodeFile=“default.aspx.cs” AutoEventWireup=“true” Trace=“true” // On page debugging %> • Comments • <%-- This is a comment --%> // different than xml Designing & Developing Web-Based Solutions in ASP.NET

  17. WebForm - DocType • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> • Browser Compatibility • Features Compatibility • Deprecated features • XHTML compliance Designing & Developing Web-Based Solutions in ASP.NET

  18. WebForm - Content • HTML • <head> • <body> • <form> • <div> • <br> • ASP.NET controls • <asp:Label> • <asp:Content> // Used with master pages Designing & Developing Web-Based Solutions in ASP.NET

  19. WebForm – Page Class • Response Object • Query String • Cookies • URL entered • Client Browser Specs • Much More (Look at this in debugger) • State Objects • View, Session, Application, Cache • User Object • Covered next quarter (profiles, roles, security) Designing & Developing Web-Based Solutions in ASP.NET

  20. Code Behind Events Designing & Developing Web-Based Solutions in ASP.NET

  21. Events • Page • Init • Load/Loaded • Also called on postback • PreRender/Render • Unload • Postback Events • OnChanged • OnClicked • … Designing & Developing Web-Based Solutions in ASP.NET

  22. Basic Intro Server Controls Designing & Developing Web-Based Solutions in ASP.NET

  23. Server Controls Designing & Developing Web-Based Solutions in ASP.NET • Definition: • runat=“server” • Basic Types • HTML Controls (Simple wrap) • Web Controls (Enhanced wrap) • Rich Controls (Limited use custom controls) • Validation Controls

  24. Review State Management Designing & Developing Web-Based Solutions in ASP.NET

  25. State Management Designing & Developing Web-Based Solutions in ASP.NET

  26. State Management – Accessors • Common Get/Set design pattern • <State Type>[“Key”] • Examples • ViewState[“myData”] = 1234; // Any Data Type • Session[“myData”] = 1234; // Any Data Type • HttpCookieuserPrefs = Response.Cookies[“cookieName”]; • String productName = Request.QueryString[“product”]; Designing & Developing Web-Based Solutions in ASP.NET

  27. State Management – ViewState • Access • ViewState[someControl.ID] • Controls automatically stored by ID (which is a string) • Stored as global base type: System.Object • ViewState[“LuckyNum”] = 1234; // object array • intluckyNum = (int)ViewState[“LuckyNum”]; // Cast • Enabled by default • <%@ Page EnableViewState=“false” %> • Encryption off by default • <%@ Page ViewStateEncryptionMode=“Always” %> Designing & Developing Web-Based Solutions in ASP.NET

  28. State Management – Query Str • Format • Key / Value • Element Access • Use • Redirection • Simple State • Login Name • Product IDs • Action Designing & Developing Web-Based Solutions in ASP.NET

  29. State Management - Cookies Lifetime settings On Disk or In Memory Compact setting Dealing with Disabled Cookies Designing & Developing Web-Based Solutions in ASP.NET

  30. Overview Web Site Deployment Designing & Developing Web-Based Solutions in ASP.NET

  31. Website Deployment • Location • FTP (preferred) • Local • IIS • FrontPage Extensions • Multi-Site • Virtual Directories • Redirect (performance hit) Designing & Developing Web-Based Solutions in ASP.NET

  32. Website Deployment - Admin • Domain Redirect • DNS1, DNS2, DNS… • Permissions • Browsable directory • Password protected Designing & Developing Web-Based Solutions in ASP.NET

  33. Hands On Lab Designing & Developing Web-Based Solutions in ASP.NET

  34. Lab • Create a simple site • View files • Web.config • .aspx + codebehind + partial class (maintained by VS) • Debug Events • Add Server Controls • Deploy site • Set Trace on (per page) • Custom Errors off (web.config) • View web host controls (webhost4life.com) Designing & Developing Web-Based Solutions in ASP.NET

  35. Homework • Readings • Chapter 16 – Themes & Master Pages • Reading Quiz due beginning of next class • Review if needed (Ch 3 – Web Forms, Ch 6 – State) • Project Assignment • Signup for webhosting • WebHost4Life.com $10 / month • Signup for domain (optional yet recommended) • www.mydomain.com < $9 / year • “Website Project” idea. • Write up simple page hierarchy & content Designing & Developing Web-Based Solutions in ASP.NET

More Related