# Tuesday, 07 December 2010

If you are currently invested in LINQ to SQL and want to upgrade to Telerik OpenAccess ORM, with the new OpenAccess Q3 release you can do this quite easily. There is a new wizard included with OpenAccess that will automatically convert your LINQ to SQL classes to Telerik LINQ classes. Let’s take a look.

I’ll start with a simple project that has a simple LINQ to SQL model in it: Northwind.dbml. It is mapped to the Northwind database tables.

image

I created a simple web form that has a GridView on it. I decided that I would try to stump the wizard by writing a complex LINQ statement, one with aggregates, joins, sums, and projections to anonymous types. Then I take that code and bind it to the GridView. The LINQ code is shown here. 

   1:  //DataContext
   2:  NorthwindDataContext dat = new NorthwindDataContext();
   3:  //LINQ Query to Aggergate and Group by to an new type
   4:  var result = from i in
   5:                      (
   6:                      from c in dat.Customers
   7:                      join o in dat.Orders
   8:                      on c.CustomerID equals o.CustomerID
   9:                      select new { c.Country, o.Freight }
  10:                      )
  11:                  group i by new { i.Country } into g
  12:                  select new { g.Key.Country, TotalAmt = g.Sum(f => f.Freight) };
  13:              
  14:  //bind the results
  15:  GridView1.DataSource = result;
  16:  GridView1.DataBind();

Results are shown here:

image

 

Conversion time. Doing the convert is simple and done in place. Just right click on the LINQ to SQL model and choose “Convert From L2S Model to Domain Model” from the context menu.

image

 

This will bring up the OpenAccess Conversion wizard. In reality the wizard is one page. If you accept the defaults, the wizard will create a new RLINQ file (Telerik OpenAccess LINQ file) and give it the same Name and Namespace as the LINQ to SQL model. In addition, it will backup the old files.

image

 

Accepting all of the defaults and clicking next brings you to the confirmation page.

image

 

From here click Finish and the wizard will do its work. You will see a conversion report come up.

 

image

Now you will have a new OpenAccess Domain Model in your project.

image

 

Since your project now has two identically names LINQ classes, it is time to delete the LINQ to SQL class. (Don’t worry it is backed up.) Without changing any code in my application, I press F5 and the project runs, but now using Telerik OpenAccess.

Enjoy!

image

posted on Tuesday, 07 December 2010 08:56:30 (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Monday, 06 December 2010

I recently wrote a piece in DevProConnections on the recent advances in ORM technologies. While I am still not a complete convert to ORMs, I think that they can play an important role in your application development toolkit. As time progresses and we abstract the database even more, ORMs will become more and more common. You can read the piece here.

posted on Monday, 06 December 2010 16:03:28 (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Friday, 03 December 2010

Back at the PDC 2009 in Los Angeles, CA, Brian Goldfarb showed off the “Microsoft Silverlight Client for Facebook Beta”. It was released by Microsoft in early 2010 and had millions of downloads for both Windows and the Mac. Over the past few months, the Facebook app has been further developed by Telerik and is now available as the first official version under its new name: Telerik f!acedeck.

SNAGHTMLc83121

Telerik has taken over the application from Microsoft and will continue its further development and support as a free application for everyone to enjoy. Telerik f!acedeck delivers a superior experience to Facebook users and offers unique features: such as drag-and-drop from the local file system, access to the video camera,  instant loading and smooth scrolling of the Facebook wall, notifications and chat.

SNAGHTMLd71d44

Telerik f!acedeck Client for Facebook is immediately available from its original location on Microsoft’s website (http://www.silverlight.net/content/samples/apps/facebookclient) as well as from Telerik’s website (http://facedeck.telerik.com). The product is free and works on both Windows and Mac OS operating systems with the Silverlight 4 plugin installed.

Enjoy!

posted on Friday, 03 December 2010 07:37:31 (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Thursday, 02 December 2010

Miguel Castro: Introduction to MVVM

Subject:
You must register athttps://www.clicktoattend.com/invitation.aspx?code=152298 in order to be admitted to the building and attend.
WPF overwhelmed us with the most powerful data binding ever released in a development platform. It seemed there was so much to learn in order to use it, but it really isn't that complicated. However, to use it to its full potential, you really do need to introduce the Model-View-ViewModel pattern. The ideas and goal around this pattern seem to vary from person to person, but the one thing that they all share is that it provides a point of binding for XAML pages. In this session, I'll show you what MVVM is and how to use it and what to put in it, in order to get maximum potential out of XAML binding. I'll even show you how to get a small MVVM Framework going for sharing across all your applications.

Speaker:
Miguel Catstro, IDesign
< Miguel Castro is an architect with IDesign with over 22 years of experience in the software industry. He’s a Microsoft MVP, member of the INETA Speakers Bureau, and ASP Insider. With a Microsoft background that goes all the way back to VB 1.0 (and QuickBasic in fact), Miguel has spoken at numerous user groups, code camps, and conferences throughout the US and overseas. He has also been featured on the technology talk shows, .NET Rocks, .NET Rocks-TV, Microsoft’s ARCast (Architecture Podcast), and The Polymorphic Podcast on numerous occasions. He specializes in architecture and development consulting and training using Microsoft technologies. Miguel is also a regular author with CoDe Magazine.

Date:
Thursday, December 16, 2010

Time:
Reception 6:00 PM , Program 6:15 PM

Location: 
Microsoft , 1290 Avenue of the Americas (the AXA building - bet. 51st/52nd Sts.) , 6th floor

Directions:
B/D/F/V to 47th-50th Sts./Rockefeller Ctr
1 to 50th St./Bway
N/R/W to 49th St./7th Ave.

posted on Thursday, 02 December 2010 10:06:12 (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Sunday, 21 November 2010

While I was on the road this past month, I caught up with Richard and Carl and appeared on a show of .NET Rocks. The show is about design and developers and featured Scott Stanfield, Lino Tadros, and myself. You can listen here.

posted on Sunday, 21 November 2010 01:57:35 (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Saturday, 13 November 2010

Thursday, November 18, 2010
Windows Workflow 4 - Patterns, Practices and Usages

Subject:
You must register athttps://www.clicktoattend.com/invitation.aspx?code=150257 in order to be admitted to the building and attend.
Everybody who writes code wants to build great software. If that software is a server application, part of being great is scaling well, handling large loads without consuming too many resources. A great application should also be as easy as possible to understand, both for its creators and for the people who maintain it. Achieving both of these goals isn’t easy. Approaches that help applications scale tend to break them apart, dividing their logic into separate chunks that can be hard to understand. Achieving this is a primary goal of Windows Workflow Foundation (WF). This session covers some basic concepts , windows workflow 4 architecure , its best patterns and usages.
Session Includes:
1. Workflow Architecture , business problems and technical case for using workflow.
2. Best Patterns and Practices.
3. Hosting using AppFabric and IIS , contract base routing.
4. Parallel Programming in Windows Workflow.
5. Workflow as a service model.

Speaker:
Navneet Srivastava, Emerging Health Information Technology
Navneet is lead architect and manager of engineers in the Product Development division of Emerging Health Information Technology, a subsidiary of Montefiore Medical Center in the Bronx. He oversees design and development of the breakthrough clinical intelligence application, Clinical Looking Glass, employing cutting edge Microsoft technologies and a host of best practices. In past positions, Navneet has developed other healthcare applications with national distribution.

Date:
Thursday, November 18, 2010

Time:
Reception 6:00 PM , Program 6:15 PM

Location: 
Microsoft , 1290 Avenue of the Americas (the AXA building - bet. 51st/52nd Sts.) , 6th floor

Directions:
B/D/F/V to 47th-50th Sts./Rockefeller Ctr
1 to 50th St./Bway
N/R/W to 49th St./7th Ave.

posted on Saturday, 13 November 2010 13:49:43 (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Friday, 05 November 2010

At TechEd Europe 2010 in Berlin, I will be doing three breakout sessions and one panel discussion: Silverlight v HTML5.

My breakout sessions are:

  • Scrum, but
  • Agile Estimation

This is the first time I am formally doing the Scrum, but session, however, Joel and I did it at TechEd North America at our pre-con. We’ll (I invited Joel, even though he is not an “official” speaker to do the session with me) walk the audience through a few slides about Scrum, Kanban, XP and “Agile is about values, not rules” and the “buffet table” approach. After about 10 minutes of us blabbing, we will open it to questions. We are prepared to speak about four scenarios: Scrum/Agile in the Enterprise, Consulting, Remote (and outsourced) teams, and ISVs. Should be fun, and interactive! Bring lots of questions!!!

The Agile Estimation talk is a repeat of my talk last year and we are doing it twice since there is a lot of demand.

The session times are below. When I am not doing sessions, I will be at the Telerik Booth. You can find us at E 83+E84, very close to where we were last year. I’ll be glad to talk to you about the sessions, agile in general, or the Telerik tools. If you check out our CTP of WP7 controls now, we have a special offer for you: As a special gift to all TechEd Europe attendees visiting our booth, you will receive a free license of these controls once they are finally released, if you download the CTP now.

See you in Berlin! Winking smile

Code

Session

Day

Time

DPR301

Scrum, but

Breakout Session

Stephen Forte

Having challenges implementing Scrum in your organization? Have you been using Scrum but need to bend the rules to make it work in your organization? Do you practice a little Scrum with a mix of Kanban? Then this session if for you! Come and learn about implementing Scrum, but with a few changes. We'll look at customizing Scrum in your environment and look specifically at how to implement Scrum for the enterprise, ISVs, consulting and remote teams.

Tuesday, November 9

2:30 PM - 3:30 PM

DPR201

Agile Estimation

Breakout Session

Stephen Forte

We’re agile, so we don’t have to estimate and have no deadlines, right? Wrong! This session will review the problem with estimations in projects today and then give an overview of the concept of agile estimation and the notion of re-estimation. We’ll learn about user stories, story points, team velocity, and how to apply them all to estimation and iterative re-estimation. We will take a look at the cone of uncertainty and how to use it to your advantage. We’ll then take a look at the tools we will use for Agile Estimation, including planning poker, Visual Studio TFS and much more.

Thursday, November 11

12:00 PM - 1:00 PM

DPR201 (R)

Agile Estimation (repeat)

Breakout Session

Stephen Forte

We’re agile, so we don’t have to estimate and have no deadlines, right? Wrong! This session will review the problem with estimations in projects today and then give an overview of the concept of agile estimation and the notion of re-estimation. We’ll learn about user stories, story points, team velocity, and how to apply them all to estimation and iterative re-estimation. We will take a look at the cone of uncertainty and how to use it to your advantage. We’ll then take a look at the tools we will use for Agile Estimation, including planning poker, Visual Studio TFS and much more.

Thursday, November 11

6:00 PM - 7:00 PM

posted on Friday, 05 November 2010 04:16:58 (Eastern Standard Time, UTC-05:00)  #    Comments [2] Trackback
# Thursday, 04 November 2010

There has been a lot said about the HTML5 v Silverlight debate in recent days. We have a very timely BOF session at TechEd Europe next week on this very topic. Join Tomislav BronzinMauro Sant'Anna, Joel Semeniuk, David YackDaron Yondem, and myself for a smack-down no holds barred panel discussion on Tuesday November 9th. It will be moderated by Tim Huckaby.

BOF10: Silverlight vs. HTML5 - Interactive Panel

Tuesday, November 9  1:20 PM - 2:05 PM

Join Tim Huckaby as he moderates a distinguished panel of Microsoft Regional Directors and some other pillars of the industry in a interactive panel discussion around the issues, excitement, bold promise and confusion around SilverLight and HTML5.

posted on Thursday, 04 November 2010 03:55:06 (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback