Sayfalar

5 Şubat 2011 Cumartesi

The Template


Once you choose a language (in the list on the left), you’ll see a list of all the templates that Visual Studio
provides for that language (in the large box in the center). The template determines what files your
website starts with.
Visual Studio supports several types of ASP.NET applications, but all of them are compiled and
executed in the same way. The only difference is the files that Visual Studio creates by default. For
example, if you create a WCF Service, Visual Studio generates a website that starts with a single WCF
service in it, rather than an ASP.NET web page.
Here’s a rundown of your template choices:
ASP.NET Web Site: This creates a full-featured ASP.NET website, with its basic infrastructure
already in place. This website includes a master page that defines the overall layout (with a header,
footer, and menu bar), and ready-made default.aspx and about.aspx pages. It also includes an
Accounts folder with pages for registration, login, and password changing, and a Scripts folder with
the jQuery library for client-side JavaScript.
ASP.NET Empty Web Site: This creates a nearly empty website. It includes a stripped-down
web.config configuration file, and nothing else. Of course, it’s easy to fill in the pieces you need as
you start coding.

ASP.NET Dynamic Data Entites Web Site: This creates an ASP.NET website that uses the ASP.NET
Dynamic Data feature described in Chapter 33. This website is designed to use the Entity Model to
access the back-end database, while the similarly named ASP.NET Dynamic Data LINQ to SQL Web
Site template uses the older LINQ to SQL approach.
WCF Service: This creates a WCF service—a library of server-side methods that remote clients (for
example, Windows applications) can call. Although you won’t examine the WCF model in detail in
this book, you will create WCF services to provide server-side functionality for Silverlight pages in
Chapter 34.
ASP.NET Reports Web Site: This creates an ASP.NET website that uses the ReportView control and
SQL Server Reporting Services (a tool for generating database reports that can be viewed and
managed over the Web). The ASP.NET Crystal Reports Web Site template provides a similar service,
but it uses the competing Crystal Reports software.
Although most developers prefer to start with the ASP.NET Empty Web Site or ASP.NET Web Site
template and begin coding, there are still more specialized templates for specific types of web applications.
To view them, click the Online Templates heading on the far left of the New Web Site dialog box. There will
be a short delay while Visual Studio contacts the Microsoft web servers, after which it will add a list of
template subcategories, each with its own group of ready-made templates. For example, ASP.NET
developers can download a template to create a DotNetNuke website (which uses the popular DotNetNuke
portal framework) or an ASP.NET MVC website that uses OpenID for user authentication.

Hiç yorum yok:

Yorum Gönder

Bing'ı Seviyoruz. :)
Google'ı Seviyoruz. :)