Posts

SharePoint 2007 Object Model

SharePoint 2007 Object Model Through SharePoint object model programmatically access the SharePoint data into asp.net or any other server process. To access the SharePoint data we need to add SharePoint Microsoft.SharePoint.dll which is found under   <Installed Drive>:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI\ SharePoint object model grouped in two categories: 1. Server Architecture 2. Site Architecture Server Architecture Object Model : The server architecture object model access “Microsoft.SharePoint.Administration” Namespace 1.         1. Farm a.         SPFarm 2.         2. Server a.         SPServer 3.         3. Services a.         SPServices 4.         4. Web Service a.         SPWebService 5.         5. Database Service Instance a.         SPServiceInstance b.         SPDatabaseServiceInstance 6.         6. Web Applications a.         SPWebApplication b.         SPAdministrationWebApp

Comparing cursor vs. WHILE loop performance

Cursors Cursors are a looping construct built inside the database engine and come with a wide variety of features. Cursors allow you to fetch a set of data, loop through each record, and modify the values as necessary; then, you can easily assign these values to variables and perform processing on these values. Depending on the type of cursor you request, you can even fetch records that you’ve previously fetched. Because a cursor is an actual object inside the database engine, there is a little overhead involved in creating the cursor and destroying it. Also, a majority of cursor operations occur in tempdb, so a heavily used tempdb will be even more overloaded with the use of cursors. The types of cursors used are very important in terms of performance. Below is a list of the available cursor types as listed on     FORWARD_ONLY Specifies that the cursor can only be scrolled from the first to the last row. FETCH NEXT is the only supported fetch option. If FORWARD_O

What is Abstraction and Encapsulation

Abstraction : Hides the implementation details of your methods. Provides a base to variations in the application which can grow over a period of time. Abstraction is virtual class design. Before actually defining class, developer will think about what all properties, methods and event will be   there in my class. Example : public abstract class Automobile {  //Properties  public int DoorCount { .. }  public string EngineType { .. }  public float Height { .. }  public float GasTankSize { .. }  public float WheelBase { .. }  public float WheelSize { .. }  //Abstract Properties  public abstract string BodyType { get; }  //Methods  public float CalculateFuelEfficiency(int lastMileage); } The Automobile class is the interface, in that it defines an interface that classes will derive from. You can't directly instantiate it through new Automobile() because it's not an implementation. It's important to note the BodyType prope

Advantages and Disadvantages of LINQ

Advantages Quick turn around for development It is a cleaner and typesafety. Queries can be dynamically Tables are automatically created into class Columns are automatically created into properties Relationship are automatically appeaded to classes Lambda expressions are awesome Data is easy to setup and use It is checked by the compiler instead of at runtime It can be debugged easily. It can be used against any datatype - it isn't limited to relational databases, you can also use it against XML, regular objects. It can able to query not just tables in a relational database but also text files and XML files. Disadvantages No clear outline for Tiers No good way of view permissions Small data sets will take longer to build the query than execute There is an overhead for creating queries When queries are moved from sql to application side, joins are very slow DBML