Using the ASP.NET Starter Kits


The ASP.NET Starter Kits illustrate a number of best practices for building applications using the ASP.NET Framework. There are five Starter Kits: The Community Starter Kit, the Reports Starter Kit, the Time Tracker Starter Kit, the Commerce Starter Kit, and the Portal Starter Kit. All five Starter Kits can be freely downloaded at www.Asp.Net (click the Starter Kits tab).

Each Starter Kit includes all of its source code. There are four versions of each Starter Kit:

  • VBSDK The VB.NET SDK version. This version does not require Visual Studio .NET. The source code uses single file ASP.NET pages.

  • CSSDK The C# SDK version. This version does not require Visual Studio .NET. The source code uses single file ASP.NET pages.

  • VBVS The VB.NET Visual Studio .NET version. This version is designed to be used with Visual Studio .NET. The pages use a code-behind model.

  • CSVS The C# Visual Studio .NET version. This version is designed to be used with Visual Studio .NET. The pages use a code-behind model.

NOTE

There are two additional versions of the Community Starter Kit: a J# SDK and J# VS version.


There are forums devoted to discussing the Starter Kits at the www.ASP.net Web site (click the Forums tab).

You are encouraged to use the source code from these Starter Kits in your applications. You can freely reuse the source code for both commercial and non-commercial applications (see the End Users License Agreement for details).

The ASP.NET Community Starter Kit

The ASP.NET Community Starter Kit enables you to quickly build a community Web site such as a user group site, developer resource site, or news site. For example, you can use the Community Starter Kit to quickly build a .NET User Group Web site (see Figure 8.11).

Figure 8.11. The ASP.NET Community Starter Kit.

graphics/08fig11.jpg

NOTE

In the interest of full disclosure, I should mention that my company designed and built the ASP.NET Community Starter Kit for Microsoft. So, for obvious reasons, I think that it is the most interesting of the Starter Kits.


The Community Starter Kit includes nine standard content modules:

  • Articles This module can be used for posting articles such as news articles

  • Events This module can be used for posting events such as upcoming user group events

  • Books This module can be used for posting books. For example, your user group might want to list books and book reviews.

  • Photo Gallery This module can be used for displaying photos. For example, you can use this module to display photos from user group meetings.

  • Downloads This module can be used for posting downloadable files. For example, you might want to enable users to download sample files or PowerPoint presentations from speakers .

  • Links This module can be used for posting links to other Web sites. For example, you might want to display a list of links to .NET resources.

  • HTML This module can be used for posting HTML pages.

  • Static Page This module can be used for creating a custom section with a user control.

  • Parent This module can be used for grouping other sections.

All of the modules support the following properties:

  • Security You can specify roles for viewing, adding, editing, and deleting content for any section.

  • Moderation You can enable moderation for any section enabling an administrator to approve or reject any content posted to the section.

  • Comments You can enable users to comment on any section.

  • Ratings You can enable users to rate content added to any section.

  • Web Service You can expose the content of any section through an XML Web service.

For example, you can create an articles section and enable users to comment and rate the articles. You can also prevent anyone except members of the Administrators role from adding new articles.

In addition to these standard content modules, the Community Starter Kit supports the following special features:

  • Skins You can easily customize the appearance of a community by selecting from a list of included skins. Alternatively, if you want to create a community with a unique appearance, then you can create your own skins.

  • Multiple Communities You can use a single installation of the Community Starter Kit to host multiple communities. The individual communities can be distinguished by domain or subdomain name .

  • Newsletters You can send a newsletter to the registered members of your community with the newsletter module.

  • Voting You can create a voting poll and enable your community users to vote on any topic.

Creating a Community with the Community Starter Kit

When you install the Community Starter Kit, a sample community named Lunar .NET is created (the sample community represents a fictitious .NET user group located on the moon). The sample community illustrates each of the standard modules.

Unless you are planning on starting a user group on the moon, you'll want to modify this sample community. To do this, you'll need to log in as an Administrator of the community. You can log in as an Administrator by clicking the Login link and entering the username Admin and password Admin.

After you log in, you can access the Community Admin pages by clicking the Admin link in the section menu. The main page for the Community Admin menu is displayed in Figure 8.12.

Figure 8.12. The Community Admin pages.

graphics/08fig12.jpg

Selecting a Theme

No one wants their Web site to look like other Web sites on the Internet. Everyone wants to be special.

You can easily and radically modify the appearance of your community by selecting a new theme. A theme determines the layout and style of the pages in your community.

To select a new theme, click the Edit Site link in the Community Admin pages. In the Edit Theme box, select a skin and a style from the drop-down list boxes. Figures 8.13 and 8.14 illustrate the home page of the Community Starter Kit with two different themes selected.

Figure 8.13. The Professional Theme.

graphics/08fig13.jpg

Figure 8.14. The Arc Theme.

graphics/08fig14.jpg

The Community Starter Kit is packaged with eight standard themes. If you don't like any of these standard themes, you can easily create a new one of your own. A theme consists of a set of user controls ( .ascx files) that contain the HTML for laying out the pages.

All the themes are found in a folder named Themes in the root Community Starter Kit folder. To create a new theme, just copy one of the existing themes (such as Professional) into a new folder under the Themes directory. After you create the new folder, you can open the individual .ascx files and modify the HTML contained in the files.

Creating and Editing Sections

A Community Starter Kit Web site consists of sections of content. For example, a community might have one or more article, download, or photo gallery sections.

You can add a new section or modify an existing section by using the Community Admin pages. For example, follow these steps to add a new article section to your community:

  1. Click the Edit Sections link.

  2. Click the Add New Section link at the bottom of the page.

  3. Enter a name, title, and description for your new section. For example, My Articles, My Articles Section, This section contains articles .

  4. In the Contents box, select Articles.

  5. Click the Add Section button.

Immediately after you add the new section, a link to the section will appear in the section menu on the home page of your community.

The ASP.NET Reports Starter Kit

The Reports Sample Kit is actually a collection of eight sample report applications:

  • Tabular Report Displays list of categories and list of matching products under each category

  • Visual Report Displays report using Pie Chart, Bar Chart, or Tabular display.

  • Cross Tab Report Displays column and row totals

  • Master Details Report Displays a report filtered by year and quarter

  • Simple Report Displays a simple list of customer contact information

  • Text Report Displays a list of employees and employee information

  • Hierarchical Report Displays three dependent reports showing progressively more detailed information

  • Drill-Down Report Displays a list of customers and enables you to click on a customer to see a list of orders associated with the customer

The screenshot in Figure 8.15, for example, is from the Visual Report.

Figure 8.15. The Visual Report.

graphics/08fig15.jpg

If you need to add a report to your ASP.NET application, then you can easily copy the sample code in the Reports Starter Kit to do it. Two of the more interesting features of the Reports Starter Kit are its use of GDI+ for generating the Pie and Bar charts and its support for printing reports.

The ASP.NET Time Tracker Starter Kit

The ASP.NET Time Tracker Starter Kit enables you to track time spent on projects. There are several interesting features of this Starter Kit:

  • Reports The Time Tracker enables you to generate reports and charts (the charts are generated with GDI+).

  • Windows Authentication The Time Tracker uses the Active Directory or the NT SAM for account information.

  • Mobile Support The Time Tracker includes support for mobile devices such as cell phones and PDAs.

The screenshot in Figure 8.16 displays the home page for the Time Tracker.

Figure 8.16. The Time Tracker Starter Kit.

graphics/08fig16.jpg

The ASP.NET Commerce Starter Kit

The ASP.NET Commerce Starter Kit is a sample application that illustrates how to create a simple online store by using the ASP.NET Framework (see Figure 8.17).

Figure 8.17. The Commerce Starter Kit.

graphics/08fig17.jpg

Here are some of the more interesting features of this Starter Kit:

  • Shopping Cart The Commerce Starter Kit illustrates how to create a shopping cart that stores items in a database.

  • Web Service Support The Commerce Starter Kit contains an InstantOrder Web service that enables you to remotely place orders or query the current status of an order.

  • Search The Commerce Starter Kit illustrates how to create a simple search page that returns matching products.

NOTE

The ASP.NET Commerce Starter Kit was originally named the IBuySpy Store.


The ASP.NET Portal Starter Kit

The ASP.NET Portal Starter Kit can be used to quickly create a portal Web site (see Figure 8.18). The ASP.NET Portal includes the following standard modules:

  • Announcements This module can be used to display a list of news items.

  • Contacts This module can be used to display contact information for a group of people.

  • Discussion This module can be used to display a threaded discussion group.

  • Documents This module can be used to display links to downloadable documents.

  • Events This module can be used to display a list of upcoming events.

  • HTML This module can be used to display an HTML page.

  • Image This module can be used to display a single image.

  • Links This module can be used to display a list of hyperlinks .

  • Quick Links This module can be used to display a compact set of hyperlinks.

  • XML/XSL This module can be used to display the output of an XSL transform on an XML document.

Figure 8.18. The ASP.NET Portal Starter Kit.

graphics/08fig18.jpg

The ASP.NET Portal Starter Kit is similar to the ASP.NET Community Starter Kit. However, the two applications were created for different audiences. The ASP.NET Community Starter Kit was designed for building community Web sites such as user group, developer resource, and news sites. Unlike the Portal Starter Kit, the Community Starter Kit includes content management features. For example, the Community Starter Kit enables you to specify who can view, add, delete, and update content. The Community Starter Kit also supports moderation so that an administrator can approve or reject any content submitted to a community.

The ASP.NET Portal Starter Kit, on the other hand, is intended to be used as a starting point for intranet or Internet portal sites. Since the Portal Starter Kit is older than the Community Starter Kit, there are currently more third-party modules for the Portal Starter Kit than the Community Starter Kit.

NOTE

The ASP.NET Portal Starter Kit was originally named the IBuySpy Portal.




ASP.NET Unleashed
ASP.NET 4 Unleashed
ISBN: 0672331128
EAN: 2147483647
Year: 2003
Pages: 263

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net