Overview of Overview of Next-gen technologies Next-gen technologies Raimond Brookman Raimond Brookman IT Architect IT Architect Info Support Info Support [email protected][email protected]http://blogs.infosupport.com/raimondb http://blogs.infosupport.com/raimondb
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Overview of Overview of Next-gen technologiesNext-gen technologies
Created by:Created by:Application Application designerdesigner
Design Design Experience:Experience:
By hand or using a By hand or using a visual toolvisual tool
projectproject structurestructure
Data model, event names, Data model, event names, element names, etc.element names, etc.
Resource names and Resource names and element types.element types.
11
ASP.NET: Future Directions ASP.NET: Future Directions Developing Rich Web Applications Developing Rich Web Applications With “Atlas”With “Atlas”
12
ASP.NET “Atlas” GoalsASP.NET “Atlas” Goals
Increased productivityIncreased productivityFewer concepts, fewer lines of codeFewer concepts, fewer lines of codeApplication and UI building blocks for common scenariosApplication and UI building blocks for common scenarios
Easier to author, debug, and maintainEasier to author, debug, and maintainClean separation of content, style, behavior, and codeClean separation of content, style, behavior, and codeWell integrated with design and development toolsWell integrated with design and development tools
Seamlessly integrated application modelSeamlessly integrated application modelWorks with ASP.NET pages and server controlsWorks with ASP.NET pages and server controlsAllows access to ASP.NET-hosted web services and Allows access to ASP.NET-hosted web services and componentscomponents
Works everywhere – cross-browser, standards Works everywhere – cross-browser, standards basedbased
A FRAMEWORK FOR BUILDING RICHER, MORE INTERACTIVE,
MORE PERSONALIZED WEB EXPERIENCES
A FRAMEWORK FOR BUILDING RICHER, MORE INTERACTIVE,
ASP.NET “Atlas” Server ExtensionsASP.NET “Atlas” Server Extensions
“Atlas” Server
Controls
“Atlas” Server
Controls
ASP.NET “Atlas” Application
Services
ASP.NET “Atlas” Application
Services
“Atlas” Web Services
Bridge
“Atlas” Web Services
Bridge
ASP.NET 2.0ASP.NET 2.0
ASP.NETApplication
Services
ASP.NETApplication
Services
Page Framework
AndServer Controls
Page Framework
AndServer Controls
““Atlas”-enabled Atlas”-enabled ASP.NET PagesASP.NET Pages
““Atlas”-enabled Atlas”-enabled ASP.NET PagesASP.NET Pages ASP.NET-hostedASP.NET-hosted
Web ServicesWeb Services(ASMX or WCF)(ASMX or WCF)
ASP.NET-hostedASP.NET-hostedWeb ServicesWeb Services(ASMX or WCF)(ASMX or WCF)
ASP.NET “Atlas” ServerASP.NET “Atlas” Server
““Atlas” HTML Atlas” HTML PagePage
““Atlas” HTML Atlas” HTML PagePage ““Atlas”Atlas”
ServiceServiceProxiesProxies
““Atlas”Atlas”ServiceServiceProxiesProxies
“Atlas” Client“Atlas” Client
14
Script-Based Type SystemScript-Based Type System
Scenario:Scenario:Script code can be ad-hoc, unmaintainable, etc.Script code can be ad-hoc, unmaintainable, etc.
Solution:Solution:Encapsulate data and logic into classes and Encapsulate data and logic into classes and componentscomponentsExpose intuitive object modelExpose intuitive object model
““Atlas” OOP constructs built on top of Atlas” OOP constructs built on top of standard script constructs and techniquesstandard script constructs and techniques
NamespacesNamespacesClasses, Interfaces, and inheritanceClasses, Interfaces, and inheritance
Properties, methods, eventsProperties, methods, eventsPrivate and public membersPrivate and public members
DelegatesDelegatesEnumerations and FlagsEnumerations and Flags
15
API SamplesAPI Samplesvar myArray = new Array(‘abc’, ‘ghi’);myArray.push(‘jkl’);myArray.splice(1, 0, ‘def’);
var myObject = ...;var s = ‘’;for (var name in myObject) { var value = myObject[name]; s += name + ‘ = ‘ + value + ‘\r\n’;}
var myArray = new Array(‘abc’, ‘ghi’);var myArray = new Array(‘abc’, ‘ghi’);myArray.add(‘jkl’);myArray.add(‘jkl’);myArray.insert(1, ‘def’);myArray.insert(1, ‘def’);
var myObject = ...;var myObject = ...;var s = ‘’;var s = ‘’;for (var name in myObject) {for (var name in myObject) { var value = myObject[name];var value = myObject[name]; s += String.Format(‘{0} = {1}\r\n’,s += String.Format(‘{0} = {1}\r\n’, name, value, value.length);name, value, value.length);}}
var myObject = ‘...’;var myObject = ‘...’;var sb = new Web.StringBuilder();var sb = new Web.StringBuilder();for (var name in myObject) {for (var name in myObject) { var value = myObject[name];var value = myObject[name]; sb.append(name);sb.append(name); sb.append(‘ = ‘);sb.append(‘ = ‘); sb.appendLine(value);sb.appendLine(value);}}var s = sb.toString();var s = sb.toString();
16
““Atlas” NetworkingAtlas” NetworkingClient networking stack layered on XMLHTTPClient networking stack layered on XMLHTTP
ASP.NET “Atlas” Web Services BridgeASP.NET “Atlas” Web Services BridgeAccess to ASP.NET-hosted and serviced componentsAccess to ASP.NET-hosted and serviced components
ASMX and WCF services, .NET objects, ASP.NET page-level ASMX and WCF services, .NET objects, ASP.NET page-level servicesservices
Integrated with ASP.NET intrinsicsIntegrated with ASP.NET intrinsics
Wire format: Javascript object notationWire format: Javascript object notationpublic class Location {public class Location { public Point Coordinates;public Point Coordinates; public String Name;public String Name;}}
public class Location {public class Location { public Point Coordinates;public Point Coordinates; public String Name;public String Name;}}
Unifies today’s distributed technology Unifies today’s distributed technology stacksstacksAppropriate for use on-machine, cross Appropriate for use on-machine, cross machine, and cross Internetmachine, and cross Internet
The unified programming model for rapidly building The unified programming model for rapidly building service-oriented applications on the Windows platformservice-oriented applications on the Windows platform
Interoperates with applications running on Interoperates with applications running on other platformsother platformsIntegrates with our own distributed stacksIntegrates with our own distributed stacks
UnificationUnification
IntegrationIntegration
• Codifies best practices for building Codifies best practices for building distributed applicationsdistributed applications
ServiceServiceOrientationOrientation
Windows Communication Windows Communication FoundationFoundation
WsDualHttpBindingWsDualHttpBinding WSWS T | ST | S XX XX XX
NetTcpBindingNetTcpBinding .NET.NET T | ST | S XX XX XX OONetNamedPipesBindingNetNamedPipesBinding .NET.NET T | ST | S XX XX XX OONetMsmqBindingNetMsmqBinding .NET.NET T | ST | S XX XX
NetPeerTcpBindingNetPeerTcpBinding .NET.NET T | ST | S XXT = Transport Security T = Transport Security || S = WS-Security | O = One-Way Only S = WS-Security | O = One-Way Only
26
ASMX/WSE3ASMX/WSE3 WCFWCF
WCFWCF ASMX/WSE3ASMX/WSE3
Integration using BindingsIntegration using Bindings
Windows Workflow Foundation Windows Workflow Foundation
Single workflow technologySingle workflow technology for Windows for WindowsBase for Microsoft products and ISV/customer solutionsBase for Microsoft products and ISV/customer solutions
One technology for human and system workflow scenariosOne technology for human and system workflow scenarios
A A frameworkframework for building workflow into applications for building workflow into applicationsA framework to build on - not an application or serverA framework to build on - not an application or server
Exposed to developers via WinFXExposed to developers via WinFX
Brings workflow to Brings workflow to mainstreammainstream .NET .NET developmentdevelopment
Transform workflow from niche to mainstream paradigmTransform workflow from niche to mainstream paradigm
Information Worker• Document Review…Information Worker• Document Review…
System WorkflowSystem WorkflowSystem WorkflowSystem WorkflowHuman Human WorkflowWorkflowHuman Human
WorkflowWorkflow
Windows Workflow FoundationWindows Workflow Foundation
Business to Business• Supply Chain Mgmt…Business to Business• Supply Chain Mgmt…
Line of Business Apps• Quote to Cash, Sales Automation…
Line of Business Apps• Quote to Cash, Sales Automation…CRM ERP
IT Management• New Hire Provisioning, Trouble Ticket,…
IT Management• New Hire Provisioning, Trouble Ticket,…
.NET Developer• Pageflow, Service Coordination…
.NET Developer• Pageflow, Service Coordination…
31WinFXWinFX
Workflow And BizTalk Workflow And BizTalk ServerServer
Windows Windows Workflow Workflow
FoundationFoundation
MessagingMessagingDesigDesig
nnToolsTools
BusineBusinessss
ActivityActivityMonitoMonito
rrAndAnd
AdminAdminToolsTools
OrchestratioOrchestrationn
TransformatiTransformationon
AdaptersAdapters
BizTalk ServerAcceleratorsAccelerators
• Premium BPM serverPremium BPM server• Distinct server productDistinct server product• Use in B2B, EAI, BPM scenariosUse in B2B, EAI, BPM scenarios• Deployable solutionsDeployable solutions• Manageability, Scale-outManageability, Scale-out
• Workflow frameworkWorkflow framework• Exposed via WinFX Exposed via WinFX • Broad set of scenarios Broad set of scenarios • Used to build solutionsUsed to build solutions• Enables manageabilityEnables manageabilityand scale-out in solutionsand scale-out in solutions• Use for building workflow Use for building workflow into apps or workflow-enabled into apps or workflow-enabled serversservers
Visual Studio DesignerVisual Studio Designer
• Future version will migrate to Future version will migrate to Windows Workflow Foundation Windows Workflow Foundation for orchestrationfor orchestration
WorkflowWorkflow
32
Windows Workflow FoundationWindows Workflow Foundation
Key ConceptsKey Concepts
Host Process
WindowsWorkflow Foundation
Runtime Engine
A Workflow
An Activity
Runtime Services
Base Activity Library
Custom Activity Library
Visual Designer
Visual Designer:Visual Designer: Graphical and code-Graphical and code-based constructionbased construction
WorkflowsWorkflows are a set of are a set of ActivitiesActivities
Workflows run within a Workflows run within a Host Host Process: Process: any application or serverany application or serverDevelopers can build their own Developers can build their own Custom Activity LibrariesCustom Activity Libraries
ComponentsComponents
Base Activity Library:Base Activity Library: Out-of-box Out-of-box activities and base for custom activitiesactivities and base for custom activities
Runtime Engine:Runtime Engine: Workflow execution Workflow execution and state managementand state management
Runtime Services:Runtime Services: Hosting flexibility Hosting flexibility and communicationand communication
Today we program against relational Today we program against relational and hierarchical data using a and hierarchical data using a language that does not support this language that does not support this nativelynatively
Data != ObjectsData != Objects
We are busy describing how things We are busy describing how things need to get done in stead of what we need to get done in stead of what we wantwant
36
C# 3.0 Design GoalsC# 3.0 Design Goals
Integrate objects, relational, and XMLIntegrate objects, relational, and XML
Build on foundation laid in C# 1.0 and Build on foundation laid in C# 1.0 and
2.02.0
Run on the .NET 2.0 (“Whidbey”) CLRRun on the .NET 2.0 (“Whidbey”) CLR
.NET Language Integrated Query.NET Language Integrated Query
C# 3.0C# 3.0 VB 9.0VB 9.0 Others…Others…
SQLSQL WinFWinFSS
38
LINQ Style programmingLINQ Style programming
var contacts =var contacts = from c in customersfrom c in customers where c.State == "WA"where c.State == "WA" select new { c.Name, c.Phone };select new { c.Name, c.Phone };
class Contact { … };class Contact { … };List<Contact> contacts = new List<Contacts>();List<Contact> contacts = new List<Contacts>();foreach(Customer c in customers) foreach(Customer c in customers) {{
C# 3.0 Language C# 3.0 Language InnovationsInnovations
var contacts =var contacts = from c in customersfrom c in customers where c.State == "WA"where c.State == "WA" select new { c.Name, c.Phone };select new { c.Name, c.Phone };
var contacts =var contacts = customerscustomers .Where(c => c.State == "WA").Where(c => c.State == "WA") .Select(c => new { c.Name, c.Phone });.Select(c => new { c.Name, c.Phone });
Extension Extension methodsmethods
Lambda Lambda expressionsexpressions
Query Query expressionsexpressions
Object Object initializersinitializers
Anonymous Anonymous typestypes
Local Local variable type variable type
inferenceinference
41
Standard Query OperatorsStandard Query OperatorsRestrictionRestriction WhereWhere
DLinq For Relational DataDLinq For Relational Data
SqlConnection c = new SqlConnection(…);SqlConnection c = new SqlConnection(…);c.Open();c.Open();SqlCommand cmd = new SqlCommand(SqlCommand cmd = new SqlCommand( @"SELECT c.Name, c.Phone@"SELECT c.Name, c.Phone FROM Customers cFROM Customers c WHERE c.City = @p0");WHERE c.City = @p0");cmd.Parameters.AddWithValue("@p0", cmd.Parameters.AddWithValue("@p0", "London“);"London“);DataReader dr = c.Execute(cmd);DataReader dr = c.Execute(cmd);while (dr.Read()) {while (dr.Read()) { string name = dr.GetString(0);string name = dr.GetString(0); string phone = dr.GetString(1);string phone = dr.GetString(1); DateTime date = dr.GetDateTime(2);DateTime date = dr.GetDateTime(2);}}dr.Close();dr.Close();
Accessing data todayAccessing data todayQueries in Queries in
quotesquotes
Loosely Loosely bound bound
argumentsarguments
Loosely Loosely typed result typed result
setssets
No compile No compile time checkstime checks
43
public class Customer { … }public class Customer { … }
public class Northwind: DataContextpublic class Northwind: DataContext{{ public Table<Customer> Customers;public Table<Customer> Customers; … …}}
Northwind db = new Northwind(…);Northwind db = new Northwind(…);var contacts =var contacts = from c in db.Customersfrom c in db.Customers where c.City == "London"where c.City == "London" select new { c.Name, c.Phone };select new { c.Name, c.Phone };
DLinq For Relational DataDLinq For Relational Data
Accessing data with DLinqAccessing data with DLinqClasses Classes
describe datadescribe data
Strongly Strongly typed typed
connectionconnection
Integrated Integrated query syntaxquery syntax
Strongly Strongly typed resultstyped results
Tables are Tables are like like
collectionscollections
44
XLinq For XML DataXLinq For XML Data
XmlDocument doc = new XmlDocument();XmlDocument doc = new XmlDocument();XmlElement contacts = doc.CreateElement("contacts");XmlElement contacts = doc.CreateElement("contacts");foreach (Customer c in customers)foreach (Customer c in customers) if (c.Country == "USA") {if (c.Country == "USA") { XmlElement e = doc.CreateElement("contact");XmlElement e = doc.CreateElement("contact"); XmlElement name = doc.CreateElement("name");XmlElement name = doc.CreateElement("name"); name.InnerText = c.CompanyName;name.InnerText = c.CompanyName; e.AppendChild(name);e.AppendChild(name); XmlElement phone = doc.CreateElement("phone");XmlElement phone = doc.CreateElement("phone"); phone.InnerText = c.Phone;phone.InnerText = c.Phone; e.AppendChild(phone);e.AppendChild(phone); contacts.AppendChild(e);contacts.AppendChild(e); }}doc.AppendChild(contacts);doc.AppendChild(contacts);
XElement contacts = new XElement("contacts",XElement contacts = new XElement("contacts", from c in customersfrom c in customers where c.Country == "USA"where c.Country == "USA" select new XElement("contact",select new XElement("contact", new XElement("name", c.CompanyName),new XElement("name", c.CompanyName), new XElement("phone", c.Phone)new XElement("phone", c.Phone) ))););
Programming XML with XLinqProgramming XML with XLinqDeclarative Declarative