Friday, August 8, 2014

Client Side Scripting: Get Sharepoint User Profile properties using jQuery

In Sharepoint 2010 environment, I recently had a request to fetch the UserProfile object using client side scripting on a Sharepoint page. Immediately, I started looking for any methods exposed within the jQuery library to do so. A jQuery script library called SPServices is available which abstracts SharePoint's Web Services and makes them easier to use.

SPServices: http://spservices.codeplex.com/


Specifically they have examples on how to retrieve UserProfile properties using SPServices library function GetUserProfileByName.


http://spservices.codeplex.com/wikipage?title=GetUserProfileByName


For my own implementation, I modularized the code for fetching the user profile object into a separate javascript file as below:



function returnUserProfile()
{
var user = {};
$().SPServices({
operation: "GetUserProfileByName",
async: false,
AccountName: $().SPServices.SPGetCurrentUser(),
completefunc: function (xData, Status) {
$(xData.responseText).SPFilterNode("PropertyData").each(function() {
              user[$(this).find("Name").text()] = $(this).find("Value").text();
           });        
    }
    });
return user;
}


I can quickly surface the function call in any CEWP/HTML form web part and read the user profile property.

Example: (Redirect based on Users Office location)

var user = {};
var url = document.url + "/sites/region/";
user = returnUserProfile();
window.location.replace(url+user.Office); 


A complete list of all properties available under UserProfile is below:

http://technet.microsoft.com/en-us/library/hh147510%28v=office.15%29.aspx


Hope this helps!

Friday, August 1, 2014

Developers vs. Operations



I recently came across an interesting article (“Revisitingwhat is DevOps” by Carlos Sanchez) on role of DevOps and the constant balance between the developers and operations team within the project to make it successful. Throughout the article I could perfectly relate to what the essence of the article was i.e. the need to have a balance between both teams to achieve the best that the software/platform has to offer.

From my own personal experiences working on multiple projects, I have always felt the need to address as part of any project, setting up channels of communication and constant interaction between the developers/architects and the operations team. On too many occasions, the development team will come up with innovative and challenging approaches to only find out that the limitation to get it implemented is the hesitation/apprehension of the operations in setting up the infrastructure or service required to facilitate the approach. After many discussions and arguments, this would finally boil down to a stalemate with teams not making any ground and having to revert back to existing solution or platform to resolve the problem.

I am not saying that the problem here lies with the Operations. They have their own reservations (and rightly so) when implementing changes which could possibly hamper or disrupt services and make their lives a living hell just so that the development team can rejoice in their two minutes of fame. There are plenty of other constraints as well that the Operations team has to look at like lifecycle management and financial limitations when reviewing the changes.

However, that being said it is ultimately a working relationship between the two which can ultimately make or break a project.

For further reading and looking at Sharepoint Governance, I recommend Steve Goodyear’s books on Practical Sharepoint Governance and Sharepoint Enterprise Content Management.

Friday, July 11, 2014

Microsoft Sharepoint Certification – Benefits for Employer and Employee



Microsoft has always been a proponent of technology certification through its MCP (Microsoft Certified Professional) program and MSDN Learning portals with guidance to plan and prepare for their certifications based on technology of your choice.
However, employers and employees alike are often at crossroads of whether the Microsoft certifications are actually beneficial for either of them. Here are some points in favor of both parties:

For employer’s, the perks lie in achieving certain competencies within the organization (yes, since 2010 Microsoft made key changes to the partner program that Gold or Microsoft Certified Partner labels did not apply to the whole company per say but to specific competencies within the organization) and demonstrating that they are dedicated towards maintain those competencies. The requirements to demonstrate these competencies among others are to show that your workforce meets the requirements for number of certified individuals with those competencies.
                                   



Specific to Sharepoint, Microsoft has consolidated the process of becoming a Microsoft Sharepoint Partner. They are divided into 2 groups namely System Integrators and Independent Software vendors.
System Integrators – Helping customers realize full business value of their Sharepoint investment including social; Enterprise Search and surfacing LOB (line of business) data in Sharepoint.
Independent System Validators – providing solutions leveraging cloud based platform for business intelligence, advanced visualization, project portfolio and business process management.

The new Collaboration and Content competency merges the previous competencies: Portals and Collaboration, Content Management and Search. Further reading on the competencies and how to achieve partner status here.

For employee’s, the perks are in achieving certification and Microsoft accreditation which can help them gain better visibility within the organization as well as the industry. Nowadays, it has relatively harder for companies to screen and assess competencies which are ever changing and rapidly progressing (compare MOSS to 2013). This gives certifications more weightage when assessing talent and required skill set based on requirements.
Below is the certification plan for MCSD (Sharepoint Developer) in 2013:



(Images and content copyright of Microsoft, the views expressed here are mine)