Vous êtes sur la page 1sur 4

Microsoft Virtual Tech Learning Session

Topic 1) MVC (Model View Controller)


MVC: its a Framework3.5 feature. So here we could learn functionality about MVC. MVC is a framework methodology that
divides an application's implementation into three component roles: models, views, and controllers.
"Models" in a MVC based application are the components of the application that are responsible for maintaining state. Often this state
is persisted inside a database (for example: we might have a Product class that is used to represent order data from the Products table
inside SQL).
"Views" in a MVC based application are the components responsible for displaying the application's user interface. Typically this UI
is created off of the model data (for example: we might create an Product "Edit" view that surfaces textboxes, dropdowns and
checkboxes based on the current state of a Product object).
"Controllers" in a MVC based application are the components responsible for handling end user interaction, manipulating the model,
and ultimately choosing a view to render to display UI. In a MVC application the view is only about displaying information - it is the
controller that handles and responds to user input and interaction.

IIS --- Controller---- View1 or View2 (IT could be your request)


Concept of routing comes in the picture. When we have Model and we use to connect with Router , it goes to pass the request from IIS
And IIS goes to connect with the server. And then it goes through Controller and controller goes to pass to the given request. So we
could say that we have some certain request which get complete with controller.
ExIf we have 2 methods one is Index and one is About. And there we have several states like
Default.aspx.cs
Using System.Web.mvc;
Public class Mycontroller : Controller
{
Public ActionResult Index()
{
ViewData[title] = Kartik is a great;
}
Public ActionResult About()
{
ViewData[name] = anshul;
Return view;
}
}
Default.aspx
<h2> <% View [Index] %>>< /h2>

Features OF MVC:

It includes a very powerful URL mapping component that enables you to build applications with clean URLs. URLs do
not need to have extensions within them. For example, I could easily map the /products/edit/4 URL to the "Edit" action of
the ProductsController class in my project above, or map the /Blogs/ /10-10-2007/SomeTopic/ URL to a "DisplayPost"
action of a BlogEngineController class.

The MVC framework supports using the existing ASP.NET .ASPX, .ASCX, and .Master markup files as "view templates"
(meaning you can easily use existing ASP.NET features like nested master pages, <%= %> snippets, declarative server
controls, templates, data-binding, localization, etc).

The ASP.NET MVC framework fully supports existing ASP.NET features like forms/windows authentication, URL
authorization, membership/roles, output and data caching, session/profile state management, health monitoring,
configuration system, the provider architecture, etc.

We can register router for that too


Protected void Application_start
{
RegisterRoutes (routetable.routes);
}
The default directory structure of an ASP.NET MVC Application has 3 top-level directories:
/Controllers
/Models
/Views
Topic 2) WCF(Window Communication Foundation)
WCF: Window Communication Foundation
Terms which we use it in WCF is
Web Services, ASMX, COM+ and Enterprise Services, MSMQ
The following shows how WCF addresses each of these requirements:

Because WCF can communicate using Web services, interoperability with other platforms that also support SOAP, such as
the leading J2EE-based application servers, is straightforward.
You can also configure and extend WCF to communicate with Web services using messages not based on SOAP, for
example, simple XML formats like RSS.

Performance is of paramount concern for most businesses. WCF is developed with the goal of being one of the fastest
distributed application platform developed by Microsoft. For a high-level performance comparison between WCF and
other Microsoft .NET distributed communication technologies

To allow optimal performance when both parties in a communication are built on WCF, the wire encoding used in this case
is an optimized binary version of an XML Information Set. Messages still conform to the data structure of a SOAP
message, but their encoding uses a binary representation of that data structure rather than the standard angle-brackets-andtext format of the XML 1.0 text encoding. Using this option makes sense for communicating with the call center client
application, because it is also built on WCF, and performance is an important concern.

Managing object lifetimes, defining distributed transactions, and other aspects of Enterprise Services are now provided by
WCF. They are available to any WCF-based application, which means that the rental car reservation application can use
them with any of the other applications it communicates with.

Because it supports a large set of the WS-* specifications, WCF helps provide reliability, security, and transactions when
communicating with any platform that also supports these specifications.

The WCF option for queued messaging, built on Message Queuing, allows applications to use persistent queuing without
using another set of application programming interfaces.

System.servicemodel is a namespace which we use it first when we start writing WCF class
We could declare some kind of Service Contract like
[ServiceContract (Namespace = http://microsoft.servicemodel.....)
WCF have some features:-

WCF-based applications running in a different process on the same Windows machine


WCF-based applications running on another Windows machine
Applications built on other technologies, such as J2EE application servers, that support standard Web services. These applications
can be running on Windows machines or on machines running other operating systems

Messaging: SOAP is the foundation for Web services and defines a basic envelope that contains header and a body
sections. WS-Addressing defines additions to the SOAP header for addressing SOAP messages, which frees SOAP from
relying on the underlying transport protocol, such as HTTP, to carry addressing information. Message Transmission
Optimization Mechanism (MTOM) defines an optimized transmission format for SOAP messages with large binary data
contents based on the XML-binary Optimized Packaging (XOP) specification.
Metadata: The Web Services Description Language (WSDL) defines a standard language for specifying services and
various aspects of how those services can be used. WS-Policy allows specification of more dynamic aspects of a services
behavior that cannot be expressed in WSDL, such as a preferred security option. WS-MetadataExchange allows a client
to directly request descriptive information about a service, such as its WSDL and its policies, using SOAP.

Security: WS-Security, WS-SecureConversation, WS-Trust, and WS-Federation all define additions to SOAP messages for
providing authentication, data integrity, data privacy, and other security features.

Reliability: WS-Reliable Messaging defines additions to the SOAP header that allow reliable end-to-end communication,
even when one or more Web services intermediaries must be traversed.

Transactions: Built on WS-Coordination, WS-Atomic Transaction allows coordinating two-phase commit transactions in
the context of Web services conversations.

Topic 3) Language Integrated Query


This article Belongs to Framework 3.5. The term language-integrated query to indicate that query is an integrated feature of the
developer's primary programming languages (for example, Visual C#, Visual Basic). Language-integrated query allows query
expressions to benefit from the rich metadata, compile-time syntax checking, static typing and IntelliSense that was previously
available only to imperative code.
LINQ has three major components:

LINQ to Objects
LINQ to ADO.NET, which includes

LINQ to DataSet (originally called LINQ over DataSet)

LINQ to Entities

LINQ to SQL (originally called DLinq)

LINQ to XML (originally called XLinq)

LINQ to Objects deals with in-memory data. Any class that implements the IEnumerable<T> interface (in the
System.Collections.Generic namespace) can be queried with SQO.
LINQ to ADO.NET deals with data from external sources, basically anything ADO.NET can connect to. Any class that implement
IEnumerable<T> or IQueryable<T>

LINQ to Entities will bring LINQ to the ADO.NET Entity Framework, which combines an Entity Data Model with an extended
version of SQL (eSQL) in yet another effort to address the data-object impedance issue. Since the Entity Framework is an ADO.NET
3.0 feature, we wont cover LINQ to Entities here.
Using LINQ to SQL
LINQ to SQL is a facility for managing and accessing relational data as objects. Its logically similar to ADO.NET in some ways but
views data from a more abstract perspective that simplifies many operations. It connects to a database, converts LINQ constructs into
SQL, submits the SQL, transforms results into objects, and can even track changes and automatically request database updates.
A simple LINQ query requires three things:
1.
2.

An entity class
A data context

3.

A LINQ query

You could get some more about Linq by given Link


http://code.msdn.microsoft.com/vlinq

Vous aimerez peut-être aussi