darryl burling developer evangelist microsoft the age of connected applications whats new in vs2008...
Post on 21-Dec-2015
219 views
TRANSCRIPT
Darryl BurlingDeveloper EvangelistMicrosoft
The age of connected applicationsWhats new in VS2008WCF
Background: WS*, .Net 3.0 and WCFABC’s & improvmentsBindings Contracts & Content
What about IIS7?HTTP Programming
Application integration (office, etc)
Application integration (office, etc)Client Application services
Client Application servicesApplication integration (office, etc)Windows Communication Foundation
Tooling supportNew BindingsWCF for DevicesHTTP Programming modelsWCF Profiling
WCF is an SDK for building SOA on Windows
Service execution runtime
Released with Windows VistaPart of Microsoft .NET Framework 3.0
Requires .NET Framework 2.0
Available also onMicrosoft Windows XP SP2Windows Server 2003Windows Server 2008
Every service is associated with a unique addressAddress is the location of the service Address provides:
Transport protocol to use HTTPTCPP2PIPCMSMQ
Name of target machine, site or network Communication port, pipe or queue Specific path or URI
A simple way of wrapping multiple aspects of communication
Protocols Format and encoding Security ReliabilityTransaction propagationInteroperability
Extract all of that out of your codeUse a pre-defined template
Can customize
Can write custom bindings from scratch
BasicHTTPBindingBasicHTTPContextBindingMSMQIntegrationBindingNetMsmqBindingnetNamedPipeBindingnetPeerTCPBindingnetTCPBinding
netTCPContextBindingwebHTTPBindingws2007HttpBindingwsDualHttpBindingwsFederationHttpBindingwsHttpBindingwsHttpContextBinding
Or build your own!
OperationContract attributeMethods only
No properties/indexers/events
Independent of visibilityOpt-in model
Other methods not included
[ServiceContract]
interface IMyContract
{
[OperationContract]
string MyMethod(string text);
}
class MyService : IMyContract
{
public string MyMethod(string text)
{
return "Hello " + text;
}
}
Separate host process can be provided by:
Microsoft Internet Information Services (IIS) 5.0/6.0Windows Activation Service (WAS) (IIS 7)Your application
Called self-hosted
In-proc must be self-hosted
IIS 5/6HTTP/HTTPS onlySelf Host other bindings
IIS 7 Windows Activation Services (WAS)Host any binding
Self HostedProcess W3SVC
.NET Worker
Service Host
HTTP
NET.T
CP
NET.P
IPE
NET.M
SM
Q
WAS
NET.T
CP
Kiwibank JavaPerlJscriptVBScriptVisual Basic 6.0 codeand Universe Pick Basic
http://tinyurl.com/335flo
Good tooling support in VS2008Templates for WCF ServicesWCF Configuration EditorIntegrated Unit Testing
Invoke services without building a client
WCF ProfilingExamine performance of services at debug
Consistent programming model for Windows Mobile device and desktopShrunk footprint from over 10MB to less than 1MBInteroperates with desktopSupported features
Subset of messaging layerSubset of WS-Security and WS-Addressability HTTP MessagingStore and Forward MessagingExtensible Transports
Not SupportedService Model and Contracts
Compact SVCUtil
Everything (mostly) is URI addressableHTTP Verbs
GET - Most PrevalentPOST – Overloaded, Used for actionsPUT, DELETE – Largely Ignored
Representation Format – (X)HTMLHTTP Response Codes Stateless
New “web-friendly” WCF Binding in Fx 3.5Allows for the development of RESTful servicesWorks across REST ContinuumHTTP and HTTPS Transports OnlyDoes not use SOAP envelopesWebMessageEncoding
JSONXML
Indicate the HTTP Method for the operation
WebGet – Don’t make me write itWebInvoke – All verbs other than GET (Method parameter takes in the name of the Verb)
Other ParametersBodyStyle – Indicates whether the Request / Response are wrapped or notRequestFormat – Json or XmlResponseFormat – Json or XmlUriTemplate – Covered in a minute…
Connected Systems:Distributed DataFunctionality surfacingConnectivity
Much improved tooling in VS2008Easy to use WCF and build connected apps
New HTTP programming support in .Net 3.5
http://blogs.msdn.com/darrylburlingSubscribe to our free, online newsletters to stay up to date with Microsoft news, information & events
www.microsoft.co.nz/subscribe
TechEd 2008 registration is now open!www.microsoft.co.nz/teched
Don’t forget to fill in your Evaluation form!
Hand in at end of day for complimentary software