# Wednesday, November 11, 2009

For me at least. After delivering three sessions at TechEd Europe, I have to turn around and head home and then turn around and head out to the PDC (I have an agile birds of a feather session there, more info later.)

It was great speaking and I also helped out at the Telerik booth. During the slow time, the whole team took a break and were brave enough to trust me to manage the booth all by myself. (I did not break anything!)

See you all next year!

posted on Wednesday, November 11, 2009 8:51:26 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Tuesday, November 10, 2009

Last summer Telerik released the Oslo Comparison and Migration Tool. It is a tool that is available free for the community. It allows you to compare two Microsoft code named “M” files, see a visual diff, and then merge the results. (M is the code name for a new data modeling language from Microsoft.)

Telerik has expanded the tool to allow comparison of items in the SQL Server “Repository” and then do the same visualdiff and them merge the schema. Developers who have been playing with the M language and repository will find it very useful to have a tool that will allow comparisons and migrations, since the requirements of our applications are always changing! :) Pretty cool.

Just a note: Telerik will be updating the tool as soon as Microsoft makes some “M” and SQL Server “Repository” related announcements next week at PDC. Stay tuned!

posted on Tuesday, November 10, 2009 1:34:25 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Monday, November 9, 2009

I am in Berlin for TechEd 2009 while Germany is celebrating the 20th anniversary of the Berlin Wall falling. Today most of us take for granted the society we live in, however, when I was growing up Eastern Europe was “the enemy”, all colored red on a map. We were not free to do business with the “eastern block”, nor were we allowed to visit without permission. Today that is all gone and I now work for a company that was behind the “iron curtain”, a company that would never have existed if the Berlin Wall did not fall.

Last night we walked down by the Brandenburg Gate and downtown Berlin. I listened to amazing stories from my colleague at Telerik, Jan Blessenohl. Jan is German and was in university in 1989. On November 9th, he actually traveled to East Berlin to buy some cheap textbooks when the protests overwhelmed the Berlin Wall and when it fell he was right there at the Brandenburg Gate standing on the wall, a part of history.

It is amazing to be here today…

Update 1

The speaker gift at TechEd was a piece of the Berlin Wall!

Update 2 (Photos!)

I went to the Brandenburg Gate area near Potsdamplatz this evening to watch the ceremonies. What was really cool was that there were 1,000 foam dominos lined up to fall, each decorated by 1,000 artists around the world. Because there were 1,000 of them and it was pouring rain, I got to get up close to them and take lots of photos.

IMG_0765

Also a photo of the Brandenburg Gate:

IMG_0768

posted on Monday, November 9, 2009 4:25:15 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Saturday, November 7, 2009

Next week I will be speaking at one of my favorite events, TechEd Europe, this year held in Berlin. While Barcelona is still my favorite city in the world, I am glad that we are in Berlin this year, since Monday is the 20th anniversary of the Berlin Wall falling, and our world changing forever.

I will be speaking on:

I speak on Tuesday and Wednesday, and the event is SOLD OUT. I hope you were lucky enough to get a ticket. I’ll be hanging out at the Telerik booth when I am not speaking if you want to come and say hi.

image

Technorati Tags: ,
posted on Saturday, November 7, 2009 3:17:24 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Friday, November 6, 2009

I have been supporting PalDev, the first (and I think only) .NET User Group in Palestine for many years. It started as a vision of Jihad Hammad a friend of mine, about 6 years ago. Goksin Bakir, Malek Kemmu, and some others in the community have also rallied behind PalDev.  This is a user group that had its first meeting in a refugee camp, then moved to Al-Quds Open University. Now they have almost 200 members and just helped launch Windows 7 and organize Microsoft’s first ever TechDays in Palestine.

The event was a great success, held over three days in three cities in Palestine. Attendance at the first day in Hebron, was about 250. Goksin was suppose to speak at the event but did not have the proper visas and was turned away at the border, so he went to Jordan and did a LiveMeeting!

This is a region with a tremendous amount of political instability, to say the least. I encourage all members of the community to help out, contact Jihad and do a session via LiveMeeting, or travel to Palestine and deliver a talk. You won’t regret it and you will do more to bring peace to the Middle East then all of those politicians out there.

You can read Jihad’s post here.

img02

 

Technorati Tags:

posted on Friday, November 6, 2009 3:19:44 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Thursday, November 5, 2009

I am in Hong Kong speaking at the Hong Kong International Computer Conference. It is a great conference, it focuses on IT as a driver for innovation and economic transformation. I was lucky enough to be doing one of the keynote presentations on how technology is so disruptive and how cloud computing changes entrepreneurship. In my talk I mention Ray Kurzweil’s Abstraction of Moore's Law, which can be summarized as saying that the next 20 years will see as much technological innovation as the past 100.

I represented Microsoft Hong Kong in this talk, and after the speech lots of people came up to me to chat. I got to talk to tons of folks at the conference: I got to talk to students and professors at Hong Kong University, the folks from One Laptop per Child, entrepreneurs (including a dude building some amazing robotics), people form NGOs, and local software developers. We got to talking about how the new technology reality has drastically changed business models. Think about digital media, the music industry has changed forever, old business models just don’t work anymore.

This got me thinking. Microsoft recently announced a great offer for Visual Studio Ultimate (yet another SKU). But the world has changed. Web 2.0 is here! So I say: All SKUs of Visual Studio should be free.The goal should be to get Visual Studio out to everyone, for free. I know that we have Express versions of these products, and for the most part, they are very capable, but I mean the real deal, Visual Studio Ultimate.

Now I know what you are thinking: Steve, have you gone soft on me?

Of course not.  I am still a disciple of Milton Friedman and a firm believer of free markets and economic incentives. But that does not mean you have to actually sell something to make money on it. I am thinking of Visual Studio 2.0.

For example, there are four versions of Visual Studio as far as I can tell. (And the fact that I have no idea is a problem.) There are the free express versions, Professional, Premium, and (the new SKU) Ultimate.

image

Microsoft should do away with all versions and give away Ultimate (without MSDN) to anyone who wants it. My mom could go and download it if she wanted to. Just have to provide some demographic information and have a Live ID.

The startup page in Visual Studio would be ad supported (and you can’t make it go away, so you will see it each time you load Visual Studio.)  I could see Telerik or our competitors wanting to sponsor that page-but not in a “pay us a million dollars model”, rather as a pay per conversion model. Basically Telerik and our competitors would pay a small fee to be on the startup page and be able to stream ads to the developers and each Telerik license sold, Microsoft takes a cut.  Note to Microsoft, since this was my idea, can Telerik have an exclusive on that page? :)

In addition, in exchange for the free Visual Studio, Microsoft will get anonymous data from the developers. What country you are in, the specs of the developer machine, installation experience, etc. Also how many projects were started in C# v VB v F#, etc. Silverlight v Web, etc. Imagine if Microsoft knew all of this data!! I want to know how many lines of C# code in Brazil were written for Windows Forms last week.

Microsoft can then sell ad space based on your environment. Think about a C# developer in Poland working mostly on Silverlight. On the startup page next time there are offers (in Polish) for Silverlight tools, conferences, books, or even job offers. How much would Dell pay to market to every developer in Australia with Visual Studio installed on an “underpowered” machine? The vendor would only know who you are if you actually clicked on the offer.

Microsoft can also make money by using Visual Studio as a sales engine for MSDN. MSDN does not really have a “sales force” and Visual Studio can be a “loss leader” for MSDN.

But MSDN’s business model would have to change as well. Why not have MSDN (not the software part) evolve into a Visual Studio based Facebook/Linkedin social network for developers. You can only get into your “MSDNFacebook” via Visual Studio. When you are coding, Visual Studio can automatically update your status (Stephen Forte is currently breaking the build….) Imagine hitting F1 and be brought to a MSDN forum search on that line of code as one option. Every .NET developer in the world would be a member of this social network! Want to find a user group? No problem! Imagine the collaboration opportunities. A whole new world of revenue opportunities would open up to Microsoft, including an IPO of MSDNFacebook! :)

In addition, the MSDN software pricing model would change. Microsoft can sell fractional MSDN licenses and specialize MSDN for local markets and different developer types. Maybe you only want MSDN for Web Development. MSDN is expensive since it includes big things like Windows Server and Exchange, etc. (I have never installed Exchange, nor will I ever do so.)  Maybe you can have MSDN options where that is excluded. Kind of like a menu where you customize just want you want and pay only for what you use. Sell more with less. (Sound familiar?)

Of course if you want the ads and the anonymous data collection turned off, you can pay an annual fee. If your employer is paying that annual fee, they can opt out of certain content, such as a job offer coming your way, etc.

Visual Studio 2.0 would be awesome. Developers get free software and more collaboration, vendors get to tap into the entire ecosystem, and Microsoft makes more money while collecting a tremendous amount of metrics, metrics that will drive new features, service packs, etc.

Maybe this will be one of the great announcements next week at the PDC……..

posted on Thursday, November 5, 2009 6:56:41 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Wednesday, November 4, 2009

Tomorrow I will be speaking at the 2009 edition of the Hong Kong International Computer Conference. This year’s theme is on Value Creation and Economic Transformation via IT. When they asked me to put together a session, I jumped on the idea of how Cloud Computing has changed the economics of start-ups and entrepreneurship. 

I started Corzen, my last company, in 2002. We got started for around $250,000. About $75,000 of that was on building out a data center. I am a software guy, so this also took a lot of my time. In 2010, I can have more processing power, more storage, and more free time for around $99 a month from Windows Azure or Amazon EC2. Think about what this will mean, it will be much easier to start a new business in the future.

The implications of this are staggering. The late 90s was always considered the golden age of start-ups since funding was so “easy” in the .com boom. Now you can start your own business for less than $20,000! We’ll see a ton of new businesses pop up in all industries. Since you won’t need investment to get started and most entrepreneurs will use their own money, the start-ups will have tons of passion.

Innovation will take a great leap forward in the next decade. Cloud Computing will lead the way.

image

posted on Wednesday, November 4, 2009 1:43:02 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Tuesday, November 3, 2009

I have a simple demo application that uses ADO.NET Data Services as a data service back end for a Silverlight application.  My ADO.NET Data Service uses the Entity Framework to map the Northwind database tables of Customers, Orders, and Order Details. Once the Silverlight applications sets a service reference to the ADO.NET Data Service, you can use the client side LINQ libraries to build your application. My application looks like this, it has a drop down filled with customers, a grid with Order and a grid with Order Details. As you click on each one, it will filter the rest.

image

The LINQ statement for the drop down looks something like this:

   1:  //this uses the LINQ to REST proxy (servicereference1)
   2:  NorthwindEntities dat = new NorthwindEntities(
   3:      new Uri("Northwind.svc", UriKind.Relative));
   4:   
   5:  //linq query to get customers in ComboBox
   6:  var customers = from c in dat.Customers
   7:                  orderby c.CustomerID
   8:                  select c;

 

Pretty basic LINQ stuff. What I would like to do next is bind my drop down combobox to customers. There is one catch, since we are in Silverlight, this processing has to be done asynchronously, so that data binding code has to be done elseware.

There are a few ways to do this, the most straight forward it to set a delegate and catch an event, etc. Another is to use a code block and catch the event right in the same method.

While both of these solutions are fine, I don’t like them. I don’t like them because they look funny and pollute my data access code with tons of async communication stuff. Lastly, for each area where we have a LINQ statement, we have a lot of repetitive similar looking code. Every bone in my body wants to make that generic and only call it once.

Enter the AsyncLINQManager class I wrote. Forget about the details of this class for now, I will list it below in full. For now let’s show how to use the LINQ statement with the helper. First you have to create an instance of the AsyncLINQManager and then register an event. (No getting around the events!) You can do this in the page load handler:

   1:  //ref to the linq manager
   2:  alm = new AsyncLINQManager();
   3:  //register an event so we can do the databinding
   4:  alm.OnEntityFetched += Page_OnEntityFetched;

Now your LINQ statement needs one more line of code. Here is the same LINQ statement from above, passing customers to the AsyncLINQManager:

   1:  //this uses the LINQ to REST proxy (servicereference1)
   2:  NorthwindEntities dat = new NorthwindEntities(
   3:      new Uri("Northwind.svc", UriKind.Relative));
   4:   
   5:  //linq query to get customers in ComboBox
   6:  var customers = from c in dat.Customers
   7:                  orderby c.CustomerID
   8:                  select c;
   9:  //call async functions for the linq query
  10:  alm.LinqAsync(customers);

Line 10 is the only new line of code. Now the LINQ manager will take care of all of the async processing for us and we just have to put our data binding code in Page_OnEntityFetched() shown here:

   1:  //this event handler will do the actual databinding
   2:  void Page_OnEntityFetched(EntityEventArgument args)
   3:  {
   4:      switch (args.TypeName) //we get this info from the event
   5:      {
   6:          case "Customers":
   7:              CustomerCbo.ItemsSource = args.returnedList;
   8:              break;
   9:          case "Orders":
  10:              dg.ItemsSource=args.returnedList;
  11:              break;
  12:          case "Order_Details":
  13:               dg_Details.ItemsSource = args.returnedList;
  14:              break;
  15:   
  16:      }
  17:  }

 

You will notice that we do all of our data binding here, for all of our LINQ statements. This is the value of the AsyncLINQManager, now all of my binding code is in the same place. (I am sure that there will be some who disagree, but hey, build a better AsyncLINQManager and blog about it and I will link to it. :) )

So let’s take a look at the code to query the orders, you will notice that it will call the same LINQ manager and then have to come back to Page_OnEntityFetched() to do the binding:

   1:  //orders
   2:  private void AsyncBindOrdersCbo(string customerid)
   3:  {
   4:   
   5:  //this uses the LINQ to REST proxy (servicereference1)
   6:  NorthwindEntities dat = new NorthwindEntities(
   7:      new Uri("Northwind.svc", UriKind.Relative));
   8:   
   9:  //linq query to filter the Orders in the grid
  10:  var orders = from o in dat.Orders
  11:               where o.Customers.CustomerID == customerid
  12:               orderby o.OrderDate
  13:               select o;
  14:   
  15:      alm.LinqAsync(orders);
  16:   
  17:  }

What I really  like is that you can go ahead and write a simple LINQ statement like you are use to, pass the result to the AsyncLINQManager for processing and then just have one event handler take care of all of your data binding. To me, your code is more clean and your developers can code the LINQ statements almost like normal (minus that one extra line of code) and forget about all of the async stuff.

The code for the AsyncLINQManager is here. All it is doing is sending out the async request, catching it, and then returning an IList and object name in the event args.

   1:  using System;
   2:  using System.Linq;//for IQueryable
   3:  using System.Data.Services.Client;//for DataServiceQuery
   4:  using System.Collections;//for ILIST
   5:   
   6:  namespace LinqUtilities
   7:  {
   8:      //ASYNC Linq stuff
   9:      public class AsyncLINQManager
  10:      {
  11:          //see the EntityEventArgument class below for the event args
  12:          public delegate void EntityFetchCompleted(EntityEventArgument args);
  13:          //developer must register this event in the UI code to catch the IList
  14:          public event EntityFetchCompleted OnEntityFetched;
  15:   
  16:          //pass in linq query object for execution
  17:          public void LinqAsync<T>(IQueryable<T> qry)
  18:          {
  19:              //generic async call to start the linq query
  20:              DataServiceQuery<T> dsq = (DataServiceQuery<T>)qry;
  21:              //Call the code async and assign OnFetchComplete to handle the result
  22:              dsq.BeginExecute(OnFetchComplete<T>, dsq);
  23:           }
  24:   
  25:          //method to handle the async result
  26:          void OnFetchComplete<T>(IAsyncResult result)
  27:          {
  28:              //catch the status of the async call
  29:              DataServiceQuery<T> dsq =(DataServiceQuery<T>)result.AsyncState;
  30:              //if we are done, then stuff the data into a untyped List
  31:              if (OnEntityFetched != null)
  32:              {
  33:                  //delegate for event
  34:                  OnEntityFetched(new EntityEventArgument
  35:                                 { returnedList = dsq.EndExecute(result).ToList() });
  36:              }
  37:          }
  38:   
  39:      }
  40:      
  41:      
  42:      //event args class for the event on the client to 
  43:      //see what linq query they are handling
  44:      public class EntityEventArgument : EventArgs
  45:      {
  46:          public IList returnedList { get; set; }
  47:          public string TypeName
  48:          {
  49:              get { return returnedList.Count == 0 ? string.Empty : returnedList[0].GetType().Name; }
  50:          }
  51:   
  52:      }
  53:  }

You can download the sample code and the AsyncLINQManager code from my “DataAccess Hacks and Shortcuts” session demos here.

Enjoy!

Technorati Tags: ,,
posted on Tuesday, November 3, 2009 4:42:33 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback