Вы находитесь на странице: 1из 6

What Others Are Downloading

• Sp3
• Internet Information Services (IIS) 7.5 Express
• Web Platform Installer 3.0
• Web Deploy v2.0
• Microsoft .NET Framework 4 (Web Installer)
• ASP.NET MVC 3 RTM

Links

http://en.wikipedia.org/wiki/ASP.NET_Web_Matrix

http://msdn.microsoft.com/en-us/magazine/gg983489.aspx

imp link
http://202.206.96.204:81/homepage/Sandy/tech/dotnet/webdoc.pdf

simple to code
Web Matrix is the easiest way to learn standards-based Web development and
makes it simple to build and publish Web sites on the internet. Start with HTML, CSS
and JavaScript and then seamlessly connect to a database or add in dynamic server
code using the new ‘Razor’ syntax for ASP.NET Web pages. Your code is easy to read,
simple to learn, short to write and works with any text editor. Use built-in helper
functions to connect to a database, display a Twitter feed, or embed a video. And with
a seamless path to ASP.NET MVC it is now easier than ever to create powerful
ASP.NET Web applications.

WebMatrix is a new all-in-one Web site editor for ASP.NET Web Pages. It’s aimed at a
different Web developer and a different part of ASP.NET than is usual for a Microsoft
product. WebMatrix isn’t a competitor to Visual Studio; it’s more of a complement, with
some overlap between the two.

You’ll find installing WebMatrix to be quick and painless. That’s because the entire
package and its dependencies are less than 50MB. The package includes a text editor,
Web server, database engine and the underlying framework—basically everything you
need to create a Web site and deploy it. What might surprise you is that it’s not just
limited to ASP.NET. WebMatrix also supports PHP and MySQL. This article will specifically
focus on the .NET features of WebMatrix.

The New ASP.NET Stack


Over the past few years, the ASP.NET stack has gone through a bit of a transformation. In
April 2009, ASP.NET MVC was released as a new option for Web application development
in ASP.NET. The MVC, or Model-View-Controller, pattern was nothing new, but its
implementation on top of ASP.NET was. Furthermore, Web Forms and MVC can both
coexist in the same site in perfect harmony.
To properly enable its introduction into ASP.NET, there was some gentle framework
refactoring going on so that those LEGO pieces could easily snap together how you chose.
Fast forward to now, and Microsoft has just released ASP.NET MVC 3 and WebMatrix.
These represent major releases that include a number of new additions and
enhancements. There are three notable new additions to the framework: the Razor Parser
and View Engine, or Razor for short; ASP.NET Web Pages; and IIS Express. Figure 1
depicts the relationships between all of the associated ASP.NET framework pieces.

Figure 1 The Web Stack

In Figure 1, you might have noticed that Razor, IIS Express, SQL Compact and Web
Deploy are valid options for other areas in ASP.NET Web development. Furthermore, with
the release of ASP.NET MVC 3, Razor is now the default view engine. I’ll cover Razor in
more detail later.

Conversely, ASP.NET Web Pages is being introduced as a peer to Web Forms and MVC.
The Web Page model is a page-centric execution model, similar to PHP. Markup and code
are both contained in the page itself, with helpers being leveraged to keep the code
succinct. You write these pages in Razor in either Visual Basic or C#.

The differences between Web Matrix and Visual Studio .NET are:
1 Project-based Solutions – Visual Studio .NET has the concept of a
project, to which you can add various types of file and resource. Web
Matrix does not use a project-based approach; instead it treats each
file as a separate item.
2 ASP.NET Page Structure – Web Matrix creates ASP.NET pages
using the inline approach, rather than the code-behind approach of
Visual Studio .NET.
inline coding is the one where logic and design part are in the same page
In code behind we seperate logic from designing Regarding which one to choose
...well it depends..
on developer choice Codebehind is preferred by many developers since it's readable
and makes devloper job some what convenient)

User Interface – Web Matrix is light (the installation file is only around
1MB in size),
thin, and fast. However, it does not provide the entire set of user
interface goodies that
are included in Visual Studio .NET. For example, Web Matrix does not
provide
statement completion, lists of object members, or pop-up tips in the
edit window.
❑ Compilation of Class Files – Unlike Visual Studio .NET, Web Matrix does
not
automatically compile class files into assemblies. This has to be done
from the command
line.
❑ .NET Framework Help Files – Web Matrix does not include reference
documentation
for the .NET Framework. Instead, it provides a useful, collapsible,
folder-based listing of
the commonly used classes and their members, along with a full list of
all the other
namespaces and classes within the .NET Framework Class Library. Web
Matrix also
ships with a class browser that shows the individual members of any
class, and provides
a link to the local .NET SDK (if installed) and the online MSDN .NET
reference pages.
❑ Community – Web Matrix is designed to be a community tool, and
contains various
types of links to the online community site at http://asp.net/WebMatrix/, as
well as links
to newsgroups, list servers, and other sites that provide community
support for Web
Matrix.
Edit Menu
The final group of commands on this menu allows you to format pages, and to
comment or un-comment the currently selected text or controls in either HTML or
Code
Quick Tag Editing
As well as editing the contents of an ASP.NET page or User Control
directly in the Edit
window, you can use the Edit Tag feature on the Edit menu to quickly
change the attributes or content of an element when the page is
displayed in Design view. This opens a dialog window that shows the
HTML declaration of the currently selected element in the page, which
you can then edit as required:

View Menu
four views: Design, HTML, Code, and All
In Code view, you can drag code builders onto the page.
These are "mini-wizards" that automatically create the code to
accomplish specific tasks. Web Matrix comes with a set of extremely
useful code builders that create data access methods using SQL
statements, and another code builder that creates the code for sending
an e-mail message.

Format Menu
The Format menu allows you to specify the appearance of elements in
your ASP.NET and HTML pages using the normal combinations of bold,
italic, and strikeout formatting. You can also set the foreground and
background colors, control
the horizontal alignment, format items as an ordered or unordered list,
and indent them. The formatting you specify here is added to the HTML
declaration of the elements as a mixture of standard formatting
elements (<b>, <i>, <font>, and so
on). The final option opens a submenu of block formatting options,
which add the relevant "Heading" element, from <h1> through to <h6>.

Layout Menu
The Layout menu contains a command to switch the selected control(s)
into Absolute Position mode. Web Matrix then adds a
position:absolute CSS style selector to the element(s), with the
appropriate size and position selectors. Then, using the commands on
this menu, you can align elements with each other in various ways,
make them the same width, height, or size, control their z-order, and
lock elements against being moved accidentally

Html Menu
The HTML menu provides features for adding hyperlinks to an element
(you get to specify the URL and description), and removing them from
an element. It also allows you to insert a fixed-size HTML table, where
you can specify all kinds of attributes for it including the number of
rows and columns, the borders and colors, the cell spacing, and the
cell padding. The commands on the HTML menu can also be used to
wrap the currently selected elements in a <span> or <div> element.

Workspace Menu
The Workspace menu is used to manipulate the Workspace window,
which is one of the items displayed on the right-hand side of the IDE (in
the section we refer to as the "project windows"). It allows you to add a
shortcut to a mapped folder on the network or
set up an FTP connection to another server. It can also be used to add
other items to the Workspace.

Tools Menu
The Tools menu contains commands to run and manage the various
add-ins that are provided with Web Matrix, as well as those that you
create and those provided by third parties. You can also use it to add
components (either stored on your local machine
or downloaded from the ASP.NET community site)

The Send Email Code Builder item can also be dragged onto a page, and
in this case the dialog shown in the following screenshot appears.

In this dialog you can specify the To and From addresses, the Subject,
the mail format, and the SMTP Server to use to send the message:

Data Menu
It is used as Sql server

Mobile Controls
File Types in the Security Section
Login Page – this creates a standard "log in" page that contains two
textboxes with
corresponding RequiredFieldValidator controls attached, a Login
button, and a
label where any error message can be displayed. The code in the page
uses a simple
hard-coded check of the values you enter, and then shows how to
execute the
RedirectFromLoginPage method to load the page that was originally
requested

Logout Page – this creates the corresponding "log off" page, with a Status
label and a
single Log Off button. The label shows the username of the currently
logged-in user
where available. Clicking the button calls the SignOut method and
displays a message
indicating that the user is no longer authenticated.

Config File – this example creates a suitable web.config file to use with
the two
previous security examples. The file contains a <configuration>
element with a child <system.web> element. The <system.web>
element contains the
<authentication> and <authorization> elements that specify
Forms
authentication, and deny anonymous users.

IntelliSense. This improves your programming


productivity by completing statements and by listing
information about the classes and methods that
you're working with in the editor.
(WebMatrix includes IntelliSense for some
programming elements, like HTML and CSS, but not
for programming code in C# or Visual Basic.)
• Debugger. The debugger lets you troubleshoot your
code by stopping a program while it's running,
examining variables, and stepping through the code
line by line.

Вам также может понравиться