Daniel Fisher
daniel.fisher@devcoach.de
Software Architect | CTO
devcoach®
Michael Willers
michael.willers@devcoach.de
Software Architect | CTO
devcoach®
 Experts each with 10+ years experience
 Development
 Architecture
 Consulting & Coaching
 Community activists
 Annual Software Developer Community Event
 Deep knowledge and skills on
 Service Orientation & Agile Methods
 Web & Data access
 Security & Deployment
 Real Projects – Not just cool demos!
Objectives
Distributed Systems, today called S+S ;-)
The Volta Approach
Summary
Yet another bookstore
A distributed system consists of multiple
services act in combination
Service is autonomous (black box)
Autonomous services enable scalability
Just deploy your service to another box
Yet another bookstore – revisited
Autonomy introduces complexity
Autonomy
Plumbing
Deployment
Hide Complexity
Modeling
Code Generation
Code Partioning
Code Recompilation
It is a toolset that allows you to build
distributed applications much easier
It‘s NOT a product (yet)!
Microsoft want‘s your feedback!
Use familiar technologies and Languages
Design and Build „like just for one Client“
Decide declarativly where your code will live
It will take your existing .NET code base and
fulfills it with
JavaScript for X-Browser
Web Services for the back end
Plumbing for communication
Welcome to the world of
Rewriting of existing MSIL code and
recompilation
Re-factoring converts single-tier code into
distributed code.
Re-targeting converts MSIL code into code for
other (virtual) machines.
Re-modulating tailors a single piece of code for
x-browsers.
Volta applies transformations on compiled code
based on custom attributes
During development code runs on the client.
Redistribution is merely a matter of rebuilding.
Automatically creates the marshalling and security
code necessary to execute the code on multiple tiers.
CLR BrowserApplication Code
CLR
BrowserClient Script
Server Code
JSE
using System;
using Microsoft.LiveLabs.Volta.Html;
namespace VoltaApplication1
{
class Program
{
static void Main(string[] args)
{
Browser.Load(new VoltaPage1());
}
}
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>VoltaApplication1</title>
<link rel="shortcut icon" href="/favicon.ico"/>
<style type="text/css">
</style>
</head>
<body>
<p>Your name:</p>
<p><input id="Text1" type="text" /></p>
<p><button id="Button1">Greet</button></p>
<div id="Greeting"></div>
</body>
</html>
using Microsoft.LiveLabs.Volta;
using Microsoft.LiveLabs.Volta.Html;
namespace VoltaApplication1
{
public partial class VoltaPage1 : Page
{
private Input nameElement;
private Div greetingElement;
private Button button1;
partial void InitializeComponent()
{
nameElement = Document.GetById<Input>("Text1");
greetingElement = Document.GetById<Div>("Greeting");
button1 = Document.GetById<Button>("Button1");
}
}
}
namespace VoltaApplication1
{
public class Greeter
{
string helloStr;
public Greeter()
{
helloStr = "Hello";
}
public string Greet(string name)
{
return helloStr + " " + name;
}
}
}
…
namespace VoltaApplication1
{
public partial class VoltaPage1 : Page
{
…
public VoltaPage1()
{
InitializeComponent();
var greeter = new Greeter();
button1.Click += delegate
{
var name = nameElement.Value;
greetingElement.InnerText = greeter.Greet(name);
};
}
}
}
Visual Studio Integration ;-)
VS 2008 with .NET 3.5
Write it in C#
Execute it as JavaScript
Write cloud apps with your favorite .NET
language using the complete toolchain 
Intellisense, Snippets, FxCop …
The HTML library provides programmatic
access to the HTML DOM.
Query their contents
such as the text typed in an input field
Respond to events
such as fire off a method when a button is clicked
Update them
such as a status message
The Volta XML library implements a subset
of the classes provided by the .NET
MSXML2 3.0.
We use this library to work with XML
Load and save documents
Create and access document nodes
Implement the XmlHttpRequest Call
Ajax design pattern..
Typed access:
Properties only
NO fields
Untyped access
By index
Hashtable
{"weatherObservation":{"stationName":"Redmond, Roberts Field
Airport","datetime":"2007-08-27 13:56:00"}}
public class WeatherObservation{
[Import]
public extern string datetime{get;}
[Import]
public extern string stationName{get;}
}
public class WeatherService
{
[Import]
public extern WeatherObservation weatherObservation{get; }
}
namespace Microsoft.LiveLabs.Volta.VirtualEarth
{
[Import(
ScriptMemberNameCasing = Casing.Pascal,
PassInstanceAsArgument = false)]
public class Map
{
private static int s_counter;
[Import("onLoadMap",PassInstanceAsArgument = true)]
public extern event HtmlEventHandler MapLoaded;
}
}
The compiler automatically generates the
corresponding .NET element.
If another name is needed: use the Import custom attribute.
Volta passes an sender object as the first
argument
override this default in the Import arguments.
The Volta.JavaScript namespace declares .NET
functions and properties for standard JavaScript
globals, like Global.Eval.
[Export]
public static double ComputeVelocity()
{
// computation goes here
}
Only static methods
Compiler generates corresponding method
through camel casing the name of the C#
element.
The Volta compiler doesn't guarantee that the
uniqueness of the generated name.
No namespaces in JavaScript
namespace VoltaApplication1
{
[RunAtOrigin()]
public class Greeter
{
...
}
}
namespace VoltaApplication1
{
[RunAtOrigin()]
public class Greeter
{
...
[Async]
public extern void Greet(
string name, Callback<string> callback);
}
}
…
namespace VoltaApplication1
{
public partial class VoltaPage1 : Page
{
…
public VoltaPage1()
{
…
button1.Click += delegate
{
var name = nameElement.Value;
greeter.Greet(
name,
message => {
greetingElement.InnerText = "async: " + message; });
};
…
Yet another bookstore
Volta tier splitting automates the creation of
the communication plumbing code,
serialization, and remoting.
Simply mark classes or methods with a
custom attribute that tells the Volta compiler
where they should run.
Unmarked classes and methods continue to
run on the client.
Volta applications run virtually anywhere,
even where an CLR is not available.
Web application can run in most standards-
compliant browsers.
Other applications can be targeted to take
advantage of the CLR.
Volta extends the reach of the .NET platform to
cover the cloud.
The only differences at the source-code level are
the presence and positions of custom attributes.
It DOES NOT eliminate the intellectual challenges
of distributed computing.
We must still formulate strategies for partitioning functionality and
dealing with network latency and availability.
Volta does, however, radically simplify the error-
prone plumbing and re-plumbing of
communication code.
Volta enables to prototype and refine
designs through refactoring DURING
development
Offers the same programming model on the
browser and the server.
A really cool approach on building
distributed apps.
But you still have to architect your system ;-)
Software em versão completa para avaliação
2 incidentes de suporte gratuito profissional
Acesso antecipado às versões beta
software exclusivo: Capacity Planner
actualizações de segurança e service packs
formação gratuita ….e muito mais.
www.microsoft.com/portugal/technet/subscricoes
Software em versão completa para avaliação
Suporte técnico 24x7 para incidentes
Acesso antecipado às versões beta
Microsoft Office
Software Assurance
formação gratuita ….e muito mais.
www.microsoft.com/portugal/msdn/subscricoes
www.microsoft.com/learning
Complete o questionário de
avaliação e devolva-o no balcão
da recepção…
…e habilite-se a ganhar 1 percurso de
certificação por dia! Oferecido por:
…e habilite-se a ganhar 1 percurso de
certificação MCTS por dia! Oferecido por:
…e habilite-se a ganhar 1 curso e exame por
dia! Oferecido por:
© 2008 Microsoft Corporation. Todos os direitos reservados.
Esta apresentação destina-se apenas a fins informativos.
A MICROSOFT NÃO FAZ GARANTIAS, EXPRESSAS OU IMPLÍCITAS NESTA APRESENTAÇÃO.

2008 - TechDays PT: Building Software + Services with Volta

  • 1.
    Daniel Fisher daniel.fisher@devcoach.de Software Architect| CTO devcoach® Michael Willers michael.willers@devcoach.de Software Architect | CTO devcoach®
  • 2.
     Experts eachwith 10+ years experience  Development  Architecture  Consulting & Coaching  Community activists  Annual Software Developer Community Event  Deep knowledge and skills on  Service Orientation & Agile Methods  Web & Data access  Security & Deployment  Real Projects – Not just cool demos!
  • 3.
    Objectives Distributed Systems, todaycalled S+S ;-) The Volta Approach Summary
  • 4.
  • 5.
    A distributed systemconsists of multiple services act in combination Service is autonomous (black box) Autonomous services enable scalability Just deploy your service to another box
  • 6.
    Yet another bookstore– revisited
  • 7.
  • 8.
  • 9.
    Hide Complexity Modeling Code Generation CodePartioning Code Recompilation
  • 10.
    It is atoolset that allows you to build distributed applications much easier It‘s NOT a product (yet)! Microsoft want‘s your feedback!
  • 11.
    Use familiar technologiesand Languages Design and Build „like just for one Client“ Decide declarativly where your code will live
  • 12.
    It will takeyour existing .NET code base and fulfills it with JavaScript for X-Browser Web Services for the back end Plumbing for communication
  • 13.
  • 14.
    Rewriting of existingMSIL code and recompilation Re-factoring converts single-tier code into distributed code. Re-targeting converts MSIL code into code for other (virtual) machines. Re-modulating tailors a single piece of code for x-browsers.
  • 15.
    Volta applies transformationson compiled code based on custom attributes During development code runs on the client. Redistribution is merely a matter of rebuilding. Automatically creates the marshalling and security code necessary to execute the code on multiple tiers.
  • 16.
  • 17.
    using System; using Microsoft.LiveLabs.Volta.Html; namespaceVoltaApplication1 { class Program { static void Main(string[] args) { Browser.Load(new VoltaPage1()); } } }
  • 18.
    <!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>VoltaApplication1</title> <link rel="shortcut icon" href="/favicon.ico"/> <style type="text/css"> </style> </head> <body> <p>Your name:</p> <p><input id="Text1" type="text" /></p> <p><button id="Button1">Greet</button></p> <div id="Greeting"></div> </body> </html>
  • 19.
    using Microsoft.LiveLabs.Volta; using Microsoft.LiveLabs.Volta.Html; namespaceVoltaApplication1 { public partial class VoltaPage1 : Page { private Input nameElement; private Div greetingElement; private Button button1; partial void InitializeComponent() { nameElement = Document.GetById<Input>("Text1"); greetingElement = Document.GetById<Div>("Greeting"); button1 = Document.GetById<Button>("Button1"); } } }
  • 20.
    namespace VoltaApplication1 { public classGreeter { string helloStr; public Greeter() { helloStr = "Hello"; } public string Greet(string name) { return helloStr + " " + name; } } }
  • 21.
    … namespace VoltaApplication1 { public partialclass VoltaPage1 : Page { … public VoltaPage1() { InitializeComponent(); var greeter = new Greeter(); button1.Click += delegate { var name = nameElement.Value; greetingElement.InnerText = greeter.Greet(name); }; } } }
  • 22.
    Visual Studio Integration;-) VS 2008 with .NET 3.5 Write it in C# Execute it as JavaScript Write cloud apps with your favorite .NET language using the complete toolchain  Intellisense, Snippets, FxCop …
  • 23.
    The HTML libraryprovides programmatic access to the HTML DOM. Query their contents such as the text typed in an input field Respond to events such as fire off a method when a button is clicked Update them such as a status message
  • 24.
    The Volta XMLlibrary implements a subset of the classes provided by the .NET MSXML2 3.0. We use this library to work with XML Load and save documents Create and access document nodes Implement the XmlHttpRequest Call Ajax design pattern..
  • 25.
    Typed access: Properties only NOfields Untyped access By index Hashtable
  • 26.
    {"weatherObservation":{"stationName":"Redmond, Roberts Field Airport","datetime":"2007-08-2713:56:00"}} public class WeatherObservation{ [Import] public extern string datetime{get;} [Import] public extern string stationName{get;} } public class WeatherService { [Import] public extern WeatherObservation weatherObservation{get; } }
  • 27.
    namespace Microsoft.LiveLabs.Volta.VirtualEarth { [Import( ScriptMemberNameCasing =Casing.Pascal, PassInstanceAsArgument = false)] public class Map { private static int s_counter; [Import("onLoadMap",PassInstanceAsArgument = true)] public extern event HtmlEventHandler MapLoaded; } }
  • 28.
    The compiler automaticallygenerates the corresponding .NET element. If another name is needed: use the Import custom attribute. Volta passes an sender object as the first argument override this default in the Import arguments. The Volta.JavaScript namespace declares .NET functions and properties for standard JavaScript globals, like Global.Eval.
  • 29.
    [Export] public static doubleComputeVelocity() { // computation goes here } Only static methods Compiler generates corresponding method through camel casing the name of the C# element. The Volta compiler doesn't guarantee that the uniqueness of the generated name. No namespaces in JavaScript
  • 30.
  • 31.
    namespace VoltaApplication1 { [RunAtOrigin()] public classGreeter { ... [Async] public extern void Greet( string name, Callback<string> callback); } }
  • 32.
    … namespace VoltaApplication1 { public partialclass VoltaPage1 : Page { … public VoltaPage1() { … button1.Click += delegate { var name = nameElement.Value; greeter.Greet( name, message => { greetingElement.InnerText = "async: " + message; }); }; …
  • 33.
  • 34.
    Volta tier splittingautomates the creation of the communication plumbing code, serialization, and remoting. Simply mark classes or methods with a custom attribute that tells the Volta compiler where they should run. Unmarked classes and methods continue to run on the client.
  • 35.
    Volta applications runvirtually anywhere, even where an CLR is not available. Web application can run in most standards- compliant browsers. Other applications can be targeted to take advantage of the CLR.
  • 36.
    Volta extends thereach of the .NET platform to cover the cloud. The only differences at the source-code level are the presence and positions of custom attributes. It DOES NOT eliminate the intellectual challenges of distributed computing. We must still formulate strategies for partitioning functionality and dealing with network latency and availability. Volta does, however, radically simplify the error- prone plumbing and re-plumbing of communication code.
  • 37.
    Volta enables toprototype and refine designs through refactoring DURING development Offers the same programming model on the browser and the server. A really cool approach on building distributed apps. But you still have to architect your system ;-)
  • 40.
    Software em versãocompleta para avaliação 2 incidentes de suporte gratuito profissional Acesso antecipado às versões beta software exclusivo: Capacity Planner actualizações de segurança e service packs formação gratuita ….e muito mais. www.microsoft.com/portugal/technet/subscricoes
  • 41.
    Software em versãocompleta para avaliação Suporte técnico 24x7 para incidentes Acesso antecipado às versões beta Microsoft Office Software Assurance formação gratuita ….e muito mais. www.microsoft.com/portugal/msdn/subscricoes
  • 42.
  • 43.
    Complete o questionáriode avaliação e devolva-o no balcão da recepção… …e habilite-se a ganhar 1 percurso de certificação por dia! Oferecido por: …e habilite-se a ganhar 1 percurso de certificação MCTS por dia! Oferecido por: …e habilite-se a ganhar 1 curso e exame por dia! Oferecido por:
  • 44.
    © 2008 MicrosoftCorporation. Todos os direitos reservados. Esta apresentação destina-se apenas a fins informativos. A MICROSOFT NÃO FAZ GARANTIAS, EXPRESSAS OU IMPLÍCITAS NESTA APRESENTAÇÃO.

Editor's Notes

  • #2 PROVIDE YOU SESSION CODE AND NAME AS IT WAS DEFINED BY AGENDA OWNERS. WELCOME ATTENDEES. INTRODUCE YOURSELF AND YOUR SESSION.
  • #3 ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #21 public VoltaPage1() { InitializeComponent(); var greeter = new Greeter(); button1.Click += delegate { var name = nameElement.Value; //greetingElement.InnerText = greeter.Greet(name); greeter.Greet( name, message => { greetingElement.InnerText = "async: " + message; }); }; }
  • #23 public VoltaPage1() { InitializeComponent(); var greeter = new Greeter(); button1.Click += delegate { var name = nameElement.Value; //greetingElement.InnerText = greeter.Greet(name); greeter.Greet( name, message => { greetingElement.InnerText = "async: " + message; }); }; }
  • #29 [Import("function(id) { return new VEMap(id); }")] public extern Map(string id);
  • #34 public VoltaPage1() { InitializeComponent(); var greeter = new Greeter(); button1.Click += delegate { var name = nameElement.Value; //greetingElement.InnerText = greeter.Greet(name); greeter.Greet( name, message => { greetingElement.InnerText = "async: " + message; }); }; }
  • #49 ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #50 ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #51 ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • #52 ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.