1 / 39

Napredak u web development svetu kroz Visual Studio 2010

Napredak u web development svetu kroz Visual Studio 2010. Zlatko Knežević Evanđelista za razvojne tehnologije zlatko.knezevic@microsoft.com http://msforge.net/blogs/blackdwarf/ . Agenda. ASP.NET podržava nekoliko vrsti aplikacija. ASP.NET Web Forms. ASP.NET AJAX. ASP.NET MVC.

eugene
Télécharger la présentation

Napredak u web development svetu kroz Visual Studio 2010

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. Napredak u web development svetukroz Visual Studio 2010 Zlatko Knežević Evanđelista za razvojne tehnologije zlatko.knezevic@microsoft.com http://msforge.net/blogs/blackdwarf/

  2. Agenda ASP.NET podržava nekoliko vrsti aplikacija ASP.NET Web Forms ASP.NET AJAX ASP.NET MVC ASP.NET Dynamic Data ASP .NET Framework .NET Framework Change the Rules

  3. ASP.NET Web Forms ASP.NET Web Forms 4.0 vam omogućava da napravite web aplikacije sa daleko bogatijim korisničkim iskustvima Change the Rules

  4. ASP.NET Web Forms Fokus na developera koji voli kod • Voli da ručno piše HTML kod • Piše JavaScript kod • Želi da kontroliše svaku uglastu zagradu i piksel Change the Rules

  5. ASP.NET Web Forms Sa verzijom 4.0, vi imate kontrolu: • Renderovanje kontrola • View State • Controls IDs • Website URLs • XHTML i Accessibility Change the Rules

  6. FormView poboljšanja <asp:FormView ID="FormView1" runat="server" RenderOuterTable="false"> Change the Rules

  7. ListViewpoboljšanja <asp:ListView ID="ListView1" runat="server"> <LayoutTemplate> <div id="itemPlaceHolder" runat="server” /> </LayoutTemplate> <ItemTemplate> <li><%# Eval("Title") %></li> </ItemTemplate> </asp:ListView> Change the Rules

  8. Kontrolišite ViewState Control.ViewStateMode • Enable • Disable • Inherit (default) Change the Rules

  9. Kontrolišite ID-eve na klijentu Control.ClientIdMode • AutoID • Static • Predictable • Inherit (default) Change the Rules

  10. Kontrolišite ID-eve na klijentu <system.web> <pages clientIDMode="Predictable"> </pages> </syetm.web> Change the Rules

  11. ASP.NET Routing i SEO Umesto: http://YourSitecom/Search.aspx?query=cats Lepše je da koristite: http://YourSite.com/Search/cats Change the Rules

  12. Ostala poboljšanja za SEO • Page.MetaDescription • Page.MetaKeywords • Response.RedirectPermanent(new url) Change the Rules

  13. QueryExtender kontrola • Radi sa EntityDataSource i LinqDataSource • Omogućava lako filtriranje rezultata iz baze podataka • Podržava različite tipove filtera: • Search • Range • Property • Custom Change the Rules

  14. ASP.NET Chart kontrola • <asp:ChartControl ../>je sada ugrađena

  15. ASP.NET 4 upravljanje i bezbednost • Output/Object cache ekstenzibilnost • Keširanje na disku • Integracija sa „Velocity“-jem (AppFabric) • Pre-load, pre-cache na startu aplikacije • Posmatranje performansi po aplikaciji • Html i Url enkodovanje ekstenzibilnost • Nova sintaksa za HTML enkodovanje <%:Message %>

  16. ASP.NET Web Forms Change the Rules

  17. ASP.NET AJAX ASP.NET podržava nekoliko vrsti aplikacija ASP.NET Web Forms ASP.NET AJAX ASP.NET MVC ASP.NET Dynamic Data ASP .NET Framework .NET Framework Change the Rules

  18. Česti mitovi • ASP.NET AJAX je usko vezan za ASP.NET i web forme • Morate da koristite ScriptManager i UpdatePanel dabiste bilo šta uradili • Zahteva Visual Studio da bi radio... Change the Rules

  19. ASP.NET AJAX Server-Side AJAX AJAX Control Toolkit Client-Side AJAX jQuery Change the Rules

  20. Server vs. Client AJAX Server AJAX Rendering Rendering Initial request: HTML Form POST HTML Client AJAX HTML + JSON JSON JSON Change the Rules

  21. ASP.NET AJAX Server bi trebalo da se brine o podacima, ne reprezentaciji Change the Rules

  22. ASP.NET AJAX • Client-Side Templates • Client-Side Controls • Client-Side Data Binding • Read/Write Database Data from the Browser • Cross-Browser Compatible • Nijve vezan za ASP.NET Client-Side AJAX Change the Rules

  23. ASP.NET MVC ASP.NET podržava nekoliko vrsti aplikacija ASP.NET Web Forms ASP.NET AJAX ASP.NET MVC ASP.NET Dynamic Data ASP .NET Framework .NET Framework Change the Rules

  24. WebFormssu odlični, ali takođe su i opcije...

  25. Apstrakcije kroz kontrole mogu biti negativne tu i tamo...

  26. Kako je MVC drugačiji?

  27. MVC = Model-View-Controller Controller (Input) View (Presentation) Model (Logic) Separation of concerns!

  28. Kako MVC izgleda? Controller Controller Zadužen za ulaz (HTTP requests) Request View View Vizuelna reprezentacija modela Response

  29. Nove stvari u MVC2 • “Mala“ unapređenja • Areas • Validacija • Strongly typed helpers • Templated helpers Change the Rules

  30. “Mala”?? • RenderAction() pomoćni metod • Povećava kompozibilnost aplikacija • Držite logiku tamo gde pripada • Lakše testiranje određenih vrsta scenarija Change the Rules

  31. Druga „mala“ unapređenja • Bezbednost • HTML Encoding Syntax • <%:Model.NewPostByEvilPerson%> • Works with ASP.NET 4 • JsonResult • Unapređenje performansi • Asynchronous Controller Actions • Olakšanja u radu • Default Parameters for Controller Actions • HttpPost, HttpGet, RequiresHttps • Value Providers

  32. Areas • Kako da obezbedite „površine“ za rad u aplikaciji? • Grupiše kontrolere, modele i view-ove u „površine“ • Podrška u Visual Studio alatima Change the Rules

  33. Validacija • Podrška za anotacije (DataAnnotations) • Podrška za druge provajdere za validaciju • Data Annotation (Default) • Enterprise Library • XML • Šta god drugo da želite... • Počnite da anotirate na modelu na serveru… • …i onda pustite da se „spusti“ do klijenta Change the Rules

  34. Templated helpers • Kako da lako i deklarativno kažete MVC-u da prikaže vaš model? Display Helper Methods • Html.Display() • Html.DisplayFor() • Html.DisplayForModel() Edit Helper Methods • Html.Editor() • Html.EditorFor() • Html.EditorForModel()

  35. ASP.NET MVC 2

  36. Overview of Talk ASP.NET podržava nekoliko vrsti aplikacija ASP.NET Web Forms ASP.NET AJAX ASP.NET MVC ASP.NET Dynamic Data ASP .NET Framework .NET Framework Change the Rules

  37. Dynamic Data produktivnost • Uključite ih u postojećoj aplikaciji • <asp:GridView/>, <asp:DetailsView/>, <asp:FormView/> <asp:ListView/> • Automatski templejti i podrška za validaciju • Dobijate scaffolding veoma lako • O istom trošku... • Templejti • Novi templejti za entitete • Templejti za filtere • Novi templejti za URL, enumeracije • Više opcija za prikaz u DisplayAttribute • Podrška za nasleđivanje i više-na-više relacije

  38. Pitanja?

  39. © 2010 Microsoft Corporation. All rights reserved. Microsoft, Visual Studio, the Visual Studio logo, and [list other trademarks referenced] are trademarks of the Microsoft group of companies. 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.

More Related