You are previewing ASP.NET 3.5 Content Management System Development.
O'Reilly logo
ASP.NET 3.5 Content Management System Development

Book Description

Build, Manage, and Extend your own Content Management System

  • Create your own Content Management System with the understanding needed to expand it and add new functionality as your needs grow

  • Learn to build a fully functional application with very little code and set up users and groups within your application

  • Manage the layout of your site using Master Pages, Content Placeholders, Themes, Regions, and Zones

  • A step-by-step guide with plenty of code snippets and screen images

In Detail

ASP.NET 3.5 is equipped with a built-in security system, standard design templates, and easy configurations for database connections, which make it the ideal language for building a content management system. With the strong community support for the ASP.NET platform, you can be assured that what you write today will be around and supported for years to come. You can imagine how easy it is to get lost in the myriad features especially if you are a newcomer.

This book shows you how to make use of ASP.NET's features and create a functional Content Management System quickly and conveniently. You will learn how to build your site and see the different ways in which you can customize your code to fit your needs. With this book in hand, you can easily set up users and groups, create valuable content for your users, and manage the layout of your site efficiently. All you need is a basic understanding of coding and a desire to learn, and this book will take care of the rest.

This book will teach you to get your site up and running quickly, and maintain its content even if you have little or no web design or programming experience. It will give you all the knowledge you need to use the tools as well as the code required to make yourself a strong developer far beyond your site. It begins with setting up your programming environment and coding a Content Management System. You will learn how to install and configure a database and connect it to your CMS. You will be able to create content and manage the layout of your site, and also make it available beyond the browser. At the end of this book, you will have designed and built a CMS that allows you to administer an Articles section, Images and Files sections, as well as a full set of Administrator tools for your site.

Table of Contents

  1. ASP.NET 3.5 Content Management System Development
  2. Credits
  3. About the Authors
  4. About the Reviewer
  5. Preface
    1. What this book covers
    2. Who this book is for
    3. Conventions
    4. Reader feedback
    5. Customer support
      1. Downloading the example code for the book
      2. Errata
      3. Piracy
      4. Questions
  6. 1. Planning and Building your First Content Management System
    1. What a Content Management System is
      1. Web Content Management Systems
    2. Why use ASP.NET
      1. ASP.NET membership and profiles
      2. ASP.NET Master Pages and Themes
      3. ASP.NET 3.5
    3. Setting up your environment
      1. Installing IIS
        1. Operating systems and IIS versions
        2. Installing IIS in Windows XP Pro
        3. Installing IIS in Windows Vista
      2. Installing ASP.NET 3.5
      3. Installing Visual Web Developer Express 2008
      4. Configuring and testing your setup
        1. Configuring IIS on Windows XP
        2. Configuring IIS on Windows Vista
        3. Setting NTFS permissions
        4. Testing IIS
    4. Writing a simple content management application
      1. Default.aspx
        1. Content.txt
      2. FCKEditor
      3. Edit.aspx
    5. Summary
  7. 2. Adding a Database to a Content Management System
    1. Why use a database
    2. Why use SQL Server Express
    3. Installing and configuring SQL Server 2005 Express
      1. Installing SQL Server 2005 Management Studio Express
      2. Running SQL Server 2005 Management Studio Express
    4. Creating a database for our simple Content Management System
      1. Creating a new database with Management Studio Express
      2. Windows authentication vs SQL server authentication
        1. Configuring an SQL user account
        2. Configuring the database to use the SQL Server account
      3. Creating a database table with Management Studio Express
      4. Using the SimpleCMS database in Visual Web Developer
    5. Using the SimpleCMS database in the CMS application
      1. Creating a new Default.aspx file
        1. Configuring the data source
        2. Binding the Data Source to a Repeater control
      2. Creating a new Edit.aspx
    6. Creating multiple content pages
      1. Altering the database table
        1. Adding data to the new column
      2. Altering the SqlDataSource code
    7. Understanding SQL Server commands
      1. SQL query syntax
      2. SELECT queries
        1. WHERE clause
          1. LIKE
          2. AND | OR
        2. TOP
        3. ALL | DISTINCT
        4. COUNT
        5. GROUP BY clause
          1. HAVING clause
        6. ORDER BY clause
      3. INSERT queries
      4. UPDATE queries
      5. DELETE queries
      6. Other queries
    8. Entities and relationships in brief
      1. Entities
      2. Entity relationships
    9. SQL injection
      1. Preventing SQL injection
    10. Changing the database user account
    11. Summary
  8. 3. Content Management System Architecture
    1. Multi-tier architecture
      1. The data store
        1. The Pages table
        2. The Panes table
        3. The Articles table
          1. Sample data for the Articles table
      2. The data access layer
        1. Creating the typed dataset
        2. Filtering data from the dataset
        3. Insert method
        4. Update and delete methods
      3. The business logic layer
        1. The ArticlesBLL class
          1. Testing the business logic layer
      4. The presentation layer
        1. Building the Master Page
          1. Designing the Master Page
          2. Creating the Default.aspx home page
          3. Adding dynamic content
    2. Summary
  9. 4. Adding Security and Membership to a Content Management System
    1. ASP.NET membership
    2. Configuring and using forms authentication
      1. Creating a new application
      2. Creating the home page
        1. Create the Master Page
      3. Enabling forms authentication
      4. Creating the membership database
      5. Configuring the SqlMembershipProvider
      6. Creating the login page
      7. Creating a user account with the ASP.NET configuration tool
      8. Creating a login
    3. Adding forms authentication to our CMS
      1. Preparing an existing SQL database
        1. The aspnet_regsql.exe tool
      2. User accounts
      3. Membership roles
        1. Adding users to roles
      4. Login page
      5. New user registration
      6. Securing content
      7. Login status
      8. Password recovery
    4. Summary
  10. 5. Creating the Articles Module
    1. Application specifications
      1. The Article publication process
      2. User controls
        1. Building a user control
      3. Additional specifications
    2. Building the Articles module
      1. Database layout
      2. Data access layer
      3. Business logic layer
      4. User controls
        1. Listing Articles
      5. Author, Editor, and Publisher roles
    3. Additional features
    4. Summary
  11. 6. Pages and Zones
    1. Master Pages
    2. Themes
    3. Menus
    4. Page hierarchy
    5. Regions and Zones
    6. Summary
  12. 7. Images, Files, and RSS
    1. How images and files work on the Web
    2. File upload control and beyond
    3. Image gallery
    4. Document repositories
    5. RSS feeds
    6. Summary
  13. 8. Administrator Control Panel
    1. Basic site settings
    2. User accounts
    3. Articles
    4. Reporting
    5. Search Engine Optimization
    6. Summary
  14. 9. Further Possibilities
    1. Upsizing to the SQL Server
    2. Additional modules
    3. Base pages
    4. Error trapping
    5. Summary