Pro ASP.NET 4 CMS - Alan Harris

Pro ASP.NET 4 CMS (eBook)

Advanced Techniques for C# Developers Using the .NET 4 Framework

(Autor)

eBook Download: PDF
2010 | 1st ed.
320 Seiten
Apress (Verlag)
978-1-4302-2713-7 (ISBN)
Systemvoraussetzungen
36,99 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen

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.



Alan Harris is a web and application developer living in Arlington, Virginia. He has worked at more than a few organizations using .NET to create enterprise solutions since the glory days of version 1.1, and can still browse to some of the oldest ones. Aside from working at his desk, he spends most of his time studying Krav Maga and writing music.
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.

Alan Harris is a web and application developer living in Arlington, Virginia. He has worked at more than a few organizations using .NET to create enterprise solutions since the glory days of version 1.1, and can still browse to some of the oldest ones. Aside from working at his desk, he spends most of his time studying Krav Maga and writing music.

Title Page 1
Copyright Page 2
Contents at a Glance 4
Table of Contents 5
About the Author 12
About the Technical Reviewer 13
Acknowledgments 14
Introduction 15
About This Book 15
What You Need to Use This Book 16
Code Samples 16
Feedback 16
CHAPTER 1 Visual Studio 2010 and .NET 4 17
Who This Book Is For 17
Who This Book Is Not For (or “Buy Me Now, Read Me Later”) 18
What’s New in .NET 4 18
C# Optional and Named Parameters 19
C#’s dynamic Keyword 21
Dynamic and Functional Language Support 26
Parallel Processing 26
Parallel LINQ (PLINQ) 27
Task Parallel Library (TPL) 27
Axum 28
Managed Extensibility Framework (MEF) 29
Distributed Caching with Velocity 29
ASP.NET MVC 32
A Tour of Visual Studio 2010 34
Windows Presentation Foundation 34
Historical Debugging 35
Improved JavaScript IntelliSense 37
jQuery Support 38
Building a CMS 40
CMS Functional Requirements 40
Creating the Application Framework 41
Summary 44
CHAPTER 2 CMS Architecture and Development 45
Motivations for Building a CMS 45
Motivations for Using .NET 46
Application Architecture 46
The CMS Application Tiers 48
CommonLibrary: The Data Transfer Objects 49
GlobalModule: The HttpModule 51
Components of a CMS Page 53
Buckets 53
Embeddable Objects 55
Embeddable Permissions 57
Handling CMS Content 59
The Content Table 59
The ContentVersion Table 60
Assembling Content on Demand 60
How Embeddable Objects Handle Versions 62
Summary 62
CHAPTER 3 Parallelization 63
What Is Parallelization? 63
Good Parallelization Candidates 63
Differences from Multithreading 64
Parallel Pitfalls 64
Deadlocks 64
Race Conditions 67
Thread Starvation 70
Amdahl’s Law 71
.NET 4 Parallelization Concepts 72
Task vs. Data Parallelism 72
Task Parallel Library 72
Task.Wait() 73
Parallel.For() and Parallel.ForEach() 75
Parallel LINQ (aka PLINQ) 75
.AsParallel() 76
CMS Parallelization Opportunities 77
Creating a Data Mining Embeddable 78
Expanding the Data Mining Tasks 82
Tagging 86
Tagging on the Client 89
Fleshing Out the Tagging Embeddable 91
What’s in a Name? 92
Handling Tag Input 95
Tag Processing in the Business Tier 98
POST Problems 103
Finalizing Tag Storage 105
Content Tags 112
Summary 118
CHAPTER 4 Managed Extensibility Framework and the Dynamic Language Runtime 119
Managed Extensibility Framework 119
The Manual Way 119
The MEF Way 121
Working from Usage to Implementation 122
Exposing Libraries via MEF 122
A Simple Plug-in Contract 123
Implementing the Plug-In 123
Using the Plug-In 124
Catalogs and Containers 128
Supporting Multiple Parts 129
Dynamic Language Runtime 133
The dynamic Keyword 134
Benefits of the dynamic Keyword 135
CMS Plug-Ins 136
IEmbeddable 137
Server Controls as Embeddables 138
Displaying Embeddables 140
PageAssembler 141
Additional Methodology Benefits 144
Missing DLLs 144
Exceptions in Embeddables 145
A More Complex Emeddable 146
Breadcrumbs 146
Navigating the CMS Tree 147
Summary 149
CHAPTER 5 jQuery and Ajax in the Presentation Tier 150
An Introduction to jQuery 150
The $() Factory 151
Implicit Iteration 153
Ajax via jQuery 154
Caching and Ajax 155
Avoiding Caching on GET Requests 156
Lightweight Content Delivery with Ajax and HTTP Handlers 157
Handling Asynchronous Errors 162
Handling DOM Modifications 165
Improving the CMS Admin with jQuery 169
Creating Collapsible Panels 171
Expanding with jQuery 173
Displaying the JavaScript Disabled Message 175
Poka-Yoke Devices 176
Summary 179
CHAPTER 6 Distributed Caching via Memcached 180
What Is a Distributed Cache, and Why Is it Important? 180
Memcached 181
Acquiring a Memcached Client Library 182
Getting Started with Memcached 183
Using the Client Libraries Directly 186
Writing a Memcached Library 188
Testing the Library 191
Deleting Objects from the Cache 193
Complex Object Types 193
Protocol Considerations 196
Memcached Internals and Monitoring 198
Building a Cache-Friendly Site Tree 200
Visualizing the Tree 201
Defining a Node 201
Defining the Tree 202
Finding Nodes 203
Inserting Nodes 205
Serializing/Deserializing the Tree for Memcached Storage 206
Memcached Configuration Considerations 209
Summary 211
CHAPTER 7 Scripting via IronPython 212
How Does the CMS Benefit from Scripting Capabilities? 212
Easier Debugging 212
Rapid Prototyping 213
An Introduction to IronPython and Its Syntax 213
What Is IronPython? 213
Installing IronPython 214
The IronPython Type System 215
Creating Classes and Controlling Scope 218
Constructors as Magic Methods 221
self 222
Exception Handling 226
Conditional Logic, Iterators, and Collections 229
Accessors and Mutators 231
Assembly Compilation 232
Compiling IronPython Code to a DLL 233
Compiling IronPython Code to an Executable 234
Building Scripting Capabilities into the CMS 235
Handling Script Files Between Tiers 238
Calling Scripts for a CMS Page 239
A Simple Scripting Example 241
Summary 243
CHAPTER 8 Performance Tuning, Configuration, and Debugging 244
The CMS Definition of Performance 244
Latency 244
Throughput 245
Establishing Baselines 245
Component vs. System Baselines 245
The Web Capacity Analysis Tool 246
Installing WCAT 246
WCAT Concepts 246
Configurations 247
Scenarios 248
Running a WCAT Test Against the CMS 250
Interpreting Performance Results 251
Improving CMS Performance with Caching 252
HTTP.sys and the OutputCache 252
Benchmarking CMS Performance 253
Configuration Considerations 254
Enable Release Mode for Production 254
Removing the Server, X-Powered-By, and X-AspNet-VersionHeaders 256
Debugging Concepts 259
White-Box vs. Black-Box Debuggers 259
User Mode vs. Kernel Mode 260
Historical Debugging via IntelliTrace 261
Collaborative Debugging 265
Importing and Exporting Breakpoints 265
DataTip Pinning and Annotation 268
Summary 271
CHAPTER 9 Search Engine Optimization and Accessibility 272
An Introduction to Search Engine Optimization 272
Science or Dark Art? 273
General Guidelines 273
Establishing Clear Markup 274
HTML Metadata the .NET 4 Way 275
Graceful JavaScript Degradation 276
Providing alt Text for Images 278
Color Scheme Sensitivity 278
Friendly URLs 280
Data Requirements for Friendly URLs 280
Stored Procedures for Friendly URLs 283
Exploiting the Page Life Cycle 284
Request Exclusion 286
Retrieving Friendly URLs 288
Retrieving Alias URLs and Response.RedirectPermanent() 294
Summary 298
Index 299

Erscheint lt. Verlag 30.7.2010
Zusatzinfo 320 p.
Verlagsort Berkeley
Sprache englisch
Themenwelt Mathematik / Informatik Informatik Software Entwicklung
Mathematik / Informatik Informatik Theorie / Studium
Mathematik / Informatik Informatik Web / Internet
Schlagworte AJAX • ASP.NET • CMS • Debugging • Framework • jQuery • Search engine optimization (SEO)
ISBN-10 1-4302-2713-3 / 1430227133
ISBN-13 978-1-4302-2713-7 / 9781430227137
Haben Sie eine Frage zum Produkt?
PDFPDF (Wasserzeichen)
Größe: 11,1 MB

DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasser­zeichen und ist damit für Sie persona­lisiert. Bei einer missbräuch­lichen Weiter­gabe des eBooks an Dritte ist eine Rück­ver­folgung an die Quelle möglich.

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.

Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Das umfassende Handbuch

von Jürgen Sieben

eBook Download (2023)
Rheinwerk Computing (Verlag)
62,93
Mini-Refactorings für besseres Software-Design

von Kent Beck

eBook Download (2024)
O'Reilly Verlag
12,99
Grundlagen, Menschen, Prozesse, Techniken

von Jochen Ludewig; Horst Lichter

eBook Download (2023)
dpunkt (Verlag)
49,90