bterkaly@microsoft.com
Welcome to MSDN Blogs Sign in | Join | Help

Awesome learning opportunity this Wednesday

$125 is a steal to learn Silverlight with Hands-On - Wednesday, July 08, 2009

I am going to be here and I'm really looking forward to it. This a deep discount for hands on training in Silverlight. It is at Microsoft, San Francisco, heart of the financial district. This is an amazing space is shopping mecca of the city, where Powell(end of Cable Car Line) and Market Street meet. This is about "business apps," now just glitsy graphics. This is the real thing and I highly recommend it. Sign up here.

Posted by BrunoTerkaly | 0 Comments

Azure – Rich Client(s) meets Azure Table Data. Smart Grid Sample – Step 06

This is Step 06. Many more steps to follow.

At the end, you will have Silverlight talking to Azure Tables

 

The reference application will be based on Smart Grid concepts. For the first round of development we will add some addresses of homes that have smart meters. We simply track the number of smart meters per house. Future versions will use Virtual Earth, and more advanced graphics with Silverlight.

The application will contain addresses and smart meter information.

Our future tasks will include.

Stop the application. "Debug, Stop Debugging" from the Visual Studio menu.

Select "Web Form" and provide the name ViewHomes.aspx

We will paste in our new grid.

 

Paste in the starter grid code markup.

 

Grid code below:

<asp:GridView ID="HomeGridView" runat="server">

</asp:GridView>

<asp:Button id="AddHomeButton" runat="server" text="Add Home" />

Our ViewHomes.asp starter grid.

The Value of StorageClient

StorageClient is installed with the Azure SDK. It provides a lot of value and saves time.

You can read more about StorageClient on MSDN.

In summary, StorageClient simplifies data calls from the cloud.

Add the existing StorageClient project. It can be found:

C:\Program Files\Windows Azure SDK\v1.0\StorageClient

StorageClient is now part of the project:

You will add storage client to the solution.

We need to inherit from TableStorageEntity

Tables store data as collections of entities.

What is an entity?

Entities are similar to rows.

An entity has a primary key and a set of properties.

A property is a name, typed-value pair, similar to a column.

A table may contain any number of entities

Key Point – No Schemas – It is up to you

The Table service does not enforce any schema for tables, so two entities in the same table may have different sets of properties.

Developers may choose to enforce a schema on the client side.

Add A New Class (Home.cs)

The Home.cs class it our main data object. It will mirror a table in the cloud. Later, we create an Azure table and a SQL Server table based on Home.cs.

 

Make sure you have your reference set

Home Class

//using Microsoft.Samples.ServiceHosting.StorageClient;

public class Home : TableStorageEntity

{

public Home()

{

this.PartitionKey = "Homes";

}

public Home(int homeID,

string homeownerName,

string city,

string state,

string zip,

int numberofmeters)

: base("Homes", homeID.ToString())

{

this.homeID = homeID;

this.HomeownerName = homeownerName;

this.City = city;

this.State = state;

this.NumberOfMeters = numberofmeters;

}

private int homeID;

 

public string HomeownerName

{

get; set;

}

   

public string Address

{

get;

set;

}

   

public string City

{

get;

set;

}

   

public string State

{

get;

set;

}

   

public string Zip

{

get;

set;

}

   

public int NumberOfMeters

{

get;

set;

}

public string HomeAddressMapUrlFileUpload

{

get;

set;

}

   

public int HomeID

{

get

{

return homeID;

}

set

{

this.RowKey = value.ToString();

homeID = value;

}

}

}

Posted by BrunoTerkaly | 0 Comments

Azure – Rich Client(s) meets Azure Table Data. Smart Grid Sample – Step 04

 

This is Step 04. Many more steps to follow.

At the end, you will have Silverlight talking to Azure Tables

 

After registering, you will receive a confirmation email. After receiving this email, you will finish your registration process and continue the installation/setup process.

I created a project called "SmartGridStorage" that I will use with this tutorial.

One you have your access key, you are ready to start creating tables and loading data.

Of course you will need to install the latest Azure SDK.

Azure Tools allow Visual Studio to create New Projects of type "Web Cloud," which is what we will do in this walkthrough.

Later, we will work with .NET Services, so just install the SDK now.

If you cannot find it, go to bing.com and type ".net services sdk download." It will be the first result.

Once you have the tools and the SDK, you can start your first "Web Cloud Service."

A fantastic place to start learning Silverlight is the http://silverlight.net site.

 

The blog entry starts with Visual Studio, New Project. See step 5.

Posted by BrunoTerkaly | 0 Comments

Azure – Rich Client(s) meets Azure Table Data. Smart Grid Sample – Step 03

This is one of a long series of blogs designed to get you to create something important.

This is all about learning how to create RIA clients talking to massively scalable table data.

 

Task Quick Hello World - Create Web Cloud Service

The next task is all about getting your feet wet with a "hello world" application.

Understanding Data Storage

Before starting a new project, I wanted to at least address some of the storage options.

Obviously, data needs to be scalable and reliable. It is that simple. The previous white papers in step 2 can give you a lot more details. Notice that we have 3 main storage metaphors:

Blobs

Tables

Queues

Each storage type has a purpose, as described above.

We will work with Azure Tables in this example.

You will need to register for Azure Services. You will also need to install a bunch of tools and SDKs.

This is a great place to start.

 

 

 

Posted by BrunoTerkaly | 1 Comments

Azure – Rich Client(s) meets Azure Table Data. Smart Grid Sample – Step 02

Here is some recommended reading:

 

Introduction .NET Services Platform

http://www.microsoft.com/azure/whitepaper.mspx

.NET Services

Access Control Service

Service Bus

Workflow Service

SQL Services

SQL Data Services

Live Services

Accessing Data

Using Mesh

Mesh-enabled web applications

 

Introducing Windows Azure

http://download.microsoft.com/download/0/C/0/0C051A30-F863-47DF-BC53-9C3CFA88E3CA/Windows Azure David Chappell White Paper March 09.pdf

Azure Tables

http://go.microsoft.com/fwlink/?LinkId=153401

Intro to .NET Services

http://go.microsoft.com/fwlink/?LinkID=150833

Access Control

http://go.microsoft.com/fwlink/?LinkID=150835

Service Bus

http://go.microsoft.com/fwlink/?LinkID=150834

Workflow

http://go.microsoft.com/fwlink/?LinkID=150836

 

The Fabric was explained early on. The fabric controller coordinates this pool of servers. The fabric controller talks to the Agent, which is a piece of code running in a pool of servers.

The code we will create is a web role.

  • Web role: A web role is a Web application accessible via an HTTP and/or an HTTPS endpoint. A web role is hosted in an environment designed to support a subset of ASP.NET and Windows Communication Foundation (WCF) technologies.
  • Worker role: A worker role is a background processing application. A worker role may communicate with storage services and with other Internet-based services. It does not expose any external endpoints. A worker role can read requests from a queue defined in the Queue service.

  • Windows Azure Blob – provides storage for large data items.
  • Windows Azure Table – provides structured storage for maintaining service state.
  • Windows Azure Queue – provides asynchronous work dispatch to enable service communication.

  • Storage Account – An application must use a valid account to access Windows Azure Storage. You can create a new account via the Windows Azure portal web interface. The user will receive a 256-bit secret key once the account is created. This secret key is then used to authenticate user requests to the storage system. The signature is passed with each request to authenticate the user requests.
    Table – contains a set of entities. Table names are scoped by the account. An application may create many tables within a storage account.
  • Entity (Row) – Entities (an entity is analogous to a "row") are the basic data items stored in a table. An entity contains a set of properties. Each table has two properties, namely the "PartitionKey and RowKey" that form the unique key for the entity.
  • Property (Column) – This represents a single value in an entity.
  • PartitionKey – The first key property of every table. The system uses this key to automatically distribute the table's entities over many storage nodes.
  • RowKey – A second key property for the table. This is the unique ID of the entity within the partition it belongs to. The PartitionKey combined with the RowKey uniquely identifies an entity in a table.
  • Timestamp – Every entity has a version maintained by the system.
  • Partition – A set of entities in a table with the same partition key value.
  • Sort Order – There is a single index provided for the CTP, where all entities in a table are sorted by PartitionKey and then RowKey. This means that queries specifying these keys will be more efficient, and all results are returned sorted by PartitionKey and then by RowKey.

 

Some people believe .NET Services are the most interesting part of the Azure services platform.

High level goal for .NET Services

Biztalk for the cloud.

The Microsoft® .NET Access Control Service helps you avoid the complicated programming that is normally required to secure applications that extend beyond organizational boundaries. With its support for a simple declarative model of rules and claims, Access Control Service rules can easily and flexibly be configured to cover a variety of security needs and different identity-management infrastructures.

The Microsoft .NET Service Bus makes it easy to connect applications together over the Internet. Services that register on the Bus can easily be discovered and accessed, across any network topology. The Service Bus provides the familiar Enterprise Service Bus application pattern, while helping to solve some of the hard issues that arise when implementing this pattern across network, security, and organizational boundaries, at Internet-scale.

The Microsoft .NET Workflow Service is a high-scale host for running workflows in the cloud. It provides a set of activities optimized for sending, receiving, and manipulating HTTP and Service Bus messages; a set of hosted tools to deploy, manage and track the execution of workflow instances; and a set of management API's. Workflows can be constructed using the familiar Visual Studio 2008 Workflow Designer.

 

 

 

Posted by BrunoTerkaly | 1 Comments

Azure – Rich Client(s) meets Azure Table Data. Smart Grid Sample – Step 01

Purpose of Blog Entry

Windows Azure is an operating system for the cloud. It does for a cloud what Windows does for a desktop. Azure maintains services that are exposed to you as a developer. Basically, Azure is Windows abstracted into the Web, available for you

An operating system abstracts hardware, shared file systems, manages permission, and provides job schedulers and process management. Azure does this, but at Internet scale. Coordinate a distributed pool of servers. That is what the Fabric controller does. The fabric controller coordinates this pool of servers. The fabric controller talks to the Agent, which is a piece of code running in a pool of servers. The agent exposes a Windows Azure-defined API. Every machine in the pool of servers has the agent running. Later, when you learn about ServiceConfiguration, you will learn that the Fabric controller will use it.

The Fabric controller maps what you want to what is available in pool of servers, deploying your code and using a load balancer to provide your service to your users. If your program crashes, the agent will find out and will tell the fabric controller, which will take corrective measures. If a disk fails, Microsoft will magnetize the disk to completely clean it. The machine will get serviced and the fabric controller will re-introduce the previously dead node back into the server pool.

Real Working Examples

To understand Azure features through real live working samples. This blog entry is an end to end solution and will guide you from start to end. There will be lots of images interspersed throughout to give you both a detailed view and a high level view.

We will start from the beginning. We will learn how to download the right SDKs, the right tools – to make this all possible.

 

Home data in cloud

We will store data in Azure tables. We will access this data with two types of rich client applications

The first example will be an ASP.NET app

The second example will be a rich Silverlight client talking to the homes table in the cloud.

Note the ASP.NET example above. It even renders a popup image. Below you can see the Silverlight version.

The Silverlight example above show the rich client version. Notice the same graphics get shown here.

Posted by BrunoTerkaly | 1 Comments

Bi-Monthly Update – May 30, 2009

This is turning out to be in extremely busy month for me. There is also some exciting announcements coming from Microsoft. By the time you read this I will have already spoken about the new developer features in Windows 7. Typically these new features are implemented in C, so if you like to write managed code, you are entering the Interop world, which allows you to call native API code from within C# or VB. It turns out that CodePlex provides some of this Interop code. Moving forward, the new features in Windows 7 will be made available in Visual Studio 2010 and related SDKs and frameworks. Those of you interested in leveraging some of the new features in Windows 7 today with C# or VB can download this at CodePlex. If you are curious about what new developer features that are available in Windows 7, there are a series of excellent videos at the PDC web site. Don't kid yourself, even Microsoft employees watch these videos to learn what's going on . Here are some of the more interesting links:

Windows 7 Links

Power Management http://channel9.msdn.com/pdc2008/PC02/

Trigger Start http://channel9.msdn.com/pdc2008/PC19/

Direct2D and DirectWrite http://channel9.msdn.com/pdc2008/PC18/

Touch http://channel9.msdn.com/pdc2008/PC03/

Sensors and Location http://channel9.msdn.com/pdc2008/PC25/

Windows Web Services http://channel9.msdn.com/pdc2008/PC01/

Silverlight 3.0

Silverlight 3.0 is going to be big. How many of you readers know what "RIA" stands for? It stands for Rich Internet Application. Silverlight 3.0 includes some capabilities that make database oriented applications using a browser (all the popular ones) super simple, with support for such tasks as data validation, authentication (role-based), and integration with ASP.NET. Why not just do everything with ASP.NET? The answer is simple – you can do things in Silverlight that you just can't do with traditional HTML. If you don't believe me, go here. I challenge my readers to create an application like this, that runs in a browser and is based on standard HTML.

Great Learning Resources

There are a couple of ways that you can learn Silverlight 3.0. One way is to work through the Hands On Labs at Silverlight.net. Some of you may be looking for a more formal approach to learning. In that case, get out your calendar and mark off July 8, when you can attend an instructor led class in SF, 835 Market Street, San Francisco – the Microsoft Office.

Our expert instructors will help you look past the glitzy, media rich Silverlight demos, to the reality of writing browser-hosted, business-oriented applications. Four deep dive sessions will guide you on a tour from Silverlight Foundations to styling Silverlight passing through Silverlight Browser Integration and ending with Silverlight and the Server. You can register here. Check out my blog here for more details. The cost for the instructor led classes a mere $125. Now's the time to get in on Silverlight 3.0, when the amount of knowledgeable developers is relatively small. Developers looking for work should take notice. There is growing adoption among large companies who were using Silverlight to solve real problems. Here are some examples.

Real World Examples

InfoSpace Selects Silverlight to Power Toolbars

InfoSpace is leveraging Silverlight to create an engaging experience for their toolbar user which also provides a gateway to their metasearch properties.  Unlike other toolbars available today, crammed with undistinguishable icons, the toolbars developed by InfoSpace are a fresh experience with simple, elegant and consistent user experiences.  Read more about InfoSpace toolbars via Sam Chenaur's blog post and learn why they chose Silverlight.

John L. Scott Real Estate Enables Online Social Networking with Live Services and Silverlight

John L. Scott Real Estate is delivering a unique social networking solution, called JLSconnect, that makes it easier for buyers to shop for a home, and it will help JLS agents win new business and keep customers.  John L. Scott was able to deliver unique customer value quickly and cost-effectively.  Read more about John L. Scott Real Estate and how they used Live Services and Silverlight together.

As always encourage you to contact me. I'm curious about what frustrates my audience in what Microsoft could be doing better to serve the developer community. Thanks for reading and am looking forward to your feedback. Send it here – bterkaly@microsoft.com.

Bruno

 

 

 

 

 

Posted by BrunoTerkaly | 1 Comments

Practical Silverlight – Sign Up Now

http://events.sftsrc.com/EventDescription.aspx?EventId=1062&AbstractId=681

 

Practical Silverlight 3

Four Deep Dive Sessions!

Two Expert Instructors!

One Day! Only $125!

 

Are you willing to invest just one day to jumpstart your knowledge of Silverlight. Our expert instructors will help you look past the glitzy, media rich Silverlight demos, to the reality of writing browser-hosted, business-oriented applications. The four deep dive sessions will guide you on a tour from Silverlight Foundations to Styling Silverlight passing through Silverlight Browser Integration and ending with Silverlight and the Server.

   

Silverlight Foundations

Until now, the standard for user experience for browser-hosted applications has been defined by AJAX and JavaScript. However, the powerful and rich user experience provided by these applications has come at a significant cost in development. Silverlight allows us to deliver an even more compelling user experience while simultaneously simplifying the programming model and leveraging our existing .NET skills.

We will cover the foundational concepts and technologies needed to jumpstart your transition to Silverlight development. Several highlights include: 

  • Silverlight Architecture
  • Understanding Dependency and Attached properties
  • XAML resources
  • How to access your code in XAML
  • Navigation and Search Engine Optimization in Silverlight 3

 

Silverlight with Style

Just as HTML has CSS and DHTML, Silverlight has Dependency Properties and the Visual Tree. Both give the developer or UX designer the ability to style a user interface independently from the application code. Silverlight offers an unprecedented level of control over UI styling and skinning. In this session, learn how to customize the look of your Silverlight application using Control and Data templates and how easy it is to produce a fully skinnable custom control.

 

Silverlight Browser Integration

There are a number of different flavors of Silverlight applications. We will examine how to:

  • Integrate with the browser to use Silverlight as a high-performance and secure replacement for JavaScript libraries
  • Build hybrid web applications where part of the UI is provided by Silverlight and part by HTML
  • Build full screen, full frame applications
  • Build "out of browser" desktop applications with Silverlight 3

 

Silverlight and the Server

While Silverlight provides a range of new opportunities for building rich client interfaces, it also makes it easier than ever before to communicate with and take advantage of the server side services. We'll look at a variety of options available for taking advantage of web services in Silverlight including cross-domain calls, the ability to leverage ASP.NET features such as Membership and session state, and the new .NET RIA Services platform in Silverlight 3.

Posted by BrunoTerkaly | 1 Comments

Title: Visual C++ ISV Summit 2009

Description: Learn how Visual C++ 2008 provides a powerful and flexible development environment for creating Microsoft Windows–based applications. We will also demonstrate how Visual Studio C++ can be used as an integrated development system, or as a set of individual tools.  The event will include overview of the key capabilities of Visual Studio Team System 2008, the upcoming 2010 release and much more! Presented by the core Microsoft C++ Team.

June 2-3, 2009, Mountain View, CA: Click here. Use invitation code 95F666.

Dublin – More than just a town in Ireland

What is Dublin?

An easy way to host Windows Communication Foundation (WCF) and Workflow applications

If you don't know what WCF is, see http://en.wikipedia.org/wiki/Windows_Communication_Foundation

For Workflow (WF), see http://en.wikipedia.org/wiki/Workflow

Of course Microsoft has many different links on these topics as well.

Better scaling and manageability

Operates within IIS

 

When and How Available

Visual Studio 2010 plus 3 months

Available in download format

 

What customers have been asking for

"I want to get my WF and WCF services up and running easily - Why doesn't it just work?"

"I want to easily monitor and control running WF and WCF services."

"I really want better tooling and scripting."

"I want built-in extensions for
enterprise-readiness." – RSP: Reliability, Scalability, Performance

It takes a lot of work

Long running durable services is tough. Making Workflow applications persist over long periods of time requires a great deal of configuration. Stop, start, pause, delete – all things that are tough to monitor and control without a lot of code.

State can be "Durable" or "Stateless"

A stateless service is a transient one.

When the service is processing a request it keeps that service instance in memory until it's finished, and there's no state kept between requests.

Think of a service that sends text messages.

This service receives a request, sends the text message, and finishes.

Each request is independent; the service does not need to maintain any state

Durable services, on the other hand, maintain state between requests and are often long-running.

Service instance state is persisted, to a database, for example.

This allows the instance to be removed from memory when it's not active and allows the state to be reconstructed if the host process should die.

Think of a loan processing service.

There are many steps, and the process takes weeks.

More than UI Tools

Customers want more than just UI tools. They want scripts even if there are great UI tools. Also, customers want the tools to work within Visual Studio. They don't want to learn a brand new tool; it should integrate with an existing tool.

The Result is Dublin

That is one of the points of Dublin. Customers want to be sure things are working, be able to monitor them, and validate performance.

 

Diagram – Big Picture

IIS has been updated

It used to have a feature called WAS, the Windows Activation Service. Now it is called the Process Activation Service. It allows IIS to automatically kick off a workflow process when a client participates in a workflow activity.

 

How to create these services (WCF and WF)

Visual Studio used to create services.

Oslo allows you to do declarative development.

With Oslo, Models will be stored in a repository and hydrated into an environment.

Windows Server Contains:

IIS/WAS

.NET Framework

Dublin

WF and WCF Services

Admin Tools (scripting tools)

 

What will the WF and WCF Frameworks provide?

Hosting

Within IIS and allow for automatic activation

Durable Timer Service

Manages the lifecycle of a service. Process can go away and

Discover Service

Tell what service are available on a server.

Persistance (Durable Services)

Be able to maintain long running state, perhaps for weeks at a time.

SQL Persistance Provider

You can extend the provider and the schema. Extension have been added to the persistance mechanism.

Monitoring

How is are things behaving? What is the state? Can you pause, start, etc?

WF SQL Tracking Provider & WCF SQL Tracking Behavior

As workflows execute, the tracking service can be configured to automatically emit information about the flow of control within the workflow, and this information can be stored in an external store, such as a SQL Server database, for querying.

This allows various applications, from custom applications to business analytic tools, effectively to "look inside" workflows and query their status, or determine which are blocking on specific external events.

This surfacing of tracking information is essential in creating the transparency that workflow solutions require.

Messaging

Flexible messaging scenarios. A pipeline receives a message and transforms into to a meaningful XML to be routed or executed as a business process – as has been defined by the developer.

Forwarding Service

A central service endpoint that can dynamically distribute the message to the correct WCF service by executing different permutations of a WCF message filter.

This can be easily done by configuring a custom Dublin's forwarding servic

Tooling – Functionality Provided by Microsoft

Visual Studio (WF and WCF Project Templates)

A new workflow designer added to Visual Studio 2010 provides a compelling graphical user experience for many of the key WCF and WF features.

VS 2010 will include bread-crumb trails for going back in scope, in-place activity editing (reducing the need for the Properties window), zoom capabilities, and overview navigation

IIS Manager (WF / WCF Management Modules)

Will allow you to have greater management capabilities.

Configuring Persistence and Tracking

Once you've successfully deployed an application, you can begin configuring your services through the other extensions provided by "Dublin." For example, in some situations, the system administrator may need to manually reconfigure the runtime configuration for the persistence and tracking databases.

"Dublin" extensions

Simply select Services from the default view and then you'll see a list of all managed services, along with a right-hand pane that exposes various service configuration option.

Easing migration to production

Notice we have an Application Export and Application Import. This facilitates going from Dev to Test to Production. A zip file is created that can be used to move the entire workflow service.

Database template

Creates a starter database with a database string

Tracing through Diagnostics

Assists debugging and finding what is occurring within the Workflow.

Services

Disc

Tracking Configuration

The designer of a workflow or activity might not want to track every single piece of information about a running workflow instance, but instead might be interested in only a subset of events.

Every running workflow instance is created and maintained by an in-process engine referred to as the Workflow Runtime Engine.

The execution of the workflow can be tracked using the workflow tracking infrastructure.

When a workflow instance executes, it sends events and associated data to tracking services that are registered with the workflow runtime.

Tracking Service

Tracking service is responsible for providing a tracking profile and a tracking channel to the tracking runtime.

Using the tracking profile, runtime provides the events and data emitted from the workflow instances to the tracking service.

Various events can be tracked with this facility: Workflow events, Activity events, and User events.

Workflow events describe the life cycle of the workflow instance.

Workflow events include Created, Completed, Idle, Suspended, Resumed, Persisted, Unloaded, Loaded, Exception, Terminated, Aborted, Changed, and Started

Activity Events

Activity events describe the life cycle of an individual activity instance.

Activity-execution status events include Executing, Closed, Compensating, Faulting, and Canceling.

When creating the business logic for an activity, the activity author might want to track some business- or workflow-specific data

User Events

Events generated by the interaction of a user into the workflow.

Tracking Profile

Tracking services often must track only a subset of the workflow information.

This is achieved using tracking profiles.

Configuration of a Service

The user interface giving you visibility into:

Persistence

Tracking

Certificates

Throttling

 

You will have access to a dashboard view that provides an overview of the running workflow instances that have been persisted and potentially suspended:

Instances running

Instances blocked

Instances Ready-to-run

Instances Suspended

You can View the list of persisted instances and to view their details.

Basic dashboard is provided

You can suspend, terminate, or abort service instances manually by selecting from the actions shown in the right-hand pane.

Suspending a service instance stops the execution of the instance and prevents it from receiving new messages.

Suspended instances can later be resumed, at which point they'll begin receiving messages again.

Terminating a service instance stops the execution of the instance and removes it from the persistence store, which means it cannot be resumed.

Finally, aborting a service instance clears the in-memory state pertaining to the given instance and reverts back to the last persistent point (which is stored in the persistence store).

Management APIs (Powershell command-lets)

All of the features addressed above are also available view scripting code.

 

Quick Demo

Let's assume we wish to implement the following:

 

Start a new project in VS2010

Warning: The screen captures are of poor quality

New Project = Application Server

Editing and Creating WCF Contracts in User Interface

Bindings are also editable in a graphical interface

Right within Visual Studio 2010's WF Designer this information can be added/edited/updated

 

 

 

 

 

 

 

Posted by BrunoTerkaly | 1 Comments

Mobile Incubation Week – Tough Questions

What I'm doing this week

I'm in the Galileo room at the Silicon Valley Mountain View Campus at Mobility Incubation Week. I'm the on-site technical resource to help teams prepare an application to run on the mobility platform.

At the end of the week there will be a winner with the best mobile application and I'm excited to see how the week onfolds.    

One team is trying to build a notification system to alert customers about problematic deliveries

Silverlight Question
Their site wants to be able to save files locally to disk. But Shawn writes,

Shri Borde's WebLog

If you implemented a text or image editor in Silverlight, the user would not be able to save the edited file to disk.

However, there is a workaround - but at the cost of extra network traffic.

  • The solution involves the following steps:
  • The Silverlight client app running in the browser sends the data that needs to be saved to disk to the web server using a POST operation using System.Windows.Browser.Net.BrowerHttpWebRequest::GetResponse
  • The web server saves the data to a temporary file and returns a URL for the temporary file in the response
  • The Silverlight client app reads the URL that is returned in the System.Net.HttpWebResponse object.
  • It navigates to the URL using System.Windows.Browser.HtmlPage::Navigate.
  • This will result in the browser invoking the default action for the given file type.
  • This is often to prompt the user to save the file to disk.
  • If the browser opens the file directly, the user could then have the browser save the file to disk.
  • If multiple files need to be saved, the web server could save them all in a zip file using System.IO.Compression.GZipStream.
  • This solution is obviously not ideal as it result in unnecessarily sending the data back and forth over the network.
  • For large files, this could be prohibitive.
  • For small files, its a reasonable solution until there is a SaveFileDialog API in Silverlight.

Silverlight 3 – SaveFileDialog

Silverlight 3 has a dialog box that can be used.

http://silverlight.net/learn/learnvideo.aspx?video=187316

Another Post which deomonstrates this solution is:

http://www.michielpost.nl/PostDetail_25.aspx

MichielPost.nl

 

Posted by BrunoTerkaly | 1 Comments

Azure - Microsoft .NET Services- Step 01 - The Service Bus - Blog Post about Setup

Introduction - Getting Setup

This blog post is all about getting ready to learn about .NET Services, and the Service Bus specifically. This blog is based on the Azure Services Toolit and adds additional background information.

The training kit can be downloaded at

http://www.microsoft.com/azure/trainingkit.mspx

Brief Intro about .NET Services - What is .NET Services and why should we learn it?

· Microsoft .NET Services are a suite of web services for customers with integration and business-to-business collaboration requirements; the services offered include workflow, access control, and service bus connectivity, and all run from the Azure Services Platform.

Connect Applications

· The Service Bus makes it easy to connect applications together over the Internet.

· Services that register on the Bus can easily be discovered and accessed, across any network topology.

Similar to Enterprise Service Bus

· The Service Bus provides the familiar Enterprise Service Bus application pattern, while solving some of the hard issues that arise when implementing this pattern across network, security, and organizational boundaries, at Internet scale.

Composite Applications

· Applications frequently need to connect or integrate with other applications and services to create what are called composite applications.

Significant Challenges

· Creating an infrastructure to facilitate this type of communication involves significant challenges related to authentication, naming, and secure cross organizational firewall traversal.

· The .NET Service Bus provides a hosted, secure, standards-based infrastructure that dramatically reduces the barriers to applications communicating across systems and organizational boundaries.

.NET Services is about getting past firewalls and NATs

· The Service Bus service enables secure connectivity between services and applications behind firewall or network boundaries, facilitating cross-organizational communication.

· Additionally the service bus allows service functionality to be exposed easily and consumed from other applications in a loosely coupled manner using a variety of communication patterns.

Workflow

· The Workflow service simplifies the need to write complex code defining a business process, offering a way to coordinate service and application interaction with pre-written activities that can be composed together to create a workflow.

Certificates are needed for the Access Control Service

· The Access Control service provides an enterprise-class mechanism for enforcing access control rules and authorization as a web service.

· It supports federated scenarios to support enforcement of access control rules where users may come from multiple organizations or utilize different identification protocols.

Security Options

· You can use Windows CardSpace information cards, X.509 certificates, username/password credentials, or no credentials at all.

There are numerous SDK samples that illustrate these different credential options.

CredentialType Value

Description

CardSpace

The client credential is a self-issued Windows CardSpace information card that is registered with the .NET Access Control Service.

AutomaticRenewal

The client credential is a self-issued Windows CardSpace information card that is registered with the .NET Access Control Service. The difference is the access token will be automatically renewed as needed.

FederationViaCardSpace

The client credential is a managed Windows CardSpace information card issued by an identity provider trusted by the .NET Access Control Service.

UserNamePasssword

The client credential is a username/password credential for the .NET Service Bus solution registered with the .NET Access Control Service.

X509Certificate

The client credential is a X.509 certificate for the .NET Service Bus solution that has been registered with the .NET Access Control Service.

Unauthenticated

No client credential is provided.

Some Key Points about certificates and authentication

· X.509 certificates work with the .NET Access Control Service through the Azure Services Platform portal.

· Once you've registered a Windows CardSpace information card or X.509 certificate with a solution, you can use it for authentication.

· You can also control whether or not clients are required to authenticate with the .NET Service Bus by configuring the binding for the receiver.

· You do this through the relayClientAuthenticationType property on the <security> element supported by each relay binding.

· If you set the property to "None", clients will not be required to authenticate in order to relay messages to the receive.

· So the .NET Service applications we create, like any other claims-based application, needs to have its own X.509 certificate that the Access Control Service can use for encrypting the security tokens that the service will receive.

Table of contents for this blog post

Downloading of resources

This includes SDKs and the training kit

Hands-On Lab - .NET Services: Introduction to the .NET Service Bus - Setup

This is discussing the setup of the lab exercise

System Requirements

You must have the following items to complete this lab:

. Microsoft Visual Studio 2008

. Microsoft .NET Framework 3.5

You also need administrator privileges.

Certificates

X.509 certificates are needed for the lab exercises

How certmgr.exe works

How makecert.exe works

Installing SDKs

You will need to install the .NET Services SDK

Certificates

X.509 certificates are needed for the lab exercises

Azure Services Toolkit

The purpose of this blog post is to help understand the Hands-on Labs in more detail.

clip_image002

Downloading Resources

There are several useful downloads at http://www.microsoft.com/azure/sdk.mspx

Here are just a few:

clip_image004

Hands-On Lab - .NET Services: Introduction to the .NET Service Bus - Setup

Let's start with the certificates to begin the process.

Certificates

One of the first things you will need to get up and running is some certificates, so that you can get the appropriate X.509 certificates to do some of these lab exercises. ...). If you need security, WSHttpBinding is another solution, but you will have to give your users some kind of credentials (Username/password, certificate...) to use your service.

Azure Access control works with .NET Services. It provides:

  • Claims-based access management and Identity federation
  • Interoperable & based on standard protocols (X.509 and SAML)
  • Supports CardSpace, LiveID, Username/Password

A certificate creation tool is used to generate and store in the local machine X.509 certificates.

We will use a certificate creation tool to generate and store in the local machine X.509 certificates.

The folder = C:\AzureServicesKit\Labs\IntroServiceBus\Setup

The script to execute = SetupEx.vbs

Delete Existing certificates

clip_image006

CertMgr.exe

-r

currentUser indicates that the certificate store is under the HKEY_CURRENT_USER key. This is the default

-s

Indicates that the certificate store is a system store. If you do not specify this option, the store is a StoreFile.

My

System store is called My

-c

Deletes certificates is used with the -del

-n

Common name of certificat. In this example, client.com

Notice

Two registry locations (CurrentUser & LocalMachine)

Two System stores (My & TrustedPeople)

Create new certificates

clip_image008

MakeCert.exe

-sr

Specifies the subject's certificate store location. Location can be either currentuser (the default), or localmachine.

-ss

Specifies the subject's certificate store name that stores the output certificate.

-a

Specifies the signature algorithm. Must be either md5 (the default) or sha1.

-n

Specifies the subject's certificate name. This name must conform to the X.500 standard. The simplest method is to specify the name in double quotes, preceded by CN=; for example, "CN=myName".

-sky

Specifies the subject's key type, which must be signature, exchange, or an integer that represents a provider type. By default, you can pass 1 for an exchange key and 2 for a signature key.

-pe

Marks the generated private key as exportable. This allows the private key to be included in the certificate.

Here is the command you will execute

C:\AzureServicesKit\Labs\IntroServiceBus\Setup>cscript setupex.vbs

If all goes well, you will see:

clip_image010

Next, the setup process will try to install some snippets to help with the programming side of the labs.

clip_image012

You may see a security warning. Simply hit "Yes" and continue to hit "Next" until you finally get the "Finish."

clip_image014

The final screen will look like this:

clip_image016

Downloading and Installing the Microsoft .Net Services SDK

http://www.microsoft.com/azure/servicebus.mspx

clip_image018

Download the .NET Services SDK (currently the latest is March 2009)

clip_image020

clip_image022

Continue to hit "Next" until you hit finish.

clip_image024

This concludes the installation of the .NET Services SDK

clip_image026

Make sure you have an account with Azure

http://www.microsoft.com/azure/register.mspx

clip_image028

Now we are ready to start writing some applications.

Posted by BrunoTerkaly | 2 Comments

Juval Lowy’s Master Architect Class

Juval Lowy

 

Once a year, Juval offers "The Architect's Master Class." I will attempt to capture some of Juval's words of wisdom. It is a real pleasure to be here.

The class is called "The Architect's Master Class," and runs 9 hours a day for 5 days. You can learn more about this class at www.idesign.net. The class is targeted at Architects, Software Engineers, and Project Managers. At a high level the class is about best practices, pitfalls, tips, and design guidelines.

The kick off is that software is in crisis. There is even a wiki entry for it:

One core reason is cost, in terms of initial development and in terms of cost of overall ownership. Juval says companies go "clean slate", where the unacceptable cost leads to a total re-write. Why are costs so high? First, we solve the wrong problems, often "gold plating," missing core functinality in the requirements and adding bells and whistles. Often times the system is obsolete by the time the product is released.

The problem is often traced to chaotic organinzations. Many firms lack a clear process and cannot repeat previous successes. Firms also lack a structured knowledge retention process. The lack of success can also be seen through customer complaints, as evidensed by the Better Business Bureaus's Top Complaints, where complaints often relate internet shopping, cell phone operation, etc – all rooted in software.

An initial assertion is that software is too expensive:

  • Initial Development is most expensive
  • Overall ownership is huge
  • Gets too expensive to add features
    • Many people go to clean slate, which is an admission of failure

The two main issues is that developers solve the wrong problem and projects are difficult to staff. First devs add too many "cool" features and not enough core functionality. Juval calls this "Gold Plating." Second, code is often unmaintainable by new staff.

Not like any othe engineering discipline

Compared to other engineering disciplines, software has no regulated licensing process or industry standards. You can just call yourself a developer without having a formal CS degree. In other engineering disciples

Not like any othe engineering discipline

Compared to other engineering disciplines, software has no regulated licensing process or industry standards. You can just call yourself a developer without having a formal CS degree. In other engineering disciplines you go to jail if a wing falls off a plane or if the elevator cable breaks.

Software is not peceived as a profession. Developers are 'geeks' or 'hackers.' This perception has allowed software to be offshored and commoditized.

Science versus Engineering

Engineering is about scientific principles toward a practical result to match some given requirements. Science is about getting knowledge through observation and experimentation. Science is typically for other scientists. Engineers report to customers. The key lesson is that we need more "Engineering" in "Computer Science."

Real Terminology

Software architects are really engineers. Software engineers are really programmers or developers. Software Developers are really just code technicians. In summary, software architecture is engineering and software development is manufacturing.

Call to action

Software development needs to be more like an engineering discipline.

Types of Architects

The Enterprise Architect is sometimes called Corporate Architect or a Chief Architect. The goal of an Enterprise Architect is to utilize economies of scale. Responsibilities include: (1) corporate level frameworks; (2) Direction and guidance; (3) Managing other architects.

A Solution Architect is sometimes called a Lead Developer and is often application specific. Responsibilities include top level design and sometimes providing a detailed design. Solution Architects often provide technical leadership and reduce complexity and provide infrastructure. Solution Architects focus on the what and not how. They colloborate with product managers and project managers. A Solution Architect is a:

- Process Lead

- Technical Lead

- Design Lead

Architecture Goals

Architecture should not be tied to business specifics and should be about best practices and patterns that transcend specific applications. Well architected code should transcend industries, products and team sizes. Architects are not about the problem domain; they are about the business. Architects rely on other domain experts: (1) System experts; (2) Developers; (3) Analysts.

Service Oriented Architecture

What is a service?

Ideally, it is a single WCF class.

Biggest Risk to a project

Not having a skilled architect. Best scenario is to have one single architect and one junior architect. One developer can work on one service. This is a good map. A good metric is to assign a team to one assembly.

High Level Design Goals

A good design minimizes interactions, has loose coupling and includes encapsulations.

How to integrate service construction

Create a service dependency graph, which shows which services depend on other services. The start a bottom up integration plan, where you start plugging in the lowest level services into higher level (consuming) services. The goal is to reduce risk and discover incompatibility earlier. Moreover, it is recommended to do daily builds and possibly regression testing (re-running previously run tests and checking whether previously fixed faults have re-emerged).

How to test service calls

EVERY service should have its own test environment. This leads to robustness and gives management signs of progress. This allows you to spice up boring testing. The goal is to test all method calls, callbacks and errors. The goal is that our test harnesses will always uncover errors so that are software doesn't have to.

 

Posted by BrunoTerkaly | 1 Comments

Azure – Microsoft .NET Services- Step 02 – The Service Bus – Blog Post about Creating a Service Bus Solution

 

Internet Connectivity Required – Creating , a new .NET Services and SQL Services solution.

For this part we need to have internet connectivity and login into your portal at http://portal.ex.azure.microsoft.com/default.aspx. The assumption I am making is that you have signed up for Azure at www.microsoft.com/azure/register.mspx and have been granted access.

You should have an invitation code

When you signed up for Azure, you received an invitation code. You may need to enter it in now.

Creating a Solution

Notice that we are provisioning:

• Microsoft® SQL Data Service

• Microsoft® .NET Service Bus

• Microsoft® .NET Workflow Service

• Microsoft® .NET Access Control Service

 

Solution Creation

  • This is where you create a solution.
  • This is a collection of service components, consisting of the Access Control Service, SQL Data Services, the Service Bus and the Workflow Service.

Multiple solutions are possible

  • You can have multiple solutions and configure the services within each solution differently.
  • For example, you may have different workflows and databases in different solutions.

Development, Test, Production Might Be A Good Idea

  • Alternatively, you might choose to have a solution for development, a solution for QA and a solution for production.
  • Solution names must be globally unique as, by their very nature, they are in the cloud and accessible by whomever you decide to grant access.

 

 

Solution takes up to a minute or two

  • Please be patient while your account is created.
  • It can take up to a minute while all the services are provisioned for the solution.

Solutions must be unique to the planet

  • If the solution name you choose is not unique (i.e.someone else has already chosen it) you will get an error and you will need to choose another solution name.

Do not forget your solution name and password

  • Once provisioning has finished, the page will display "Provisioning is complete!" and give you a solution password.

How to login to your solution

  • To login in at any time, simply navigate to http://portal.ex.azure.microsoft.com/default.aspx, click Sign In and provide your Live ID credentials.

LiveID gets you to sign in, but the solution credentials are used for code writing

  • The solution credentials are used when you write code using the services in the solution.

 

 

Sign-in to your account

http://portal.ex.azure.microsoft.com/

 

Sign In To Your account

CardSpace and X.509 Certificates

This same page is where we manage the security and identity aspects of your application.

Summary

  • This is the main management page for this solution from where you can change the credentials for the solution and access each of the services that comprise the solution.

SLA & Billing

  • In future, there will also be usage reports, billing and SLA information.

     

Posted by BrunoTerkaly | 1 Comments

Azure – Microsoft .NET Services- Step 01 – The Service Bus – Blog Post about Setup

 

Introduction – Getting Setup

 

This blog post is all about getting ready to learn about .NET Services, and the Service Bus specifically. This blog is based on the Azure Services Toolit and adds additional background information.

 

The training kit can be downloaded at

http://www.microsoft.com/azure/trainingkit.mspx

 

Brief Intro about .NET Services – What is .NET Services and why should we learn it?

  • Microsoft .NET Services are a suite of web services for customers with integration and business-to-business collaboration requirements; the services offered include workflow, access control, and service bus connectivity, and all run from the Azure Services Platform.

Connect Applications

  • The Service Bus makes it easy to connect applications together over the Internet.
  • Services that register on the Bus can easily be discovered and accessed, across any network topology.

Similar to Enterprise Service Bus

  • The Service Bus provides the familiar Enterprise Service Bus application pattern, while solving some of the hard issues that arise when implementing this pattern across network, security, and organizational boundaries, at Internet scale.

Composite Applications

  • Applications frequently need to connect or integrate with other applications and services to create what are called composite applications.

Significant Challenges

  • Creating an infrastructure to facilitate this type of communication involves significant challenges related to authentication, naming, and secure cross organizational firewall traversal.
  • The .NET Service Bus provides a hosted, secure, standards-based infrastructure that dramatically reduces the barriers to applications communicating across systems and organizational boundaries.

.NET Services is about getting past firewalls and NATs

  • The Service Bus service enables secure connectivity between services and applications behind firewall or network boundaries, facilitating cross-organizational communication.
  • Additionally the service bus allows service functionality to be exposed easily and consumed from other applications in a loosely coupled manner using a variety of communication patterns.

Workflow

  • The Workflow service simplifies the need to write complex code defining a business process, offering a way to coordinate service and application interaction with pre-written activities that can be composed together to create a workflow.

Certificates are needed for the Access Control Service

  • The Access Control service provides an enterprise-class mechanism for enforcing access control rules and authorization as a web service.
  • It supports federated scenarios to support enforcement of access control rules where users may come from multiple organizations or utilize different identification protocols.

Security Options

  • You can use Windows CardSpace information cards, X.509 certificates, username/password credentials, or no credentials at all.

 

There are numerous SDK samples that illustrate these different credential options.

 

CredentialType Value

Description

CardSpace

The client credential is a self-issued Windows CardSpace information card that is registered with the .NET Access Control Service.

AutomaticRenewal

The client credential is a self-issued Windows CardSpace information card that is registered with the .NET Access Control Service. The difference is the access token will be automatically renewed as needed.

FederationViaCardSpace

The client credential is a managed Windows CardSpace information card issued by an identity provider trusted by the .NET Access Control Service.

UserNamePasssword

The client credential is a username/password credential for the .NET Service Bus solution registered with the .NET Access Control Service.

X509Certificate

The client credential is a X.509 certificate for the .NET Service Bus solution that has been registered with the .NET Access Control Service.

Unauthenticated

No client credential is provided.

 

Some Key Points about certificates and authentication

  • X.509 certificates work with the .NET Access Control Service through the Azure Services Platform portal.
  • Once you've registered a Windows CardSpace information card or X.509 certificate with a solution, you can use it for authentication.
  • You can also control whether or not clients are required to authenticate with the .NET Service Bus by configuring the binding for the receiver.
  • You do this through the relayClientAuthenticationType property on the <security> element supported by each relay binding.
  • If you set the property to "None", clients will not be required to authenticate in order to relay messages to the receive.
  • So the .NET Service applications we create, like any other claims-based application, needs to have its own X.509 certificate that the Access Control Service can use for encrypting the security tokens that the service will receive.

 

Table of contents for this blog post

Downloading of resources

This includes SDKs and the training kit

Hands-On Lab - .NET Services: Introduction to the .NET Service Bus – Setup

This is discussing the setup of the lab exercise

System Requirements

You must have the following items to complete this lab:

•    Microsoft Visual Studio 2008

•    Microsoft .NET Framework 3.5

You also need administrator privileges.

Certificates

X.509 certificates are needed for the lab exercises

How certmgr.exe works

How makecert.exe works

Installing SDKs

You will need to install the .NET Services SDK

Certificates

X.509 certificates are needed for the lab exercises

 

Azure Services Toolkit

The purpose of this blog post is to help understand the Hands-on Labs in more detail.

Downloading Resources

There are several useful downloads at http://www.microsoft.com/azure/sdk.mspx

Here are just a few:

 

Hands-On Lab - .NET Services: Introduction to the .NET Service Bus – Setup

Let's start with the certificates to begin the process.

 

Certificates

One of the first things you will need to get up and running is some certificates, so that you can get the appropriate X.509 certificates to do some of these lab exercises. ...). If you need security, WSHttpBinding is another solution, but you will have to give your users some kind of credentials (Username/password, certificate...) to use your service.

 

Azure Access control works with .NET Services. It provides:

  • Claims-based access management and Identity federation
  • Interoperable & based on standard protocols (X.509 and SAML)
  • Supports CardSpace, LiveID, Username/Password

 

 

A certificate creation tool is used to generate and store in the local machine X.509 certificates.

 

We will use a certificate creation tool to generate and store in the local machine X.509 certificates.

 

The folder = C:\AzureServicesKit\Labs\IntroServiceBus\Setup

 

The script to execute = SetupEx.vbs

Delete Existing certificates

CertMgr.exe

-r

currentUser indicates that the certificate store is under the HKEY_CURRENT_USER key. This is the default

-s

Indicates that the certificate store is a system store. If you do not specify this option, the store is a StoreFile.

My

System store is called My

-c

Deletes certificates is used with the –del

-n

Common name of certificat. In this example, client.com

 

Notice

Two registry locations (CurrentUser & LocalMachine)

Two System stores (My & TrustedPeople)

 

Create new certificates

MakeCert.exe

-sr

Specifies the subject's certificate store location. Location can be either currentuser (the default), or localmachine.

-ss

Specifies the subject's certificate store name that stores the output certificate.

-a

Specifies the signature algorithm. Must be either md5 (the default) or sha1.

-n

Specifies the subject's certificate name. This name must conform to the X.500 standard. The simplest method is to specify the name in double quotes, preceded by CN=; for example, "CN=myName".

-sky

Specifies the subject's key type, which must be signature, exchange, or an integer that represents a provider type. By default, you can pass 1 for an exchange key and 2 for a signature key.

-pe

Marks the generated private key as exportable. This allows the private key to be included in the certificate.

 

 

Here is the command you will execute

 

C:\AzureServicesKit\Labs\IntroServiceBus\Setup>cscript setupex.vbs

 

If all goes well, you will see:

Next, the setup process will try to install some snippets to help with the programming side of the labs.

 

 

You may see a security warning. Simply hit "Yes" and continue to hit "Next" until you finally get the "Finish."

 

The final screen will look like this:

Downloading and Installing the Microsoft .Net Services SDK

http://www.microsoft.com/azure/servicebus.mspx

Download the .NET Services SDK (currently the latest is March 2009)

Continue to hit "Next" until you hit finish.

This concludes the installation of the .NET Services SDK

Make sure you have an account with Azure

http://www.microsoft.com/azure/register.mspx

Now we are ready to start writing some applications…

 

 

 

 

Posted by BrunoTerkaly | 1 Comments
More Posts Next page »
 
Page view tracker