Presentation is loading. Please wait.

Presentation is loading. Please wait.

Current Popular IT I Pertemuan 10 Matakuliah: T0403/Current Popular IT I Tahun: 2008.

Similar presentations


Presentation on theme: "Current Popular IT I Pertemuan 10 Matakuliah: T0403/Current Popular IT I Tahun: 2008."— Presentation transcript:

1 Current Popular IT I Pertemuan 10 Matakuliah: T0403/Current Popular IT I Tahun: 2008

2 Learning Outcomes Learner can do state management Learner can use Cookie, Session, and Profile Learner can choose between server-side and client-side state management Bina Nusantara Copyright © Surya Sujarwo 2008

3 Material Outline Using Browser Cookies Using Session State Using Profiles ASP.NET Request-Processing Architecture ASP.NET and Server-Side State Management ASP.NET and Client-Side State Management A Client State Workshop Form Post Data and ASP.NET Controls ASP.NET Control State Caching Application Pages and Data Optimize Application and Session State Management Bina Nusantara Copyright © Surya Sujarwo 2008

4 Using Browser Cookies Create : Expire: Read: Remove: Bina Nusantara References: ASP.NET 3.5 Unleashed (Stephen Walther, 2008)

5 Using Session State Create: Read: Remove: Bina Nusantara References: ASP.NET 3.5 Unleashed (Stephen Walther, 2008)

6 Using Profiles Add profile: Using profile: Add group: Using group: From code: Bina Nusantara References: ASP.NET 3.5 Unleashed (Stephen Walther, 2008)

7 ASP.NET Request-Processing Architecture ASP.NET request data flow Bina Nusantara References: ProASP.NET 3.5 Server Controls and AJAX Components(Rob Cameron and Dale Michalk, 2008)

8 ASP.NET Request-Processing Architecture (Continue…) ASP.NET request processing classes Bina Nusantara References: ProASP.NET 3.5 Server Controls and AJAX Components(Rob Cameron and Dale Michalk, 2008)

9 ASP.NET and Server-Side State Management The Context Object Bina Nusantara References: ProASP.NET 3.5 Server Controls and AJAX Components(Rob Cameron and Dale Michalk, 2008) PropertyDescription ApplicationProvides server-side state management for all clients of the web Application ApplicationInstanceReference controls the execution process of the ASP.NET web request CacheProvides access to the server-side cache in ASP.NET ErrorProvides access to the error exceptions that occur during ASP.NET execution ItemsKey/value pair collection used to pass information between the components in a request RequestContains information from the client request, including browser type, cookies, and values encoded in form and URL query string collections ResponseKey/value pair collection used to pass information between the requesting components ServerProvides utilities including Server.Transfer, Server.HtmlEncode, and Server.MapPath SessionState collection maintained on behalf of a web application user TraceDebugging utility for writing to the trace output of the web form UserMakes security information available when a user is authenticated

10 ASP.NET and Client-Side State Management URL strings Cookies HTML Hidden Variables ViewState Bina Nusantara References: ProASP.NET 3.5 Server Controls and AJAX Components(Rob Cameron and Dale Michalk, 2008)

11 ASP.NET and Client-Side State Management ASP.NET Postback Mechanism Bina Nusantara References: ProASP.NET 3.5 Server Controls and AJAX Components(Rob Cameron and Dale Michalk, 2008)

12 A Client State Workshop Bina Nusantara References: ProASP.NET 3.5 Server Controls and AJAX Components(Rob Cameron and Dale Michalk, 2008)

13 A Client State Workshop (Continue…) Bina Nusantara References: ProASP.NET 3.5 Server Controls and AJAX Components(Rob Cameron and Dale Michalk, 2008)

14 A Client State Workshop (Continue…) Bina Nusantara References: ProASP.NET 3.5 Server Controls and AJAX Components(Rob Cameron and Dale Michalk, 2008)

15 Form Post Data and ASP.NET Controls Bina Nusantara References: ProASP.NET 3.5 Server Controls and AJAX Components(Rob Cameron and Dale Michalk, 2008)

16 Form Post Data and ASP.NET Controls Bina Nusantara References: ProASP.NET 3.5 Server Controls and AJAX Components(Rob Cameron and Dale Michalk, 2008)

17 ASP.NET Control State Bina Nusantara References: ProASP.NET 3.5 Server Controls and AJAX Components(Rob Cameron and Dale Michalk, 2008)

18 ASP.NET Control State (Continue…) Bina Nusantara References: ProASP.NET 3.5 Server Controls and AJAX Components(Rob Cameron and Dale Michalk, 2008)

19 ASP.NET Control State (Continue…) Bina Nusantara References: ProASP.NET 3.5 Server Controls and AJAX Components(Rob Cameron and Dale Michalk, 2008)

20 Caching Application Pages and Data Page Output – Varying by Parameter (QueryString) – Varying by Control Partial Page Caching – Post-Cache Substitution Bina Nusantara References: ASP.NET 3.5 Unleashed (Stephen Walther, 2008), Pro ASP.NET for SQL Server (Brennan Stehling, 2007)

21 Caching Application Pages and Data (Continue…) – Post-Cache Substitution (continue…) – Advantages using WriteSubstitution() method Can be method of other class Can be use in custom control Bina Nusantara References: ASP.NET 3.5 Unleashed (Stephen Walther, 2008), Pro ASP.NET for SQL Server (Brennan Stehling, 2007)

22 Caching Application Pages and Data (Continue…) – Caching with user control Bina Nusantara References: ASP.NET 3.5 Unleashed (Stephen Walther, 2008), Pro ASP.NET for SQL Server (Brennan Stehling, 2007)

23 Caching Application Pages and Data (Continue…) DataSource Caching Data Caching Bina Nusantara References: ASP.NET 3.5 Unleashed (Stephen Walther, 2008), Pro ASP.NET for SQL Server (Brennan Stehling, 2007)

24 Caching Application Pages and Data (Continue…) Data Caching (continue…) Bina Nusantara References: ASP.NET 3.5 Unleashed (Stephen Walther, 2008), Pro ASP.NET for SQL Server (Brennan Stehling, 2007)

25 Optimize Application and Session State Management Application State – This is information that applies to all clients of the Web application. This information is shared by, and managed for, multiple clients. Session State – This is information that applies to a specific client session. You manage this information for individual clients. Setting Session State Bina Nusantara References: Performance Tuning and Optimizing ASP.NET Applications (Jeffrey Hasan and Kenneth Tu, 2003)

26 Optimize Application and Session State Management (Continue…) Setting Session State (continue…) Bina Nusantara References: Performance Tuning and Optimizing ASP.NET Applications (Jeffrey Hasan and Kenneth Tu, 2003) ModeDescription InProc (default)which stores session state in memory on the Web server StateServerstores session state in a separate process called the ASP.NET state service SQLServerstores session state in a SQL Server database Customenables to specify a custom storage provider Offdisables session state Cookieless modeDescription AutoDetectASP.NET determines whether the requesting browser or device supports cookies UseCookiesCookies persist user data, regardless of whether the browser or device supports cookies UseDeviceProfileASP.NET determines whether to use cookies based on the HttpBrowserCapabilities setting UseUriThe calling feature uses the query string to store an identifier, regardless of whether the browser or device supports cookies

27 Optimize Application and Session State Management (Continue…) Choosing the right ASP.NET State Management Option – Session State: Does the application require centralized session state management, or can it be managed on individual Web servers? Does the application require cookie-based or cookieless session state? What kind of information needs to be stored? Does the application really need a Session object for all information? – Application State: Does the application require permanent application state? Does the application require transient application state? How frequently will stored items be updated? Does the client need direct access to the item? Bina Nusantara References: Performance Tuning and Optimizing ASP.NET Applications (Jeffrey Hasan and Kenneth Tu, 2003)

28 Thats All Thank You for the Attention Bina Nusantara


Download ppt "Current Popular IT I Pertemuan 10 Matakuliah: T0403/Current Popular IT I Tahun: 2008."

Similar presentations


Ads by Google