E-Book, Englisch, 320 Seiten
Harris Pro ASP.NET 4 CMS
1. Auflage 2010
ISBN: 978-1-4302-2713-7
Verlag: Apress
Format: PDF
Kopierschutz: Adobe DRM (»Systemvoraussetzungen)
Advanced Techniques for C# Developers Using the .NET 4 Framework
E-Book, Englisch, 320 Seiten
ISBN: 978-1-4302-2713-7
Verlag: Apress
Format: PDF
Kopierschutz: Adobe DRM (»Systemvoraussetzungen)
To be a successful ASP.NET 4 developer, you need to know how to apply the vast array of new functionality available in the latest release of the .NET 4 Framework and Visual Studio 2010.
This book will immerse you in a variety of advanced topics, including architecting different application data tiers, memory caching paradigms, data mining, and search engine optimization. Working through step-by-step exercises using P/LINQ, DLR, MEF, MVC, IronPython, Axum, and Ajax, you will learn a variety of approaches to building each of the key application tiers common to all web solutions.
Using a proven technique of illustrating advanced concepts with functional solutions, all topics in the book are modeled on a fully operational content management system (CMS), built from the ground up. This ensures that you’ll be introduced to real-world examples that demonstrate the full functionality of the .NET 4 Framework for ASP.NET, and that you’ll be able to apply your new skills to any web development situation.
Autoren/Hrsg.
Weitere Infos & Material
1;Title Page;1
2;Copyright Page;2
3;Contents at a Glance;4
4;Table of Contents;5
5;About the Author;12
6;About the Technical Reviewer;13
7;Acknowledgments;14
8;Introduction;15
8.1;About This Book;15
8.1.1;What You Need to Use This Book;16
8.1.2;Code Samples;16
8.1.3;Feedback;16
9;CHAPTER 1 Visual Studio 2010 and .NET 4;17
9.1;Who This Book Is For;17
9.2;Who This Book Is Not For (or “Buy Me Now, Read Me Later”);18
9.3;What’s New in .NET 4;18
9.3.1;C# Optional and Named Parameters;19
9.3.2;C#’s dynamic Keyword;21
9.3.3;Dynamic and Functional Language Support;26
9.3.4;Parallel Processing;26
9.3.4.1;Parallel LINQ (PLINQ);27
9.3.4.2;Task Parallel Library (TPL);27
9.3.4.3;Axum;28
9.3.5;Managed Extensibility Framework (MEF);29
9.3.6;Distributed Caching with Velocity;29
9.3.7;ASP.NET MVC;32
9.4;A Tour of Visual Studio 2010;34
9.4.1;Windows Presentation Foundation;34
9.4.2;Historical Debugging;35
9.4.3;Improved JavaScript IntelliSense;37
9.4.4;jQuery Support;38
9.5;Building a CMS;40
9.5.1;CMS Functional Requirements;40
9.5.2;Creating the Application Framework;41
9.6;Summary;44
10;CHAPTER 2 CMS Architecture and Development;45
10.1;Motivations for Building a CMS;45
10.2;Motivations for Using .NET;46
10.3;Application Architecture;46
10.3.1;The CMS Application Tiers;48
10.3.2;CommonLibrary: The Data Transfer Objects;49
10.3.3;GlobalModule: The HttpModule;51
10.4;Components of a CMS Page;53
10.4.1;Buckets;53
10.4.2;Embeddable Objects;55
10.4.3;Embeddable Permissions;57
10.5;Handling CMS Content;59
10.5.1;The Content Table;59
10.5.2;The ContentVersion Table;60
10.5.3;Assembling Content on Demand;60
10.5.4;How Embeddable Objects Handle Versions;62
10.6;Summary;62
11;CHAPTER 3 Parallelization;63
11.1;What Is Parallelization?;63
11.1.1;Good Parallelization Candidates;63
11.1.2;Differences from Multithreading;64
11.2;Parallel Pitfalls;64
11.2.1;Deadlocks;64
11.2.2;Race Conditions;67
11.2.3;Thread Starvation;70
11.2.4;Amdahl’s Law;71
11.3;.NET 4 Parallelization Concepts;72
11.3.1;Task vs. Data Parallelism;72
11.4;Task Parallel Library;72
11.4.1;Task.Wait();73
11.4.2;Parallel.For() and Parallel.ForEach();75
11.5;Parallel LINQ (aka PLINQ);75
11.5.1;.AsParallel();76
11.6;CMS Parallelization Opportunities;77
11.6.1;Creating a Data Mining Embeddable;78
11.6.2;Expanding the Data Mining Tasks;82
11.7;Tagging;86
11.7.1;Tagging on the Client;89
11.7.2;Fleshing Out the Tagging Embeddable;91
11.7.3;What’s in a Name?;92
11.7.4;Handling Tag Input;95
11.7.5;Tag Processing in the Business Tier;98
11.7.6;POST Problems;103
11.7.7;Finalizing Tag Storage;105
11.7.8;Content Tags;112
11.8;Summary;118
12;CHAPTER 4 Managed Extensibility Framework and the Dynamic Language Runtime;119
12.1;Managed Extensibility Framework;119
12.1.1;The Manual Way;119
12.1.2;The MEF Way;121
12.1.3;Working from Usage to Implementation;122
12.1.4;Exposing Libraries via MEF;122
12.1.5;A Simple Plug-in Contract;123
12.1.6;Implementing the Plug-In;123
12.1.7;Using the Plug-In;124
12.1.8;Catalogs and Containers;128
12.1.9;Supporting Multiple Parts;129
12.2;Dynamic Language Runtime;133
12.2.1;The dynamic Keyword;134
12.2.2;Benefits of the dynamic Keyword;135
12.3;CMS Plug-Ins;136
12.3.1;IEmbeddable;137
12.3.2;Server Controls as Embeddables;138
12.3.3;Displaying Embeddables;140
12.3.4;PageAssembler;141
12.4;Additional Methodology Benefits;144
12.4.1;Missing DLLs;144
12.4.2;Exceptions in Embeddables;145
12.5;A More Complex Emeddable;146
12.5.1;Breadcrumbs;146
12.5.2;Navigating the CMS Tree;147
12.6;Summary;149
13;CHAPTER 5 jQuery and Ajax in the Presentation Tier;150
13.1;An Introduction to jQuery;150
13.1.1;The $() Factory;151
13.1.2;Implicit Iteration;153
13.2;Ajax via jQuery;154
13.2.1;Caching and Ajax;155
13.2.2;Avoiding Caching on GET Requests;156
13.2.3;Lightweight Content Delivery with Ajax and HTTP Handlers;157
13.2.4;Handling Asynchronous Errors;162
13.2.5;Handling DOM Modifications;165
13.3;Improving the CMS Admin with jQuery;169
13.3.1;Creating Collapsible Panels;171
13.3.2;Expanding with jQuery;173
13.3.3;Displaying the JavaScript Disabled Message;175
13.4;Poka-Yoke Devices;176
13.5;Summary;179
14;CHAPTER 6 Distributed Caching via Memcached;180
14.1;What Is a Distributed Cache, and Why Is it Important?;180
14.2;Memcached;181
14.2.1;Acquiring a Memcached Client Library;182
14.2.2;Getting Started with Memcached;183
14.2.2.1;Using the Client Libraries Directly;186
14.2.2.2;Writing a Memcached Library;188
14.2.2.3;Testing the Library;191
14.2.2.4;Deleting Objects from the Cache;193
14.2.3;Complex Object Types;193
14.2.4;Protocol Considerations;196
14.2.5;Memcached Internals and Monitoring;198
14.3;Building a Cache-Friendly Site Tree;200
14.3.1;Visualizing the Tree;201
14.3.2;Defining a Node;201
14.3.3;Defining the Tree;202
14.3.4;Finding Nodes;203
14.3.5;Inserting Nodes;205
14.3.6;Serializing/Deserializing the Tree for Memcached Storage;206
14.4;Memcached Configuration Considerations;209
14.5;Summary;211
15;CHAPTER 7 Scripting via IronPython;212
15.1;How Does the CMS Benefit from Scripting Capabilities?;212
15.1.1;Easier Debugging;212
15.1.2;Rapid Prototyping;213
15.2;An Introduction to IronPython and Its Syntax;213
15.2.1;What Is IronPython?;213
15.2.2;Installing IronPython;214
15.2.3;The IronPython Type System;215
15.2.4;Creating Classes and Controlling Scope;218
15.2.5;Constructors as Magic Methods;221
15.2.6;self;222
15.2.7;Exception Handling;226
15.2.8;Conditional Logic, Iterators, and Collections;229
15.2.9;Accessors and Mutators;231
15.3;Assembly Compilation;232
15.3.1;Compiling IronPython Code to a DLL;233
15.3.2;Compiling IronPython Code to an Executable;234
15.4;Building Scripting Capabilities into the CMS;235
15.4.1;Handling Script Files Between Tiers;238
15.4.2;Calling Scripts for a CMS Page;239
15.4.3;A Simple Scripting Example;241
15.5;Summary;243
16;CHAPTER 8 Performance Tuning, Configuration, and Debugging;244
16.1;The CMS Definition of Performance;244
16.1.1;Latency;244
16.1.2;Throughput;245
16.2;Establishing Baselines;245
16.2.1;Component vs. System Baselines;245
16.3;The Web Capacity Analysis Tool;246
16.3.1;Installing WCAT;246
16.3.2;WCAT Concepts;246
16.3.3;Configurations;247
16.3.4;Scenarios;248
16.3.5;Running a WCAT Test Against the CMS;250
16.3.6;Interpreting Performance Results;251
16.4;Improving CMS Performance with Caching;252
16.4.1;HTTP.sys and the OutputCache;252
16.4.2;Benchmarking CMS Performance;253
16.5;Configuration Considerations;254
16.5.1;Enable Release Mode for Production;254
16.5.2;Removing the Server, X-Powered-By, and X-AspNet-VersionHeaders;256
16.6;Debugging Concepts;259
16.6.1;White-Box vs. Black-Box Debuggers;259
16.6.2;User Mode vs. Kernel Mode;260
16.7;Historical Debugging via IntelliTrace;261
16.8;Collaborative Debugging;265
16.8.1;Importing and Exporting Breakpoints;265
16.8.2;DataTip Pinning and Annotation;268
16.9;Summary;271
17;CHAPTER 9 Search Engine Optimization and Accessibility;272
17.1;An Introduction to Search Engine Optimization;272
17.1.1;Science or Dark Art?;273
17.1.2;General Guidelines;273
17.1.2.1;Establishing Clear Markup;274
17.1.2.2;HTML Metadata the .NET 4 Way;275
17.1.2.3;Graceful JavaScript Degradation;276
17.1.2.4;Providing alt Text for Images;278
17.1.2.5;Color Scheme Sensitivity;278
17.2;Friendly URLs;280
17.2.1;Data Requirements for Friendly URLs;280
17.2.2;Stored Procedures for Friendly URLs;283
17.2.3;Exploiting the Page Life Cycle;284
17.2.4;Request Exclusion;286
17.2.5;Retrieving Friendly URLs;288
17.2.6;Retrieving Alias URLs and Response.RedirectPermanent();294
17.3;Summary;298
18;Index;299




