Thursday, July 7, 2011

SharePoint : Connected Webparts

Creating connected webparts involves the below steps. Create an Interface            public interface ITextBoxStringCreate a property which would be returning a reference to the interface.         public interface ITextBoxString         {             string TextBoxString { get; set; }         } Provider Webpart  Implement the interface.   ...

SharePoint : SPJOBLockType

Specifies the lock type for a given timer job definition. There are 3 Locks available.. SPJobLockType.None -- if you set it none, the instance will run in all the available servers in the Farm (e.g. Application Server Timer Job) SPJobLockType.ContentDatabase – this will cause 3 instances to be running in each of the Web-Frontends.in short, it’s almost the same as the Job one, meaning that it only runs one server. SPJobLockType.Job – this will cause only one instance of the job to run on any of the front-end servers. (Note: it is possible...

Saturday, June 25, 2011

.Net Serializer - you dictate terms !

You may want to look at how you can use the built-in futures of .NET to serialize and deserilize an object into XML, rather than creating ToXML() method on every class that essentially just Data Transfer Object. I have used these techniques successfully on a couple of projects but don’t have the implementation details handy right now. I will try to update my answer with my own examples sometime later. Here's a couple of examples that Google returned: XML Serialization in .NET by Venkat Subramaniam http://www.agiledeveloper.com/articles/XMLSerialization.pdf How...

SQL : Primary Key and Unique Key

You can use UNIQUE constraints to make sure that no duplicate values are entered in specific columns that do not participate in a primary key. Although both a UNIQUE constraint and a PRIMARY KEY constraint enforce uniqueness, use a UNIQUE constraint instead of a PRIMARY KEY constraint when you want to enforce the uniqueness of a column, or combination of columns, that is not the primary key. Multiple UNIQUE constraints can be defined on a table, whereas only one PRIMARY KEY constraint can be defined on a table. Also, unlike PRIMARY KEY...

SharePoint : List Items count and view scopes

We all SharePoint Developers use SP object model . Don't we? What's the difference between. list.Items.Count and list.ItemCount ( list being a SPList object) Before we answer this Question, Lets see what are different view  scopes present in a list. View Scope SPViewScope is a SharePoint enumeration, which has values Default, FilesOnly, Recursive, RecursiveAll. ->Folder 1          Item 1          Item 2 ->Item 3 Consider a SHAREPOINT list which has items in the...

Wednesday, June 15, 2011

Http and Https

What is Http? Stands for HyperText Transfer Protocol, the underlying protocol used by the World Wide Web. HTTP defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. For example, when you enter a URL in your browser, this actually sends an HTTP command to the Web server directing it to fetch and transmit the requested Web page What is SSL? The Secure Socket Layer protocol was created by Netscape to ensure secure transactions between web servers and browsers....

Thursday, June 9, 2011

SQL : Joins and Corelated Subquery

Co-related Subquery A sub query is a query that is nested inside a SELECT, INSERT, UPDATE, or DELETE statement, or inside another sub query. A sub query can be used anywhere an expression is allowed /* SELECT statement built using a sub query. */ SELECT Name FROM AdventureWorks2008R2.Production.Product WHERE ListPrice = (SELECT ListPrice FROM AdventureWorks2008R2.Production.Product WHERE Name = 'Chainring Bolts' ); /* SELECT statement built using a join that returns the same result set. */ SELECT Prd1. Name FROM AdventureWorks2008R2.Production.Product...

Monday, June 6, 2011

SQL : char, nchar, nchar, nvarchar

nchar and nvarchar can store Unicode characters. char and varchar cannot store Unicode characters. char and nchar are fixed-length which will reserve storage space for number of characters you specify even if you don't use up all that space. varchar and nvarchar are variable-length which will only use up spaces for the characters you store. It will not reserve storage like char or nchar. nchar and nvarchar will take up twice as much storage space, so it may be wise to use them only if you need Unicode support. You can use char when the data entries...

Thursday, February 17, 2011

SharePoint 'D' in 2010 is now fun!

Development/Debugging/Deployment I was just playing around with SharePoint 2010 and Visual Studio 2010 this evening . First thing i noticed is our Life as Developers might get much simpler with SharePoint 2010. Developing & Deploying in Moss 2007 involved multiple steps and configurations at different places. Now in 2010 its just matter of few seconds. Most of the configurations is now taken care by VS. Development: Ready...