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 »
I just posted an interview on Channel 9 with John Stallo talking about some cool tools in Visual Studio 2008 that will help you build simple N-Tier applications. Thanks to Kathleen again for helping with the shoot! This time we got fancy and used two camera angles ;-):
Building N-Tier Applications in Visual Studio 2008In this in interview John Stallo, a Program Manager on the Visual Basic Team, talks about WCF and simple N-Tier applications. He talks about a specific architecture scenario and some of the pain points we have building n-tier applications today. He then walks us through the improvements made in the DataSet Designer that physically separates the data access from the structure and validation code and then quickly creates a WCF service and a client that demonstrates this architecture.
You'll probably also want to check out the walk-through John posted here as well if you missed it.
And in case you haven't seen it yet, you can view John's picture and bio along with some of the other team members on the Visual Basic Team page.
This is great & John Stallo explains this really well. What would even be greater is showing how LINQ fits into this
This was really useful content. Also, the format you are using with the video/screnn recording are so much nicer than just the screen recording -- it's nice to be able to see the presenter.
The beauty of LINQ is that you can use it in any layer of your application architecture because it's a querying technology that not only works over databases but also in-memory objects (any .NET collection) as well as XML. You can even query over typed datasets. For instance in the example John gave us we could have started writing LINQ queries over the client-side datasets in order to aggregate the order details and display totals to the user.
Watch the LINQ videos to help you get started: http://msdn2.microsoft.com/en-us/vbasic/bb466226.aspx#linq
Thanks for the video...it was useful. I'm curious to know your opinion whether the way we have a n-tier architecture in VS2005 (e.g. Data Table, Table Adapters, DataAccess Layer, Bussiness Object Layer) and the coding behind that, will be vastly different with VS 2008? I understand from the video that the there will be a different physcial file for storing some of the data set information w/ vs2008, but in general will the two versions be different?
The code that gets generated for VS2008 DataSets is different (adds features like the TableAdapterManager for hierarchical updates and also supports LINQ querying) but it is backwards compatible with the way you work with them in VS2005 so you should be able to take advantage of the new version without breaking your code.
There are new ways of accessing your data however, if you do choose to change your architecture. The LINQ to SQL classes and the O/R designer can be used in place of the DataSet but the DataSet is not going away.
Great video. Question: has the sql designer for data/table adapters been cleaned up. In the current VS 2005 version, it is unusable for handling updates and inserts for autoincrement keys and timestamps. Also, the designer chocks when selecting grandchildren of a grandparent. I finally had to build my own code generation tools for configuring data adapters.
Designer chocking SQL examples:
SELECT AccessFlagLookupID, AccessFlag, Description, LastUpdated, LastUpdatedBy, CAST(TS AS INT) AS TS FROM AgencyNET.AccessFlagLookup
INSERT INTO [AgencyNET].[AccessFlagLookup] ([AccessFlag], [Description], [LastUpdatedBy]) VALUES (@AccessFlag, @Description, @LastUpdatedBy);SELECT AccessFlagLookupID, CAST(TS AS INT) AS TS FROM AgencyNET.AccessFlagLookup WHERE (AccessFlagLookupID = SCOPE_IDENTITY())
UPDATE [AgencyNET].[AccessFlagLookup] SET [AccessFlag] = @AccessFlag, [Description] = @Description, [LastUpdated] = getutcdate(), [LastUpdatedBy] = @LastUpdatedBy WHERE (([AccessFlagLookupID] = @Original_AccessFlagLookupID) AND (CAST(TS AS INT) = @Original_TS));SELECT CAST(TS AS INT) AS TS FROM AgencyNET.AccessFlagLookup WHERE (AccessFlagLookupID = @AccessFlagLookupID)
DELETE FROM [AgencyNET].[AccessFlagLookup] WHERE (([AccessFlagLookupID] = @Original_AccessFlagLookupID) AND (CAST(TS AS INT) = @Original_TS))
SELECT V.EndUserFramingVendorEEID, V.EndUserFramingSolutionUrlID, V.VendorEmployeeID, V.LastUpdated, V.LastUpdatedBy, CAST(V.TS AS INT) AS TS
FROM AgencyNET.EndUserFramingVendorEE AS V INNER JOIN
AgencyNET.EndUserFramingSolutionUrl AS F ON V.EndUserFramingSolutionUrlID = F.EndUserFramingSolutionUrlID INNER JOIN
AgencyNET.EndUserWebSite AS W ON F.EndUserWebSiteID = W.EndUserWebSiteID
WHERE W.EndUserID = @EndUserID
C# Version for anyone thats interested