Http://www.microsoft.com/downloads/details.aspx? FamilyID = 7323586a-301c-4a38-a5f3-a4595b391824 & displaylang = zh-cn
OverviewThis toolkit contains the following content:
For ASP. NET beginners, please first learn the basic concepts,
1. learning materials for ASPNET-training pptfiles for ASP. NET and ADO. NET, including DEMO code, suitable for beginners
2. ASPNET system learning materials-Microsoft system training materials, including ASP. NET, ADO. NET, and mobile development. It is suitable for comparative and systematic learning of Microsoft Web development technology.
Use ASP. NET Starter Kit to start Web site development now. Release Date: 12/31/2004 | updated on: 12/31/2004
This document assumes that you are familiar with Web Development
Download the code in this article:StarterKits.exe(141KB)
If you want to build ASP. NET Web
Site, you need to build on the basis of robust and reliable code. Is it great to make some changes and customize them from a complete website and then launch them online? ASP. NET Starter
Kit is a packaging solution that allows you to do so. These five Toolkit (Community, Reports, Commerce, Portal, and Time)
Tracker) provides reusable and customizable complete code. In addition, many ISPs support ASP. NET Starter Kit Web
The site is automatically deployed. When you must deploy the site quickly, only a few tasks are left for you. This article introduces ASP. NET Starter
Kit, and build a community Web site with many advanced features (such as rating, user voting, uploading quotas, change notifications and themes.
|Commerce Starter Kit and Portal Starter Kit|
|Time Tracker Starter Kit|
|Reports Starter Kit|
|Community Starter Kit|
|Create a community|
|Community Starter Kit Structure|
|Create a new module|
And Visual Studio. NET have indeed made Web application development easier. However, when creating ASP. NET Web
You still need to do some work yourself. You still need to design a complete application, develop it with reusable reliable code, and thoroughly test it. During this process, you may ask yourself:
"Has someone already solved this problem? Are I developing it again ?" Some scenarios for most ASP. NET
Developers are common, such as combining community sites, tracking the time of a project or creating portals for the company. Build based on a well-designed Foundation (without having to design applications from scratch, even if
This means that you can customize and expand the solution), which will bring good results. This is exactly the design idea of ASP. NET Starter Kit.
ASP. NET Starter Kit is a set of (five in total) Packaged sample applications from Microsoft that you can
Download. This includes an e-commerce storefront application, a Community Web site, a portal site, sample reports, and a project time tracking application. Starter Kit
The purpose is to provide several useful start sites and some reliable ASP. NET code examples, from which you can learn and build sites on this basis. All five
Starter Kit comes with the complete source code. Can you use SQL Server? Or Microsoft? Data Engine (MSDE)
Used for data storage and in Visual Basic? C # And J # versions. In addition, Starter Kit can
Studio. NET version (with independent. aspx and code hidden pages), you can also use it in the SDK
Version (no code hidden page. Therefore, you can use Starter Kit in your favorite environment, regardless of whether the environment is Visual Studio
. NET, ASP. NET Web Matrix Project, or another editor. In this article, I will introduce these five ASP. NET Starter
Kit. Next, we will focus on Community Starter Kit to show you how to expand it based on your specific needs.
Starter Kit is a fictitious spy company, IBuySpy.
Create an e-commerce storefront application. The application uses a three-tier architecture, cache function, form authentication, and a shopping cart. Commerce Starter Kit
It also includes a B2B Web service component. This is a great application for you to study and learn, especially when you need to build your own e-commerce applications.
Starter Kit creates a portal application for the fictitious spyware IBuySpy described in Commerce Starter Kit. Portal
Starter Kit consists of 10 portal modules: notification, contact, discussion, event, html/text, image, Link, quick link, xml/xsl
And a custom module.
Tracker Starter Kit (see Figure 1) is essentially a time and accounting Intranet without an accounting component
Application. It is quite simple. It has three tabs: Log, Reports, and Administration. Administration
The tab can be used to configure projects, the Log Tab can be used to record hours, and the Reports tab can be used to generate Reports by project or individual.
Figure 1 Log tab in Time Tracker Starter Kit
Time Tracker Starter Kit shows many interesting ASP. NET architecture features, such as three-tier design, Windows? And form authentication, use GDI + to generate dynamic charts, and move the front-end.Back to Top Reports Starter Kit
Starter Kit and other Starter Kit
The difference is that it is not a single aggregate application. More correctly, it is a series of (eight in total) reports that you can read, run them for the sample data, and check their source code. In addition, you
You can copy the source code and paste it into your own application. This toolkit works in a way similar
ASP. NET provided by Visual Studio. NET
QuickStart. These Report examples include simple table reports, two types of hierarchical and in-depth reports, cross tables, and several GDI + charts.
It may be the core toolkit. With it, you can quickly combine community sites for user groups, clubs, families, or communities without having to know how it works. You can also use it to combine simple
News and information sites. In some respects, it overlaps with the functions provided by Portal Starter Kit, but it focuses more on non-commercial organizations and is easier to set and manage.
Supports many different types of content, including articles, photo libraries, and event lists. In addition, it also supports a large number of optional features (these features are standard on many community sites), including advertising, arbitration, upload Configuration
Amount, comments, comments, user votes, content change notifications, automatic conversion, subject, Web box, union, press releases, appearance and security.
The advertisement consists of two AdRotator
Control, one control has a standard size (468 pixels-60 pixels) of the banner, and the other has 125 bytes-125
Pixel banners. If you enable the arbitration function for a region, the content of this region must be approved by the reviewer to be displayed on this site. You can set an upload quota for each user to limit
Number of images and files that can be uploaded to the site. Community Starter Kit also supports the uploading quota for the entire Community. This allows ISP
Host many communities in a single box without occupying all available disk space for a site.
You can choose to enable the user rating and comment function for a specific type of content (book or article. Users can evaluate content items (the rating can be from 1 to 5). If they want to, they can also enter a comment to replace the rating, or both add a rating and a comment.
Starter Kit supports creating and reporting user voting. Therefore, you can use
Development language ?" Or "what is the name of the first drummer of the Qi Yi spacecraft choir ?" And so on. You can also automatically notify users when there is new content in a region. You can even specify
Function to automatically remove foul language from submitted content and comments without any intervention.
Community Starter Kit has an option that allows you to create a topic list so that you can classify the content when adding the contributed content. Therefore, the topics of. NET Framework-based news sites can be ASP. NET, hosted C ++, and Web services.
Community Starter Kit allows you to enable various Web boxes to add content to be highlighted in the blank area of the page. For example, you can use a Web box to display the most popular or up-to-date articles, links, downloads, or photos on the home page. You can also use the reference Web box to display random references on the page.
Starter Kit supports two mechanisms for copying content: Service subscription and Web Service boxes. By using the service subscription mechanism, you can aggregate another Community
The content of the site area is displayed on your site. For example, you can subscribe to the discussion area of another community site and display it on your own site as if they were your own discussion area. And
The Web Service box displays extracted information in the blank area. However, the Web service box can obtain content from other sites. You can subscribe to another one to use its content as XML
The Community Starter Kit site published by the Web service can also subscribe to the RSS service, such as http://msdn.microsoft.com/msdnmag/rss/recent.xml. You can use the XML Web Service and SOAP protocol (instead of the current RSS Protocol) to publish any region of the site as a community service. The published region can be used as a service subscription or Web service box.
You can send press releases to community members. The press release component supports both templates and embedded special tags. You can use these tags to include
Password and other fields, as well as content-specific fields such as NewArticles, NewBooks, and NewDownloads.
The Community Starter Kit engine supports appearance, themes, and other concepts, and allows you to completely change the appearance of a site by selecting another topic from the Management page. The appearance and topic will be discussed later in this article.
Community Starter Kit supports a wide range of security systems that classify members by their roles: Anonymous, authenticated, reviewed, and administrator, you can also classify roles according to your custom roles. You can also protect the security of any area of the site so that only a specific type of users can view, add, edit, or delete content.
Figure 2 community Web site example
2. Examples show many Community functions supported by Community Starter Kit. This community is Named Ballard. NET
Virtual user group, which uses the Professional topic. Please note that the user vote is displayed on the top of the page, and the community service supply box title is ". NET Tips &
Tricks is located in the lower right corner of the page.
Download and install Community Starter Kit
Then, the first thing you want to do is to delete the sample site data. You can click the "Login" link at the bottom of the navigation bar and use Admin as the Admin user.
Password login to complete. (Because this password may cause security risks, please change it as soon as possible .) After successful logon, the new link (Admin)
Will appear on the navigation bar. Click the link to go to the management section of the site. scroll down to find the "Delete Content" link.
After the content is deleted, return to the community homepage.
You will notice that some examples are retained. To replace the homepage content with your own content, return to the Management page and click "Edit"
Sections, click the Home area, and provide a site title, description, and logo. You can also use this "Edit
"Sections" option to change the basic layout of the home page, select a topic, or enable many optional features of the home page (such as displaying Web boxes or Web service boxes ).
After setting the homepage layout, you can add multiple regions to the site. A site can have unlimited regions.Figure 3Lists various types of zones (or modules) that can be created ).
To add a region, click the "Edit Sections" link on the Management page. You can create multiple regions of the same type. For example, Figure 2
The community site shown in contains two Article regions: News and
Articles. You can use the parent region to help organize a group of similar areas. For example, if you want to separate the downloaded content by the general category, you can create a file that contains several download regions (such
The parent region of User Contributions, Controls, and Speaker Presentations.
On the Edit sessions page, you can enable various optional features for a specific region, such as arbitration or email notification. You can also choose to publish the content of this region as a Community Web service.Back to Top Community Starter Kit Structure
Manage many Web
Websites are all data-driven and dynamically generated, but most of them are still static to a large extent. Although this is not necessarily a bad thing, the more content dynamically generated on the site, the higher the customization level.
Community Starter Kit is completely data-driven. Community Starter Kit
Contains only one. aspx page with no content. All content is stored in SQL Server or MSDE database. Community Starter
A single installation of Kit supports multiple communities that can be configured using the special ISPAdmin account.
When you request Community from the Web Server
On the Starter Kit page, an HTTPModule named CommunitiesModule
The request is processed to determine the communities, regions, pages, and users associated with the request, and fill in CommunityInfo, SectionInfo, PageInfo, and
UserInfo object. These objects are members of the Items set of the Context object. Because Context
Objects can be saved in all modules and handlers involved in a request. Therefore, the data is available for pages that process the request (for more information about Context objects, see
Steven Smith wrote "ASP. NET: Nine Options for Managing Persistent User State in Your ASP. NET Application", which was published onMSDN?Magazine). The CommunitiesModule then redirects the request to the communityDefault. aspx page, which dynamically generates responses using the above objects, many user controls, support classes, and style sheets.
Community Starter Kit
You may not be able to do everything you want, but the toolkit is designed with Scalability considerations. If you don't like how it works, you can easily change it. After all, it comes
Complete source code written in Basic. NET, C #, and J. The theme and module elements of this toolkit are particularly suitable for customization.
Starter Kit is designed based on the ASP. NET Forums application.
Like an application, it also uses themes (also called appearances) to separate the user interface from the code. A topic is far more than a style table. In fact, there will be no content without a topic, because the topic contains all the content displayed on the site
Control. SubjectFigure 4.
To create a topic, add a folder under the Communities \ Common \ Themes folder. The topic name is derived from the name of the folder. Under this folder, createFigure 4. Fortunately, because all themes are inherited from the basic theme Default, you do not have to fill in all folders of the theme. Therefore, if you do not provide the appearance required by the topic, Community Starter Kit uses the Default topic appearance.
If the Default topic contains more than 75 files, you can still create a basic topic by providing only a few files. I created a basic topic named Small, which is
The simplified version of the Default topic. It corresponds to the Default
The basic difference between a theme is that the theme uses a smaller font, the color is changed from blue to red, and the tabs use different la S. My new topic consists of the following six files:
Communities \ Common \ Themes \ Small \ Images \ redshiny3dsquarebullet_7x7.jpg
Communities \ Common \ Themes \ Small \ Skins \ ControlSkins \ Sections_SectionMenu.ascx
Communities \ Common \ Themes \ Small \ Skins \ PageSkins \ Default. ascx
Communities \ Common \ Themes \ Small \ Styles \ an_red_arrow.gif
Communities \ Common \ Themes \ Small \ Styles \ Default.css
Communities \ Common \ Themes \ Small \ Styles \ redyellowstar.gif
Of course, the more elements provided, the more complete the topic. For example, if you go deep into a region using the Small topic, you will still see the control with a blue background. However, if I have not changed the color scheme of the topic, this is the best practice. To create a new topic, you can use the existing topic as the model and modify its appearance and style.Back to Top Create a new module
Although this is a bit more complex than creating a topic, you can also create a new module for the community. For example, I created a module named Jobs to track work announcements.
To create a new module, first Add a new table to the CommunityStarterKit database to track new module items, and name the table Community _Module(Where,ModuleIs the name of the new module ). The primary key of the table should be namedModule_ ContentPageID, together with the names of other fields to be collected for this module.
The stored procedure that needs to be used to add new module items, edit existing projects, retrieve the project list, and then retrieve all fields of a single project. Name the stored procedure of the Jobs Module
Community_JobsAddJob, Community_JobsEditJob, Community_JobsGetJobs and
Community_JobsGetJob. I copied the stored procedures of the Articles module and used them as Jobs
Model of the stored procedure, and add other fields necessary for tracking the work announcement. Community_JobsGetJobs is used to retrieve Jobs_Section
Page. This module calls the Community_GetPagedSortedContent function to page the output content (seeFigure 5).
Create a new folder under Engine \ Modules that will contain the code of this module. In this folder, there should be three names: Components, Content, and
The sub-folder of Controls. For the Jobs module, I created
Engine \ Modules \ Jobs \ Components, Engine \ Modules \ Jobs \ Content and
Engine \ Modules \ Jobs \ Controls folders. The Components folder should contain two class libraries. The first class library contains
The ContentInfo class is derived from the class. The second class library contains a utility class that calls the stored procedure of each module.
Use Visual Basic
. NET version of Community Starter Kit, I created a class library named JobInfo. vb, which contains a single class
(JobInfo ). I use the ArticleInfo. vb class library as the model of my class library. The JobInfo constructor uses a single parameter.
DataReader, extracts each field from the Jobs table using this parameter, and puts them into a private variable that will then be exposed as a series of attributes of the JobInfo class (seeFigure 6).
Class provides interfaces between the Jobs module and the Jobs stored procedure, including a single class
JobUtility, which has four methods: AddJob, EditJob, GetJobs, and GetJobInfo. Call the GetJobs Method
Community_JobsGetJobs stored procedure and return the ArrayList of the JobInfo object (seeFigure 7).
For each basic page supported by this module, Content
The folder should contain a class library. These classes will be the code of the user control created in the future. At least, your module needs to provide classes for each of the following types of pages: Add a project, edit a project, and display a project list.
(For the region page) and display a single project (for the project deepening page ). These classes must be
ContentAddPage, ContentEditPage, ContentListPage, or ContentItemPage
. As you may have noticed, Content often has a one-to-one relationship with the stored procedures they call.
I have created four class libraries.
(AddJob. vb, EditJob. vb, JobSection. vb, and Job. vb ).
The content library is a model. The content class is used to adhere to the JobInfo class and user control appearance. The Job class in the Job. vb class library displays the complete information of a specific work list (seeFigure 8).
For each work item displayed on the Job and JobSection pages, the Controls folder contains custom server Controls. For Job
The following server controls are created: JobCompany, JobTempStatus, JobTempMonths, JobStartDate,
JobLocation, JobEducation, JobExperience, JobSalary, JobContactName,
JobContactPhone, JobContactEmail, JobContactWeb, and JobEditContent. For
On the JobSection page, I created the ItemJobLocation control. The JobCompany custom control is displayed inFigure 9.
Now, you need to create some user controls to show the appearance of each basic module page corresponding to the SkinnedCommunityControl class created in the previous step. At least, you must provide a set of content appearance user controls for the Default topic. You can also provide content appearance user controls for other themes.
In Themes \ Default \ Skins \ ContentSkins
Three user controls are created under the folder: Jobs_AddJob.ascx, Jobs_JobSection.ascx, and
Jobs_Job.ascx. There is no user control for editing work, because Jobs_AddJob.ascx
The Control performs a dual task, which provides support for adding and editing work.Figure 10The Excerpt from the Jobs_Job.ascx user control is displayed. Note the reference of the custom Server Control named JobCompany and JobTempStatus in the Engine \ Modules \ Jobs \ Controls folder.
Now, I have added a style to the new content control's default style table (Themes \ theme \ Styles \ default.css.Figure 11Displays several new styles.
Then, I send the following information to the database: Community_PageTypes and Community_NamedPages.
The table adds entries for this project and the project region page. By imitating existing Community_MaintenanceInitializeArticles
The name of the stored procedure is Community _ MaintenanceInitializeJobs.
This step is relatively simple. Running this stored procedure creates necessary table entries.
Figure 12 JobSection page
Figure 12 shows the JobSection page of the Ballard. NET community site. If you click the "Read More" Link under the Work announcement, the Job page shown in 13 is displayed.
Figure 13 Job page
Download a copy of the files that constitute the Jobs module (and the Small topic) from the link at the beginning of this article.Back to Top Summary
Starter Kit provides several pre-packaged sample applications that provide both a working Web site template and Visual Basic
. NET, C #, and J. These toolkits represent the most common Web
Applications, including communities, businesses, portals, reports, and project time tracking sites. This article discusses how to install and use Starter Kit, and
Visual Studio. NET copy) to customize and extend the Community Starter Kit method. If you are looking for a way to start creating
ASP. NET site methods. These toolkit may be a set of convenient tools you are looking. Note that some companies that provide Web Hosting can provide
Automatic deployment and account registration of Kit. For more information, see http://www.asp.net/hosters.
Thanks to Stephen Walther for helping me write this article.
For background information, see:
ASP. NET Starter Kits
Paul LitwinAs CEO and senior trainer of Deep Training, the company is mainly engaged in. NET Training. He is the chairman of the Microsoft ASP. NET Connections conference. He has written or written many books with others, includingASP.NET for Developers(SAMS, 2001 ). He is currently writing a new book on ASP. NET. You can usePaull@deeptraining.comContact Paul.
Go to the original English page
Applicable to people who already know ASP. NET can start with the sample code folder in this Toolkit:
Step-by-Step English textbooks-source code examples in the English version. For the most widely used Web applications, Microsoft has carefully designed five scenarios based on the best practices: E-commerce
(Commerce), Portal, Web Report System (Reports), Community system (Community), Time management (Time)
Tracker ). These sample codes can be used as a learning model and can be used to start a new project.
2. Chinese Version --- the Chinese version of Starter Kit. The Chinese version is mainly for Starter
The document in Kit has been translated. When using it, install the English version according to the instructions in the Toolkit, decompress the corresponding Chinese version of the compressed file, and find the installation path of the English version, covering the English version of the text
. Note that Visual Studio. NET 2003 is required for the Chinese version.
3. starter Kit provides VS and SDK versions in multiple languages (VS indicates that VS projects can be opened in the development environment, and SDK version indicates that VS is installed.. NET Framework. You do not need to install. NET). The translation part is the VS version of C # language.
4. Student Loan Management System-example program written by Microsoft for a bank in China. The code shows the application of ASP. NET in key Chinese systems.