Contents tagged with Office 365

  • SharePoint MVP AMA on October 29th

    Tags: SharePoint, Office 365

    You should mark the 29th of October at 1pm EST (18:00 CET) in your calendar. The MVP Chats are back!

    A couple of years back we regularly held MVP chats where anyone could ask SharePoint MVPs anything (almost at least). These chats was really successful and we received really good feedback. Unfortunately the tool we used for the chats was abandoned and we have been looking for a new way to do this. We think we’ve found a really interesting format for this by using the AMA format at Reddit (/r/sharepoint).

    [Update 2014-10-29]: The thread is located here: http://www.reddit.com/r/sharepoint/comments/2kojof/ama_time_we_are_a_bunch_of_microsoft_mvps_for/

    There will be at least fifteen SharePoint MVP’s answering YOUR questions so feel free to tune it the 29th. We will try to make sure that at least one MVP answers your question, the ones most skilled in the topic of the question, and we’ll make sure that not everyone answers it (which normally is an issue with forums like this).

    We will have experts from infrastructure, to design, to development, to no-code (all definitions of that!) solutions and more, for both SharePoint and Office 365 This will be a great opportunity for all of you to finally get that hard question answered.

    If this turns out to be a successful event I’m pretty sure we will do it again! And to get as much questions as possible, spread the word and use the hashtag #spmvpchat.

  • Presenting the new Office 365 APIs at TechDays in Sweden

    Tags: Presentations, Office 365

    TechDays 2014I’m thrilled to be presenting at TechDays 2014 in Stockholm the 19-20 November. This is the 5th time the TechDays conference is held here in Sweden and I know that this years edition will be even more awesome than the previous times. As usual the best speakers from Sweden will be there and some international really interesting speakers, such as the well-known Mary Jo Foley.

    I will be presenting a session about the new and interesting Office 365 APIs. We will walk through what these new APIs do, what they can be used for, how to do authentication and why you should invest your time in these APIs. It will be a developer focused session and we will look at code as much as possible – and we will have as much fun as possible.

    I really look forward to meeting you there, and if you’re not already booked, then head on over to your manager and say that if he or she doesn’t send you to TechDays, then you will in the wake of your competitors. Oh, and by the way, don’t miss out on the early bird offer which is valid until the last of august.

  • The SharePoint Team is listening - make your voice heard

    Tags: SharePoint 2013, Office 365, Microsoft

    There’s a lot of stuff happening right now at Microsoft, they innovate, create great software and services, the new CEO accepts and wins almost all challenges and the SharePoint and Office team is listening! This is the Microsoft that I like and this is how I want Microsoft to continue to be. But Microsoft and the SharePoint team can’t just listen in blind – they listens to us out here in the real world, customers, clients etc. and we need to make our voice heard. This can be done in several ways, we can talk to our Microsoft representatives, we can whine on our blogs and on social networks OR we could make ourselves heard at UserVoice.

    Microsoft and different divisions and groups within Microsoft has started to use UserVoice pretty extensively lately. UserVoice is a great service where you can set up your own channel, listen for feedback and questions, and answer them and most importantly act upon them. Just recently the SharePoint team had a blog post called “UserVoice driving improvements to SharePoint API” which shows just this. From the feedback they received on UserVoice and with direct and indirect customer contact they’ve made some pretty significant improvements to the SharePoint API’s, such as JSON Light support and others. I really dig this!

    FeedbackSo, if you have a suggestion or improvement to Office, SharePoint and/or the Office 365 service then get your sorry behind over to UserVoice and make yourself heard. Read other peoples suggestions and vote on them. The more votes, the more likely the teams will pick up it.

    Here are some of the UserVoice channels that Microsoft and the different product groups use:

     

    One suggestion that I made the other day was a suggestion that the Office/SharePoint/Office 365 team has a publically posted “change log”. I would like them to post any changes done to the API, UI, CSS, JavaScript, PowerShell etc in a chronological change log, so we don’t have to read between the lines in KB articles etc. If you think that this is a great idea, then I invite you to vote on my suggestion here: http://officespdev.uservoice.com/forums/224641-general/suggestions/6297224-sharepoint-and-sharepoint-online-change-log

  • Presenting at TechX Office 365 January 23-24 2014

    Tags: Conferences, Office 365

    imageThis year has barely started but the conference season is already running at full speed. The first conference for me of this year will be the TechX Office 365, here in Stockholm, Sweden.

    This is a conference organized by Microsoft with sole focus on Office 365. There will be national and international speakers of top class. I will do two presentations, one about Building Apps for SharePoint [Online] 2013 and one about Building Apps for Office  2013.

    The conference is held January 23rd to 24th at the Microsoft offices in Stockholm (Akalla). There are still a few seats left, so hurry over to get your ticket.

  • Summing up the year of 2013 and embracing 2014

    Tags: SharePoint, Azure, Personal, SharePoint 2013, Office 365

    Wow, 2013 was an interesting year and the time has come for my annual blog post to sum up the year that soon has passed us and looking a bit into the crystal ball for the next one. This is my seventh summary post and it is always fun to look back at what has happened during the last 12 months (2012, 2011, 2010, 2009, 2008, 2007 and 2006).

    For me the year has been really intensive on all levels; I don't think I´ve ever experienced such a huge demand for my professional services as of now, there is so much new stuff to learn and it´s harder and harder to keep up, I have a hard time resisting doing tons of community stuff and at the same time we had a huge construction work at our house, and of course having two soon-to-be teenager girls takes its toll!

    Writing

    The number of blog posts I create every year continues to decrease, but I do hope the quality improves and that you still get some decent value out of my posts. There are so many good bloggers out there and I don´t want to repeat what everyone else is writing about. There are a couple of posts that I´m quite proud of and here´s the list of the ones you have visited the most the last 12 months:

    There´s no coincidence that four of the top five posts written this year is about Office Web Apps Server 2013 (WAC) – it is my new favorite server product, and I think it is one of the core server products/services that will be a huge and integral part of the "One Microsoft" and its services.

    I also had the benefit of participating in a "real" writing project – as a co-author of "Inside Microsoft SharePoint 2013". This was my second book written together with some of the most famous SharePoint book authors. If you still haven´t ordered yourself a copy then you´re missing out on something!

    Speaking

    I´ve continued to do sessions at conference, perhaps not that many this year. I try to choose conferences that fits me, my family and clients and also I try to focus on creating good, new and interesting content. I´m not the kind of person that like to do the same content over and over again. I´m incredibly lucky being in this position and being able to travel and meet all the awesome people around the world. I know there are a couple of conferences that I would like to have presented at, but had to turn down due to other commitments…maybe next year. To read more about the presentations I´ve done over the last year and see the decks and some video recordings, check out my Presentations page.

    MVP

    I got re-awarded the MVP status once again, now my fourth time. It´s always really nice to be given this award.

    MCSM

    Talking about the Microsoft Certified Solutions Master, MCSM, could be a couple of posts on its own, but let´s try to crunch it down. Early January this year I attended the beta rotation of the brand new MCSM program for SharePoint. This program was totally redone to suit both on-premises SharePoint 2013 and Office 365/SharePoint Online (contrary to what some people think and say). There is/was no better training for SharePoint, in the cloud or not, than this program, and there will never be such a good program again! I was fortunate to pass both the written exam and the qualification lab "in-rotation" (that is no retakes or anything), being one of the first ones. Unfortunately the whole MCSM program was cancelled during this year. But once a Master always a Master. I´m really proud that I am one of the few who has passed MCM for SharePoint 2010, MCA for SharePoint 2010 and MCSM for SharePoint (2013) – a bit sad I didn´t get the chance to get the 2007 exam and get a full hand :-(

    SharePoint…

    Can´t write this post without a little section about SharePoint. What will happen to SharePoint, will it cease to exist? To some degree I do think so. But SharePoint as a product has played out its role in my opinion. SharePoint is just a piece in the puzzle of future collaboration software. Take a look at how Workflow has been moved out of SharePoint, how Office Web Apps is a separate product, how applications now are Apps outside SharePoint, how Enterprise Social now is a service (in Yammer). SharePoint will be there in the form of building sites and acting like a glue between all the other services. Will it be known as SharePoint? I don´t really know, but in a few years, I don´t think so. It sounds like judgment day for some, and it might be, unless you are prepared. I think this "brave new world" will for the ones who can accept the change be full of opportunities…and I´m looking forward to it! On the other hand the recent messages from Redmond that SharePoint on-premises ensures the current on-premises customers that SharePoint as a product will be here for another couple of years, which is good, it gives you good options to slowly move from a product to a service. But the innovation will be in the services, Office 365 and Azure, not in the products.

    Predictions

    Last year's predictions was not that off the chart. The Cloud message is ever increasing, and there´s no end to it. I also predicted a "collapse" of the SharePoint community, to some degree I think that has started to happen. The community is still thriving but there is not a single community as it used to be. There has been several new community sites and community conferences started this year. Not that it is a totally bad thing, but in my opinion it does not help the community moving forward. We´re also seeing many of the old community celebs and influencers moving away from SharePoint as a specialty and instead focusing on the new set of services.

    So what about 2014 – what do you think Wictor?

    SharePoint is dead, long live SharePoint. I wrote it above; SharePoint as a product is slowly going away, instead "SharePoint as a service" is where the focus should be. If anyone of you watched the PDC08 keynote, when Azure was announced – do you remember the slide where "SharePoint Services" was one of the listed services. I think this is where we´re going, six years later.

    Azure domination! The Azure team at Microsoft is really impressive right now, look at all the different services they announce and improve. Being a bit late to the game, but now being captain of the Cloud movement. If it was something I would bet my career on now, it would be Azure.

    Services, services, services! Everything will be services. Combine the things I said about SharePoint, with the things about Azure and add the recent announcements of the killed ForeFront products (and others). Microsoft is all in on the Devices and Services thing and you should be too. This changes the way we design, build and sell our professional services.

    The future does look a bit cloudy, doesn´t it.

    Happy New Year

    That was it! I do have a lot more to say, but you all should be on vacation right now stocking up on energy for 2014 so I keep it short. Next year will be an intensive year for me, I know it. I´m already excited about the new engagements I have planned for early 2014, about the SharePoint Conference in Las Vegas (last SP conference?) where I will be a presenter for the first time, and also the big change at Microsoft with a new CEO – how will that affect me!?

    So, to all of you I wish a Happy New Year and I´m looking forward to seeing a lot of you out there next year!

  • Summing up the year of 2012 and embracing 2013

    Tags: Personal, SharePoint, SharePoint 2013, Office 365

    Only one day and a few hours left of the year of 2012 and the time has come for me to make my (now traditional) summary post. I’ve done it now for six years (2011, 2010, 2009, 2008, 2007 and 2006) and it’s always fun to look back at what has happened during the last 12 months.

    This year has been an interesting year to me and contained some really interesting milestones, happenings and events.

    Writing

    This year I’ve written basically the same amount of posts as in 2011, even though a new SharePoint version has been released. Basically it comes down to that I’ve been working a lot and haven’t had time to finish up some of the posts I’ve started and I’ve been busy with other commitments in the community. Anyways, I hope you enjoyed what I’ve written – I try to keep the quality up rather than the quantity.

    What’s really cool is that I now on average have more that 1.300 daily subscribers to my blog, a 30% increase since last year. Thank you!

    The most popular posts this year has been:

    1. How Claims encoding works in SharePoint 2010 – a post you should read IMO and still valid for SharePoint 2013
    2. Visual Guide to Azure Access Control Services authentication with SharePoint 2010 – part 1 – The first part of six posts in the series.
    3. SharePoint 2013 – Introduction to the Minimal Download Strategy – MDS – An MDS overview.
    4. SharePoint 2013 – Claims is the new black – the post title says it all
    5. SharePoint 2013 – A look at the hardware and software and other requirements – my pov on the hw and sw requirements

    The most popular post (from all years) is still the “Fix the SharePoint DCOM 10016 error on Windows Server 2008 R2” post.

    No books this year – done that once…

    MVP again..

    I was re-awarded the Microsoft Most Valuable Professional, MVP,  award for SharePoint for the third consecutive year. I’m honored by still being a part of this group of community contributors.

    Microsoft Certified Architect – MCA

    What I’m most proud of this year is that I passed the Microsoft Certified Architect for SharePoint, MCA, certification. This is a certification, currently only held by five individuals worldwide, which proves that you can “architect” a business and technical solution based on SharePoint and related technologies. What I do like about this certification is that it is not just a test or a lab (you get those tests while doing the MCM/MCSM, which is a pre-requisite for the MCA) but instead it is a mix of interview, business case, portfolio, presentations and Q&A’s, where you really must show that you understand business requirements, budgets, time plans etc. You can read more about my take on the program here – What is a Microsoft Certified Architect?

    Conferences and travels

    I got my fair share of travelling this year as well, a bit less than last year – which my family appreciated though. I had the opportunity to speak at a couple of conferences – where the International SharePoint Conference 2012 was the highlight. This conference was something extraordinary for both the attendees and us speakers. I really enjoyed working together with the team on the dev-track building out our solution and sessions and it was so fun having the whole team on the front row supporting (and a little bit of heckling) each other during the three days. I will be back next year in London!

    I also had a blast at the first SharePoint conference in Croatia, and I hope I’m invited again and as usual our local SharePoint and Exchange Forum – which just keeps growing!

    Microsoft arranged the SharePoint Conference 2012 in Las Vegas to unveil the spanking brand new SharePoint version…well it turned out that the product was released a month ahead, so the conference didn’t have much new information. In my opinion this was a pretty bad conference – the depths of the sessions was to low, to many of the speakers should not have been allowed on stage, and what a total disaster when all Microsoft talked about was how good the cloud is and they had no Internet connectivity. I really hope that the conference team get their stuff together and rethink a lot of things for the next conference!

    The Cloud

    I can’t really write a summary post of 2012 without talking about the Cloud. Microsoft (and other vendors) really put all their money on the cloud this year – nothing new with this, it’s been going on for years, but this year it’s more clear than ever. Well, the cloud is nothing new – it’s just a new name for the Internet, Application Service Providers, etc etc, it’s more of a marketing term.

    Since the release of Office 365 the transition of SharePoint to the cloud has started (BPOS was first but SharePoint wasn’t cloud ready at all at that time). With this new wave of SharePoint and 365 the SharePoint cloud offering is even more evident – and we don’t know now where it will end, I’m not sure even Microsoft knows that yet.
    We’ve been running 365 for a year and a half now and we still suffer a lot from different strange issues (that could be a post on it’s own!). Hopefully once upgraded the service will be more stable and useful.

    I might sound a bit doubtful about the cloud – and I am. For the vast majority the cloud (read 365) is a great option instead of hosting and managing their own instances. But for large enterprises (the clients I’m normally working with) 365 is not even an option…

    Only time will tell…

    Predictions

    This is the part I really enjoy writing and thinking about at this time of the year – looking back at my last years predictions and looking in the crystal ball for the upcoming year.

    Last years predictions wasn’t that good – Silverlight is till not dead (someone hooked it up to a CPR machine) and all the browser vendors seems to be on some kind of honeymoon. My wish that 2012 was a bit less cloudy failed miserably! The only thing I think I got right was that Windows Phone would have momentum and by looking at some stats there’s some truth in that.

    So what do I think about next year?

    • Cloud, cloud and cloud! The cloud marketing will continue, it will be shoved down our throats, we’ll be so sick of it by the end of 2013. But this will be the way forward. It will be really interesting to see what will happen to traditional “on-premises” products – will they vanish? Just take a look at how Microsoft has discontinued a lot of products this year!
    • Identities, certificates, federation! I think one of the most important things for next year and the years following are having a good identity infrastructure and identity management in place. This should be a priority for all companies and architects working in our business. It’s also the basic requirement to get any cloud services to work properly.
    • Apps, devices and integration! For the cloud, hosted services etc to work the integration story must be better. We’ve seen a good start with Windows 8 (RT), Windows Phone 8, Office 2013 etc – but it’s not fully there yet. I think that this is what will be improved over the next 12 months and that might also be the key differentiator between the three large “ecosystems” – Windows, Linux/Android and the fruit camp.
    • SharePoint community! The SharePoint community has grown really large and it has reached some kind of “critical mass”. I’m not saying it’s to big or anything but I see the community being more divided than ever splitting up in different directions with different specializations, aspects, mind-sets etc. The number of conferences, user group is ever increasing. This year the community will change (due/thanks to the cloud) – we will see a big change in focus, we will see SharePoint professionals being Azure, Windows 8/Phone, JavaScript professionals.

     

    What do you think?

    Thank you and a happy new year!

    With that I would like to wish you all a Happy New Year and say thank you for 2012. I‘ve been having my doubts about 2013, but now I ‘m really looking forward to it. I have some cool events and travels planned, I know that my work at Connecta will contain some interesting opportunities and I know that the demand for SharePoint is ever increasing…

    A view from our summerhouse

    See you on the other side!

  • Now running on Azure Web Sites and Orchard

    Tags: Website, Personal, Office 365, Windows Azure

    Azure Web SitesYES! I'm finally alive with a new hosting provider - this time it's Microsoft (who could have guessed that!). Thanks to the just released Azure Web Sites I have now moved my blog from my old custom blog implementation (that has been a fun project though), to running Orchard on Azure Web Sites using SQL Azure. This finalizes my cloud migrations - last year I moved e-mail and everything but the site to Office 365 and started with a hosted service for this site, but for running this little blog that was a bit to expensive (you're not clicking the ads enough).

    You have to bare with me for a little while until I get everything spinning. I apologize for any inconveniences with updated posts in your blog readers and other physical or mental illness caused from this. All blog posts should have been migrated fine (I know some stuff haven't got correctly through) keeping the old URL's and everything. I built a quick Orchard theme and haven't tried it in obscure browsers yet. Also Azure Web Sites is only in preview, so I expect it not to work 24/7 (my previous hosting provider didn't have that either though...).

    If you do find something peculiar, don't hesitate to comment on it...

    [Update] There seems to be an issue with Azure Web Sites/Orchard when I'm updating or adding modules, which makes the site go down for a couple of minutes. Hopefully I won't do this as often though...

  • Visual Studio 11 Developer Preview with the new SharePoint Developer tools

    Tags: Visual Studio, SharePoint 2010, Office 365

    imageVisual Studio 11 Developer Preview is now available for download für alles and it does not only include the Windows 8 stuff like the previous preview did - this one contains the thing we all want - the SharePoint Developer tools.

    Overall the performance of Visual Studio 11 is blazingly fast! I regret I tested it - since I will go back to 2010 tomorrow (or even tonight). They team has done a great job and included a lot of the PowerTools natively; such as the new Solution Explorer, the improved search feature etc.

    But, back to the SharePoint Developer tools 11! What's new for all the kool kids! Here's a few highlights.

    Content Type and List Designer

    We all love our CAML, FieldRefs etc. But it isn't that productive. VS11 contains the long awaited Content Type Designer and also a very similar designer for Lists.

    This is how the designer looks like when you're creating a Content Type:

    The Content Type Designer

    When creating a list you have a great view to create Views:

    Create a list view

    Sandbox and Office 365 support

    New features in the Office 365 space for Visual Studio was an easy bet. They have incorporated the things from the SharePoint Power Tools, such as better compile time support for the Sandbox etc. The best feature here is the Publish feature, which allows you to publish your package to a URL or local directory. You can now publish a SharePoint WSP directly to the sandbox in Office 365 - but you can't activate the solution from within Visual Studio.

    Publish!

    Other improvements

    There are much more improvements such as profiling support, better JavaScript debugging support etc. Read all about the new stuff here: http://msdn.microsoft.com/en-us/library/ee290856(VS.110).aspx

    But...you really need to test it out. I'm really looking forward to start working with projects in VS11!

  • SharePoint Online and External Data using JSONP

    Tags: SharePoint 2010, Office 365

    It was some time since I did a real blog post and I have been fiddling with a specific topic, which I'm going to write about, for quite some time now. I've been working an Office 365 Intranet and been doing two conferences lately where I've demonstrated Office 365 and Windows Azure integration. One of the challenges (and boy, there are many) of Office 365 and SharePoint Online are access to External Data or services. In a few blog posts I will describe how you can work around these issues using some very simple techniques. All that is to it is that you have to "think outside the box" and not always go down the traditional SharePoint way of doing things.

    So let's get started! How do I in my SharePoint Online solution access remote/LOB data in a SQL Server database, web service or what not? The first and obvious candidate most think of is Business Connectivity Services - didn't they announce that in Anaheim!? Yea, it can be done and it works - but not as you (and I previously) expected. Steve Fox (MSFT) did show it at the SharePoint Conference 2011 and also wrote a blog post about it. The caveat is that you have to go through the Client Object Model to access the data in the external list, not using the Sandboxed server side API - that dog won't hunt.

    I'm going to do basically the same thing as Steve did but using a slightly different technique - which I find more easy and more straightforward, considering I'm not using the asynchronous Client Object Model but instead uses standard jQuery, jQuery templates JsRender, JSONP and WCF.

    This is how we'll build this little sample. First of all we have a database stored in SQL Azure. This database is surfaced through a WCF endpoint in a Windows Azure Web Role. This WCF service will be consumed by a JavaScript using jQuery and JSONP as transport in a Web Part (I'll use a Sandboxed Visual Web Part for this) and rendered using JsRender (not jQuery templates which I recently shown in a few sessions).

    The data flow

    The secret sauce - JSON-P

    First of all before digging into how this is actually implemented we need to sort out how we're actually going to transport data from the WCF endpoint to SharePoint Online.

    The best and easiest way is to use JSON notation to transport the data; jQuery has great support for that and it's very easy to program using JSON structures in JavaScript. The only problem is that SharePoint Online and the WCF service is going to be hosted on different domains - and therefore it will be a cross-domain scripting issue. To overcome this issue JSONP (JSON with Padding) can be used. JSONP is a very clever method. Instead of returning a string from the remote domain and then being parsed by the caller, a JavaScript method is returned, which returns the JSON structure when evaluated, and this returned response is dynamically appended to the calling document as a script tag. Smart huh? Only problem is that we need to fiddle somewhat with our WCF endpoints, and that's what we'll discuss next...

    Setting up the WCF endpoint

    In this sample we need a database with one or more tables and then generate an ADO.NET Entity Data Model from that. That data model is then exposed through a WCF Data Service. WCF Data Services uses the OData protocol and supports JSON format but not JSONP. Fortunately I was not the first one lacking this feature and there is a simple extension you can download to accomplish this. This extension is an attribute that you add to your Data Service class and makes the service support the $format=json and $callback=? query string parameters.

    Once you have downloaded and included the class into your project you decorate your DataService class with the JSONPSupportBehavior attribute and it should look something like this:

    [JSONPSupportBehavior()]
    [System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)]
    public class Users : DataService {
        public static void InitializeService(DataServiceConfiguration config) {
            config.SetEntitySetAccessRule("Users", EntitySetRights.AllRead);
            config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
        }
    }

    Now we're all set to consume this from SharePoint Online.

    Consuming the JSONP enabled WCF endpoint from a Web Part

    Create a new Empty Sandboxed SharePoint project and then add a Sandboxed Visual Web Part (make sure that you have the Visual Studio SharePoint Powertools installed to get this Sandbox enabled Visual Web Part). We're only going to use HTML and JavaScript for this one, so you could do the same thing using a Content Editor Web Part, SharePoint Designer or whatever you prefer.

    Note: I'm using the new JsRender technique here, instead of the just recently abandoned jQuery Templates. The JsRender is not even in beta yet so the syntax might/will be changed over time. Read more about the change here.

    First of all in our user control we need to import the jQuery 1.7 file. Instead of uploading it to our SharePoint site we'll use a CDN for this (which will boost your overall performance and save you one file to maintain).

    <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.min.js"></script>/<

    The JsRender.js file is not yet available on any CDN's so we have to add that JavaScript file into a new Empty Module SPI. You can deploy it to any folder or library, in this case I'm deploying it to the SiteAssets library of the site. Since we're talking about SharePoint Online here and we cannot guarantee that the file will be in a specific site this JavaScript file must be included dynamically or by using server side code to get the correct Web Url. We're doing the former one, and you will see the code in just a bit.

    The next thing is to define some markup where we would like to show our data from the WCF service. We'll define a table with an id equal to "list" and add a nice default row, which just says loading (makes it a bit more nice to the user).

    <h1>Users</h1>
    <table>
        <tbody id='list'>
            <tr><td><img src="/_layouts/images/loadingcirclests16.gif" />Loading data.../</td></tr>
        </tbody>
    </table>

    After that we need to define the template that JsRender will use when applying the data to the table. This is done in a script tag using the type="text/x-jquery-tmpl" like this:

    <script id="UsersTemplate" type="text/x-jquery-tmpl">
        <tr>             
            <td><b>{{=Name}}</b></td>              
            <td>{{=Company}}</td>         
        </tr>     
    </script>

    The final thing is to add the script that will load the data from the WCF service and then when it retrieves the response it will use the JsRender template to populate the table.

    <script type="text/javascript">
        SP.SOD.executeOrDelayUntilScriptLoaded(doTheRemoteStuff, 'SP.js');
        var rootWeb;
    
        function doTheRemoteStuff() {
            var clientContext = new SP.ClientContext();
            var siteColl = clientContext.get_site();
            rootWeb = siteColl.get_rootWeb();
            clientContext.load(rootWeb);
            clientContext.executeQueryAsync(succeeded, failed);
        }
    
        function succeeded() {
            var elm = document.createElement('script');
            elm.type = 'text/javascript';
            elm.src = rootWeb.get_serverRelativeUrl() + '/SiteAssets/JsRender.js';
            document.getElementsByTagName('head')[0].appendChild(elm);
    
            $.getJSON("http://mycloudapp.cloudapp.net/Users.svc/Users?$filter=email ne ''&$format=json&$callback=?",
                function (data) {
                    $("#list").empty();
                    $("#list").html($("#UsersTemplate").render(data.d));
                });    
        }
        function failed() {
            SP.UI.Notify.addNotification('Something failed...');
        }
    </script>

    The script starts with using the Script-On-Demand features of SharePoint 2010 to delay execute the doTheRemoteStuff() function. Once the SP.js file is loaded the function is executed. The function will use Client Object Model to retrieve the Url to the root web, to ensure that this Web Part will work on sub webs as well. This is needed so that we dynamically can add the JsRender.js file that was added to the SiteAssets library in the root web.

    Once we have the root web loaded the succeded() method is going to execute. This is where we first dynamically insert the JsRender.js file into the head element, referencing our own JsRender.js file. Once that is done we will use the jQuery getJSON method to get all users from the Data Service (in this case all users that has an e-mail address). To make the response a JSONP response it is important to add $format=json&callback=? to the query string in the getJSON method.

    When the response is returned the table is cleared and the rendered data is added as inner HTML of the table. The jQuery extension method $(template).render(data) is the JsRender method that generates the HTML from the template and the JSON strucutre.

    Once this project is deployed and activated in the Sandbox and the Web Part is added to a page it will first show you the loading message and then after just a second a nicely table with the data from your SQL Azure backend.

    A SharePoint Online Web Part displaying data from a SQL Server Azure database

    Summary

    This post intends to demonstrate how to solve a very common problem in SharePoint Online - fetching data from LOB systems. I used SQL Azure and a Windows Azure Web Role hosted WCF service, but it can be any kind of JSONP supported WCF service. The holy grail in this case is to JSONP enable the WCF service.

    Watch this space for a continuation of similar posts...

  • You cannot create property based search scopes in Office 365 (SharePoint Online)

    Tags: SharePoint 2010, Office 365

    Post is updated, see comments at the end of the post.

    We're really getting close to the go live of Office 365 and I am, and I guess a lot of you are as well, preparing to launch a couple of Intranets and sites. As you know by now there are some major differences between SharePoint 2010 on-premise and SharePoint Online in Office 365. And there are also some more subtle ones that jumps up right in your face.

    Today we were designing a topology for an intranet and we thought that we could use Search Scopes to search and aggregate data. Site Collection Search Scopes are available in SharePoint Online, but you cannot access the Search Service Application and create global Search Scopes. That's fine, we're in a megamulti-tenant environment here. Search Scopes are very convenient to use when you would like to do a search for a specific type of documents or information since you can create Property Query based Search Scopes. This is how it looks like in a standard on-premise SharePoint 2010:

    On Premise Search Scope

    So I tried to do the same thing in Office 365! And found out that a Property Query is not possible to create. You can only create Search Scopes based on the Web Address/URL! Sigh! I can't really see why this is disabled (see update below). Yes, I understand that they won't let us create Managed Properties, but this is to sneaky!

    Cloud Search Scope

    So back to the drawing board for me!

    Update!

    After some discussions on Twitter with SharePoint Master2 Mirjam van Olst the actual answer wasn't that far. She led me to the SharePoint Server 2010 capacity management: Software boundaries and limits document on TechNet (which I read a gazillion times lately when studying for the MCM). This document clearly states that the Threshold is "200 site scopes and 200 shared scopes per search service application" and "Exceeding this limit may reduce crawl efficiency and, if the scopes are added to the display group, affect end-user browser latency. Also, display of the scopes in the search administration interface degrades as the number of scopes passes the recommended limit.". This of course does not work in a multi-tenant environment. Notice that it's only a threshold.

    But! Why can we create URL based scopes? To find out I created two different scopes in an on-premise box and took a peek on the SSA admin database (I only looked, no hands!). All scopes global or site collection scoped are stored in the SSA admin database and compiled every 15 minutes. Both property query rules and URL rules are treated the same. That lead me to the lovely SharePoint protocol specifications, and specifically the MS-CIFO which describes the index files. This document describes how the scopes are handled in the index, using the Scope Index File format (.bsi files). My interpretation of the specs are that these files in the index are used when querying using a specific scope and therefore affecting the crawling since they are index files and behaves just like any index with merges etc. I didn't go any further...

    I still cannot tell for sure why URL rules are allowed, but my best guess is that they do not affect performance in the same way as property based rules are. So in Office 365 URL rules can be used. Also, since URL based rules are not that useful they will not be used as much anyways...

    /end update

    (Notice that I didn't mention "cloud" anywhere...dang, I just did...)

About Wictor...

Wictor Wilén is a Director and SharePoint Architect working at Connecta AB. Wictor has achieved the Microsoft Certified Architect (MCA) - SharePoint 2010, Microsoft Certified Solutions Master (MCSM) - SharePoint  and Microsoft Certified Master (MCM) - SharePoint 2010 certifications. He has also been awarded Microsoft Most Valuable Professional (MVP) for four consecutive years.

And a word from our sponsors...

SharePoint 2010 Web Parts in Action