Monthly Archives: January 2013

My first book: Beginning SharePoint 2013 Development

It was a long time coming and I have wanted to do this for quite some time … but I have just heard that the book I co-wrote with Steve Fox, Donovan Follette and tech edited by Andrew Connell has just been sent to the printers!

As the name suggests … It’s all about starting development on SharePoint 2013.  As you may have read or heard there is quite a bit of new stuff for developers in 2013 and this book aims to serve as a guide for those looking to grapple with those changes.

Topics include …  the new app model, developer tools, Azure, building and packaging apps, publishing in the SharePoint Store, distributing them internal to an organization, OAuth, Client Side OM, REST APIs, integrated SP + Office apps, Remote Event Receivers, Business Connectivity Services, Office Services & Workflow.

A core theme throughout the book is learning about the new development options available in 2013 and how and when to take advantage of them.

I wrote five of the fifteen chapters …

  • Developing, Integrating, and Building Applications
    in SharePoint 2013
  • Packaging, and Deploying SharePoint 2013 Apps
  • Distributing SharePoint 2013 Apps
  • Overview of the Client-Side Object Model and REST APIs
  • Overview of OAuth in SharePoint 2013

Like I mentioned above, writing a book was something I have wanted to do for a while now but never got around to it.  I really have to thank Steve Fox for giving me the opportunity to collaborate on this.

It should be available soon and is already available for pre-order on Amazon:

Get it while its HOT!

-CJ.

My first Windows 8 app

Logo.scale-80Some of you may know that I make a Windows Phone app called My Trips. It’s a popular companion application for the awesome TripIt.com service.  If you don’t use TripIt to manage your travel plans you are missing out!  You just forward your booking tripit_proPDF or document from your travel agent, hotel, airline or whatever to [email protected] and they magically (nerd alert: read awesome search based entity extraction) parse out all the data and put it into a far for useful format that is accessible on the internet for you.

My Trips lets you sync those plans down to your phone or PC and take them with you when you travel.  As awesome as the world is these days its highly likely you will be stuck without an internet connection at the most inopportune time 🙂

I wrote the first version of My Trips as an experiment when I wanted to take a look at building a phone app for Windows Phone… one thing led to another and nek minnit everyone wants it and I had to make it into a real app and publish it. 

Long story short … it’s used by more people than I had ever hoped 🙂

So when Windows 8 came around people started asking when I would release My Trips for it.  Of course it didn’t take much convincing and I really wanted to try my hand at Win8 development.

So it was a sweet moment last night when I finally finished version 1 of My Trips for Windows and submitted it for certification.  Hopefully nothing major will come up in certification and it will be in the Windows Store soon!

Did you just port the phone version?

To answer the question, no it wasn’t a smooth port at all. In fact I would say 85% of the code is new.  I want to write a few posts about the experience of the move to Windows 8, but for now it is fair to say that the way I built the phone application didn’t exactly lend itself to code sharing.  The phone app wasn’t built with a  nice separation of concerns using something like a pattern like MVVM.  I decided that rather than continue building on the mess I would start almost from scratch and build up with Win8 version using the (excellent) Caliburn Micro framework to facilitate a clean MVVM pattern.

The resultant code is a wonder of cleanliness, maintainability and extensibility that should make it a lot easier to port to other places if needed and maintain more simply.  If you are into clean code I highly recommend taking a look at Caliburn.

So given all I really managed to reuse code wise were a few TripIt API classes and some data model classes it really was quite a bit of work to get the rest written up.  All new Views, View Models, some Models and lots of ancillary code for caching, settings etc…Hence why it took a while longer than I had hoped.

I didn’t end up getting 100% feature parity with the phone application just yet.  That will take a bit more time.  The basics are there however, syncing your trips to your device and viewing them. Additionally things like support for Snapped view in Win8 and “Fill” view (that is the opposite side of the screen to snap view).

Here are a few screenshots of v1:

Splash screen…
1
Trip list…
2
A flight…
5
A hotel…
6
Snapped view with another app on the right…
7
 

For the devs reading I chose to write the app in C# and XAML over JS/HTML.  I personally find the C# XAML experience a LOT more productive … especially when you add in tools and frameworks like Caliburn Micro.

Like I said above, I hope to follow up with a few posts about the experience in more detail and about Win 8 development in general. 

Also … drop me a note in the comments or the contact section of the blog if you need any Windows 8 development done.  I know some people 🙂

Thanks,

-Chris Johnson.

New SharePoint Online / SharePoint 2013 version feature comparison matrix…

The always timely and astute Andrew Connell just alerted me to the new SharePoint Online / SharePoint 2013 feature comparison matrix that MS published.

Here: http://technet.microsoft.com/en-us/library/jj819267.aspx

Nothing too surprising … the E3 plan is the plan to buy still if you want a “full” online SharePoint Online experience. Nothing has changed in that regard.

Notable things you will notice missing if you don’t go with an E3 or higher:

  • Business Connectivity Services (BCS), External Lists etc…, BCS Web Parts
  • InfoPath Form Services
  • eDiscovery features, holds, exchange integration etc…
  • Office Pro Plus
  • Video Search
  • All BI features

(the list above is not exhaustive and are really the ones I noticed and felt were interesting)

What is of real note is what is missing from SharePoint Online all together. This isn’t news to anyone who has been playing around with the preview … but for a lot of people I speak to these are not well known.

The biggest thing (IMHO) missing are around WCM features. Things like Content By Search Web Part, Catalogs, Topic Pages, Faceted navigation and Image Renditions are all pretty critical new features in SharePoint 2013 that are not currently available online. (they might be turned on later on at some point no doubt). This is a bit of a disappointment for those looking to build out search driven web sites.

For on SharePoint 2013 on premises the biggest “ouch” worth mentioning in my view is again WCM. 

Pretty much all the new search driven WCM features are only included in SharePoint 2013 Enterprise.  WCM Catalog, Facted Navigation, Image Renditions, Multiple Domains, Topic Pages, Content by Search etc…

Another odd thing I noticed was that Site Definitions were marked as not being included in Standard.  This is weird and I suspect is wrong … but I have not checked it for myself yet.

Side Note: External Lists anomaly.  For those with a keen eye might have seen that External Lists are included in the Foundation edition. Where as a lot of the other BCS related features are not.  Reason: This is because of where the plumbing for External Lists sits.  When we implemented this (I was the program manager who owned the external lists feature for 2010) we changed the SPList object so that you could access data in an External List the with the same SPList object model calls as you would with a regular list. Because this is a fairly deeply rooted object in the OM it’s part of the Foundation edition … and therefore in the 2010 release of SharePoint a lot of the BCS engine and core plumbing was moved to SharePoint Foundation from SharePoint Server to enable this SPList OM over external lists scenario. Bit of background for those still reading 🙂

-CJ.

PS: the fact that MS have published this means General Avalability and announcements around SharePoint Online upgrades should be coming soon … hopefully Smile

WordPress and SharePoint architecture similarities and … who moved my blog?

Other than WordPress and SharePoint sharing similar a capitalization strategy I noticed some other similarities…

When I left MS just over a year ago I decided that I would move from my older (and far more popular) MSDN blog. It was on an old blog engine that wasn’t great and didn’t offer the stuff the new cool kids were doing.  So I started looselytyped.net and hosted it on wordpress.com.  It was super simple to set up and wordpress.com did a lot of it for me.

WordPress.com is like SharePoint Online in many respects. It’s a hosted version of WordPress and because it is hosted there are things that the hoster lets you fiddle with and things they don’t let you fiddle with. Much like in SharePoint Online you don’t get to poke around under the covers of SharePoint like you can with SharePoint on-prem.

WordPress Plugins … aka full trust solutions

WordPress has a concept of plugins.  In SharePoint land this is the equivalent of full trust solutions being installed on your farm.  Obviously (like SharePoint Online) WordPress.com doesn’t let you add these since they could do anything to the server they like and effect other customers. SharePoint Online is the same, Microsoft want to preserve the stability and security of the system for everyone hosted there.

SNAGHTML39eed8c

See the similarities between WordPress and SharePoint now? 🙂

Where SharePoint is evolving is in how we get around this limitation of not being able to add functionality in a pluggable but secure and manageable manner.

Step 1: A more secure plugin model … aka Sandboxed Solutions

In SharePoint 2010 Sandboxed Solutions were introduced to offer a sandboxed execution environment for your code. This was far more limited in what you could do in there, but at least it offered some form of online friendly pluggable system.  I was working on the team that owned Sandboxed Solutions in the SharePoint 2010 release & at the time it seemed like a great solution. Remember this was before Azure existed. This was 2.5 years prior to 2010 releasing and “the cloud” was still being called “servers in a datacenter” by most people.

Step 2: An even more secure and flexible plugin model … aka SharePoint Apps

Hindsight is a wonderful thing and looking back Sandboxed Solutions is the wrong model long term. Hosting other peoples code is hard and there are better places to do that than in SharePoint i.e. Azure.

The new SharePoint App model offering remotely hosted code is a far better model going forward in my opinion.  It’s not that I am deeply into “apps” as such … it’s more that this new model offers interesting new plumbing and APIs that developers can use (see SharePoint’s new Plumbing, great for developer).

Where to from here?

Back to WordPress … it doesn’t yet offer a solutions like this (AFAIK). Plugins are full trust solutions that are installed.  In a similar vein Microsoft CRM offers a sandbox where code can run etc…

I wonder when we will see more products like WordPress and MS CRM move to the same architectural model as SharePoint 2013 for custom code and plugins?

I expect to see the new SharePoint App model, or more correctly, the plumbing and APIs that support the app model to evolve in the coming releases fairly rapidly. Allowing us to do more than is possible today and build solutions that integrate with SharePoint in new and interesting ways. The Sandbox has turned out to be a dead end and the new way forward is getting code out of the host process and into better suited places like Azure.

So what is your point Chris?

Oh … well I started writing this post to fill you in on my blog moving. Its still WordPress … but I decided I wanted plugins and all the stuff WordPress.com doesn’t offer.

So I moved my blog to run on WordPress on Azure Web Sites.

Yes I know this sounds like I am advocating for full trust solutions in SharePoint … really I’m not 🙂 SharePoint has a better long term solution for those now 🙂

I wanted the ability to add plugins and get at features in WordPress not offered in the WordPress.com hosted option.

+ I am a big Azure fan … keep up the great work @ScottGu

I won’t regurgitate all the steps to get WP running in Azure … but will point to a couple of helpful posts from John Papa who recently did a similar move.

http://www.johnpapa.net/wordpress-on-azure/
http://www.johnpapa.net/azurecleardbmysql/

One thing I will mention is that I had a hard time getting Azure configured to serve my site on both looselytyped.net and www.looselytyped.net.  Azure Web Sites recently added support for “naked domains” aka… domains without the “www” on the front.  I found it a wee bit tricky to set up due to the requirement to set up a dummy CNAME DNS record so that Azure can check the DNS settings … so in case you are wondering how to do this I have a few screen shots below.

My DNS is hosted with GoDaddy … and the first thing you need to do is add a special CNAME DNS record that Azure checks for.

You need to create an alias for “awverify” and point it at “awverify.<your azure name>.azurewebsites.net … see below…

image

Then in the Azure management portal click the manage domains button to map domain names to your web site

image

Here is my setup…

image

In order for Azure to allow me to add www.looselytyped.net I needed to set up a CNAME record that pointed at looselytyped.azurewebsites.net

In the same vein … Azure would only allow me to add the “naked domain” (looselytyped.net) once I had added the CNAME for “awverify” and point it at “awverify.<your azure name>.azurewebsites.net.

Anyway … I hope this helps the next person who gets stuck trying to get their Azure web site running on a root “naked” domain.  It stumped me for a while and the documentation wasn’t 100% clear.

Thanks,

-CJ.