Welcome to MSDN Blogs Sign in | Join | Help

PDC Sessions

Last week was PDC – with great announcements and releases like Silverlight 4 Beta. All of the PDC keynotes and almost all of the breakouts sessions are here available online for anyone for free. As mentioned on the PDC video page if the session you want isn’t there, just check back after a couple of days (sessions need to be encoded, edited and uploaded).

Yesterday evening Scott Guthrie hold a web chat hosted by the LIDNUG user group where everybody had the opportunity to ask any kind of questions including PDC announcements. If you missed it, here you can find the registration.

Posted by kcasada | 0 Comments
Filed under: ,

PowerShell 2.0

Mit der aktuellen Version 2.0 macht die PowerShell, die im Herbst 2006 offiziell vorgestellt wurde, einen großen Sprung nach vorne. Die wichtigsten Features sind Remoting, Background-Prozesse und ein Editor mit integriertem Debugger. Außerdem ist die PowerShell 2.0 bei Windows Server 2008 R2 und Windows 7 fest eingebaut. Die DeveloperWorld stellt die wichtigsten Neuerungen vor, die auch für Entwickler interessant sind, da auch Server-Produkte wie Dublin eine „PowerShell-Schnittstelle“ erhalten sollen. Lesen Sie mehr: http://www.computerworld.ch/aktuell/news/49689/index.html.

Posted by sannak | 0 Comments
Filed under: ,

Live from PDC 2009 Day 3 and closing notes

Silverlight 4 Performance

Finally you can use the VS Profiler to profile a Silverlight application (VS2010). Other than the profiler you can enable a couple of flag to visualize the GPU acceleration: EnableCacheVisualization and the redraws: EnableRedrawRegions. Another useful utility is UISpy http://msdn.microsoft.com/en-us/library/ms727247.aspx.

SQL Server 2008 R2 StreamInsight

This is a cool technology for analyzing live data feeds. Basically you have input  adapters that streams data in to the engine where you can have LINQ queries that gets executed to filter, sort, aggregate data on the fly and then sent to output adapters. In the session there was an example for the stock trading market with as input market data some query for aggregating the volume and price by market eg. NASDAQ and then outputting the data to an Excel sheet. I like the idea and it seems very usefull to anaylize all sort of real time data like sensors data, web traffic data, financial data, meteorological data, etc…
Don’t get confuse by the name, it is not too much related to SQL Server although is the shipping vehicle and can use SQL as a repository and storage. You need to write .NET code for the adapters and LINQ query for the filtering process. More here: http://www.microsoft.com/sqlserver/2008/en/us/R2-complex-event.aspx

Bing Map

I was complaining about Swiss coverage of the satellite images in Bing with a girl of the product team, so i decided to show here how bad it is and I selected Airolo as an example and to my surprise it just came out better than Google. After the 10 seconds embarrassment I did learn that we have a new deal for imagery for Western Europe.

image

They are loading the data right now so it will take some time for the full coverage.
If you didn't know we have now also a cool Bing Map Silverlight control. You can play it live here: http://www.microsoft.com/maps/isdk/silverlight/ and download it here: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=beb29d27-6f0c-494f-b028-1e0e3187e830#tm. To note that is using the same technology as deep zoom so is way smother that the AJAX version (including the competitors one).

Microsoft Live Labs Pivot

This is a cool technology based on deep zoom (to be more precise based on Seadragon technology) to makes it easier to interact with massive amounts of data in ways that are powerful, informative, and fun.

image

Here you can watch a video that tells you more: http://www.getpivot.com/ 

 

It was another great PDC, although being only one year from the last one there was quite a bit of announcements and new technologies.

Like a did last year here my purely personal opinion on the new stuff that I have seen with a rating for importance, coolness, potential impact and timeframe for mainstream adaption.
Ratings from + to +++++ with the last (5) being the maximum rating.

Technology

Importance

Coolness

Potential Impact

Timeframe for adoption

Windows Azure

++++

++++

+++++

Now - 3 years

SQL Azure

++++

+++

++++

1-3 years (needs desperately backup and restore)

“Dallas” ++ ++++ +++ 2-3 years
“Sydney” +++ ++ +++ 1-3 years

AppFabric

+++

+++

+++

1 year

SQL Server 2008 R2 StreamInsight ++ ++++ ++ 1/2 year

WCF RIA Services

+++++

+++++

++++

1/2-1 year

Silverlight 4

+++++

+++++

+++++

1/2-1 year

Internet Explorer 9

+++++

n/a

+++

1 year

Sharepoint 2010 & SL

+++++

+++

++++

1/2 year

 

What was missing was WinMo 7 and Silverlight Mobile. Hope to see them as promised for Mix 2010.

Bottom-line is time to start coding for the cloud with Silverlight as UI:-)

Cheers from Los Angeles.

 

Ronnie Saurenmann

Posted by ronnies | 0 Comments

Office 2010 Beta und SharePoint Server 2010 Beta 2 verfügbar zum Download

Per sofort stehen die Beta Versionen zu Evaluationszwecken von

  • SharePoint Server 2010
  • Office Web Applications
  • Office 2010
  • Visio 2010
  • Project 2010

für Kunden und Partner öffentlich zum Download zur Verfügung.

Weitere Informationen und Downloads: http://www.microsoft.com/2010/de/

image

Entwickler finden zu SharePoint 2010 hier einen Learning Guide.

Die RTM Releases sind für die erste Hälfte 2010 vorgesehen.

Posted by Olaf | 0 Comments

Live from PDC 2009 Day 2

Today it was a Silverlight day for me. I visited and talked to many people almost only about Silverlight 4

But before I dig in to SL4 I want to point out a couple of other cool stuff:

Internet Explorer 9

here you can find a detailed list of some of the new aspect of IE9 http://blogs.msdn.com/ie/archive/2009/11/18/an-early-look-at-ie9-for-developers.aspx
but personally the things I like the most are hardware accelerated rendering, because I always find the various browser quite sluggish in resizing, scrolling, etc… and of the better text rendering.

ATI HD 5970 graphic card with 3 ports

During lunch time I had a change to try to run my Deep Zoom Zermatt http://rubrik.ch.msn.com/reportagen/zermatt.aspx  on a 3 displays setup driven by the latest 3 port ATI graphic card, supposedly the fastest graphic card in the world at a resolution of 5040 x 1080. http://www.amd.com/us/products/desktop/graphics/ati-radeon-hd-5000/hd-5970/Pages/ati-radeon-hd-5970-overview.aspx
Just amazing performance and immersion. AMD is now using my app as a demo too.

IMAGE_047

Sharepoint 2010 & Silverlight

Finally it was good to see on the keynote the push for integration of Silverlight and Sharepoint and i really hope to see more and more Office – Silverlight integration.
It seems also that Sharpoint 2010 dev story it is much better and more usable than with 2007.

So what about Silverlight 4?

As a super fan of Silverlight and since SL 2 try to convince every single person in the world, even my wife:-), that Silverlight is a fantastic platform for Line of Business application, after today announcement there is no more excuse for not using it:-)

It is just amazing the evolution and innovation is such short time that Silverlight is having. Her you can find a detailed list of the new features and you can download the beta too: http://www.silverlight.net/getstarted/silverlight-4-beta/

But I would like to point out some of what I believe are the key features for Line of Business app:

  • Printing
    Printing is absolutely the no 1 feature. The API are fairly easy to use and allow to do pagination and print screen elements but also arbitrary element trees non in the visual tree.
  • Right click support for context menu
    Second most requested feature. To note that you need to build your own context menu. The API enables only to cancel the default SL3 behavior and handle the event.
  • Richtextbox
    Another super requested feature and if you had to do rich text work in SL2 or 3 you know why is so good to have it.
  • Clipboard support
    Although it was possible through JavaScript is now easy and fully available from managed code.
    Cool is now that you can copy & paste multiple rows in the DataGrid and even to and from Excel.
  • String formatting on DataBinding
    A small but very useful feature is the possibility to specify string formatting on the binding eg: {0:F}. No need to write a converter every time.
  • MouseWheel Scrolling support in the important controls like DataGrid, Listbox, etc..
  • Same compiled code to be run on the desktop and Silverlight without change
    Very useful to share Business logics across tiers and apps.
  • COM automation enables you to run other desktop programs such as Office, for example requesting Outlook to send an email, send a report to Word or data to Excel.
  • Implicit styles.
    You don’t need to explicitly declare the style that you want to use in every control but you can now, like in WPF, simply omit the key on the style and it will be applied to all control of that type automatically. Was just about time!
  • Out of Browser Notification Window
    This can be very useful to notify user that they need to work on some new items, like a new orders, etc…
  • Finally the Combobox is now capable to handle IDs for usage as lookup mechanism on foreignkeys.

One thing to point out, that I also got confused, is that the WebBrowser control only works on Out of Browser apps and not in browser.

Also worth mentioning is that all the features, other than obviously COM Interop, work on MAC too and in all the supported browsers that now includes Google Chrome.

The super LOB framework for SL previously known as .NET RIA Services and now called WCF RIA Services is now based on WCF Soap with as default the binary formatter (for perf reason).
This means that you can call the service and get a WSDL file from your service layer and generate proxies for other platforms like JAVA. Quite cool. Plus being completely based on WCF you can, with SL4, use TCP instead of HTTP.

Last but not least the new VS 2010 Silvelight UI designer is quite good. I really like the drag and drop support for databinding and automatically creating bound controls such as listbox, datagrid. Also quite usfull is intellisense on binding expression. Still you would need Blend to create templates, styles and animations. But finally now  there will be less switching back and forth between Blend and VS.

That is all for today

Have fun with SL4

Ronnie Saurenmann

Posted by ronnies | 0 Comments

Live from PDC 2009 Day 1

Today was the Azure day. A lot of news around it and of course the announcement of the commercial availability starting 1.1.2009. Azure will be commercially available for Switzerland on the same date.

Here a brief summary of the new feature in Windows Azure:

  • Direct communication between role instances. No needs to use queue to communicate across roles or across instances of the same role.
  • Support for rolling updates across change domains one domain at a time
  • Windows Azure Diagnostics library.It enables logging using standard .NET api.
  • Certificate Management for SSL certificates
  • Variable size VMs. You can pickup the size of the VM that fits you best.
    VMs size that are available (cpu, ram, hd):

Small
1.6 GHz
1.75 GB
225 GB

Medium
2 x 1.6 GHz
3.5 GB
490 GB

Large
4 x 1.6 GHz
7 GB
1,000 GB

Extra large
8 x 1.6 GHz
14 GB
2,040 GB

  • External endpoints for worker roles. You can now define external endpoints for HTTP, HTTPS, and TCP, and specify the desired port number.
  • Windows Azure Drive
    The Windows Azure Drive allows Windows Azure applications to mount a Page Blob, which is a single volume NTFS VHD. All writes in the application are made durable to the blob, and reads come out of the local VM cache or the page blob if there is a cache miss. This allows applications to upload/download VHDs via blobs, and the VHD is durable and survives the failover of the VM, since it is backed by a paged blob.
  • CDN support for storage blogs
    A content delivery network (CDN) enhances end user performance and reliability by placing copies of data, at various points in a network, so that they are distributed closer to the user. A client accesses a copy of the data near to the client, as opposed to all clients accessing the same set of central servers (called Origins), thereby causing a bottleneck near these Origin servers.
  • Windows Azure Service Management APIs. REST based APIs that enable customers to automate the deployment, management and scaling of their application.
  • Admin right and remote desktop administration of VM with the possibility to snapshot the VM. This allow you to install and configure whatever software you want to run on the VM (not yet available).

Microsoft Project Dallas

Microsoft codename ‘Dallas’ is a community technology preview (CTP) of a Windows Azure and SQL Azure-powered Information service that provides developers and information workers access to third party premium data sets and web services. ‘Dallas’ also enables self-service business intelligence and analytics over stored data sets using existing Microsoft technologies.

With the power and scale of the Windows Azure platform (Windows Azure, SQL Azure Database), Dallas provides developers with the ability to build and manage innovative applications across the desktop and mobile devices by bringing together disparate sets of private and public data, both on premises and in the cloud. Via a single marketplace, Dallas enables developers to access complex data sets to build entirely new analytic and reporting scenarios. And content providers are able to expose their data to millions of developers on a global level enabling new growth and revenue opportunities.

Microsoft SQL Azure Data Sync

Microsoft SQL Azure Data Sync is tooling and runtime to enable data synchronization with SQL Azure. This technology facilitates two key scenarios that are not available with other cloud platforms today, extending current on-premises infrastructure to the cloud, and producing clients with offline/cached-mode support. Extending on-premises data to the cloud allows for information to be easily shared with mobile users, business partners, remote offices and enterprise data sources all while taking advantage of new services in the cloud. This technology provides a bridge, allowing on-premises and off-premises applications to work together. Using cached mode enables developing clients with an improved user experience through lower latency and higher availability. Additionally cached mode provides the benefits of lower network utilization and better server scale through lower load and a better ability to schedule work.

Future features of SQL Azure

  • data base clones that enable you to do transactional snapshot of your db and make it available even geo locate. You can then even promote the snapshot as the new active db. This enable backups and restores. Expected 1H10
  • full backup and restore functionality. Expect 2H10
  • fan out queries across DBs (distributed queries)
  • large size DBs (maybe around 50 GB)

Microsoft Project Sydney

A new product to enable enterprises to securely connect on premise servers with services running on Azure. E.g. A web role talking with an on premise SQL. Sydney will come in beta next year.

AppFabrics

Finally Velocity and Dublin find an home as app server under AppFabric. The app server will be available next year for Azure too.

 

Greetings from LA

Ronnie Saurenmann

Posted by ronnies | 0 Comments

PDC 09 - Data Center in a Box

Neben den Software-Seite von Windows Azure kann an der PDC exklusiv auch die Hardware-Seite begutachtet und (leider nur mit dem Mobile) fotografiert werden, denn analog zu erfolgreichen Menschen gilt auch im Cloud Computing: Hinter jedem starken Cloud Operating System steht eine starke Data Center Infrastruktur.

Im Falle von Microsoft ist die Container-förmig und hat in etwa die Dimensionen eines Schulbusses. Darin untergebracht sind 8 Server-Racks die in der abgebildeten Konfiguration exakt 405 Server-Blades aufnehmen. Die begehbare Box wird dazu ins Data Center geliefert, mit Strom, Kühlwasser und Glasfaser verkabelt und reguliert anschliessend selbständig die Innentemperator – in der Regel, indem die Abwärme der Server-CPUs über die Dachlüftung nach draussen abgegeben wird.

Wie heisst’s so schön beim Lokalfernsehen: Für MSDN Schweiz exklusiv aus L.A. -
de Christof Zogg

Azure1

Azure2 

Azure4

Posted by czogg | 0 Comments
Filed under: ,

Visual Studio 2010 – Beta 2 – der erste Eindruck

Die Beta 2 von Visual Studio 2010 und .NET Framework 4 ist ein wichtiger Meilenstein auf dem Weg zur finalen Version, deren Auslieferung bereits auf den 22. März 2010 festgelegt wurde. Die DeveloperWorld beleuchtet die wichtigsten Neuerungen des Nachfolgers von Visual Studio 2008 SP1 in einem kurzen Portrait: http://www.computerworld.ch/aktuell/developerworld/49686/index.html.

Posted by sannak | 0 Comments
Filed under:

Vorschau auf die PDC 09

Nächste Woche findet in Los Angeles die PDC 09 statt, auf der Themen wie Azure, .NET Framework 4 und VS 2010 im Mittelpunkt stehen werden, auf der aber auch wie üblich der Fahrplan für die nächsten Jahre vorgestellt wird. Die DeveloperWorld serviert im Voraus ein paar Appetithäppchen für die, die sich noch kurzfristig zu einer Teilnahme entscheiden könnten, und für diejenigen, die die Konferenz via Live Streaming verfolgen möchten: http://www.computerworld.ch/aktuell/news/49651/index.html.

Posted by sannak | 0 Comments
Filed under:

SharePoint 2010 – die wichtigsten Neuerungen für Entwickler (Teil 1)

Nach dem SharePoint 2010 auf der großen SharePoint und Office Konferenz im Oktober erstmalig der Öffentlichkeit präsentiert wurde, stellt die DeveloperWorld alles das vor, was Entwickler über die kommende Version wissen müssen. Lesen Sie mehr unter: http://www.computerworld.ch/aktuell/news/49641/index.html.

Posted by sannak | 0 Comments
Filed under:

Consuming an Entity Data Model using the EntityDataSource control (tutorial)

With this tutorial I want to show you how you can use the EntityDataSource control in order to build an ASP.NET Web Page which is consuming an Entity Data Model (created with Entity Framework); you will see what are the typical problems you may find when working with this control.

 

 

EntityDataSource allows you to bind your data into the UI and is really powerful in case you want to do Rapid Application Development; but because it lives completely in the UI it does not allow you to have a separation of the logic between the layers.  If you want to have such a separation you are probably better with the ObjectDataSource control.

 

 

The Entity Data Model we want to consume is represented by the following diagram and has been generated from the Northwind sample database.

 

image

The sample page we want to build will be like the following one: a typical master-detail solution with Edit functionality. You select a customer and you get the details about the Order. You can change the customer details, the order details (including the assigned shipper) and modify the shipper’s details.

 

clip_image004

 

In order to start you have to create an ASP.NET Web Application using Visual Studio, add an ADO.NET Entity Data Model (please include the following tables: customers, orders  and shippers). We are now ready to consume the model.

 

Open the default.aspx page within the Visual Studio designer and drag & drop a GridView control. Click on the top-right corner of the GridView controller and choose <New data source…> as dataSource.

 

 

clip_image005

When the wizard starts, select Entity as data source. By choosing Entity an EntityDataSource control with ID EntityDataSource1 will be automatically generated for you. Press OK.

image

On the following mask you have to select the connection string and the object container name (just one single choice is available, take this one). Then press Next.

 

You now have to configure the data selection. Because in the first GridView control (GridView1) we want to display the list of customers and we also want to expose edit functionality, choose customers as EntitySetName, select Select All (Entity Value) and put the hacks by Enable automatic inserts/updates/deletes.

 

Note:  a huge number of people don't realize that when they select some specific columns from the following dialog, they are actually creating an anonymous type and therefore it is not possible to have automatic inserts, updates and deletes.

 

 

 

clip_image009

Press Finish and then by the following dialog activate all functionalities (Enable Paging, Enable Sorting, … ) as shown below:

 

 

clip_image011

In order to put some color, click on Auto Format… and select classic color. Set also the PageSize property of the Gridview1 control to 5. You should now have something like this:

 

clip_image013

We now want to show the related orders. That’s why we need to add a second GridView control by placing it into the designer using drag&drop.

 

clip_image015

From the GridView Tasks menu, select New data Source (Choose Data Source) as you did before…the wizard will start. Follow the same steps you did before for the GridView1 control representing the list of customers. The only difference here, is that you have of course to choose Orders instead of Customers as EntitySetName from the Configure Data Selection mask.

clip_image017

Because we want to display just the order related to the selected customer within the first GridView control we have to define a “where condition”. In order to do that select the EntityDataSource2 control (the one which is related to the second GridView control- GridView2). In the properties window, select the Where property and click on the ellipse button as showed below:

 

clip_image018

Set the where expression (which is an EntitySQL expression) as shown below. Then add a parameter and name it CustomerId (must correspond to the @ parameter within the where expression). From the Parameter source dropdown list select Control and as ControlID select GridView1. Within the Parameters section the value GridView1.SelectedValue appears, which represents the ID of the selected customer within the customers grid.

clip_image019

One last thing has to be done. Click on the Show advanced properties and select String as DbType.

clip_image021

 

You can now start the application by pressing F5. By selecting one customer you should get the related orders.

 

Note:  ShipperId (Shipper.ShipperID), which represents the ID of the related entity (Shipper), is shown within the GridView, even though the related entity Shipper has not been loaded (no include statement has been defined).

 

 

clip_image022

Now suppose we want to show the CompanyName of the Shipper Navigation Property (have a look at the Order entity within the first figure, which represents the Entity Data Model).  Because CompanyName is not the key, in order to show it we have to explicitly tell to the EntityDataSource2 control (the one bind to the orders GridView control-GridView2) that when the orders are loaded, the related shipper must also be loaded. In order to do that you have to set the include property of EntityDataSource2 control to Shipper.

 

 

clip_image023

 

What you are doing here, is just a sample of Eager Loading.

 

The next step is to define a column to show the CompanyName: switch to source view and copy the following piece of xml highlighted in yellow.

 

clip_image025

Paste it below and replace ShipperID with CompanyName:

 

 

clip_image027

 

If you try now to start the application (F5), by selecting one customer you will get the following strange error: “A field or property with the name ‘Shipper.CompanyName’ was not found on the selected data source”.

 

clip_image029

 

 Why that?

 

Because you cannot access properties of related entities with BoundFields, even if the related entity has been loaded with the Include clause. What we need in order to show properties which are not keys of related entities, is a TemplateField.

 

One easy step is needed to transform your BoundField in TemplateField. Switch to Design view and from the GridView Task menu (of the GridView2 control) select Edit Columns …

 

clip_image030 

When the Fields dialog appears, select the Shipper.CompanyName and click on the Convert this field into a TemplateField and press OK.

clip_image031

 

Go to the source view and remove the generated square brackets from the template field. If you don’t do it, you will get a strange error.

clip_image033

 

If you now try to go in Edit mode within the Orders grid you will see that the cells of CompanyName column are being transformed in TextBox control. This doesn’t make really sense; in fact what you need here is a DropDownList control; what you want to do here is evtl. to assign another shipper and not to edit shipper information.

In order to get the DropDownList we have to change the Edit template. Switch again back to the design view. Select Edit Templates.

clip_image034

 

Per default Visual Studio is displaying the ItemTemplate, but Be Careful…what we want to change here is the EditItemTemplate. Switch to the EditItemTemplate.

clip_image035

 

You should now have the following situation:

clip_image036

 

Replace the TextBox control with a DropDownList control. Then from the DropDownList Tasks menu select Choose Data Source …

clip_image037

 

From the Choose Data Source dialog select <New data source…> (we need a new EntityDataSource control in order to display shipper information).

clip_image039

 

Select once again Entity and put as ID EntityDataSourceShipper1.

clip_image041 

Press OK and follow the wizard as you did before (of course by selecting all related Shipper information and without enabling any inserting, updating and deleting functionality).

At the end select CompanyName as data field to be displayed within the combobox and ShipperID to be used as ID.

clip_image043

Press OK.

We now have to synchronize the value of the DropDownList (SelectedValue) with currently item being edit. To do that click on the EditDataBinding… link within the DropDownList Tasks menu.

clip_image044

and within the DataBindings dialog set a custom binding expression for the SelectedValue property (as shown below without square brackets).

clip_image046 

We are now finished with the Editing Template. Click on End Template Editing.

clip_image047

 

There is another problem to be solved. There may be situation where we do not have a shipper assigned to an order yet. Because of that we have to add an empty entry in the DropDownList control, otherwise you will get an error.

 

Add the empty entry by adding the following line within the DropDownList control definition:

clip_image049 

You also have to set the AppendDataBoundItems property of the DropDownList control to true.

clip_image051 

Let’s also hide the ShipperID column by setting his attribute Visible to false (later if you want you can also hide others columns by simply doing the same thing).

clip_image053 

What do we want to do next?

We want to be able to edit shipper information. So when I select an order I want to get all shipper information and being able to edit them. In order to display the shipper information we are going to use a DetailsView control.

First switch to design view and add a DetailView control on the bottom of the page.

When you start the Data Source Configuration wizard, set EntityDataSourceShipper2 as ID for the data source control being generated.

clip_image055 

Press OK and follow the wizard as you did before (of course by selecting all related Shipper information and this time by only enabling inserting and updating …no deleting functionality).

clip_image057 

Open the Where dialog of the new generated EntityDataSourceShipper2 and do the following changes:

clip_image058 

Press OK.

And now we need of course to provide this parameter (ShipperID) or if you prefer a value for this parameter to the DetailView control (in fact we didn’t defined any parameter source information yet).  Where can I find this information?

First you have to convert the ShipperID BoundField in a TemplateField. In order to do that open the field dialog of the GridView2 control by clicking Edit columns… within the GridView2 Task menu and Convert the Shipper.ShipperID BoundField into a TemplateField.

clip_image059 

Switch to the source view, remove the generated square brackets and rename the generated label in lblShipperID.

clip_image061 

Remove the part highlighted in yellow:

clip_image063 

Generate the SelectedIndexChanged event handler on the second grid (orders grid) and add the following code.

clip_image065 

By doing this every time another order is being selected the ShipperID value can be retrieved from the lblShipperID label control and used to set the where parameter of the  EntityDataSourceShipper2 control (used to automatically generate a where condition, which at the end retrieves the shipper of the selected order).

We also have to generate the following event handler, which makes a refresh on the second grid, whenever a change is done to the Shipper information (DetailsView control).

protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
{
   
GridView2.DataBind();
}

There is still another small problem. When I change selection on the first grid, of course the second grid with the orders is being reloaded. The problem is that in this specific case the DetailsView control will still show the old shipper information (because the WhereParameter[“lblShipperID”] still contains the old id).

To fix  this we can implement the DataBound event handler of the second grid (GridView2 control). First we have to generated the GridView2_DataBound event handler: clip_image067 

Now we have to refactor the content of the GridView2_SelectedIndexChanged event handler by selecting the method’s code, right-clicking on it and selecting Refactor|Extract Method …

clip_image069 

Change the method name as follow and press OK.

clip_image070 

Add the following code to the GridView2_DataBound event handler:

clip_image072 

We should now have the following code:

clip_image074 

One last detail…. you should know that Bind (in write mode) only understands properties that are on your root entity. In fact if you try to delete an order, instead of getting a “Reference Constraint” error (because the order is related to other entities), you get something like “System.NullReferenceException: Object reference not set to an instance of an object.”…a strange error message….

If you want to get what you expect, you have to change Bind with Eval; but you then also have to know that Eval can be used for read-only databinding…

In our case we can replace Bind with Eval for the CompanyName field (which is not defined on the root entity).

clip_image076 

The final solution is available in the enclosed zip file.

Hope it helps,

Ken Casada

Posted by kcasada | 0 Comments
Attachment(s): EntityDataSource.zip

Entity Framework Feature CTP Preview 2 released (built on top of EF 4 Beta 2)

Just a quick note to let everyone know that an updated version of the EF Feature CTP is now available for Visual Studio 2010 Beta 2. As you can read on the ADO.NET team blog this release includes some great new enhancements for Code Only and Self-Tracking Entities (support for Silverlight 3, databinding support, …).

This new version is from now available here.

Posted by kcasada | 0 Comments
Filed under:

Microsoft Surface – Going below the Surface

After the first episode “Microsoft Surface Computer – Unboxing!”, I am now presenting a sequel I call “Going below the Surface”. I had the chance to assist a service technician in his task to replace the main computing unit of a Surface computer, a chance for me to get to know the “insides” of the Surface, not just from the diagrams.

surface_1

Microsoft sent an entire new computing unit, so the mission was to swap the Surface’s built in PC.

surface_2

First, we had another look at the video explaining the hardware disassembly.

surface_3

The next step was to remove the two head panels, one revealing the ports, the opposite one revealing the computer.

surface_4

A look at the computer’s ports shows five Ethernet ports (to the far left) used to connect to the Surface’s cameras.

surface_5

A look at the unit’s bottom side shows the ventilation system.

surface_5b

Now we started to unplug the damaged unit. We decided that labeling the cables makes sense especially as the six audio cables all look the same.

surface_6

Next we removed the two side panels. Tip: Make a note which is the left and which is the right panel as well as what side is “up” to not confuse them when re-assembling.

surface_7

This gives much better access to all the ports on one side and to the power connector on the other.

surface_8

You can also see the Ethernet cables plugging into the cameras.

surface_9

After a good hour we had the unit reassembled and working again. The Surface computer really is a very nice machine, even “below the Surface”, constructed very solid and of high-quality.

And its insides would make a gorgeous fake bomb in any episode of “James Bond” or “24” for the heroes to disarm in the last 3 seconds of the countdown.

Posted by Saschac | 0 Comments
Filed under: ,

And the winners are…

Yesterday at Shape'09 – The Web Conference, the best Swiss Silverlight applications of the year were accredited with the

recognition – An initiative of Microsoft Switzerland, in cooperation with Best of Swiss Web (BoSW). Claudio Dionisio, president of the BoSW Association, awarded the most innovative, exciting and business relevant Silverlight solutions. The projects were judged by a competent jury, chaired by Prof. Dr. Markus Stolze from the Institute für Software at the Hochschule für Technik in Rapperswil. The jury members especially focused on aspects such as technical innovation and unconventional design. Furthermore, great emphasis was placed on stability, usability and business relevance of the submitted solutions.
From the pool of the submitted projects, the jury awarded the following four solutions with Gold-, Silver- and Bronze- Awards. And the awards go to:

clip_image002[1]

1th Place - sobees web

Contracting Body: sobees

Contractor: sobees

clip_image004

2nd Place - B2B-Connector - E-Commerce Platform Swiss Post

Contracting Body: Die Schweizerische Post, Poststellen und Verkauf

Contractor: Die Schweizerische Post, Informationstechnologie


and


2nd Place - Medical Cockpit

Contracting Body: Solothurner Spitäler AG

Contractor: afca informatik ag

clip_image006

3rd Place - Interaktives Sales Tool

Contracting Body: Siemens Schweiz AG

Contractor: Unic AG

 

On the Shape Web Site, you can find plenty of information about these solutions, the jury members and the criteria they have used to select the winners. Aim of this post is more to honor the great people who are behind these great solution. So, let’s see some pictures :-)

 

sobees web

Sobees

Vincent RITHNER, CTO soobes.com (second from left). In his words:

"Since the beginning of sobees, our plan was clearly to deliver the best applications interacting with social networks and offering the best user experience, both on the desktop and on the web. For us, WPF for the desktop and Silverlight for the web (and SL mobile in the future) represent the best technologies to transform our vision into reality."

Beside Vincent, from left to right:

  • Claudio Dionisio, president of the BoSW Association
  • Prof. Dr. Markus Stolze (BoSS jury president) from the Institute für Software at the Hochschule für Technik in Rapperswil
  • Christof Zogg, Director Developer & Platform Group, Microsoft Schweiz

 

B2B-Connector - E-Commerce Platform Swiss Post

Post

Paolo Casella, SW Architect, Informationstechnologie - Die Schweizerische Post (second from left)

Sergio Aquilini, Senior Developer, Informationstechnologie - Die Schweizerische Post (third from left)

In Paolo’s words:

"At the very start of project our customers expressed very clearly, which were the needs the solution to be developed had to fulfill: multitenant, high accessibility, higher user-experience (usability/ease-of-use), no deploy. The challenge was to combine such customer needs to the technical requirements defined by the existing applications and data-structures: complex data representation (sales-related information, customer information, processes status, use of graphics), combination of different screens at a time (parallel processing of user-tasks), asynchronous data access. Those are the reasons why we came up with the idea of Silverlight."

 

Medical Cockpit

Afca

Paul Affentranger, Geschäftsführer, afca informatik ag (second from left). In his words:

"Silverlight enables us to develop with less complexity modern, attractive and stable user interfaces. The technology supports smooth collaboration between developers and designers, and integrates well to Service Oriented Architecture. "

 

Interaktives Sales Tool

Unic

The UNIC Team with the customer representative from Siemens Schweiz AG. In their words:

"With the new interactive and intuitive Silverlight solution we gain substantial benefits and savings in our customer service."
Bernardo Egli, Marketing Communication Manager, Siemens Schweiz AG, Building Technologies Division

"The extensive basic features of Silverlight allowed us to develop efficiently our user-friendly sales tool for Siemens Switzerland AG."
André Schmid, Director Sales and Consulting Microsoft, Unic AG

Posted by smalle | 0 Comments

Windows Azure Hands-on Lab

Windows Azure will be commercially available in November. To help the future cloud developers move the first steps with the Azure Platform Services, we have developed and Hands-on Lab that touches the key aspects of this new platform.

Last week, about 60 people attended the two sessions in Wallisellen. With this post, we want to give you as well the possibility to implement your first Web Gallery in the Cloud.

In about 3 hours of work, you will learn how to develop your cloud application locally and how to deploy it onto Windows Azure. You will also get familiar with the main concepts of Windows Azure, like the Web Role and the Worker Role, or the three storage types available: queue, table, and blob.

So, if you aim to be a cloud developer for Windows Azure, do not hesitate to click on this link and follow the instructions.

(And if you have any question, just drop a line!)

 

Have fun!

Posted by smalle | 0 Comments
More Posts Next page »
 
Page view tracker