Posts Tagged ‘SharePoint 2010’
Sweden SharePoint User Group (SSUG) – Updates and information
September 21st, 2012 by Tobias Zimmergren
Author: Tobias Zimmergren
http://www.zimmergren.net | http://www.tozit.com | @zimmergren
Introduction
Since we kicked off the Sweden SharePoint User Group (or SSUG) a couple of years back, we’ve managed to keep a great flow and balance in keeping free meetings and sessions throughout the Swedish SharePoint community. Recently I launched (actually re-launched) the SSUG group down in the southern parts of Sweden – and with great success. It’s awesome to see what a huge interest there is for SharePoint in general and our user group in particular.
Popular: Coming events
I’ve re-mapped the domain www.ssug.se to point to our EventBrite page, which is where you’ll find any and all upcoming events with the SSUG group in Sweden.
Stockholm – September 24th, 2012
There is only 50 seats. PLEASE - if you cannot attend and have registered, please unregister. It’s not fair to our host or the people on the waitlist to not show up!
- 17:30 Registration – you need to register here on Eventbrite to get a seat
- 18:00 Wictor Wilén introduces SSUG and kicks off this season
- 18:05 Steria welcomes everyone
- 18:10 Matthias Einig (Steria) will present Application Life Cycle Management in SharePoint
- 19:00 Beer and something to chew on
- 19:15 Wictor Wilén (Connecta) will give you an introduction to all the new and shiny stuff in SharePoint 2013
- 20:00 All good things must eventually end, but we’ll wrap up with a quick Q&A session about SharePoint 2013
Malmö – Oktober 4th, 2012
There is only 50 seats. PLEASE - if you cannot attend and have registered, please unregister. It’s not fair to our host or the people on the waitlist to not show up!
- 17:30 – 18:00: Mingle and meetup
- 18:00 : Tobias Zimmergren (TOZIT AB) introduces SSUG and kicks the meeting off
- 18:05 : Carl-Johan Tiréus (Connecta) welcomes us to Connecta
- 18:15 : One year with SharePoint – Alfa Laval presents their experiences and lessons learned from introducing SharePoint in their organization
- 19:00 : Food & Beer!
- 19:15 : Wictor Wilén (Connecta) talks about the most important news in SharePoint 2013
- 20:00 : The End. Who’s up for a SharePint?
Where can you find us?
Upcoming events: www.ssug.se
Facebook Group: www.facebook.com/SharePointSweden
- Posted in Business
- 1 Comment
- Tags: SharePoint 2010, SharePoint 2013, SSUG, Sweden SharePoint User Group
SharePointDiscussions.com – Discussion Forum software for your SharePoint sites
August 15th, 2012 by Tobias Zimmergren
Introduction
During the last few years, we’ve been enabling our clients with enhanced discussion forum solutions for SharePoint 2007 and SharePoint 2010 in their intranets, extranets and public facing web sites. Given the great success of the last few years implementations of discussion solutions with our clients, we have now dedicated an entirely new initiative to manage the discussion solution suite.
Head on over to www.sharepointdiscussions.com to take a closer look!
We’re live!
We’ve successfully launched a new site called SharePointDiscussions.com which will now host the content of our products and services related to our discussion forum solutions and software. All new features and updates to the solutions will be accessible from this location and any requests related to these products and solutions can be relayed to the support team at support {at} sharepointdiscussions.com
Highlights
Some of the things I’d love to highlight are:
- Competitive pricing!
– We can offer a single server license for only $399 per server
– You purchase it once, and then you’re done. No annual fees!
- Language support!
– We support multiple languages, including these:
– English – Swedish – Danish – German – Greek – Farsi – Norwegian – Dutch
– If you need your language localized, get in touch
- Features
– Mark posts as answers
– Mark posts as helpful
– Mark posts as abusive
– Collect user statistics
– Earn points for posts, helpful posts and answers
– Categorize discussions in different forums
– Multiple threads in each forum
– Create posts and threads easily
– Delete entire threads easily, or single posts
– RSS: Subscribe to new threads in a forum
– RSS: Subscribe to new posts in a thread
– Additional free Web Part: Recent Posts
– Additional free Web Part: Top Viewer
– Display users with most total points
– Display users with most total posts
– Display users with most answered posts
– Display users with most helpful posts
– Additional free Web Part: Forum Search
… and much more.
Summary
It’s about time to continue writing on our SharePoint 2013 versions of our Apps, products and solutions – so with that, I thank you for your time to read this!
Enjoy!
- Posted in Business
- No Comments
- Tags: Products, SharePoint 2010, SharePoint Discussion Web Part
Hosted Microsoft TFS – Team Foundation Service – Part 4: Connect your project to TFS and create a build definition
February 24th, 2012 by Tobias Zimmergren
Author: Tobias Zimmergren
http://www.zimmergren.net | http://www.tozit.com | @zimmergren
Introduction
A while back an announcement was made that TFSPreview.com had been made available for general testing. Various bloggers at Microsoft put an invitation token in their MSDN blogs so everyone can have a go at it.
In this article series we’ll take a very quick look at what the hosted TFS solution by Microsoft looks like.
Articles currently in the series:
Steps to hook up a project to your new build server
This article obviously assumes that you’ve already followed along with the previous articles and hooked up a build configuration for your TFSpreview account. Now we’ll take a look at how we can get our projects hooking up in a CI/Automated Build scenario with Team Foundation Services.
The steps from this point onwards are basically the same as if it would be an on-premise TFS server in your own domain. Your build server is configured, your code is hosted in TFS and all you’ll need to do is connect your project to the actual TFS and then create a new build definition.
Create a new project (or connect an existing one) and connect to TFS
We’ll start from the beginning and create a new Visual Studio 2010 project (in my case it’ll be an Empty SharePoint Project), and remember to tick the Checkbox "Add to source control": ![]()
Make sure that the project is connected to your TFS server, check in the source and we can get started:
Create a new build definition
At this point (if you’ve followed the articles in this article series) you should have a TFS server, a connection from Team Explorer to your TFS server and also a new project hooked up in your repository. Now its time to create our first build definition so we can automate the builds and deployments.
Start by navigating to your Team Explorer and right-click on Builds and then click the "New Build Definition…": ![]()
This will give you the following new dialog where you can specify details for your build: ![]()
Move on to the "Trigger" tab. In my case I want to enable CI (Continous Integration) for my project: ![]()
Move on to the "Workspace" tab. In my case I’ll leave the Source Control Folder as the default root as seen below. You can choose to specify a specific TFS project if you don’t want to include all. ![]()
Move on to the "Build Defaults" tab. You’ll need to specify a build controller (you should have one here since we created one in the previous article). You will also need to specify a drop folder, where your binaries are going to be delivered upon the build: ![]()
Move on to the "Process" tab. This is where things get really interesting. You can from this dialog specify a variety of different variables for your project when it builds. I’m not going to dig into details here because my good mate Chris O’Brien have covered all of that in his article series about automated builds. ![]()
Save the build definition and validate that it appears in the Team Explorer: ![]()
Test the build configuration
In order to validate that our setup now works with TFSpreview.com and our own build server and to validate our newly created build definition, simply make some changes to your project and check it in and have it automatically schedule a new build (We chose Continuous Integration, which will build on each check in). You can see that the build is now scheduled and currently running: ![]()
And after a while you can validate that it is Completed: ![]()
The final validation is of course to see the drop folder that we specified and make sure that it now contains our newly built sources: ![]()
Voila. Build seems to be working.
Summary
This post was intended to give you an overview over the simplicity of creating a simple build definition and getting started with automated builds in TFSpreview (hosted Microsoft TFS). Pretty neat and it seems to be working just the way we want.
Obviously there’s some apparent questions like:
- What if I want to output my .wsp files as well?
- What if I want to execute a specific script upon the execution of the build so I can automate test-deployments?
- Etc. etc.
My first recommendation is to visit Chris O’Brien and read all the posts in his CI/automation series which is simply amazing.
- Posted in Technical
- 3 Comments
- Tags: Automation, CI, Cloud, SharePoint 2010, SP2010, TFS
Hosted Microsoft TFS – Team Foundation Service – Part 2: Connect your development rig
December 29th, 2011 by Tobias Zimmergren
Author: Tobias Zimmergren
http://www.zimmergren.net | http://www.tozit.com | @zimmergren
Introduction
A while back an announcement was made that TFSPreview.com had been made available for general testing. Various bloggers at Microsoft put an invitation token in their MSDN blogs so everyone can have a go at it.
In this article series we’ll take a very quick look at what the hosted TFS solution by Microsoft looks like.
Articles currently in the series:
Connect Visual Studio 2010 to your new hosted team project
In order to be able to connect to the hosted TFSPreview team project, you’ll need to comply with the prerequisites I’m listing here.
Prerequisites
- Make sure you’re running Visual Studio 2010 SP1
- Install KB2581206 – (KB2581206 – Visual Studio 2010 SP1 TFS Compatibility GDR)
Hook up Visual Studio to your new repository/project
Alright, if you’ve downloaded and installed KB2581206 (which means you’re spinning VS2010 SP1 already) you are read to connect. The procedure to connect to the hosted TFS service is basically the same as if you were to connect to any other TFS repository, which is easy and awesome.
In Visual Studio 2010 SP1, simply make these smooth ninja moves and you’re done:
Make sure to fetch the URL of your account (As seen in your dashboard, like depicted below):
Enter this URL in the Visual Studio 2010 dialogs and we’re ready to kick off:
It’ll ask you for your credentials which you need to use to verify your account details:
You should now be authenticated and your repository should be available:
You’ll go ahead as you normally do and choose the projects that interests you and then you’re basically done:
Your Team Explorer should contain your TFS project and you should be able to work with it as you normally would from Visual Studio 2010:
This means you’ve got all of your standard tasks and operations available straight from VS 2010 (So you don’t have to go to the website to make changes …): ![]()
Summary
Easy enough. As soon as you’ve downloaded the required tooling to get connected, you can hook up your new cloud-hosted team project in Visual Studio 2010 without any problems. Give it a spin, it flows quite nicely!
Enjoy.
- Posted in Technical
- 6 Comments
- Tags: Cloud, SharePoint, SharePoint 2010, SP2010, TFS, Visual Studio
Getting Started with Debugger Canvas – An aid in your daily development (debugging) tasks
December 29th, 2011 by Tobias Zimmergren
Author: Tobias Zimmergren | www.tozit.com | @zimmergren
Introduction
Sometimes when you’re in a development project you can feel the pain of debugging. If there’s a lot of code floating around it may be hard to sort out the method calls and how the depend on each other if it’s a very complex solution. To ease the task of debugging there’s a great VS 2010 plugin called Debugger Canvas, which will help you to sort out a lot of the hassle while debugging.
In this article we’ll just take a quick look at what Debugger Canvas is and how it can assist us in our daily debugging adventures.
Getting Started with Debugger Canvas
Firstly, you obviously need to download the extension for Visual Studio 2010, which can be done HERE.
Debugger Canvas in Action
When you’ve installed the extension, there’s a few new opportunities presented when debugging. Your new “F5” experience will be based on the new Debugger Canvas UI instead of the traditional debugging experience which means you’ll be able to more easily follow the calls within your code, like this:
When you step into the code deeper, you’ll see how the calls were made quite easily:
Summary
You should definitely take a look at Debugger Canvas if you haven’t already as it’ll be most helpful for you in your development adventures.
Get a better overview here and watch the introductory video!
Enjoy.
- Posted in Technical
- 3 Comments
- Tags: Debugging, Development, SharePoint 2010, VS2010
Conditionally Enable or Disable a Button/Command in your SharePoint 2010 custom Ribbon group
December 28th, 2011 by Tobias Zimmergren
Author: Tobias Zimmergren
http://www.zimmergren.net | http://www.tozit.com | @zimmergren
Introduction
In most of my recent projects I’ve been required to hook up some custom functionality and add custom forms, pages and Web Parts. Some of the forms and pages I designed needed to be launched from the Ribbon menu, which of course is contextual. This basically means that when you visit a specific list which inherits from a specific content type, we can choose to display our custom Ribbon controls. One of the most common requirements I bumped into was having some kind of conditional check whether to enable or disable the button based on a set of conditions.
In your Ribbon XML for the CommandUIHandler there’s a property called “EnabledScript” which is a tag that enables you to enter a validation script to determine whether or not the ribbon button should be enabled. In my case I need to disable the custom Ribbon-controls if one item is selected, but otherwise always disable it.
Use the following snippet from the SP.ListOperation, which contains the Selection.getSelectedItems method:
<CommandUIHandler
Command=”Ribbon.Awesome.NavButton_CMD”
CommandAction=”javascript:Alert(‘My Awesome Button Was Clicked’);
EnabledScript=”javascript:SP.ListOperation.Selection.getSelectedItems().length == 1;” />
It’s really only the last line that is of interest here since that’s where the script magic happens to determine if the control should be enabled or not.
MSDN have some nice samples in one of their articles over here.
Results
If you select one (and only one) item in the list, your custom command will be enabled:
If you didn’t select or selected more than one item, the command will be disabled as such:
Summary
I know many people have been struggling with the Ribbon and making it behave. In this article I simply wanted to highlight one of the very common tasks I’ve seen developers looking for and trying to achieve in some of the last few projects I’ve been involved.
Since my awesome mate Wictor covered a bunch of awesome posts about the Ribbon, I’m not going to dive into any more details than so
Enjoy.
- Posted in Technical
- 5 Comments
- Tags: Development, Ribbon, SharePoint 2010, VS2010
SP 2010: Developing for performance Part 8 – Control that ViewState
August 16th, 2011 by Tobias Zimmergren
Author: Tobias Zimmergren
http://www.zimmergren.net | http://www.tozit.com | @zimmergren
Introduction
SharePoint 2010 developing for performance article series:
In this series of articles I will briefly introduce you to some key concepts when it comes to developing for performance in our SharePoint 2010 applications.
Related articles in this article series
Part 1 – SP 2010: Developing for performance Part 1 – Developer Dashboard
Part 2 – SP 2010: Developing for performance Part 2 – SPMonitoredScope
Part 3 – SP 2010: Developing for performance Part 3 – Caching in SharePoint 2010
Part 4 – SP 2010: Developing for performance Part 4 – Logging
Part 5 – SP 2010: Developing for performance Part 5 – Disposal patterns and tools
Part 6 – SP 2010: Developing for performance Part 6 – CSS Sprites
Part 7 – SP 2010: Developing for performance Part 7 – Crunching those scripts
Part 8 – SP 2010: Developing for performance Part 8 – Control that ViewState
Part 8 (this article):
As most of you know, in any ASP.NET project (SharePoint included) there’s something you know as ViewState. With the ViewState we can persist state of our properties in the page controls and objects across postbacks that happen in our solutions. If we are not careful and plan the usage of ViewState properly, we can end up with a performance hit that will slightly decrease the performance in the page rendering process.
In this article we will take a look at what impact the ViewState can have if we “forget about it”, and of course how we can prevent our pages from being unnecessarily big in page size.
ViewState in our SharePoint projects
If you’ve been developing SharePoint projects of any type, you’ve most certainly been doing some kind of asp.net UI development as well. (Application Pages, Web Parts, User Controls and so on) that are inheriting the asp.net capabilities and hence the ViewState.
What you should know as an ASP.NET developer: Be sure to know when you should, or shouldn’t use the ViewState. You can disable the usage of ViewState for certain components, or the entire page.
Performance considerations
With an increased ViewState you get an increased Page Size which in turn obviously means that the page will take a bit longer to render.
We’ll take a quick look at how the performance can differ when we’re using ViewState and when we’re disabling the ViewState in a SharePoint project.
Taking a look: ViewState
In order for us to really understand what impact the ViewState can have on the page rendering process, we’ll dig into the details of the what the ViewState looks like. To do this we can check out the source of the rendered page, and of course we’ll rely on our faithful squire; Fiddler2.
Before we’ll start digging with the Fiddler2-application, we can simply check the Page Source of any given page being rendered and we’ll most likely find a heap of ViewState madness going on in there.
In my sample application that only consist of a simple GridView control and a few rows of data – the ViewState is turned into this:
<input type= "hidden "
name= "__VIEWSTATE "
id= "__VIEWSTATE "
value= "/wEPDwULLTE5NjIxMzI1MDIPZBYCZg9kFgICAQ9kFgQCAQ9kFgICDw9kFgJmD2QWAgIBD
w8WAh4HVmlzaWJsZWdkZAIDD2QWBgIRD2QWBGYPZBYEAgEPZBYCZg9kFgQCAg9kFgYCAQ8WAh8Aa
GQCAw8WCB4TQ2xpZW50T25DbGlja1NjcmlwdAVdamF2YVNjcmlwdDpDb3JlSW52b2tlKCdUYWtlT
2ZmbGluZVRvQ2xpZW50UmVhbCcsMSwgMSwgJ2h0dHA6XHUwMDJmXHUwMDJmc3BmJywgLTEsIC0xL
CAnJywgJycpHhhDbGllbnRPbkNsaWNrTmF2aWdhdGVVcmxkHihDbGllbnRPbkNsaWNrU2NyaXB0Q
29udGFpbmluZ1ByZWZpeGVkVXJsZB4MSGlkZGVuU2NyaXB0BSFUYWtlT2ZmbGluZURpc2FibGVkK
DEsIDEsIC0xLCAtMSlkAhUPFgIfAGhkAgMPDxYKHglBY2Nlc3NLZXkFAS8eD0Fycm93SW1hZ2VXa
WR0aAIFHhBBcnJvd0ltYWdlSGVp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CFg9kFgZmDw8WAh8QBQIyMWRkAgEPDxYCHxAFDlNhbXBsZSBJdGVtI
DIxZGQCAg8PFgIfEAUiWmltbWVyZ3JlbidzIFBlcmZvcm1hbmNlIFNhbXBsZSAyMWRkAhcPZBYGZ
g8PFgIfEAUCMjJkZAIBDw8WAh8QBQ5TYW1wbGUgSXRlbSAyMmRkAgIPDxYCHxAFIlppbW1lcmdyZ
W4ncyBQZXJmb3JtYW5jZSBTYW1wbGUgMjJkZAIYD2QWBmYPDxYCHxAFAjIzZGQCAQ8PFgIfEAUOU
2FtcGxlIEl0ZW0gMjNkZAICDw8WAh8QBSJaaW1tZXJncmVuJ3MgUGVyZm9ybWFuY2UgU2FtcGxlI
DIzZGQCGQ9kFgZmDw8WAh8QBQIyNGRkAgEPDxYCHxAFDlNhbXBsZSBJdGVtIDI0ZGQCAg8PFgIfE
AUiWmltbWVyZ3JlbidzIFBlcmZvcm1hbmNlIFNhbXBsZSAyNGRkAhoPDxYCHwBoZGQYAgUfY3RsM
DAkUGxhY2VIb2xkZXJNYWluJEdyaWRWaWV3MQ88KwAKAQgCKWQFR2N0bDAwJFBsYWNlSG9sZGVyV
G9wTmF2QmFyJFBsYWNlSG9sZGVySG9yaXpvbnRhbE5hdiRUb3BOYXZpZ2F0aW9uTWVudVY0Dw9kB
QRIb21lZGnihW5zRhNmmnQef2E5KXJlKgIU" />
If you compare the aforementioned ViewState with the very same page but with the ViewState disabled, it would look like this:
<input type="hidden"
name="__VIEWSTATE"
id="__VIEWSTATE"
value="/wEPDwULLTE5NjIxMzI1MDJkGAIFH2N0bDAwJFBsYWNlSG9sZGVy
TWFpbiRHcmlkVmlldzEPPCsACgEIAilkBUdjdGwwMCRQbGFjZUhvbGRlclR
vcE5hdkJhciRQbGFjZUhvbGRlckhvcml6b250YWxOYXYkVG9wTmF2aWdhdG
lvbk1lbnVWNA8PZAUESG9tZWTEsK7AlAZmIZYt/bke1dmkbPKxhg=="/>
What impact can these few lines of markup have on the page rendering process anyway, you say? Well, in order to find out – let’s summon our good friend Fiddler2 and do a quick comparison.
|
ViewState Enabled |
ViewState Disabled |
|
| Body size (bytes) | 14 534 bytes | 12 883 bytes |
| Load time (seconds) | 0.3765430 seconds | 0.2031263 seconds |
A visual comparison of the same page with versus without ViewState enabled:
|
Body Size comparison (bytes) |
Load Time comparison (seconds) |
So what can I do to tune and tweak the ViewState?
There’s generally two good initial tips for tuning the ViewState.
- Disable ViewState for the entire page
- Disable ViewState for selected components
The first option is good if you don’t need to use ViewState in any of the components on your page. Then you can simply disable ViewState by setting the ViewStateEnabled property to false:
<%@ Page Language="C#"
AutoEventWireup="true"
CodeBehind="ViewStateSample.aspx.cs"
Inherits="Zimmergren.Samples.ViewState.ViewStateSample"
DynamicMasterPageFile="~masterurl/default.master"
EnableViewState="false" %>
The second option is good if you need the ViewState for certain components, but you want to disable it for others. You can disable the ViewState for specific components;
<asp:GridView ID="GridView1"
runat="server"
AutoGenerateColumns="False"
AllowSorting="true"
AllowPaging="true"
PageSize="25"
EnableViewState="false"
/>
Additional Tip: Take a look at HTTP compression
In addition to being aware of the ViewState in any asp.net project, you should take a look at HTTP Compression that you can enable in IIS.
Summary
Alright – the summer is officially over (at least of you take a look at the recent weather) and I’m back in the saddle. In this article I’ve been talking a bit about how the ViewState can impact your performance in any asp.net project (hence SharePoint project). The reason for talking about it is that I’ve seen quite the amount of projects as of late that doesn’t think about the impact a huge ViewState can have on the time it takes to download and render a page on the client.
An important consideration that I’ve learned throughout all our projects to create Internet-facing sites based on SharePoint (or plain old ASP.NET) is to measure the performance in different scenarios, including some stress testing and load tests. In most of these projects we’ve seen an increased performance if we take time to select what components or pages should disable ViewState. It might be worth considering.
Note that this is a minimal sample with minimal impact. Consider when you’ve got a huge page with 10+ Web Parts and all using the ViewState, even if they don’t really need to – can you imagine the page load times increasing? The answer is probably yes
Enjoy.
- Posted in Technical
- 8 Comments
- Tags: ASP.NET, Performance, SharePoint, SharePoint 2010
SP 2010: Developing for SharePoint 2010 and Windows Azure – Part 1
June 14th, 2011 by Tobias Zimmergren
Author: Tobias Zimmergren
http://www.zimmergren.net | http://www.tozit.com | @zimmergren
Introduction
After many-a-requests I’ve decided to do an article on how you can work with an Azure-hosted SQL Server and consume that data in SharePoint 2010.
Related articles for working with external data in SharePoint 2010:
A few introductory details about this article…
In this article I will discuss and guide you through how you can utilize the power, scalability, flexibility and awesomeness that comes with the cloud. By following this article you will get an introduction to how you can work with SharePoint together with Windows Azure to store business data.
This article will be an introduction to developing SharePoint solutions to work with Windows Azure, and in later articles I will discuss other approaches where Windows Azure may be a good solution to incorporate in the plans for your organization together with Office 365 and SharePoint Online.
Please note that this article is NOT intended to be an introduction to setting up Windows Azure. Its an introduction to setting up the connection from SharePoint to SQL Azure. More in-depth articles are coming up later.
Prerequisites
In order to follow along with this article and repro these steps yourself, you will need to have the following things in place already:
- A Windows Azure developer account
- An SQL Azure database and a table in that database
- Visual Studio 2010
- SharePoint Designer 2010
- A few sprinkles of awesomeness in your pocket would be nice, just for fun
Please note that in SQL Azure you’d need to hook up the IP-address of the machine running this code or service in order to enable it for connectivity with the SQL Azure database. You’ll see more about that in your SQL Azure portal.
Connect to SQL Azure using Business Connectivity Services in SharePoint 2010
In this section I will talk about how we can create a connection to our SQL Azure database from SharePoint by utilizing BCS. I will for the ease of demo use SharePoint Designer to set it up – and to prove that it works!
1. Make sure you’ve got existing data in one of your SQL Azure databases
In my setup, I’ve got a database called ZimmergrenDemo and a table called ProductSales. I can access the database either from the Windows Azure Platform portal or directly from the SQL Server Management Studio:
I’ve got some sample data that I’ve popped into the SQL Azure Database:
2. Setting up a Secure Store Service configuration for your SQL Azure connection
In order for the BCS runtime to easily be able to authenticate to the SQL Azure database (which is using different credentials than your Windows Server/Domain), you can create a Secure Store application and use that for authentication.
1. Create a new Secure Store Application
Go to Central Admin > Mange Service Applications > Secure Store Service > New
Create a new Secure Store application, looking something like this:
![]()
2. Configure the Secure Store application fields
I add one field for User Name and one for Password, something like this:
3. Add the administrator account(s) needed
Voila! Your Secure Store application is setup, now let’s move on to working with the data in our SQL Azure database.
3. Working with the data though Business Connectivity Services
Now that the SQL Azure database is available and your Secure Store application is configured, it’s time to get the BCS up and running with SharePoint Designer.
The first and foremost option to get up and running quickly is of course to hook up an External List and be able to see your data straight through the standard SharePoint UI.
For a detailed step-by-step instruction for the whole routine to set up a new BCS connection, please refer to my previous articles.
1. Configure the BCS connection using SharePoint Designer
Launch SharePoint Designer and create a new External Content Type and select the SQL option for the data source. Enter the information to your SQL Azure database and the application ID for your Secure Store application.
Connecting to your SQL Azure database through BCS via SPD:
![]()
Since you need to enter the credentials for your impersonated custom identity (the SQL Azure database credentials) – you’ll get this dialog:
Enter the credentials to your SQL Azure database:
![]()
Once that is taken care of, you will be able to follow the normal routines for configuring your BCS connection.
My SQL Azure database, right inside of SPD:
![]()
2. Create an external list and navigate to it in your browser
In whatever way you prefer, create an external list for this External Content Type and navigate to it. You will probably see a link saying “Click here to authenticate“.
Click the link, and you will be provided with this interface:
I probably don’t have to explain that this is where you’ll enter your SQL Azure User Name and Password to make sure your BCS connection authenticates to your SQL Azure database properly.
Okay, when the external list is created and you’ve configured the authentication – you’ll see your data flying in directly from SQL Azure into your SharePoint external list for consumption!
And as always, the coolest thing here is that it’s read and write enabled straight away – you can work with the items in the list much like normal items in any list. Sweet.
Consume the data programmatically from SQL Azure instead
If you don’t want to go with the BCS-approach and just do code directly instead then all you need to do is make sure that you wear the developer-hat and start hacking away a few simple lines of code.
Working with SQL Azure is like working with any other data source, so there’s really no hunky dory magic going on behind the scenes – it’s all just pretty basic.
Here’s a sample Web Part I created to collect the data from SQL Azure and display in SharePoint 2010.
Here’s most of what the code could look like:
public partial class VisualProductSalesUserControl : UserControl
{
private const string connectionString = "Server=tcp:YOURSERVER.database.windows.net;Database=ZimmergrenDemo;User ID=Username@YOURSERVER;Password=myAwesomePassword++;Trusted_Connection=False;Encrypt=True;" ;
private string selectCommand = "select * from ZimmergrenDemo.dbo.ProductSales;" ;
private DataTable productSalesData = new DataTable ("ProductSales" );
protected void FetchAndFill(string connectionString, string selectCommand)
{
using (var connection = new SqlConnection (connectionString))
{
var adaptor = new SqlDataAdapter
{
SelectCommand = new SqlCommand (selectCommand, connection),
};
adaptor.Fill(productSalesData);
salesGrid.DataSource = productSalesData;
salesGrid.DataBind();
}
}
protected void Button1_Click(object sender, System.EventArgs e)
{
FetchAndFill(connectionString, selectCommand);
}
}
Summary
In this article I talked briefly about how you can connect to your SQL Azure database using BCS and then utilize that information from SharePoint – or create a custom solution to access the data.
The reason for this article is to show you that working with Azure isn’t a big and scary task to take upon you – it’s actually all very straight forward!
Enjoy.
- Posted in Technical
- 5 Comments
- Tags: Featured, SharePoint, SharePoint 2010, Windows Azure
SP 2010: Developing for performance part 7 – Crunching those scripts
May 9th, 2011 by Tobias Zimmergren
Author: Tobias Zimmergren
http://www.zimmergren.net | http://www.tozit.com | @zimmergren
Introduction
SharePoint 2010 developing for performance article series:
In this series of articles I will briefly introduce you to some key concepts when it comes to developing for performance in our SharePoint 2010 applications.
Related articles in this article series
Part 1 – SP 2010: Developing for performance Part 1 – Developer Dashboard
Part 2 – SP 2010: Developing for performance Part 2 – SPMonitoredScope
Part 3 – SP 2010: Developing for performance Part 3 – Caching in SharePoint 2010
Part 4 – SP 2010: Developing for performance Part 4 – Logging
Part 5 – SP 2010: Developing for performance Part 5 – Disposal patterns and tools
Part 6 – SP 2010: Developing for performance Part 6 – CSS Sprites
Part 7 – SP 2010: Developing for performance Part 7 – Crunching those scripts
Part 8 – SP 2010: Developing for performance Part 8 – Control that ViewState
Part 7 (this article):
This article is a bit shorter than the others and will only cover the concept of crunching your script files in your projects. The reasoning behind a crunched file is to save on transfer-bytes between the client and server.
JavaScript crunching
The technique called script crunching (or JavaScript crunching) is often referred to a way of eliminating useless characters from the script files to allow them to load faster. This means that by eliminating unnecessary whitespaces, line breaks and putting semicolons in the right places you can achieve a file size that is smaller than the original.
The reasoning behind crunching the script files are much that you can save on the client/server transfer and therefore also minimize the HTTP requests – which in turn is one step in the right direction for minimizing the page load time and render time.
Short in short; Do consider the technique if you’ve got large scripts that are taking a bit too long to load.
SharePoint 2010 are using crunched scripts
In SharePoint 2010 we already have a few examples of where JavaScript crunching is working in action. One example is the SP.js file which is essentially a crunched JavaScript library in SharePoint 2010. You do however also have the ability to use the SP.debug.js which contains the same content, but without being crunched.
When you look at those two files in an editor, you’ll quickly see the difference between them:
SP.js – 381 KB – Crunched JavaScript file in SharePoint 2010 ![]()
SP.debug.js – 561 KB – The same file, but without the crunch ![]()
You can see that the mail difference between these two files is the file size. This means that if you’ve using the crunched version of the JavaScript file, your application will load slightly faster.
How to: Crunch your script files
There’s tons of tools on the market for crunching your scripts. Here’s a few online tools for crunching those scripts:
(or just search for JavaScript crunch, and you’ll find all the tools you’ll ever need)
What is the difference when using crunched scripts?
As a quick summary I did a test with an application that are loading a somewhat large script file – first without any crunching and then the same application loading the files after they’ve been minimized with a crunch. These are the results in my SharePoint 2010 application.
|
Without crunching
|
After crunching
|
| JavaScript file size: 445871 bytes (435 KB) |
JavaScript file size: 331798 bytes (324 KB) |
| Saves around 25.5% in file size |
Summary
A brief summary of the result is that if you’re crunching your script files, you’ll get a slightly smaller footprint when loading the page and making the HTTP requests. The reason for bringing this to your attention is of course that it’s a technique that’s been around for quite some time, but people tend to miss out on it because they’ve not seen the results of it. So, here you go – a visual chart telling you how it differs to use the exact same script, with and without crunching.
Enjoy.
- Posted in Technical
- 2 Comments
- Tags: Performance, Scripts, SharePoint, SharePoint 2010
SharePoint Best Practice conference in London 2011 session download
April 21st, 2011 by Tobias Zimmergren
Author: Tobias Zimmergren
http://www.zimmergren.net | http://www.tozit.com | @zimmergren
Introduction
The last week that just passed was filled with quite some cool happenings over at the BPCUK Conference in London. If you’ll follow the #BPCUK tag on Twitter you’ll find all the juicy information that you missed out on – there’s no real need for me to repeat it here
Downloads
As promised, my session deck on Silverlight and SharePoint 2010 can be downloaded here: Download!
- Posted in Misc
- No Comments
- Tags: Best Practice, Conference, Downloads, London, SharePoint, SharePoint 2010, Silverlight, Speaking, Training


