Siêu thị PDFTải ngay đi em, trời tối mất

Thư viện tri thức trực tuyến

Kho tài liệu với 50,000+ tài liệu học thuật

© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Professional DotNetNuke ASP.Net portals
PREMIUM
Số trang
452
Kích thước
10.8 MB
Định dạng
PDF
Lượt xem
1732

Professional DotNetNuke ASP.Net portals

Nội dung xem thử

Mô tả chi tiết

Professional DotNetNuke™ ASP.NET Portals

Shaun Walker, Patrick J. Santry, Joe Brinkman, Daniel Caron,

Scott McCulloch, Scott Willhite, and Bruce Hopkins

01_595636 ffirs.qxd 5/10/05 10:02 PM Page i

01_595636 ffirs.qxd 5/10/05 10:02 PM Page iv

Professional DotNetNuke™ ASP.NET Portals

Shaun Walker, Patrick J. Santry, Joe Brinkman, Daniel Caron,

Scott McCulloch, Scott Willhite, and Bruce Hopkins

01_595636 ffirs.qxd 5/10/05 10:02 PM Page i

Professional DotNetNuke™ ASP.NET Portals

Published by

Wiley Publishing, Inc.

10475 Crosspoint Boulevard

Indianapolis, IN 46256

www.wiley.com

Copyright © 2005 by Wiley Publishing, Inc., Indianapolis, Indiana

Published by Wiley Publishing, Inc., Indianapolis, Indiana

Published simultaneously in Canada

ISBN 13: 978-0-7645-9563-9

ISBN 10: 0-7645-9563-6

Manufactured in the United States of America

10 9 8 7 6 5 4 3 2 1

1B/SV/QV/QV/IN

Library of Congress Cataloging-in-Publication Data:

Professional DotNetNuke ASP.Net portals / Shaun Walker ... [et al.].

p. cm.

Includes index.

ISBN 0-7645-9563-6 (paper/website)

1. Active server pages. 2. Web portals—Design. 3. Microsoft

.NET. I. Walker, Shaun, 1971- .

TK5105.8885.A26P78953 2005

005.2'76—dc22

2005006846

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, elec￾tronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976

United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment

of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400,

fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing,

Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, e-mail: [email protected] or

online at wiley.com/go/permissions.

LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESEN￾TATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS

WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF

FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMO￾TIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY

SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN

RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS

REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUB￾LISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGA￾NIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF

FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFOR￾MATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER,

READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DIS￾APPEARED BETWEEN THEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.

For general information on our other products and services please contact our Customer Care Department within the

United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.

Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are trade￾marks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries,

and may not be used without written permission. DotNetNuke is a trademark of Perpetual Motion Interactive Systems,

Inc. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any

product or vendor mentioned in this book.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in

electronic books.

01_595636 ffirs.qxd 5/10/05 10:02 PM Page ii

Credits

Acquisitions Editor

Jim Minatel

Development Editor

Kenyon Brown

Technical Editor

Bruce Hopkins

Production Editor

Angela Smith

Copy Editor

Kim Cofer

Editorial Manager

Mary Beth Wakefield

Vice President & Executive Group Publisher

Richard Swadley

Vice President and Publisher

Joseph B. Wikert

Graphics and Production Specialists

Karl Brandt

Carrie A. Foster

Quality Control Technician

David Faust

Permissions Editor

Laura Moss

Proofreading and Indexing

TECHBOOKS Production Services

01_595636 ffirs.qxd 5/10/05 10:02 PM Page iii

01_595636 ffirs.qxd 5/10/05 10:02 PM Page iv

About the Authors

Shaun Walker is founder and president of Perpetual Motion Interactive Systems Inc., a solutions com￾pany specializing in Microsoft enterprise technologies. Shaun has 15 years professional experience in

architecting and implementing large scale IT solutions for private and public organizations. Shaun is

responsible for the creation and management of DotNetNuke, an open source content management sys￾tem written for the Microsoft ASP.NET platform. Based on his significant community contributions he

was recently recognized as a Microsoft Most Valuable Professional (MVP) in 2004. In addition, he was

recently added as a featured speaker to the MSDN Canada Speakers Bureau, which allows him to evan￾gelize DotNetNuke to User Groups across Canada. Shaun resides in British Columbia, Canada with his

wife and two children.

Patrick Santry, Microsoft MVP (ASP/ASP.NET) holds MCSE, MCSA, MCP+SB, i-Net+, A+, and

Certified Internet Webmaster certifications. He has authored and co-authored several books and maga￾zine articles on Microsoft and Internet technologies. Patrick is frequent presenter on web technologies,

having presented at several events including the Exchange 2000 launch, DevDays 2004 in Pittsburgh,

Pennsylvania, and to area .NET SIGs on DotNetNuke module development. In addition, Patrick owns

and maintains http://www.WWWCoder.com, a popular site for news, tutorials, and information for the

web development community. Patrick resides in Girard, Pennsylvania, USA with his wife Karyn, and

their four children, Katie, Karleigh, P.J., and Danny.

Joe Brinkman, formerly the founder and President of TAG Software Inc, is the Chief Technology Officer

for DataSource Inc. (http://www.datasourceinc.com), a J2EE development company focused on sim￾plifying and automating development of N-Tier applications with Java. With more than 22 years of IT

experience and a Computer Science degree from the United States Naval Academy, he brings a broad

range of experience and expertise in a variety of software and hardware architectures. Having worked

with DotNetNuke since February 2003, and a founding Core Team member, Joe currently serves as a

member of the DotNetNuke Board of Directors, a Lead Architect and Security Specialist.

Dan Caron is a Lead Application Designer & Developer with MassMutual Financial Group, a Fortune

500 global, diversified financial services organization. With MassMutual, Dan designs technical solu￾tions for financial web applications using Microsoft and Java technologies. For more than 10 years, Dan

has been designing and developing applications with various programming technologies including

Microsoft ASP.NET, XML/XSL, SQL, Java, and JSP. He has been a major contributor to the DotNetNuke

open-source portal project since the Core Team was founded in 2003. Some of Dan’s noteworthy contri￾butions include the exception handling framework, event Logging Provider and the Scheduler. Dan con￾tinues to contribute his talent to the project as a Lead Architect, Core Developer, and member of the

Board of Directors. Dan lives in Connecticut, USA with his wife and two children.

Scott McCulloch works as an Application Developer for the Computer Science Corporation, Australia.

At 26 years of age, Scott holds a Bachelor and Masters Degree in Computer Science, as well as the three

major Microsoft Certifications (MCSD, MCDBA, MCSE). Scott has been part of the DotNetNuke commu￾nity since the project began (late December, 2002). Today, his role within the DotNetNuke team is con￾tributing as an Architect and Core Developer. He currently resides in Wollongong, Australia with his

fiancée, Lenise.

Scott Willhite is an accomplished business and technology professional turned family man. He happily

spends his days working closely with his wife on their personal and community oriented business pur￾suits. Scott’s technology pedigree is distinguished, including Bachelor of Science in Computer Science

01_595636 ffirs.qxd 5/10/05 10:02 PM Page v

and MBA in Information Systems Management degrees from Baylor University. Scott has worked as

Senior Manager and Technical Architect for Andersen Consulting (now Accenture), Associate Director

for EnForm Ventures, acting CTO and VP of Technology for 10x Labs, and Program Director for Safeco’s

Office of the CIO. He’s architected, developed, and managed systems built on technologies ranging from

COBOL to Java and .NET, solving all kinds of real-world business problems without a certification of

any kind. Ever the “Don Quixote” type, Scott’s currently tilting at the windmills of open-source and

committed to building DotNetNuke (both the software and the community) into something truly

extraordinary. His favorite mantra is the core values developed with his partners for their former startup

company, 10x Labs: “Speak the truth. Share the wealth. Change the world!” Scott currently lives in West

Seattle with his lovely wife Allison, his young son Kyle, a whiny German Shepherd dog, two very weird

house cats, and a cast of wonderful friends and neighbors that he wouldn’t trade for gold.

Bruce Hopkins, Microsoft MVP (ASP.NET), holds a BSCIS from DeVry University and holds certifica￾tions as an MCSE and several flavors of Linux. Bruce is currently the IT Director for Chattahoochee

Technical College in Marietta, Georgia and has held a wide variety of positions in technology through￾out his career ranging from programming and web design to network administration and management.

Bruce remarks that this varied experience is crucial to determining the correct tool for the task at hand.

This is shown by the many varied technologies he uses every day. These include Windows, Unix, SQL

Server, Oracle, MySQL, and many different Linux-based applications that are an integral part of main￾taining the college’s infrastructure. Bruce makes his home in Marietta, Georgia with his wife and son.

01_595636 ffirs.qxd 5/10/05 10:02 PM Page vi

Contents

Preface xv

Chapter 1: An Inside Look at the Evolution of DotNetNuke 1

IBuySpy Portal 2

ASP.NET 3

IBuySpy Portal Forum 5

IBuySpy Workshop 6

DotNetNuke (DNN) Web Site 22

Chapter 2: Installing DotNetNuke 29

Preparation 29

Objectives 30

Hardware Prerequisites 30

Software Prerequisites 31

Hosting Prerequisites 31

Implementation 31

Downloading DotNetNuke 32

Extracting the Installation File 32

Creating the Database 32

Creating the Database User 34

Setting Permissions 38

Creating the Web Site 39

Configuring .NET Nuke 44

Testing the Installation 45

Common Installation Issues 48

Explanation 49

Scenario 1: The Clean Install 50

Scenario 2: The Upgrade 51

Installation Templates 51

Summary 53

02_595636 ftoc.qxd 5/10/05 10:04 PM Page vii

viii

Contents

Chapter 3: Portal Overview 55

What Is a Portal? 55

Portal Organizational Elements 56

Parent/Child Portals 56

Pages 57

Panes 58

Containers 59

Modules 60

Account Login 61

Announcements 61

Banners 61

Contacts 61

Discussions 61

Documents 61

Events 62

FAQ 62

Feedback 62

IFrame 62

Image 62

Links 62

News Feeds (RSS) 62

Search Input 63

Search Results 63

Text/HTML 63

User Accounts 63

User Defined Table 63

XML/XSL 63

Additional Modules 63

User Roles 64

Summary 64

Chapter 4: Portal Administration 65

Who Is the Portal Administrator? 65

Where Do I Begin? 66

The Control Panel 67

The Site Wizard 68

The Help Button 75

The Preview Button 75

Configuring Your Portal 76

Site Settings 76

Security Roles 83

02_595636 ftoc.qxd 5/10/05 10:04 PM Page viii

ix

Contents

Pages 87

Skins 91

File Manager 92

Languages 95

Maintaining Your Portal 100

User Accounts 100

Vendors 103

Newsletters 106

Site Log 107

Recycle Bin 108

Log Viewer 109

Summary 111

Chapter 5: Host Administration 113

Who Is the Host? 113

Where Do I Begin? 114

SuperUsers Accounts 115

Configuring Your Installation 116

Host Settings 116

Managing Portals as Host 126

Portals 126

Skins 130

Log Viewer 131

Other Host Tools 133

Module Definitions 133

File Manager 137

Vendors 138

SQL 138

Schedule 139

Languages 144

Search Admin 147

Lists 148

Skins 150

Summary 150

Chapter 6: Modules 151

Module Architecture 151

Portal 151

Page 153

Module 153

Module Container 154

02_595636 ftoc.qxd 5/10/05 10:04 PM Page ix

x

Contents

Types of Modules 155

Announcements Module 155

Banner Module 161

Contacts Module 163

Discussions Module 163

Documents Module 164

Events Module 166

FAQs Module 168

Feedback Module 169

IFrame Module 169

Image Module 170

Links Module 171

News Feed (RSS) 172

HTML/Text Module 173

User Defined Table Module 174

XML/XSL Module 175

Management 176

Page Management 176

Module Management 178

Installation 183

Summary 185

Chapter 7: DotNetNuke Architecture 187

Technologies Used 187

Provider Model 188

Provider Configuration 190

Custom Business Objects 190

CBO Hydrator 192

Architectural Overview 195

Presentation Layer 196

Business Logic Layer 197

Data Access Layer 198

Data Layer 199

Security Model 201

Security in ASP.NET 2.0 201

DotNetNuke and ASP.NET 2.0 202

Security in DotNetNuke 3.0 202

Namespace Overview 205

Summary 206

02_595636 ftoc.qxd 5/10/05 10:04 PM Page x

xi

Contents

Chapter 8: Core DotNetNuke APIs 207

Introduction 207

Event Logging 208

The API 208

Exception Handling 216

The Exceptions Class 217

Localization 221

Locales 222

Resource Files 222

The API 224

Scheduler 230

HTTPModules 232

HTTP Modules 101 232

DotNetNuke HTTP Modules 235

Module Interfaces 240

IActionable 241

IPortable 251

IUpgradable 253

Inter-Module Communication 253

ISearchable 254

Summary 257

Chapter 9: Beginning Module Development 259

Planning Your Module Project 259

Ready Your Resources 261

Starting Development 261

Configuring Your Visual Studio .NET Project 262

Configuring DotNetNuke to Interface with Your Module 265

Summary 270

Chapter 10: Developing Modules: The Database Layer 273

Database Design 274

Database Structure 274

Database Providers 280

SQLDataProvider Class 280

Data Abstraction 285

DataProvider Class 286

Summary 287

02_595636 ftoc.qxd 5/10/05 10:04 PM Page xi

xii

Contents

Chapter 11: Developing Modules: Business Logic Layer 289

Developing the Business Logic Layer 289

Defining the Properties for the Info Class 290

Creating Objects Using the Controller Class 293

Custom Business Object Help Class 295

Optional Interfaces for the Events Module Controller Class 295

Summary 298

Chapter 12: Developing Modules: The Presentation Layer 299

Module User Interfaces 299

View Control 301

Settings Control 313

Edit Control 316

DotNetNuke Helper Functions 327

Error Handling 327

Navigation URLs 328

Summary 329

Chapter 13: Skinning DotNetNuke 331

File Organization 332

Processing Pages and Loading Skins 332

Packaging Skins and Containers 335

Creating Your Skin 336

Container Creation 348

Summary 352

Chapter 14: Distribution 353

Code Add-Ons 354

Modules 354

Module Manifest File 354

Packaging Modules 360

Resource File 361

Installing Modules 362

Skin Objects 365

Skin Object Manifest File 368

Providers 369

Provider Manifest File 369

Skinning Add-Ons 370

02_595636 ftoc.qxd 5/10/05 10:04 PM Page xii

Tải ngay đi em, còn do dự, trời tối mất!