-->

04/12/2013

SharePoint - Copy Files / Documents from Search screen using JavaScript

One of the major enhancement of SharePoint 2010 is "Content Organizing" which makes it more strong in "Document Management System (DMS)" race.

Content Organizing means, the content automatically routed to different destinations based up on various factors.

Best part of it, content is organized without any manual intervention.

Worst part of it, Data / Docs are scattered across site collection or whole web application.

Lets consider a scenario, where the user uploaded 20 documents which were organized into multiple libraries in a site collection. Now i want to bring all that 20 docs to one single library where the user can edit them and resubmit.

Let me show you what i am aiming for.


First Question "Why Search?"

13/11/2013

Document Center Vs Record Center - SharePoint 2010

This is not a new discussion, there are lot of links talking about differences between Document Center and Record Center.

Let me summarize what you may get going through most of the sites:

Document Center: This is meant for Document Collaboration and mostly for Live Documents. Basically is like your File Server , except that you have searching and indexing capabilities.

E.g., If a team is working on a project, and there will be lot of documents which all team members will be Creating / Reading / Updating / Organizing. DC suites this purpose.

Record Center: This is meant for Document Retention and mostly for Read-Only documents.

E.g., Once the project is completed all the documents will be saved and secured for further references. These documents are not meant to be modified. RC suites for this purpose.


16/08/2013

Basics of Sharepoint Search

In this post we discuss about basics of sharepoint search.
Below are the concepts which we cover in this post.
  • Components of Search
  • Enabling / Understanding Search Service Application
  • Sharepoint Content Source
  • Crawl Rules
  • Crawl Logs
  • Setting-up Enterprise Search
  • Crawl Properties / Search Schema
  • Search Managed Properties / Search Schema

04/08/2013

Mtom Encoding in WCF

In this post we will cover
  • What is MTOM Encoding
  • MTOM Vs Text Encoding
  • Reasons to choose MTOM
  • Demo

MTOM (Message Transmission Optimization Mechanism) – WCF supports 3 encodings (in context of WCF, encoding means converting a WCF message (serialized XML InfoSet) into bytes) – Text, MTOM & Binary. All Http Bindings (Basic, WS, Dual, etc.) support Text / MTOM encoding, Text being the default one.

Why MTOM?
Problem with Text Encoding is it uses base 64 encoding format which can inflate the message size by 30%. This can be a heavy penalty while carrying large binary attachments.
On the otherhand, MTOM avoids base 64 encoding for binary attachments keeping the overall size of message in control. Moreover, MTOM is based on open specifications & hence is largely interoperable.

Enough of theory... Let's do a demo to concretize the concept.

For this, i have created a simple WCF service. Below image will describe what we intend to do.





03/08/2013

Integrate Yammer into Sharepoint 2013

In this post we see how to integrate Yammer features into SharePoint Server 2013. You can achieve this by installing the Yammer app for SharePoint and embedding your Yammer feeds.

 Step 1: Get the app from the Store

Important: Use an account that is a member of the farm administrators group to perform this step. Do not use the farm administrator account that was used to install and configure SharePoint Server 2013. The farm administrator account cannot import app licenses because that could result in performance problems. For more information, see http://technet.microsoft.com/en-us/library/fp161231.aspx. You can add additional farm administrators to the farm administrators group in Central Administration. When in the online store, you will need a Microsoft account to add the app successfully.

06/07/2013

Step-By-Step installing Sharepoint 2013 Using AutoSPInstallerGUI

In earlier post we dealt with Issues while Installing and Issue in hosting App model in SharePoint 2013.

We can avoid most of these issues by using AutoSPInstaller.

Its a batch file which triggers a series of powershell commands, which reads configuration data from an xml file and installs SharePoint 2013 and all other supporting components.

Even though AutoSPInstaller made installation easy, but still we have a pain point. Configuration.

Now we have a AutoSPInstallerGUI, as simple web application specially designed for SP 2010 and 2013 installations. This will make our lives easy dealing with configuration part.

All you need to do is download #1. AutoSPInstaller and #2. AutoSPInstallerGUI from respective links.

AutoSPInstaller has all the required batch files, configuration files, Powershell script files, and pre-requisite installer files.

AutoSPInstallerGUI has a simple windows application, using which we modify the installer file in AUtoSPInstaller.


If this is so simple, why I am writing this post!

03/07/2013

Using Certificate Authentication for Cross Domain Communication

I have addressed couple of posts on logic behind certificates , how to use them with WCF in both transport and message security contexts.

In this post i try to present the basic idea and implementation of using certificates for communication between different parties in realtime scenario. Dont worry about the screenshots of config files, you can download the sample and get all the settings you required for copy.

There are many scenarios which demand certificates authentication mechanism. Common examples are
#1. Banking web application which do their transactions using FBA and Certificate authentication
#2. Server to Server calls.
#3. Service to Service calls
#4. Application to service calls.
and so on covering most of the high security requirments.

But everything boils down to "A cross domain communication or we can say Domain independent communication".

15/06/2013

Sharepoint DDD / TDD Code Testing Tip

In this post i would like to demonstrate a small tip in writing SharePoint code, which can make testing a bit easy.

Now before going into further details lets talk about 2 concepts DDD and Unit Test Vs Integration Test.

#1. DDD & TDD : Domain Driven Development  targets at unrelenting Domain layer from technology, thus making it flexible to be accessed by any technology for re-usability.

On the other hand TDD targets at implementing the functionality based on scenarios. For example, lets consider Agile implementation. Each sprint will target a couple of scenarios, which may not comprises of complete functionality. So, we will write the test cases for those scenarios and will write the code against to the test cases until they are success.

In both the cases, the main idea is separation of concerns and increasing the testability of the code.

#2. Unit Test is a test that will be executed in isolation, means no dependency on any other factor. In SharePoint , the unit test should be executed even without Sharepoint dlls, and Sites, and any other factor.
We have several frameworks like Moles, TypeMock which will give you ability to mock complete SP Object model thus execute your code in isolation.

On the other hand Integration testing is running the code in coordination with various layers that actually perform tasks on the site.

19/04/2013

Feature Stapling in Sharepoint

Feature Stapling is a concept using which a specific feature will be stappled to site template.

What we gona acheive with it?

There will be scenario where certain resource has to be populated to every site collection that was / will be created on a farm.

Eg : I am dealing a client who is a owning a chemical lab. He want complete list of "Elements and their Atomic weights" to be present in every site that was already created, and any site that will be created in future.

In this scenario, Feature stappling will be used.
Lets see how to demonstrate it.

01/04/2013

Demo of PhoneGap on an Android

In earlier post we have seen "Basics of PhoneGap". In this post we will see how to transform simple web application (Html 5, Css3, Javascript) into a native android App using PhoneGap.

First i have a simple web application to show the current location based on your devices Geological position. It was written in simple Html 5, Css 3, and Javascript.

Introduction to PhoneGap

What is PhoneGap?
With increasing demand of Application access on Portable devices like Mobiles and Tablets, the Application development has been divided into two streams.

Web Applications and Apps 

Well, there are pros and cons of both the approaches.

26/03/2013

Using Delegate Control in Sharepoint

Before jumping to actual development, lets know which scenarios demand the usage of Delegate Controls in sharepoint.

I have designed header image for my blog, and i want to have it on top of my sharepoint site.

So how to add it to all the pages in my sharepoint site.

Deploying Custom Master Page Using a sharepoint Feature

In this module, we will see how to deploy a Custom master page to a sharepoint site, using a sharepoint feature.

Step 1: Create a sharepoint project. Add a Module to it. I named it as "MasterModule". By default the module will be created with 2 files,  Elemnts.xml and Sample.txt.

Step 2: You can add / create a Custom Masterpage file as per your requirment. For my purpose, i am trying to reuse the existing V4.Master.

If you are trying to export the master page from Sharepoint Designer, you may end up with error

http://server/_catalogs/masterpage/v4_Modified.master(26): error CS0030: Cannot convert type 'Microsoft.SharePoint.WebControls.ScriptLink' to 'System.Web.UI.IAttributeAccessor'

10/03/2013

Granting Anonymous Access to Sharepoint List / Library Programtically

In this post we will see how to enable and disable Anonymous access to a List or Document library from a sharepoint feature (C# code).

There are 3 different steps involved in granting Anonymous access to a List/Library in a right way.

Step 1: Enabling the anonymous accesss to the Web application from Central Admin. This does not mean that the whole web application is now anonymous. This step signifies that, this web application has ability to host resources that can be accessed by Anonymous user.

Multi Tab App with Async Task

Objective: To create an android app, with multiple tabs catering different types of questions, in which data will be saved to SQL-Lite using Asynchronous approach (Async Tasks concept.)

This post will be covering only a part of the actual objective.
I created a Multi Tab application and each tab pointing to  a different fragment.
Now in every tab click the data has to be saved without blocking the user actions.
For this i have chosen Async Task concept.
As of now i just put up a simple dialog display demonstrating the Async actions while user navigates between the tabs.
In up coming post, i will finish the code for even saving the data to SQL-Lite database, thus completing the actual intent.

03/03/2013

Shared Preferences and Yes/No Alert Dialog in Android

In this post, my intent is to use the internal memory of an android and save / retrieve the data from different views.

We have several options to save data on a Android device, like Compact SQL, Files and Shared Preferences.

So, i have a One Page Application, which will accepts name and save it to the internal memory and then retrieves the data to display i on second screen.


24/02/2013

My First Android App



I have always worked on .Net technologies like Windows applications using C#, Web applications using Asp.Net then moved to creating light weight Web applications using MVC Razor.  Apart from that stream, i have been working on Sharepoint 2007, Sharepoint 2010 and now Sharepoint 2013.

One of my client raised a concern of his application access via Mobiles and Tablets. I have looked at several options like . .

11/02/2013

Why Server 2012 ?

If you go through the Hardware / Software requirements of Sharepoint 2013, you can see that server 2008 R2 can also run sharepoint 2013.
We know Server 2012 is awesome and very useful in Usage and Performance perspectives , especially for Sharepoint 2013. But we cannot give such a vague answer when a client asks the same question.
                       Why Server 2012?

17/01/2013

PowerShell - Wait for Retract / Uninstall before Remove

This is a very small tip for SharePoint developers. Basically people hate PowerShell before knowing it. But you will love it once you start using it. Sooooo Comfortable.

So, as a part of PowerShell commands, we have UnInstall-SPSolution command for retracting a SharePoint solution and Remove-SPSolution command to remove the solution from any scope.

When you execute these commands in a sequence in a script (.ps1) file, Usually we end up with an error saying
 Remove-SPSolution : The solution "XXXX.wsp" has been deployed in the farm. Please retract the deployment before removing the solution.You can also use the
-override parameter to forcibly remove the solution, but you will not be able to retract the solution deployment.

09/01/2013

JSLink - Custom JS Rendering in Sharepoint 2013

JSLink is the new feature introduced in SharePoint 2013, loading off the burden of XSLT webparts from developer's mind.
Lets me show you an example. I have two lists "Movies" and "Books".

But I want to display them on a page like  . . .
All this can be done just by using Java script and without creating a single webpart.
Lets see how to accomplish this task.