Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sofia, Bulgaria | 9-10 October Datasets, Business Objects or Just LINQ Sahil Malik www.winsmarts.com Prerequisites for this presentation: 1).NET 2) Lots.

Similar presentations


Presentation on theme: "Sofia, Bulgaria | 9-10 October Datasets, Business Objects or Just LINQ Sahil Malik www.winsmarts.com Prerequisites for this presentation: 1).NET 2) Lots."— Presentation transcript:

1 Sofia, Bulgaria | 9-10 October Datasets, Business Objects or Just LINQ Sahil Malik Prerequisites for this presentation: 1).NET 2) Lots of coffee. Level: Intermediate Sofia, Bulgaria October 10th

2 Sofia, Bulgaria | 9-10 October A little bit about me. MVP C# INETA Speaker telerik Evangelist Book Author X 3 Article Author X n Site: Blog: blah.winsmarts.com MVP C# INETA Speaker telerik Evangelist Book Author X 3 Article Author X n Site: Blog: blah.winsmarts.com

3 Sofia, Bulgaria | 9-10 October A bit about what I will talk about.. This presentation is all about practical tips, technology applied rather than technology presented. The case for disconnected data Mechanisms to represent disconnected data DataSets and Business Objects Stand in.NET 2.0, and compare the two Code Examples. And what happens when you throw the future in the mix? This presentation is all about practical tips, technology applied rather than technology presented. The case for disconnected data Mechanisms to represent disconnected data DataSets and Business Objects Stand in.NET 2.0, and compare the two Code Examples. And what happens when you throw the future in the mix?

4 Sofia, Bulgaria | 9-10 October The two halves of data access

5 Sofia, Bulgaria | 9-10 October The Connected Pessimistic Concurrency. Keeping a connection open – while u wait !! A much lower possibility of concurrency conflicts. Simpler/More Straightforward. Pessimistic Concurrency. Keeping a connection open – while u wait !! A much lower possibility of concurrency conflicts. Simpler/More Straightforward.

6 Sofia, Bulgaria | 9-10 October The Connected – Lets be Practical! If amazon.com maintained an open database connection, for every visitor on their site. About 40 million visitors a day At an average, lets assume that each visitor were to stay online for 5 minutes. Lets to be fair, assume, no connection pooling. If amazon.com maintained an open database connection, for every visitor on their site. About 40 million visitors a day At an average, lets assume that each visitor were to stay online for 5 minutes. Lets to be fair, assume, no connection pooling.

7 Sofia, Bulgaria | 9-10 October Connected – GEE WHIZ!! Total number of average open connections 40,000,000 / (24 * 60/5) = 312,500 Total licensing cost on an Oracle database – Ouch amount of $. Total licensing cost on SQL Server – Also an Ouch amount of $. And dont forget the nuclear power plant to run your servers. Total number of average open connections 40,000,000 / (24 * 60/5) = 312,500 Total licensing cost on an Oracle database – Ouch amount of $. Total licensing cost on SQL Server – Also an Ouch amount of $. And dont forget the nuclear power plant to run your servers.

8 Sofia, Bulgaria | 9-10 October Connected – But its not just about $ What about a distributed architecture? Web Services? Disconnected Salesman? The whole UDDI concept – a.k.a. Microsoft and IBMs idea for World Piece. What about a distributed architecture? Web Services? Disconnected Salesman? The whole UDDI concept – a.k.a. Microsoft and IBMs idea for World Piece.

9 Sofia, Bulgaria | 9-10 October DisconnectedDisconnected Connect Read Disconnect Others may use your connection. Work on your data Re Connect Submit Changes Disconnect Connect Read Disconnect Others may use your connection. Work on your data Re Connect Submit Changes Disconnect

10 Sofia, Bulgaria | 9-10 October Demo #1 The difference connection pooling makes.

11 Sofia, Bulgaria | 9-10 October Connection Pooling IDbConnection

12 Sofia, Bulgaria | 9-10 October Disconnected Architecture conn

13 Sofia, Bulgaria | 9-10 October Disconnected Data Two choices Business Objects The DataSet family. Two choices Business Objects The DataSet family.

14 Sofia, Bulgaria | 9-10 October Business Objects - Pros A class instance that holds your data, and represents it in a semi structured hierarchical fashion that is specific to your domain. You can put smarts in your business object. Your business object means something – its not a dumb bucket of data. A class instance that holds your data, and represents it in a semi structured hierarchical fashion that is specific to your domain. You can put smarts in your business object. Your business object means something – its not a dumb bucket of data.

15 Sofia, Bulgaria | 9-10 October Business Objects - Cons You have to write them You loose the basic ability to work with data Sorting Searching Filtering Your business objects, are a complete reinvention, in every system you will ever work on. You have to write them You loose the basic ability to work with data Sorting Searching Filtering Your business objects, are a complete reinvention, in every system you will ever work on.

16 Sofia, Bulgaria | 9-10 October The DataSet family - Pros Built into the framework. You dont have to write it. Comes with a decent ability to search/sort/filter etc. You can even add limited smarts to your DataSet by adding partial classes or strongly typing the DataSet. Built into the framework. You dont have to write it. Comes with a decent ability to search/sort/filter etc. You can even add limited smarts to your DataSet by adding partial classes or strongly typing the DataSet.

17 Sofia, Bulgaria | 9-10 October The DataSet family - Cons Limited smarts Its really just a dumb bucket of data. Not semi-structured or hierarchical Just rows and columns. Limited smarts Its really just a dumb bucket of data. Not semi-structured or hierarchical Just rows and columns.

18 Sofia, Bulgaria | 9-10 October Active BO versus Passive Dataset Passive Less work Your application keeps your data clean Lower impedance mismatch with the database Easy SOA, more distributed. Passive Less work Your application keeps your data clean Lower impedance mismatch with the database Easy SOA, more distributed. Active More work Your data keeps your application clean Higher impedance mismatch with the database SOA is tougher, less distributed.

19 Sofia, Bulgaria | 9-10 October DataSet or BO? So are you more of a DataSet person? Or a Business Object person? WHAT AN AWFUL CHOICE TO MAKE!! On one hand I loose the ability to validate and represent my data. On the other, I loose searching/sorting, and have to perform a lot of work translating to and from the underlying data store. Which is why I am looking forward to ADO.NET vNext and LINQ. So are you more of a DataSet person? Or a Business Object person? WHAT AN AWFUL CHOICE TO MAKE!! On one hand I loose the ability to validate and represent my data. On the other, I loose searching/sorting, and have to perform a lot of work translating to and from the underlying data store. Which is why I am looking forward to ADO.NET vNext and LINQ.

20 Sofia, Bulgaria | 9-10 October SO WHAT DOES LINQ*.* GIVE YOU? Hmmmmm …..

21 Sofia, Bulgaria | 9-10 October BEFORE WE ANSWER THAT Tell me, which car do you like better? FerrariHonda Civic

22 Sofia, Bulgaria | 9-10 October BEFORE WE ANSWER THAT Tell me, which car do you like better? Business Objects based ArchitectureDatasets based Architecture

23 Sofia, Bulgaria | 9-10 October WHAT DOES VNEXT GIVE YOU? vNext = LINQ, LINQ2SQL, LINQ2Dataset, LINQ2Entity, ADO.NET eF Business Objects based ArchitectureDatasets based Architecture

24 Sofia, Bulgaria | 9-10 October HOW DOES VNEXT GIVE YOU.. vNext = LINQ, LINQ2SQL, LINQ2Dataset, LINQ2Entity, ADO.NET eF Business Objects based ArchitectureDatasets based Architecture

25 Sofia, Bulgaria | 9-10 October vNextvNext.. Makes working with Business Objects easier. LINQ ADO.NET eF LINQ to Entity LINQ to SQL.. Makes working with Datasets easier. LINQ to DataSet.. Makes working with Business Objects easier. LINQ ADO.NET eF LINQ to Entity LINQ to SQL.. Makes working with Datasets easier. LINQ to DataSet

26 Sofia, Bulgaria | 9-10 October Demo #2 How LINQ makes working with Business Objects easier.

27 Sofia, Bulgaria | 9-10 October Demo #3 LINQ to DataSet – How does that help?

28 Sofia, Bulgaria | 9-10 October ADO.NET vNext –high level overview Its about bridging the conceptual and logical model. The 4 models Its about bridging the conceptual and logical model. The 4 models PresentationConceptualLogicalPhysical

29 Sofia, Bulgaria | 9-10 October ADO.NET vNext –high level overview Database Conceptual Schema / Client Views Your Business Logic

30 Sofia, Bulgaria | 9-10 October ADO.NET vNext –high level overview This mapping in done in various XML Files.ssdl Logical Schema.csdl Conceptual Schema.msl The Mapping

31 Sofia, Bulgaria | 9-10 October EDM – Entity Data Model Entities Relationship Inheritance is a relationship when tested against a base entity type. Complex Types Entities Relationship Inheritance is a relationship when tested against a base entity type. Complex Types

32 Sofia, Bulgaria | 9-10 October Logical Schema - ssdl

33 Sofia, Bulgaria | 9-10 October Conceptual Schema - csdl

34 Sofia, Bulgaria | 9-10 October Mapping - msl

35 Sofia, Bulgaria | 9-10 October What about DLINQ? Its called LINQ to SQL now You can use it where the logical model and the conceptual model are the same. Further Reading ADO.NET vNext CTP DLINQ and LINQ Its called LINQ to SQL now You can use it where the logical model and the conceptual model are the same. Further Reading ADO.NET vNext CTP DLINQ and LINQ

36 Sofia, Bulgaria | 9-10 October A bit about release dates.NET 2.0.NET 3.0 WF/WCF/WPF/Cardspace SharePoint 2007 Vista All this stuff Orcas,.NET vNext, ADO.NET vNext, LINQ *.* CLR 2.0 Nov 2005 End 2006ish Future

37 Sofia, Bulgaria | 9-10 October Clearing a few misconceptions ADO.NET vNext is unlike other ORMs in the market place. Minimalist approach, rather than everything and the kitchen sink. ADO.NET vNext introduces the concept of Client Views and thus set based theory in object oriented code. Queries are more sophisticated than simple string matching It takes the approach of attacking the conceptual model, rather than get mired in object to relational translation. ADO.NET vNext is unlike other ORMs in the market place. Minimalist approach, rather than everything and the kitchen sink. ADO.NET vNext introduces the concept of Client Views and thus set based theory in object oriented code. Queries are more sophisticated than simple string matching It takes the approach of attacking the conceptual model, rather than get mired in object to relational translation.

38 Sofia, Bulgaria | 9-10 October Demo #4 LINQ to Entity, ADO.NET vNext – How do they help, (and not help).

39 Sofia, Bulgaria | 9-10 October

40


Download ppt "Sofia, Bulgaria | 9-10 October Datasets, Business Objects or Just LINQ Sahil Malik www.winsmarts.com Prerequisites for this presentation: 1).NET 2) Lots."

Similar presentations


Ads by Google