Posted by Ramani Sandeep on December 11, 2009
Introduction
Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed. It can contribute to efficiency in the program’s operation if properly and appropriately used. The opposite of lazy loading is Eager Loading.
Article – 1: jQuery Tabs and Lazy Loading by Malcolm Sheridan
In this article I will connect to the Northwind database using LINQ to SQL, and display customer and product information in separate tabs. I’ll also show you one way of lazy loading these tabs so the data is retrieved only once, not each time a tab is selected.
Read more
Article – 2: Lazy Loading jQuery Tabs with ASP.NET by Mikesdotnetting
This article looks at efficient use of jQuery tabs when displaying data. Specifically, it covers how to lazy-load data, so that it is only accessed and displayed if the tab is clicked.
Lazy Loading is a well-known design pattern that is intended to prevent redundant processing within your application. In the case of tabbed data, there seems little point retrieving and binding data that appears in a tabbed area that no one looks at. So, this examples covers how to defer data access and display until the user wants it – which is defined by them clicking the relevant tab.
Read more
Article – 3: Eager Loading and Lazy Loading in ADO.NET Data Services by Gil Fink
The default behavior of a data service’s .NET client is not to load the entities’ associated objects. When we request an entity we will get it from the service but its associated objects will not load up at all.
Lets say that I have two entities in my program
The associations between the entities are that a department can have a lot of courses and a course belongs to one department.
When I load a department it’s list of courses will be empty. trying to iterate the list of courses will give nothing because the courses will not load until we tell them to be loaded explicitly.
This is done by the LoadProperty method of the data service context.
Read more
I have a great learning experience thru this.
Now its your turn to have it.
Posted in ASP.NET, ASP.NET 3.5, ASP.NET Ajax, C# 3.0, JQuery, Linq | Tagged: Eager loading, Eager Loading and Lazy Loading in ADO.NET Data Services, jQuery Tabs and Lazy Loading, lazy loading, lazy loading .net, lazy loading asp.net, lazy loading in asp.net, Lazy Loading jQuery Tabs with ASP.NET | Leave a Comment »
Posted by Ramani Sandeep on September 1, 2009
Today one of my friend asking me about some links from where she can start learning Linq & have some practice on it. so here i am providing some of useful links. Hope this will also helps others also who want to start learning Linq.
Here are the some the very important links where you can find useful materials to learn Linq with ASP.NET 3.5.
Start with Video:
Click here…
101 LINQ Samples:
MSDN for LinQ:
Other Useful Article:
1. Introduction to LINQ and VS 2008 web application by Ashrafur Rahaman : Click here
2. Using LINQ with ASP.NET (Part 1) by Scott Guthrie : Click here
3. Understanding LINQ (C#) by Amro Khasawneh: Click here
4. Using LINQ to Objects in C# by salysle : Click here
5. Brian Mains discusses LINQ to SQL capabilities in the Visual Studio 2008 designer : Click here
6. Using LINQ to SQL (Part 1) by Scott Guthrie : Click here
7. Dynamic LINQ (Part 1: Using the LINQ Dynamic Query Library) by Scott Guthrie : Click here
8. C# 3.0 and LINQ Posted by Scott : Click here
Books List:
Posted in Linq | Tagged: Linq, LinQ useful links, LinQ with ASP.NET 3.5 | Leave a Comment »
Posted by Ramani Sandeep on August 31, 2009
The Json.NET library makes working with JavaScript and JSON formatted data in .NET simple. Quickly read and write JSON using the JsonReader and JsonWriter or serialize your .NET objects with a single method call using the JsonSerializer.
Features
- LINQ to JSON
- The JsonSerializer for quickly converting your .NET objects to JSON and back again
- Json.NET can optionally produce well formatted, indented JSON for debugging or display
- Attributes like JsonIgnore and JsonProperty can be added to a class to customize how a class is serialized
- Ability to convert JSON to and from XML
- Supports multiple platforms: .NET, Silverlight and the Compact Framework
The JSON serializer is a good choice when the JSON you are reading or writing maps closely to a .NET class. The serializer automatically reads and writes JSON for the class.
For situations where you are only interested in getting values from JSON, don’t have a class to serialize or deserialize to, or the JSON is radically different from your class and you need to manually read and write from your objects then LINQ to JSON is what you should use. LINQ to JSON allows you to easily read, create and modify JSON in .NET.
Json.NET CodePlex Project
Json.NET Download
Posted in ASP.NET Ajax, JQuery, JavaScript, Linq | Tagged: : LINQ to JSON, datatable to Json, Json.net | Leave a Comment »
Posted by Ramani Sandeep on August 26, 2009
The primary difference is that the extension methods defined for IQueryable<T> take Expression objects instead of Functional objects, meaning the delegate it receives is an expression tree instead of a method to invoke.
IEnumerable<T> is great for working with in-memory collections, but IQueryable<T> allows for a remote data source, like a database or web service.
IEnumerable doesn’t have the concept of moving between items, it is a forward only collection. It’s very minimalistic; something that most any data source can provide. Using only this minimal functionality, LINQ can provide all of these great operators.
IQueryable<T> is a very powerful feature that enables a variety of interesting deferred execution scenarios (like paging and composition based queries).
Hope this helps !!!
Reference Links :
Posted in ASP.NET, ASP.NET MVC, Linq | Tagged: IEnumerable, IEnumerable vs IQueryable, IQueryable, IQueryable vs IEnumerable | 1 Comment »