jump to navigation

Received Marklogic Innovative Award for SharePoint integration May 10, 2010

Posted by willhlaw in Marklogic, SharePoint, XML Database.
Tags: , , , , , ,
add a comment

Marklogic User Conference 2010 Logo

Congratulations for Innovation Award to my Dev Team!

At the Annual Marklogic User Conference 2010 in San Francisco, my team and I were awarded the Innovation Award. It came as a heavy crystalline pedestal and looks impressive. We were awarded for our SharePoint front-end integration to a Marklogic XML database backend.

In addition:

  • The team has built a model around a generic query.xqy module which acts like a mini app builder widget. Pass it a query and a format type (html-basic, html-table, map, KML, RSS, JSON, etc) and you will get results quickly with a sidebar for a keyword search and the faceted search.
  • We have developed an improved SharePoint Connector for both SharePoint document libraries as well as  SharePoint lists (the Marklogic SharePoint Connector only synchronizes document libraries).  Our connector also allows the user to configure extra paremters such as the collection to post the item to.  If anyone is interested in this Marklogic SharePoint Connector for Lists and Libraries, please let me know.  We are thinking about polishing it up and packing it in a solution file.

Client Side AJAX Applications in SharePoint 2010 – Live Blogging at SUGDC April 9, 2010

Posted by willhlaw in jQuery, SharePoint.
Tags: , , , , ,
add a comment

sugdcTitle4

I am listening to Lee Richardson at SharePoint User Group DC (SUGDC) Reston, VA.  I apologize in advance for the terse code examples and potential incoherent notes.  I am trying to capture everything on the fly and have only touched up a few concepts and added my opinion in the conclusion.  To see this subject in greater depth, visit Lee’s blog.

With client side scripting, there is no compiling, no syntax checking, no type checking.  There is no LINQ, no ADO.NET.  So why would we use it?

Two technologies will be discussed:

  1. WCF Data Services came from ADO.NET Services and previously, Astoria.  OData is a specification that a podcaster, Scott Hanselman, mentioned in connection with SharePoint 2010.
  2. ASP.NET AJAX Templates.

WCF Data Services is an API in SharePoint that allows you to use RSS / Atom and JSON.  It is not just a pure data access layer, it also adheres to the security model built in and returns proper HTTP specification error codes.  It also has validation built-in.  There is also a uniqueness constraint in SharePoint 2010 that will double-check when inserting a new item and return an error code if an item already exists with the same value that was marked for uniqueness (Something that databases have been doing for years).

Polling the crowd on who has used ASP.NET AJAX framework and would not use it on their next project.  5 people raised their hands.  5 people kept their hands up.  An UpdatePanel in SharePoint has just been too difficult over the years, it sends the entire ViewState to the server on each request, and updating the framework as it matures with SharePoint has been painful.

Templating is part of ASP.NET AJAX 4.  It is still in BETA.  Best way to describe it is by describing what it is not.  What would you use if you were to return 100 items from the server and display in a table and page.  I commented, “jPoint and the flexigrid jQuery plugin.”  A few people turned around and said, “Are you the jPoint guy?”  Lee didn’t hear the jPoint comment, but he smiled, and said, “Yes, jQuery.  You could do that.”

Enough talking and he jumps into the demo.  He first shows a response on a webpage and describes the data that we are looking at.  Opens Visual Studio and comments that, “it is not an out of the box, unfortunately”.  An Administrator needs to turn on a feature after installing the WCF Data Services.  A new project is started in Visual Studio.  In SharePoint 2010 and Visual Studio 2010, SharePoint project templates come out of the box.  That’s cool and several people in the crowd acknowledged seeing other demos, but no one admitted to having hands on experience.

Several files are referenced are pasted in from Clipboard, SharePoint basic js files, ADONET, jQuery, and jQuery-ui.  In the code, you typically see three different approaches.  Declarative, imperative, and the jQuery approach.  Everything tonight that is shown will be the imperative approach.  On the web, you always see declarative (using xmlns, it looks nice, but it is too magical).

There are two data types, DataContext knows how to talk to OData services and WCF Data Services.  A Subtype is the AdoNetContext knows how to talk to WCF Data Services.

Then, he starts to explain the code.  $create is a shortcut to create things.

dataview=$create(Sys.UI.Dataview,

{

autofetch: true,

dataProvider: dataContext,

fetchOperation: …

$get(‘userStories’)

}

<div class=”sys-template”)

<div> { {Title }} </div>  //this is a one way binding, like a read view.

</div>

Just in time compiling sometimes takes a while even though nothing changes.  Not sure why this happens.  The items were pulled and displayed in a list.  A background style was applied and some other script was pasted into the ASPX page in Visual Studio, and the userStories showed up as index cards on a corkboard background image.

Now to drag and drop the index cards onto the corkboard and create a master view so when you click on a userStory from the list, it will pop up on the corkboard.  He moved it around on the corkboard because he applied jQuery-ui draggable to the userStories div.  But after a page refresh, the index cards moved back to their original place.  So, custom columns X and Y were added to the userStories which were Tasks contents that can be synched with Outlook.  These new columns are to keep track of the screen coordinates so upon display, they will remain in place.

sys:style=”{{…can use sys to identify a template syntax in an attribute.  Inside the function call, string concatenation can be used.  First, though, the sys namespace needed to be defined xmlns:sys = “Javascript:sys”.  The sys templating allows the class style to be dynamically set from the item’s X and Y values.  Pretty neat.  Normally, you would have to compute these values in javascript and could not do it inline with your HTML.

After dragging and dropping, the new X value is assigned inside the jQuery dropped routine.

Sys.Observer.setValue(obj, “X”, newX) updates the DOM and prepares the object to be saved back to the server.

Fiddler is opened so that we can see exactly what is going on.  The .svc call is returning a $batch.  The dataview keeps track of what JSON objects are being changed and only sends those to the server.  That is pretty efficient.

<div> { {Title }} </div>  //this is a one way binding, like a read view.

<div> { binding X } </div> //this is a two way binding.

Note: if you use this binding in a <input type=”text”> HTML element, it will automatically update the JSON objects and the DOM so you do not need to type the Sys.Observer line above.

Now we are going to work on the Master Detail view and add an edit button to the Detail view.  Here live binding is used.

Sys.bind(“DetailDataView”,…)

<img sys.bind=…/>

Clicking on the edit img of a userStory Task, the object becomes “selected” so the binding knows when the edit input box is typed in and it automagically updates the DOM so you see the read only version of the userStory Task in the background change.  Pretty neat!

To conclude, you will need to learn a new syntax, but writing inline code in your HTML to generate styles from properties of fetched SharePoint items and live bind objects between the DOM and in-memory JSON objects is very powerful.  Also, the ASP.NET AJAX 4 is able to only send the data for items that have changed back to the server.  That is smart bulk loading.  Lee was adamant that he was not a javascript developer, but I thought he did a great job at putting together his demo and modifying his code on the fly during the demo.  I am not sure how difficult it will be to deploy WCF Data Services on a SharePoint server, but I would recommend users who are not strong in javascript to look into this technology.  If you are already strong in javascript, then there will be less benefit at leveraging this new, but powerful technology from Microsoft.

Thanks, Lee, for a great presentation.  Well done.

Lee Richardson’s Twitter ID: @lprichar

Lee Richardson’s blog: http://rapidapplicationdevelopment.blogspot.com/

LeeNicSmall

SPSDC and jPoint Presentation Wrap-up including How to pre-populate SharePoint form fields from URL parameters with just 3 lines of code. December 9, 2009

Posted by willhlaw in jPoint, jQuery, SharePoint, SPSDC.
Tags: , , , , , ,
2 comments

SharePointSatDC

It started off a cold and rainy morning on 12/5/09 for the SharePoint Saturday DC conference.  I had a car full of about 7 bags of donated clothes for the events clothing drive thanks to the Harris, Lawrence, and Wallenhorst families.  The clothes were dropped off after my 8:30-9:40 session and by that time, there was a nice white blanket on the ground and snowing heavily!  I hope the clothes from the event will provide warmth to several cold persons sometime soon.

I kicked off my presentation with a “Taste of jPoint” video to wake up the audience and grab their attention.  Tell me what what you think of the video.  Ken from the jPoint team created it from some program on his new laptop.  If you are prompted, username is demouser and password is sharejPoint!

The presentation, entitled “jPoint: jQuery Based Library for Creating Web 2.0 Apps in SharePoint” had 4 parts.

  1. Web 2.0 App: Demo
  2. jPoint: Unleashed
  3. jParts: Plug and Play Web Parts
  4. jParts: Live Demo

For the Web 2.0 App Demo, I gave a quick background and showed while describing another jPoint team member’s pre-recorded demo.

I then talked through parts 2 and 3 with just a couple of on-the-fly questions from the audience.

For the jParts: Live Demo, I was pretty confident I could do it live without trouble, as long as the website connection worked, since I had run through similar steps when I created a screencast earlier.  Well, I was a little bit wrong.  There were, of course, a few glitches, but I was able to smooth them out.  In one case, I touted how Firefox with Firebug is such a useful tool for client-side developing on SharePoint.  A few seconds later, I had to switch to IE so that I could inspect the contents of a form [editor] web part.

Nevertheless, I was able to demonstrate live, how to add the GoogleChartsAPI jPart from the Web Parts Gallery.  Then, I demonstrated how to take the new jPart_Template.js and paste in 3 lines of code and a function called querySt to read query string parameters to create a jPart to pre-populate a SharePoint form page with values from URL parameters.  Those 3 lines of code are:

$.each(jP.Form.readForm().Items, function(idx,formjQueryItem){
if(querySt(formjQueryItem.Name) != null)
jP.Form[formjQueryItem.Name].val(querySt(formjQueryItem.Name));
Let’s go over it quickly.

The first line uses jQuery’s $.each function which iterates through the form items and uses an anonymous callback function with two parameters. idx for the index and formjQueryItem which represents the Form item object (in other words, the cell that contains the Title, Assigned To, or Priority field.

jP.Form.readForm() is called which reads the page’s html to extract the SharePoint columns or “fields”.  readForm() returns a Form item object so that you can daisy chain this into one line to get the items, jP.Form.readForm().Items.

The next line checks to see if the current name of the field (i.e. Title, Assigned To, or Priority), matches an existing URL parameter.  If it does, then the last line is executed.  The last line uses the powerful .val() function.  To reference a particular field in jPoint, the array notation, jP.Form[“field name”] can be used or the dot notation, jP.Form.fieldname can be used.  When using the dot notation, it is not recommended to use a field that has special characters or a whitespace.  In jPoint you can, you just need to remove those before using it (i.e. Assigned To becomes AssignedTo).  So back to the last line.

jP.Form[formjQueryItem.Name] gives you a reference to the field item object.  Passing a parameter to the .val() function acts like a setter.  No parameters acts like a getter, just like jQuery’s val() function.  Thus, passing the value of the URL parameter to the field item’s val function sets it.  Thus, you can pre-populate any form field.

To run the code, remember, you need to have both jQuery and jPoint loaded on the page.  Below is the entire script.

<script type=”text/javascript”
src=”http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js”&gt;</script><script type=”text/javascript”
src=”http://sharejpoint.googlecode.com/files/jPoint-latest-expanded.js”&gt;</script><script type=”text/javascript”>
$(document).ready(function() { //Wait page to load and then apply webpart logic
$.each(jP.Form.readForm().Items, function (idx, formjQueryItem) {


if(querySt(formjQueryItem.Name) != null)
jP.Form[formjQueryItem.Name].val(querySt(formjQueryItem.Name));

});
});
function querySt(ji)


{
hu = window.location.search.substring(1);
gy = hu.split(“&”);
for (i=0;i<gy.length;i++)
{
ft = gy[i].split(“=”);
if (ft[0].toUpperCase() == ji.toUpperCase()) //Fixed query so it is case insensitive
{
return unescape(ft[1]);
}
}
return null;
}
</script>

So, when I was finished with the live demo, I was at the 50 minutes mark.  I had ten more minutes before the 10 minutes Q & A.  After asking the audience, we decided more examples would be good.  Rather than going off script and risk the few embarrassing glitches of the live demo, I explained a few of the jPart examples on the http://sharejPoint.com/examples website.  I showed off the chatterbox solution as a pure client-side jPart.  After that, I discussed the Bing Maps API and the story behind it.

After ten minutes of that, it was finally ready for the Q & A.  Oh, and before the Q & A was over, my laptop died.  The camstudio session that I was recording…gone!  Oh no.

There were a few interesting questions like, “If I use jPoint in the enterprise, who is going to support it and for how long”.  I answered “With jPoint being a good platform for developing scripts for 2007 that work when upgraded to 2010, it’s going to be around for a while.  Plus, it is open source.  You can look at the comments in the code and maintain it yourself.  I really think that this project has legs and the more people I talk to, the more excitement and enthusiasm is generated and the word spreads”.

One audience member summarized the session, “It was not as clear at first, but the demos at the end really helped to make it more clear.”  I think there are lot of advanced concepts with jPoint, especially jParts and the deployment framework.  There is a lot of documentation to be done.  At the very end of Q & A, a bunch of audience members came up to talk to me one and one.  One member was extremely excited about learning jPoint and has offered to contribute to the project, particularly in the documentation area.  It is always great to bring on new volunteers to the project.

Since I had a wedding all the way down in Raleigh, I had to leave right after Q & A.  At 8:00am it was raining.  At 9:45am it was snowing.  This was not going to be a fun trip.  Well, after making it to the wedding on time, we found out that we were actually late, because the wedding started EARLY!  Who does that?

I want to conclude with a big thank you to Dan Usher and Dux Sy Raymond and the other organizers for helping to make this event happen.  And thanks again to everyone who contributed clothes!

If you want to take a look at the slide deck, I have converted it into a PDF and made it available here.

A slide from my SPSDC jPoint Presentation December 2, 2009

Posted by willhlaw in jPoint, SPSDC.
Tags: , , ,
add a comment

See my previous post, I will be speaking on SharePoint Saturday to promote and support TWO good causes.

Below is one of the slides I am working on that explains how jPoint is changing the game for developing JavaScript solutions for SharePoint. Although not explained on the slide, a jPart is a jPoint “plugin” that can be deployed to SharePoint as a web part as a script inside a Content Editor Web Part (actually, a Form [Editor] Web Part is a better choice since Microsoft is eliminating the ability to include <script> tags in the new CEWP in SharePoint 2010 – I will write a post on this later).

image

I will be speaking on SharePoint Saturday to promote and support TWO good causes November 19, 2009

Posted by willhlaw in Gov 2.0, jPoint, sharejPoint, SharePoint, SPSDC, Web 2.0.
Tags: , , , , , ,
4 comments

[Update] – Schedule of presentations has been posted.  My session is from 8:30 – 9:30am and bio page is here.

On Dec. 5, the SharePoint Saturday for DC (#SPSDC) event will be hosted at the Microsoft Technology Center.  The call for speakers were for non SharePoint 2010 content and specifically, for solutions that addressed relevant business needs for the Washington, DC area.  In other words (more or less), this means “Who wants to talk about solutions useful for the Government?”  I was interested and could have repeated one of my previous SharePoint presentations about reporting airplane incident/accident events within SharePoint or about categorizing your data to plan for various degrees of high availability in SharePoint.  Both are certainly relevant to the government.  However, after Dux Raymond Sy checked out the jPoint project, he encouraged me to submit a speaker form to discuss it.  It is not directly related to the government, per se, but it will allow both the public and private sectors to improve the effectiveness of their SharePoint deployments.  Here is the list of speakers (I am at the bottom).

Thus, I made the title of my presentation “jPoint: A jQuery Based Library for creating Web 2.0 Apps in SharePoint”.  I have the description of the talk at the bottom of this post.  At the presentation, I hope that some of the jPoint contributors, like Ken, Samir, and Luke, will be present so you can meet some of the incredible talent that is helping to create a client side API in JavaScript for SharePoint and jump starting the effort to build solutions on top of the API – see the neat examples at http://sharejPoint.com/examples. Now on to promoting the good causes.

salvationArmyGood Cause #1

SharePoint Saturday will be promoting a Clothing Drive.  Warm clothes will be especially helpful for the needy in the coming Winter months.  I love when hard work can be directed towards a good cause, such as national safety, the disadvantaged, and of course, charity. Below is an excerpt from http://www.sharepointsaturday.org/dc/default.aspx.

#SPSDC Clothing Drive

Thursday, October 29, 2009

If you are planning to attend SharePoint Saturday DC on December 5, 2009, make sure you bring clothing that are new or in good condition to be donated to local charities like Salvation Army.

Clothing-donation needs include: school clothes, coats and other cold-weather accessories, professional clothing for employment interviews, and shoes, which wear out quickly and must be replaced often, especially among growing children.


Clothing donations to qualified charitable organizations are tax deductible.
For tax deduction purposes, The Salvation Army publish guidelines for the valuation of donated items, including clothing and shoes.

Let’s show the true meaning of connecting and collaborating. As Karuana Gatimu (one of the great SharePoint community leaders today) says “Sharing is the Point!”

Good Cause #2

The second good cause I will be promoting is jPoint.  Why?  It is simple.  It is free and saves time.  It is arguably not as important as the clothing drive, in the short term.  But bear with me.  I have a long term vision in mind.  jPoint is a free, open source project that will make developers lives easier and give SharePoint site administrators the ability to deploy customizations and “Web 2.0” mashups or composite applications without having to write code or touch the server.  I want to do my part in the community to create and spread the adoption of cost saving, valued added tools that increase the end user experience.  Increasing the end user experience will increase adoption and that will not only set the stage for increasing user productivity, but should also increase the efficiency of business processes and make everyone better off.  What do you think?  Checkout my talk at SharePoint Saturday or get involved with the project at http://jPoint.codeplex.com.  And similar to Kauruana’s quote above, jPoint’s motto is: “Share jPoint. It’s open source.”

card01_back

Description of the SharePoint Saturday presentation – “jPoint: A jQuery Based Library for creating Web 2.0 Apps in SharePoint

Have you ever wanted to hide certain fields in a SharePoint list form that were “For Office Use Only?” Or to create a chat/IM tool or AJAX enable a list, but did not have rights to deploy a custom solution on the server? Or to use drag and drop functionality on a SharePoint page? Many developers have turned to jQuery client-side scripts to solve these issues. Many solutions take to much time to get off the ground and they break when used in other browsers. And what about your current client-side scripts when you upgrade to SharePoint 2010? Will they work? These problems are being solved by the FREE open source community project called jPoint. It is hosted on codeplex at http://jPoint.codeplex.com. jPoint is a data access layer for SharePoint to make it easier for developers to work with form fields and communicate with the SharePoint web services. It also provides a deployment framework so developers can create jPart “plugins” that site Administrators can drop on their pages to create Web 2.0 mashups.

This presentation will comprise of three segments:

1: Demo of a real life Web 2.0 App in SharePoint

2: Explanation of jParts and how Site Admins can configure them

3: Deep dive into jPoint library and API  (time permitting)

This session level is ranked intermediate and for Special Interest.  Leave me a comment if you are interested in the demo videos or any post-presentation material.  Thanks.

jPoint version 0.7 Released – Objectifies SharePoint Web Services and more November 12, 2009

Posted by willhlaw in jPoint, SharePoint, Web Services.
Tags: , , , ,
add a comment

[cross-posted on The jPoint Blog at http://sharejPoint.com/blog]

image

 

 

 

 

 

 

Here is the link to the jPoint version 0.7 Release on Codeplex. jPoint is the jQuery based library that makes building javascript solutions a lot easier by abstracting a lot of the low-level SharePoint intricacies such as cross browser compatibility, manipulating the HTML mess in Forms, and in particular, the nuances of the different SharePoint web services.  In the previous releases, jPoint required the application developer to iterate through the data returned from the web service as jQueryData, which was XML returned from the jQuery AJAX call. In this 0.7 release, you can now reference the data as an Items object.  Let’s say you want to get the last message from a chat list (assuming the default view has messages ordered by descending ID).  You would be able to write:

jP.Lists.setSPObject(siteURL, “chat”); //adds chat list (as Uppercase) to the Lists object

jP.Lists[“CHAT”].getSPView(); //adds the items from the default view to the Lists.CHAT object

var chatMessage = jP.Lists[“CHAT”].Items[0].message;

Below are the rest of the highlights of the 0.7 release.

Major jPoint.Lists Object Updates:

When using getSPItem, getSPItemsWithQuery, getSPView, getSPViewCollection, getPictures, updateItem, addItem, and deleteItem,
jPoint.Lists["<listname>"] will have the following objects populated depending on current context

  • ListName – name of last list used
  • FieldCount – count of fields
  • ItemCount – count of items
  • Items – array of item object [{fld11:val11,fld12:val12,…},{fld21:val21,fld22:val22,…},…]
    • fields are based on xml response and might not be uniform across rows, so check before use
  • xmlDoc – xml document response from webservice call
  • JQueryData – row data as jQuery object
  • total – count of rs:\\data nodes if exist
  • nextPage – key for paging if rs:\\data exist

Improved Public Functions:

  • jP.Form.readForm() – identification of form fields for dispform.aspx
  • jP.Form.<FieldName>.val() – reading of value from fields with no input element to support dispform.aspx
  • jP.strip(str) – remove special hex encoded characters
  • jP.Lists[<ListName>].getSPListFields() – save additional information into list object
  • jP.Lists[<ListName>].udpateItem(itemid) – process response data to save information into list object
  • jP.Lists[<ListName>].getSPItem, getSPItemsWithQuery, getSPView, getSPViewCollection, getPictures – Return list object

Improved Private Functions:

  • getSPItemData(listObj) – use processResponseData to save information
  • getSPItems(listObj, rowLimit) – use processResponseData to save information
  • getSPViewItems(listObj) – get default view dynamically
  • buildModifyContent(listName, data) – handling when data[i].ID is not null

Newly Added Public Functions:

  • deleteItem(id) – delete SPList item
  • getSPViewCollection() – populate jPoint object with list view collection
  • filterItems(filterField, filterValue) – filter the list items where filterField contains filterValue
  • getItemsFieldData(fieldNames) – extract a subset of Items for specified fields

Newly Added Private Functions:

  • processResonseData(listObj, data) – populate jPoint.Lists.{listname} and jPoint.Lists with list information to process list web service all uniformly
  • saveListObjects(listObj, responseData) – populate jPoint.Lists.{listname} and jPoint.Lists with list information
  • getResultItems(respData) – convert response data into array of item objects
  • getColumns(items) – get complete list of columns from items array
  • buildDeleteContent(listName, id) – construct xml body for deleting SPItem from a specified list

Gov 2.0 Resources from Microsoft October 23, 2009

Posted by willhlaw in Gov 2.0, SPC09.
Tags: , , , , ,
2 comments

These resources are from Dean Halstead’s presentation at the 2009 SharePoint Conference in Las Vegas and from his presentation slides. I wrote an overview of his presentation on a blog post entitled SharePoint as Gov 2.0 and Enterprise Web Platform: From SPC09 Las Vegas. Dean Halstead (Twitter.com/DeanHalstead) is a Collaboration Architect at Microsoft.

Links

On-Line Samples

SharePoint as Gov 2.0 and Enterprise Web Platform: From SPC09 Las Vegas October 22, 2009

Posted by willhlaw in Gov 2.0, SPC09.
Tags: , , , , , , , , ,
2 comments

This is the last session at the 2009 SharePoint Conference in Las Vegas. The presenter is Dean Halstead (Twitter.com/DeanHalstead), a Collaboration Architect at Microsoft.

[Update] A version of Dean’s presentation has been found here.

Objectives

  • Understand how to leverage solutions and approaches that are being used throughout Government (Gov 2.0) to improve social networking and address common challenges in your organization or company.
  • Pillars of Transparency
    • Accountability
    • Participation
    • Transparency

Gov 2.0

  • As you deal with web 2.0 type content and new media in your org, you may need an information policy applied to the content such as Sarbanes-Oxley or Freedom of Information Act, etc.
  • Recovery.Gov is built on SharePoint
    • Shows an overview video and information on Best Practices on how to implement 2007.
    • Talks quickly about a No-Code solution for clicking on video links and have the video appear in a DVWP that was built using SharePoint Designer. When the presenter said this, I looked up and saw a URL parameter, ID=5. Thus, the DVWP was just filtering on the list that has the YouTube script that was probably copied directly from YouTube’s embed code section.
  • Contextual Social Networking
    • A trend towards social networking fatigue. Too much personal information along with new enterprise social tools and information.
    • With contextual social networking, the system can automatically tell the user that others are working on something similar as you upload a document or name a document with certain tags.
  • Gov 2.0 Common Feature Challenges
    • Internal/Extgernal integration
    • Internal micro-blogging (Twitter / Facebook)
    • Social Network Analysis
    • Geospatial integration
    • Data, data, data, podcasting, and communities.
  • Gov 2.0 Kit
    • Enhanced version is being released on Codeplex today! First time audience clapped.
    • Enhanced MySite for Microsoft SharePoint™ RC1 – October 22, 2009. 
    • Easy to install tools. They are MSI installs and activated features.
    • Demo of the Gov 2.0 kit
      • My Peeps
        • An internal, behind the firewall twitter.
        • To follow and monitor people
        • There is a little T and F icon to allow you to update your status internally and externally to the public Twitter and Facebook accounts.
        • Auditing is built into the kit. On the My Peeps dashboard, the little T and F icons show up next to each tweet, so that others know where else it was posted to
        • When you follow someone, it is a request and requires approval by the followed person.
        • The current solution does not have spelling or grammar check.
      • My Home
        • Is a Facebook like profile page.
        • It has Updates to see actions such as “John Posted notes.doc on Shared Documents”.
      • Twitter webpart
        • Pulls personal feeds into the SharePoint portal.
    • ICE
      • A Codeplex project that is a Silverlight control that can be embedded in SharePoint.
      • It shows not only people, but object relationships in a link map. Very cool!
    • Jackbe Mashup tools.
      • Helps to make data transparent and thread it throughout the org.
      • Presto by Jackbe is a mashup tool. A data modeler or expert business decision maker can create a model and combine information from SharePoint and CRM (etc).
      • End users can then take those data models and drop them into SharePoint pages as Webparts.
      • The Mashup Webparts can even communicate with each other using web part connections.

Gov 2.0 Common Policy Challenges

  • PII (Personally Identifiable Information)
    • How do you find PII and secure it?
      • Use FAST search and Concept Search to find data and automatically turn it into a PII document which is secured differently and can even be RMS (Rights Management Server) and digitally protected. It allows you to put rights onto the document and encrypt it. Permissions to open the document must be given.
      • The organization will be able manually or automatically categorize (based on Policy rules) to discover the data and delete it or protect it.
  • Endorsement of Information
    • Community Moderated
    • Organizational Moderation (Twitter, Facebook, and Public site)
      • Having a moderator is a drain on the orginizations
      • Apps for America (a context put on by Gov 2.0 Summit) finalist had a community based moderation solution.
    • Public Affairs Workflow for release (Blogs, Wikis, Documents, etc)
  • Culture Wars
    • Conflict Areas
      • Old Guard vs. Generation Y and 2.0
      • Sign-to-Noise, definition of “Real Work”, Privacy, and Control Corporate Messaging
    • Impact
      • Social Networking initiatives being stifled
      • Low Adoption/Classes, Slowed Idea Generation, Lower Employee Satisfaction, Institutional Knowledge Bleed
  • Other challenges
    • Information Spillage
    • Security Concerns
    • Trusted and Authoritative Source
    • Identity Management
    • Governance
    • Accessibility (Section 508/WCAG)
    • On-premise hosting
    • Silos of Information
    • Integration and Interoperability
  • Resources

    As solutions and best practices are rolled out in Recovery.gov, these solutions will spread to other Government agencies. I personally think that social network tools will greatly improve the knowledge transfer within the enterprise and government.

SharePoint Designer 2010 – Building Composite Apps: From SPC09 Las Vegas October 21, 2009

Posted by willhlaw in jQuery, SharePoint, Sharepoint Designer, SPC09.
Tags: , , , , ,
1 comment so far

I am here at the SharePoint Conference 2010 (SPC09) at Las Vegas. There were not a plethora of interesting sessions this afternoon, so I stuck to what I have been good at; live blogging on SharePoint Designer 2010. See my other blog posts:

Here are the interesting points from the session.

LINQ and REST in Sharepoint 2010: Live from SPC09 Las Vegas October 21, 2009

Posted by willhlaw in SharePoint, SPC09.
Tags: , , ,
3 comments

LINQ and REST in Sharepoint 2010.

I am blogging live from the Sharepoint 2010 Conference in Las Vegas. This is a session on LINQ and REST web services. I have only written about the highlights.

Overview of new architectural features when dealing with querying lists in SharePoint 2010

  • Query Throttling
    • Site collection administrator can put a limit (i.e. 5000) on the query block.
    • Developer can override the querythrottlingblock to retrieve more items from the server.
    • This prevents end users from swamping the server.
  • Resource Throttling
    • Pagination plays a distinct role so that the data is filtered on the server, not on the client side anymore. First time audience clapped.
  • Allows list options to be setup so that child references are setup for delete through. This means that if the parent is deleted, then the children go into the Recycle Bin as well. Other options prevent the user from deleting a parent item that has child items.
  • Demo is in the Javascript Client Object Model
    • If you can do it in javascript, you can do it in the client.
    • The Javascript OM requires you to be more explicit with every step.
    • Custom page is called /_layouts/data/clientom.aspx
    • Uses the Yahoo YUI library script files.
    • Example had a var viewXML which was a predefined CAML query with {1} to act as placeholders for variable replacements later.

REST

  • REST-style ListData.svc web service
  • Work with data via (Representational State Transfer)
  • SharePoint list data
  • Other data sources as well
    • Excel and Azure cloud
  • Powered by ADO.NET Dadta Services “Astoria”
    • REST Protocols: Atom, AtomPub, and RSS
  • Syntax:
    • /_vti_bin/ListData.svc/{Entity}[({identifier})]/[{Property}]
  • Example to get budget hours for Project $4:
    • /_vti_bin/ListData.svc/Projects(4)/BudgetHours
  • Example to get Projects for Clients in Chicago:
    • /_vti_bin/ListData.svc//Projects?$filter=Client/City eq ‘Chicago’
  • Example to get a Project and its related Client:
    • /_vti_bin/ListData.svc/Projects?$expand=Client
    • Shows me parent that is associated with this XML
  • QueryString parameters for REST
    • $filter
    • $expand
    • $orderby
    • $skip
    • $top
    • $metadata (will bring back all the XML metadata about the object. Think of it like WSDL for your REST call)
    • You can stack these parameters
  • Demo, manipulating REST data.
    • Javscript Client Object Model does not allow XSS (cross site) scripting so you must use relative URLs.
      • Tip: To guard against CSRF (Cross Site Reference Forgery) attacks using JSON, the array or JSON object in a response is always wrapped by a single JSON object with a singler member named “d” whose value includes the array or object representing the entity or entities being returned.”
      • http://msdn.microsoft.com/en-us/library/cc907912.aspx
    • Tip: IE8 -> Internet Options -> Feed and Web Slice Settings -> uncheck Turn on feed reading view in order to view XML in the browser.
    • Code snippet from example demo using Rest in javascript.
      • function PostData(url,data, callback)
        • var wRequest = new sys.Net.WebRequest()
        • wRequest.set_url(url)
        • wRequest.get_headers()
        • wRequest.set_httpverb()

LINQ to SharePoint

  • Strongly-typed access to List Data on Server
  • Entity based programming on the server
    • SPMetal Code Generation Utility (command line utility can be used for automatic builds)
    • LINQ Queries
    • Strong Types
  • Translates LINQ queries into CAML queries
  • Can be used in
    • Web Parts, Event Receivers, Sandboxed code
    • Sample: Orginal LINQ query

      From p in dadta.Projects

      Where

      p.Cleint.City – “Chicago”

      select new {

      Name = p.tTiel,

      clientName = p.Client.Title,

      Budget = p.BudgetHours

      };

    • Sample in CAML was shown and it looked ridiculous to code out. Everybody clapped because LINQ is SO much easier.
  • Demo, accessing relational SharePoint data using LINQ to SharePoint.
    • This example is on coded on the server
    • The first demo was rebuilt using the ASP.NET treeview rather than the YUIi treeview.
    • There is a property in the SPConfListDataContext called log.
    • Of course, with a server side solution in Visual Studio 2010, you can set a breakpoint in the code and break to it once that code is reached after a button press, for example, on the web page. Remember, in 2010, there are sandboxed solutions to help develop solutions before deploying to production.
    • The LINQ query is simple and ends up generating CAML query in the background.

Data Access Technologies

  • SharePoint 2010 List Data model
    • You should be using the Server OM and LINQ to SharePoint when you are developing on the server.
    • You should be using the Client OM and REST when running the code on a remote computer.
    • REST and LINQ are not giving you SharePoint objects. It is only giving you XML. You should use one of the Object Models.
    • If you want to work with relationships between items, REST and LINQ are much easier to use than the OM.
    • OM and REST can benefit from the Callback Calling Pattern. Remember in the Javascript Client Object Model, the .executeQuery(successCallBack, failureCallBack).
  • Managed Client OMs vs. Javascript Client OM
    • Full URL Context vs Server-relative Context Only
    • String Collection vs String[] Array
    • Null, infinity vs. Nan, positive/negative infinity
    • Explicit FBA support vs Context FBA support
    • Create, Update, Commit vs Create, Commit, Update
    • No FormsDigest Required vs Needs <SharePoint:FormsDigest>
    • Standard Server OM Identity vs No RoleDefinitionBindingCollection Identity
    • SPWeb Locale for Comparisons vs Invariant Culture for Comparisons.

This was a very detailed presentation with a lot of code talk-throughs. There are many details to follow up on. My post here only acts as a quick overview of the session and certainly not a definitive guide. The session slides will be posted after the Conference and I will update this blog post with links once they are.