Sharing the goodness…
Beth Massi is a Senior Program Manager on the Visual Studio team at Microsoft and a community champion for business application developers. Learn more about Beth.
More videos »
Where have I been all week! Sheesh! Well I've been heads down doing some "App Building" with the VB team this week testing all the new features of Visual Studio and Visual Basic. I have to say it's looking really good!
I decided to create a typical n-tier business application (I know boring, but reality!) that manages incoming orders for local pizzerias. It has a Winform client that displays a huge (touch) screen of incoming orders to the kitchen. It also has a piece that the pizzeria can use to take orders over the phone and enter them into the system quickly. It can also map out the customer addresses for the delivery people using the MapPoint web services. It uses WCF services, N-tier Datasets, Winforms, MapPoint Web Services, LINQ, SQL-Server 2005 Express so far. I'm actually a newbie on a lot of these features and it's only taken me 2 full days to get the application together and running perfectly. I have to say that Intellisense is so much better and LINQ makes churning through the data extreemely easy and productive. Even the way I design the UI is changing because of LINQ and using it with data-binding.
Now I’m creating the final piece that will be a Silverlight client for customers to order over the web. I built the database so that it can handle multiple stores so I want to display the stores first based on the customer’s address and then they can enter the order. If I can pull this piece off then it will make for a very compelling architecture. Wish me luck ;-)
P.s. I'll post this as an Orcas sample application when all is said and done.
What are your thoughts regarding LINQ as per Rick Strahl's post : http://west-wind.com/weblog/posts/33570.aspx
Did you run into that scenario in your n-tier app?
I didn't run into the problem here because I was using n-tier typed datasets that have a structure. Like Rick mentions, you can serialize an enumeration of your business objects, just not an anonymous type easily, at least in C# ;-). You can get around this in VB using late binding. Something like:
Private Sub Test()
Dim t = Me.RunQuery()
For Each item In t
Private Function RunQuery() As Object
Dim q = From items In Me.CustomerDataSet.Customer _
Select items.Customer_ID, items.Name
Note that it's still an object and you won't get intellisense in the Test method. Dynamic interfaces would have been really really handy in this situation, but alas, they were cut from VB 9 (they are available in the May 2006 LINQ CTP if you want to try them out). That allows you to do this:
Dynamic Interface MyStuff
Name As String
Private Function RunQuery() As MyStuff
That way you can access the item.Name with intellesense in the Test method. Expect to see them in later versions of Visual Basic along with a lot more dynamic features.
Ok cool, thanks for the info.
When will you be posting the n-tier app using LINQ? If you think it is going to be a while, could you please atleast post a rough sketch of your architecture on your blog? I am designing a app using WPF/WCF/LINQ and it would be really useful to see how n-tier should be designed using LINQ. Thanks.