KEMBAR78
Introduction to ASP.NET
Developing Windows and Web Applications using Visual Studio.NETPeter GfaderSenior Software Architect
Peter GfaderSSA @ SSWLoves C# and .NET (Java not anymore)Specializes in Windows FormsASP.NETTFS testingAutomated testsSilverlight
Homework?Consume a public web service
Show users where they areAgendaThe course ten sessions – Overview so farOverview of ASP.NETAn ASP.NET PageServer ControlsUser ControlsValidationMaster PagesThemes & skinsLABPage Cycle EventsMenu, Navigation & SitemapsSome cool new ASP.NET 2 Server Controls
Session 6: ASP. NET The course ten sessions – Overview so far
 Overview of ASP.NET
 An ASP.NET Page
 Server Controls
 User Controls
 Validation
 Master Pages
 Themes & skinsLAB Page Cycle Events
 Menu, Navigation & Sitemaps
 Some cool new ASP.NET 2 Server Controlshttp://sharepoint.ssw.com.au/Training/UTSNET/Part 1: .NET WinformsOverview of .NETData in FormsUsability - Rules to Better Windows FormsDeployment and Security of Windows FormsWeb Services and ThreadingThe 10 SessionsFirst 5 – Done – Winforms
http://sharepoint.ssw.com.au/Training/UTSNET/Part 2: .NET WebformsOverview of .NET WebformsTODAYData in WebformsUsabilityRich Web Forms and Other ASP.NET Features Web Security Advanced Topics & Future Technology (Silverlight)The 10 SessionsNext 5 – To Do – Webforms
The web
HyperTextMarkupLanguageDescribes a web pagehttp://en.wikipedia.org/wiki/HTMLHTML<html>  <head>    <title>Hello HTML</title>  </head>  <body>    <p>Hello World!</p>  </body></html>
Hypertext Transfer ProtocolRequest – Responsehttp://en.wikipedia.org/wiki/HttpHTTPGET /index.html HTTP/1.1 Host: www.example.com HTTP/1.1 200 OK Date: Mon, 23 May 2005 22:38:34 GMT Server: Apache/1.3.3.7 (Unix)  (Red-Hat/Linux) Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT Content-Length: 438 Content-Type: text/html; charset=UTF-8
YourComputerHostingComputerInternetTheInternetServerClientHow a web page is shown
Request / ResponseRequestwww.ssw.com.auTheInternetResponseServerHTMLClient
IL = Intermediate        LanguageCLR = Runtime.NET Overview
CLRCommonLanguageRuntime= Virtual machine
What Is ASP.NET?ASP.NET provides a complete environment for building, deploying, and running .NET Web applications.Developer ProductivitySimplified page development modelTarget any Web client (PC or mobile device) Modular, well-factored, extensible architectureSuperior debugging and tracing supportEnhanced Performance, Scalability, and ReliabilityCompiled, not interpretedRich caching supportWeb farm scalable session stateAutomatically detects and recovers from errorsSimple Deployment and ConfigurationNo need to bring down Web serverDeploy and upgrade running applications with XCOPYXML configuration files
User requests an application resource from the Web server.IIS forwards the call to ASP.NET’s processApplication manager calls the Application domain & Processes the page.ASP.NET Page Request
EvolutionThe whole .NET FXhttp://shrinkster.com/1515.NET Framework
GenerateParseCode-behindclassfileASPXEngineRequestGen’dPageClassFileASPXFileInstantiateRequestPageClassResponse (HTML/js/dhtml/etc…)Instantiate, process and renderASP.NET Compilation
2 Types of Projects – 1 – Web SiteWeb SiteDon’t use this, here for compatibility onlyFile  > New > Web SiteEach page is dynamically loaded into memorySlow on first load after deploymentNo need to recompile for code change
2 Types of Projects – 2 – Web ApplicationWeb Application -RecommendedFile  > New > Projects, then Select Web ApplicationCompiles all pages into one DLLFaster on first load after deploymentMust recompile whole site for code changeNot available in Default VS 2005, requires SP2
ASP.NETCompilationGenerateParseCode-behindclassfileASPXEngineRequestGen’dPageClassFileASPXFileInstantiateRequestPageClassResponse (HTML/js/dhtml/etc…)Instantiate, process and renderWeb Site
ASP.NETCompilationGenerateParseCode-behindclassfileASPXEngineRequestGen’dPageClassFileASPXFileInstantiateRequestPageClassResponse (HTML/js/dhtml/etc…)All pre compiled!Web Application
The Page
ASP.NET –Page/Web FormAn ASP.NET Web page consists of two parts: Visual elements, which include markup, server controls, and static text.Programming logic for the page, which includes event handlers and other code.
Things to NoticeASP.NET – Page/Web Form
Things to NoticePage DirectiveASP.NET – Page/Web Form
Things to NoticePage DirectiveServer side codeASP.NET – Page/Web Form
Things to NoticePage DirectiveServer side codeFormASP.NET – Page/Web Form
Things to NoticePage DirectiveServer side codeFormNormal HTML StructureASP.NET – Page/Web Form
Things to NoticePage DirectiveServer side codeFormNormal HTML StructureServer ControlsASP.NET – Page/Web Form
ASP.NET – Page Code ModelASP.NET provides two models for managing the visual elements and code:The Single-File Page Model	<%@ Page Language="VB“>	<script runat=“server”> … </script>The Code-Behind Page Model 	<%@ Page	Language="VB“CodeFile="SamplePage.aspx.vb“Inherits="SamplePage“AutoEventWire="false" %>
A Page's Life
 Page requestStart Page InitializationLoadValidationPostbackEvent handlingRenderingUnloadhttp://msdn.microsoft.com/en-us/library/ms178472.aspxASP.NET – Page Life Cycle Stages (SILVER-U)
ASP.NET – Page Life Cycle Stages (SILVER-U) 1) Page requestOccurs before the page life cycle begins. When the page is requested by a userASP.NET determines whether the page needs to be parsed and compiled (therefore beginning the life of a page), or if a cached version of the page can be sent in response without running the page.
ASP.NET – Page Life Cycle Stages (SILVER-U) 2) Start Page properties setRequest and ResponseDetermines whether the request is a postback or a new request and sets the IsPostBack property. Sets the page's UICulture property
ASP.NET – Page Life Cycle Stages (SILVER-U) 3) Page InitializationControls on the page are availableEach control's UniqueID property is set. Themes are applied to the page. If the current request is a postback, the postback data has not yet been loaded and control property values have not been restored to the values from view state.
ASP.NET – Page Life Cycle Stages (SILVER-U) 4) Page LoadIf the current request is a postback, control properties are loaded with information recovered from view state and control state.
ASP.NET – Page Life Cycle Stages (SILVER-U) 5) Page ValidationThe Validate method of all validator controls is calledSets the IsValid property of Individual validator controlsThe page
ASP.NET – Page Life Cycle Stages (SILVER-U) 6) Postback Event HandlingIf the request is a postback, Event handlers are called
ASP.NET – Page Life Cycle Stages (SILVER-U) 7) PageRenderingBefore rendering, view state is saved for the page and all controls. During the rendering phase, the page calls the Render method for each control, providing a text writer that writes its output to the OutputStream of the page's Response property.
ASP.NET – Page Life Cycle Stages (SILVER-U) 8) Page UnloadUnload is called after the page has been:Fully rendered, Sent to the client, and Is ready to be discarded. At this point, page properties such as Response and Request are unloaded and any cleanup is performed.
 Page requestStart Page InitializationLoadValidationPostbackEvent handlingRenderingUnloadhttp://msdn.microsoft.com/en-us/library/ms178472.aspxASP.NET – Page Life Cycle Stages (SILVER-U)
PreInitInitInitCompletePreLoadLoadControl eventsLoadCompletePreRenderSaveStateCompleteRender Unload ASP.NET – Page Life Cycle Events
Postback & ViewState
ASP.NET PostbacksA Page Postback is:Where the client communicates back to the server, Through the page that was originally served. The post back is a submission of the Form element.
ASP.NET ViewstatePage ViewStateAllows the state of objects (serializable) to be stored in a hidden field on the page.  ViewState is transported to the client and back to the server, Is not stored on the server or any other external source.  ViewState is used to retain the state of server-side objects between postbacks. So program can see if values have changed
Server states
ASP.NET StatesSession State – allows the state of objects (serializable) to be stored for a single session (lifetime of the user’s browser or specific timeout)Application State – allows the state of objects (serializable) to be stored for the application across different sessions.
Server controls
ASP.NET – Server ControlsServer controls are tags that are understood by the server. Syntax: <asp:control_name id="some_id" runat="server" /> Example:<asp:Button		id="button1" 		Text="Click me!" runat="server" OnClick="submit" />
DemoHow to create a web applicationHow to create a web formDesigner FeaturesDifferent Page Code modelsPostbacksViewstate, Session State, Application State
User controls
ASP.NET User ControlsA group of server controls that are created by the user.Encapsulates certain functionalityCan be used on multiple pagesE.g 	Address User control (in your lab)		Contact User Control
ASP.NET Configuration
ASP.NET ConfigurationWeb.ConfigSimilar to app.config in windowsApplication-wide configurationProvide application settingsIn XML, so it’s easy to change
Who is the Master?
ASP.NET 2: Master PagesMaster pages new concept in ASP.NET 2.0Allows site developers to build master templates for their site's look and feel Put common code shared by all the pages on the master pageA page that references a Master Page is called a Content Page.
ASP.NET 2: Master Pages
How to define the Master pageAt the page level (in the page)<%@ Page Language="C#“MasterPageFile="MySite.Master"    %> At the application level (in web.config)<pages masterPageFile="MySite.Master" />
Validation
ASP.NET: ValidationA Validation server control is used to validate the data of an input control. If the data does not pass validation, it will display an error message to the user.
Important Properties:ControlToValidate:The ID of the control that this validator validates. Display: Has three possible values:Dynamic space the control uses isn’t reserved for the controlStatic 	space control uses is always reservedNone 	control is invisibleEnableClientScript:  Validation occurs on the Client’s Browser (default). Text: Displayed when validation fails; often used to put an asterisk or an icon next to the error or for displaying the error message in a validation summary. ASP.NET: Validation
Themes & Skins
ASP.NET 2: Themes & SkinsWhat is a theme?A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in a Web application, across an entire Web application, or across all Web applications on a server.A theme contains:skins, cascading style sheets (CSS),images, and other resources
ASP.NET 2: Themes & SkinsWhat is a skin file?A skin file has the file name extension .skinBelongs to a certain themeContains property settings for individual controlsContains settings for server controls only
ASP.NET 2: Themes & SkinsFor Example:<asp:button ID=“btnNew”With css (before skin files were around):<asp:button ID=“btnNew”runat=“server”cssclass=“blueBlackButton”/>.blueBlackButton {Background:lightblue;Color:Black; }
ASP.NET 2: Themes & SkinsBut with Skins, you let the skin do the design work.In the page:<asp:button ID=“btnNew”runat="server" />In the Skin file:<asp:buttonrunat="server" BackColor="lightblue" ForeColor="black" />
ASP.NET 2: Themes & SkinsSo, when do we use css files?When you need to style non-server controls, because skin files are only for asp.net controls.
Theme File StructureMyWebSite> App_Themes		> BlueTheme			> Controls.skin			> BlueTheme.css 		> PinkTheme			> Controls.skin			> PinkTheme.css

Introduction to ASP.NET

  • 1.
    Developing Windows andWeb Applications using Visual Studio.NETPeter GfaderSenior Software Architect
  • 2.
    Peter GfaderSSA @SSWLoves C# and .NET (Java not anymore)Specializes in Windows FormsASP.NETTFS testingAutomated testsSilverlight
  • 3.
  • 4.
    Show users wherethey areAgendaThe course ten sessions – Overview so farOverview of ASP.NETAn ASP.NET PageServer ControlsUser ControlsValidationMaster PagesThemes & skinsLABPage Cycle EventsMenu, Navigation & SitemapsSome cool new ASP.NET 2 Server Controls
  • 5.
    Session 6: ASP.NET The course ten sessions – Overview so far
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
    Themes &skinsLAB Page Cycle Events
  • 13.
  • 14.
    Some coolnew ASP.NET 2 Server Controlshttp://sharepoint.ssw.com.au/Training/UTSNET/Part 1: .NET WinformsOverview of .NETData in FormsUsability - Rules to Better Windows FormsDeployment and Security of Windows FormsWeb Services and ThreadingThe 10 SessionsFirst 5 – Done – Winforms
  • 15.
    http://sharepoint.ssw.com.au/Training/UTSNET/Part 2: .NETWebformsOverview of .NET WebformsTODAYData in WebformsUsabilityRich Web Forms and Other ASP.NET Features Web Security Advanced Topics & Future Technology (Silverlight)The 10 SessionsNext 5 – To Do – Webforms
  • 16.
  • 17.
    HyperTextMarkupLanguageDescribes a webpagehttp://en.wikipedia.org/wiki/HTMLHTML<html> <head> <title>Hello HTML</title> </head> <body> <p>Hello World!</p> </body></html>
  • 18.
    Hypertext Transfer ProtocolRequest– Responsehttp://en.wikipedia.org/wiki/HttpHTTPGET /index.html HTTP/1.1 Host: www.example.com HTTP/1.1 200 OK Date: Mon, 23 May 2005 22:38:34 GMT Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux) Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT Content-Length: 438 Content-Type: text/html; charset=UTF-8
  • 19.
  • 20.
  • 21.
    IL = Intermediate LanguageCLR = Runtime.NET Overview
  • 22.
  • 23.
    What Is ASP.NET?ASP.NETprovides a complete environment for building, deploying, and running .NET Web applications.Developer ProductivitySimplified page development modelTarget any Web client (PC or mobile device) Modular, well-factored, extensible architectureSuperior debugging and tracing supportEnhanced Performance, Scalability, and ReliabilityCompiled, not interpretedRich caching supportWeb farm scalable session stateAutomatically detects and recovers from errorsSimple Deployment and ConfigurationNo need to bring down Web serverDeploy and upgrade running applications with XCOPYXML configuration files
  • 24.
    User requests anapplication resource from the Web server.IIS forwards the call to ASP.NET’s processApplication manager calls the Application domain & Processes the page.ASP.NET Page Request
  • 25.
    EvolutionThe whole .NETFXhttp://shrinkster.com/1515.NET Framework
  • 26.
  • 27.
    2 Types ofProjects – 1 – Web SiteWeb SiteDon’t use this, here for compatibility onlyFile > New > Web SiteEach page is dynamically loaded into memorySlow on first load after deploymentNo need to recompile for code change
  • 28.
    2 Types ofProjects – 2 – Web ApplicationWeb Application -RecommendedFile > New > Projects, then Select Web ApplicationCompiles all pages into one DLLFaster on first load after deploymentMust recompile whole site for code changeNot available in Default VS 2005, requires SP2
  • 29.
  • 30.
  • 31.
  • 32.
    ASP.NET –Page/Web FormAnASP.NET Web page consists of two parts: Visual elements, which include markup, server controls, and static text.Programming logic for the page, which includes event handlers and other code.
  • 33.
    Things to NoticeASP.NET– Page/Web Form
  • 34.
    Things to NoticePageDirectiveASP.NET – Page/Web Form
  • 35.
    Things to NoticePageDirectiveServer side codeASP.NET – Page/Web Form
  • 36.
    Things to NoticePageDirectiveServer side codeFormASP.NET – Page/Web Form
  • 37.
    Things to NoticePageDirectiveServer side codeFormNormal HTML StructureASP.NET – Page/Web Form
  • 38.
    Things to NoticePageDirectiveServer side codeFormNormal HTML StructureServer ControlsASP.NET – Page/Web Form
  • 39.
    ASP.NET – PageCode ModelASP.NET provides two models for managing the visual elements and code:The Single-File Page Model <%@ Page Language="VB“> <script runat=“server”> … </script>The Code-Behind Page Model <%@ Page Language="VB“CodeFile="SamplePage.aspx.vb“Inherits="SamplePage“AutoEventWire="false" %>
  • 40.
  • 41.
    Page requestStartPage InitializationLoadValidationPostbackEvent handlingRenderingUnloadhttp://msdn.microsoft.com/en-us/library/ms178472.aspxASP.NET – Page Life Cycle Stages (SILVER-U)
  • 42.
    ASP.NET – PageLife Cycle Stages (SILVER-U) 1) Page requestOccurs before the page life cycle begins. When the page is requested by a userASP.NET determines whether the page needs to be parsed and compiled (therefore beginning the life of a page), or if a cached version of the page can be sent in response without running the page.
  • 43.
    ASP.NET – PageLife Cycle Stages (SILVER-U) 2) Start Page properties setRequest and ResponseDetermines whether the request is a postback or a new request and sets the IsPostBack property. Sets the page's UICulture property
  • 44.
    ASP.NET – PageLife Cycle Stages (SILVER-U) 3) Page InitializationControls on the page are availableEach control's UniqueID property is set. Themes are applied to the page. If the current request is a postback, the postback data has not yet been loaded and control property values have not been restored to the values from view state.
  • 45.
    ASP.NET – PageLife Cycle Stages (SILVER-U) 4) Page LoadIf the current request is a postback, control properties are loaded with information recovered from view state and control state.
  • 46.
    ASP.NET – PageLife Cycle Stages (SILVER-U) 5) Page ValidationThe Validate method of all validator controls is calledSets the IsValid property of Individual validator controlsThe page
  • 47.
    ASP.NET – PageLife Cycle Stages (SILVER-U) 6) Postback Event HandlingIf the request is a postback, Event handlers are called
  • 48.
    ASP.NET – PageLife Cycle Stages (SILVER-U) 7) PageRenderingBefore rendering, view state is saved for the page and all controls. During the rendering phase, the page calls the Render method for each control, providing a text writer that writes its output to the OutputStream of the page's Response property.
  • 49.
    ASP.NET – PageLife Cycle Stages (SILVER-U) 8) Page UnloadUnload is called after the page has been:Fully rendered, Sent to the client, and Is ready to be discarded. At this point, page properties such as Response and Request are unloaded and any cleanup is performed.
  • 50.
    Page requestStartPage InitializationLoadValidationPostbackEvent handlingRenderingUnloadhttp://msdn.microsoft.com/en-us/library/ms178472.aspxASP.NET – Page Life Cycle Stages (SILVER-U)
  • 51.
  • 52.
  • 53.
    ASP.NET PostbacksA PagePostback is:Where the client communicates back to the server, Through the page that was originally served. The post back is a submission of the Form element.
  • 54.
    ASP.NET ViewstatePage ViewStateAllowsthe state of objects (serializable) to be stored in a hidden field on the page.  ViewState is transported to the client and back to the server, Is not stored on the server or any other external source.  ViewState is used to retain the state of server-side objects between postbacks. So program can see if values have changed
  • 55.
  • 56.
    ASP.NET StatesSession State– allows the state of objects (serializable) to be stored for a single session (lifetime of the user’s browser or specific timeout)Application State – allows the state of objects (serializable) to be stored for the application across different sessions.
  • 57.
  • 58.
    ASP.NET – ServerControlsServer controls are tags that are understood by the server. Syntax: <asp:control_name id="some_id" runat="server" /> Example:<asp:Button id="button1" Text="Click me!" runat="server" OnClick="submit" />
  • 59.
    DemoHow to createa web applicationHow to create a web formDesigner FeaturesDifferent Page Code modelsPostbacksViewstate, Session State, Application State
  • 60.
  • 61.
    ASP.NET User ControlsAgroup of server controls that are created by the user.Encapsulates certain functionalityCan be used on multiple pagesE.g Address User control (in your lab) Contact User Control
  • 62.
  • 63.
    ASP.NET ConfigurationWeb.ConfigSimilar toapp.config in windowsApplication-wide configurationProvide application settingsIn XML, so it’s easy to change
  • 64.
    Who is theMaster?
  • 65.
    ASP.NET 2: MasterPagesMaster pages new concept in ASP.NET 2.0Allows site developers to build master templates for their site's look and feel Put common code shared by all the pages on the master pageA page that references a Master Page is called a Content Page.
  • 66.
  • 67.
    How to definethe Master pageAt the page level (in the page)<%@ Page Language="C#“MasterPageFile="MySite.Master" %> At the application level (in web.config)<pages masterPageFile="MySite.Master" />
  • 68.
  • 69.
    ASP.NET: ValidationA Validationserver control is used to validate the data of an input control. If the data does not pass validation, it will display an error message to the user.
  • 70.
    Important Properties:ControlToValidate:The IDof the control that this validator validates. Display: Has three possible values:Dynamic space the control uses isn’t reserved for the controlStatic space control uses is always reservedNone control is invisibleEnableClientScript: Validation occurs on the Client’s Browser (default). Text: Displayed when validation fails; often used to put an asterisk or an icon next to the error or for displaying the error message in a validation summary. ASP.NET: Validation
  • 71.
  • 72.
    ASP.NET 2: Themes& SkinsWhat is a theme?A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in a Web application, across an entire Web application, or across all Web applications on a server.A theme contains:skins, cascading style sheets (CSS),images, and other resources
  • 73.
    ASP.NET 2: Themes& SkinsWhat is a skin file?A skin file has the file name extension .skinBelongs to a certain themeContains property settings for individual controlsContains settings for server controls only
  • 74.
    ASP.NET 2: Themes& SkinsFor Example:<asp:button ID=“btnNew”With css (before skin files were around):<asp:button ID=“btnNew”runat=“server”cssclass=“blueBlackButton”/>.blueBlackButton {Background:lightblue;Color:Black; }
  • 75.
    ASP.NET 2: Themes& SkinsBut with Skins, you let the skin do the design work.In the page:<asp:button ID=“btnNew”runat="server" />In the Skin file:<asp:buttonrunat="server" BackColor="lightblue" ForeColor="black" />
  • 76.
    ASP.NET 2: Themes& SkinsSo, when do we use css files?When you need to style non-server controls, because skin files are only for asp.net controls.
  • 77.
    Theme File StructureMyWebSite>App_Themes > BlueTheme > Controls.skin > BlueTheme.css > PinkTheme > Controls.skin > PinkTheme.css
  • 78.
    Applying ThemesApply atheme to a Web site <configuration> <system.web> <pages theme="ThemeName" /> </system.web></configuration> Apply a theme to an individual page<%@ Page Theme="ThemeName" %>
  • 79.
  • 80.
    So who thinksWin forms are better than web forms?
  • 81.
  • 82.
    ResourcesASP.NET AJAXhttp://www.asp.net/ajax/Ramp upyour skillshttp://msdn.microsoft.com/rampup
  • 83.
    Resources – ASP.NETQuickstartshttp://quickstarts.asp.net/Masterpageshttp://www.asp.net/learn/master-pages/Profiles, Themes and user controlshttp://www.asp.net/learn/moving-to-asp.net-2.0/module-10.aspxPage lifecyclehttp://www.asp.net/learn/videos/video-6558.aspx
  • 84.
    Resources – ASP.NETValidationhttp://quickstarts.asp.net/QuickStartv20/aspnet/doc/validation/default.aspxConfiguration& Deployinghttp://www.asp.net/learn/videos/video-05.aspxUser controlshttp://www.asp.net/learn/videos/video-194.aspx
  • 85.
    Resources - UsergroupsSilverlightDesigner and Developer Networkhttp://www.sddn.org.au/Sydney Deep .NET User Grouphttp://www.sdnug.org/Newcastle Coders Grouphttp://www.ncg.asn.au/Sydney .NET Users Grouphttp://www.ssw.com.au/ssw/NETUG/Sydney.aspx
  • 86.
  • 87.
    Thank You!Gateway CourtSuite 10 81 - 91 Military Road Neutral Bay, Sydney NSW 2089 AUSTRALIA ABN: 21 069 371 900 Phone: + 61 2 9953 3000 Fax: + 61 2 9953 3105 info@ssw.com.auwww.ssw.com.au

Editor's Notes

  • #2 Click to add notesPeter Gfader Developing Windows and Web applications
  • #3 Java current version 1.6 Update 171.7 released next year 2010Dynamic languages Parallel computingMaybe closures
  • #12 Show in Firebug  google.com
  • #13 Show in FireBug
  • #18 http://download.microsoft.com/download/4/a/3/4a3c7c55-84ab-4588-84a4-f96424a7d82d/NET35_Namespaces_Poster_LORES.pdf
  • #73 Rich UI-- Reb: Reworded the question– as it was too obvious the answer. Without it, this question requires students to process what they heard from the lecture. Original was: “So who thinks Win forms are still better than web forms? Why?”