SharePoint 2007 Beginner Project: How to Design and Build a Simple Help Desk Ticketing System – Part 4 (Screencast)

 

Yesterday, we shared with you the third installment in a free 10-episode video series designed to teach someone new to SharePoint how to design and build a simple business solution in under 4 hours. The fourth video teaches the new user how to navigate in a SharePoint 2007 site, and how to create a new site. (Length: 6 minutes 37 seconds)

2011-06-24-SP2007Project-Part04-01.png

(Those who would like to access all ten parts of the video series on one page can sign up for my email newsletter at spmastery.com and receive the password to access the Project 1 page on my blog).

Easier maintaining Web Parts with Visual Studio 2010 SharePoint Developer Tools

 

2011-06-29-EasierMaintainingWebParts-01.jpg

 

Visual Studio 2010 SharePoint Developer Tools simplify working with SharePoint 2010 projects. By introducing SharePoint Project Items (SPIs) the tools hide the internals of creating SharePoint packages and allow you to focus on the real work. However, when you start moving SPIs around, things might get complicated and break. Find out how to prevent yourself from spending hours on fixing stuff using the standard functionality of the new developer tools.

The things that change the most

When you change the location of a SPI in your solution, there are a number of things that you have to keep in mind to keep it working. The exact number of things varies depending on the SPI template and since Web Parts are probably the most common SPIs that you’re working with, let’s use them as an example.

The things that should change

When you move a Web Part to another place in your solution, you’re very likely to change the namespace as well, to reflect the new location. However changing the namespace only is not enough. In the case of Web Parts, you have to modify two more things to keep them working.

The things that don’t change and which we can make change

The first thing that you have to keep in mind, after changing the namespace of a Web Part, is to update the .webpart file that registers the Web Part with the Web Part Gallery. If you don’t do this, users will get an error trying to add this Web Part to a page. When you look closer at the contents of the .webpart file provided with the Web Part SPI you will see that a part of the fully qualified name is generated dynamically by the developer tools:

While generating the SharePoint Package, the Visual Studio 2010 SharePoint Developer Tools will automatically replace the $SharePoint.Project.AssemblyFullName$ replaceable parameter with the 4-part assembly name, so that you don’t have to worry about it. The only thing that you have to remember to do, is to change the namespace. However, did you know that you can make the tools work for you and make them generate the whole name automatically?

Making things change

Visual Studio 2010 SharePoint Developer Tools have a number of replaceable parameters that you can use to simplify the maintenance of your projects. One of those parameters is $SharePoint.Type.<Guid>.AssemblyQualifiedName$ which, during the packaging process, is replaced with the fully-qualified name of the type specified by the GUID.

To use it there are two things that you have to do. First you have to decorate your Web Part class with the Guid attribute, for example:

The most important here is that the GUID is lowercase and doesn’t contain curly braces. If you get this wrong, the replaceable parameter will not be replaced!

The next thing that you have to do is to open the .webpart file and in the type element, replace the value of the name attribute with the replaceable parameter, like:

Next time when you package your solution, Visual Studio 2010 SharePoint Developer Tools will replace the whole parameter with the fully-qualified name of the Web Part class. And should you ever move your Web Part to another location or even a different project, as long as you keep the GUID unchanged, the tools will always generate the proper type name.

One very important thing to note here is, that the way the developer tools work out of the box (generating only the 4-part assembly name) is not a bug! The tools use, by default, a slightly different and easier approach. The approach I’ve just described demands some extra work from you, but can be very helpful depending on your scenario.

The things we can’t make change

When it comes to Web Parts updating the namespace in the .webpart file is not the only operation that you have to do after moving the Web Part to a different place in your solution. As you know Web Parts are controls and controls have to be registered as safe in order to work in the context of a SharePoint site.

Visual Studio 2010 SharePoint Developer Tools allow you to attach SafeControl entries to every SPI. Creating such “sticky” entries is very convenient: should you ever move the SPI to a different place or package it to a different solution, the SafeControl entry will be packaged with it which really simplifies managing the packaging process.

The only limitation at this moment, when it comes to managing SafeControl entries, is that there is no way of automatically generating them. By default a SafeControl entry is generated as follows:

Although the tools automatically generate the 4-part assembly name in the Assembly attribute, you still have to manage the namespace itself in the Namespace attribute. At this moment there is no replaceable parameter that would automatically generate the namespace for you.

Although it doesn’t take you all the way there, the good news is, that generating a new SafeControl entry is just a matter of a few clicks. All you have to do is to browse to the Properties of your SPI, open the Safe Controls Entries property, select the old entry, click Remove, click Add and you’re done. Visual Studio 2010 SharePoint Developer Tools will automatically generate a new SafeControl entry with correct namespace for your SPI.

2011-06-29-EasierMaintainingWebParts-02.png

Summary

Using Visual Studio 2010 SharePoint Developer Tools for building SharePoint 2010 solutions allows you to focus on your work and be more productive. However when you move your SPIs to another location in your solution, there are some manual steps that you will have to do, to keep them working. Using the standard functionality of the developer tools, you can minimize the effort and make the maintenance of your solution easier.

Which SharePoint wave will be hosted on Azure Platform?

​Mary-Jo Foley quotes Eron Kelly,  the Senior Director of Product Management for Microsoft Online Services and Office 365 stating:

​​"Over time, the whole (Office 365 suite) will come to be based on Azure,"

It’s pretty easy to assume that SharePoint 2010 Online is included as part of the Office 365 Suite and therefore that SharePoint 2010 Online will eventually run on Azure. This is a HUGE architectural leap from running on Windows Server 2008 R2, SQL Server 2008 R2, IIS 7.5, ASP.NET 3.0 architectural stack.

Now Eron Kelly is moving to the Azure team, as Mary-Jo Foley points out, and he could just simply be ensuring job security by pushing everything his way ;-) But, it does make sense to move it to Azure where it can become a true distributed processing cloud SaaS. I’m sure that they will have troubles with scaling out SharePoint Online as more customers come onboard as they will have to "cookie cut" a prebaked private network of servers that make up the SharePoint 2010 Online Service for a collection of tenants. This becomes very brittle as more instances of these come online and echos some of the issues around the BPOS-D offering.

There is also a lot of push from Microsoft on SharePoint + Azure with Steve Fox’s (Microsoft DPE)  new book being released, some speakers selected for SPC 11 announced on twitter, Paul Stubbs (Microsoft DPE) publishing training material on this. 

I do believe it is unlikely with the time frames of Office 365 SharePoint 2010 Online GA being 28th of June that the next major release of SharePoint be hosted on the Azure Platform. They’ll be a lot of work in the team to make this happen from a SQL Azure Platform level and also from a Azure Service Windows Server level too.

It will also be interesting architectural how this will affect the onpremise version…I can’t see them branching the product into one on-premise (Windows Server) version and one cloud version (Azure). So will we require Azure appliances in the future to run on premise.

So, business as usual folks, but just thought for those out there that understand the depth of this SharePoint beast what a task the team has at hand if they wish to pull this off!

SharePoint 2007 Beginner Project: How to Design and Build a Simple Help Desk Ticketing System – Part 3 (Screencast)

 

Yesterday, we shared with you the second installment in a free 10-episode video series designed to teach someone new to SharePoint how to design and build a simple business solution in under 4 hours. The third video finishes teaching the method for analyzing a business problem and designing a SharePoint solution. (Length: 2 minutes 52 seconds)

2011-06-24-SP2007Project-Part03-01.png

(Those who would like to access all ten parts of the video series on one page can sign up for my email newsletter at spmastery.com and receive the password to access the Project 1 page on my blog).

SharePoint Governance – What is it?

 

2011-06-14-SPGovernance-Why-01.png Governance has become a hot topic in the SharePoint community. In my previous post I explained a few of the compelling reasons why. Now I am going to get into what governance is.

In the minds of a lot of people, governance is limited to “Thou shalt nots”. While restricting what people can do on SharePoint can be an integral part of a governance plan, thou shalt not make “Thou shalt nots” the whole story; it shouldn’t be, because if it is, you are missing a lot of valuable and powerful ways to make your SharePoint deployment successful.

Governance, as I see it, is five things – the first four are:

  • the rules of the road
  • how those rules are enforced
  • who is responsible for making the rules
  • who is responsible for enforcing them

Whoa. That was easy, wasn’t it?

Well, OK, “simple” maybe. Easy? Probably not.

I saved the best for last. The best thing about governance is it is an opportunity to align your technology with the business.

I had the wonderful opportunity last month at the Central Texas SharePoint User Group to hear Bill English talk about aligning SharePoint with the business. It was a fantastic presentation, and even if you read his linked post (which you should), I urge you to take the opportunity if you have it to hear Bill speak.

The creation of your governance plan is a great opportunity to start the conversation about making that alignment happen. In order to figure out what your users should (and shouldn’t) be doing in your environment, it is a good idea to know what your SharePoint is for. If you can get that purpose aligned with the business needs and define that alignment, you are halfway to having a governance plan.

If you can align with the business, the business will be invested in a successful implementation (buy in!), and will be more willing to take on the responsibilities inherent in a governance plan.

Yes, responsibilities. Remember what I wrote about making sure the content is accurate, that it adheres to company policies, that it is relevant, that it is accessible to those who need access (and inaccessible to those who should not have access), and easy to find? Someone has to do all of that.

A SharePoint Administrator knows about SharePoint. That is their job. If they are well rounded, they may also have some knowledge about business processes, HR policies, and the company’s structure and products. But unless the company is very small, the best person to maintain the content is the content owner, the best person to maintain the process is the process owner, the best person to manage the people is the people manager, and so on. They all have the specific, relevant knowledge about their subject areas needed to make accurate decisions. The SharePoint Administrator should not be a bottleneck that the business has to get through in order to accomplish the business’ goals (though the Administrator should be there to support those goals). After all, the whole point of SharePoint is empowering the end users.

But, as Spider-Man says, “With great power comes great responsibility.” With the power to create (and disposition) data, documents, content of all sorts, must come the responsibility to manage that content. And not only should they bear at least some (if not most) of the responsibility for managing that data and the processes, but they should be a part of making decisions about what the rules are going to be regarding how that content and the processes are to be managed. After all, with responsibility should come some power, too.

So you have your purpose, your purposeful alignment with the business needs and goals, and you are including the business stakeholders as part of the process. Now you can start delegating responsibilities (at least to the limit of what your organizational culture will allow). What responsibilities do you delegate? Ah, that is for an upcoming post.

One final note on this – remember that I said that if your governance plan is limited to “Thou shalt nots“, you are missing a lot of valuable and powerful ways to make your SharePoint deployment successful? Here are a few things to think about regarding responsibilities – who is responsible for your disaster recovery? Are you going to do DR drills – bring down the site and recover it from a backup? How often? Who is responsible for making sure all of the business stakeholders get a voice – who is herding the cats? Who is responsible for balancing the needs of the stakeholders? Once you open up to governance being about more than “Thou shalt nots”, you may find that your governance plan could become integral to overhauling your organizational culture….

Next time – SharePoint Governance – vs Organizational Culture (Uh-oh!)

SharePoint 2007 Beginner Project: How to Design and Build a Simple Help Desk Ticketing System – Part 2 (Screencast)

 

Yesterday, we shared with you the first installment in a free 10-episode video series designed to teach someone new to SharePoint how to design and build a simple business solution in under 4 hours. The second video continues teaching the method for analyzing a business problem and designing a SharePoint solution. (Length: 7 minutes 46 seconds)

2011-06-24-SP2007Project-Part02-01.png

(Those who would like to access all ten parts of the video series on one page can sign up for my email newsletter at spmastery.com and receive the password to access the Project 1 page on my blog).

Master List of SharePoint 2010 Custom Development Best Practices

​For the novice or even for the experienced SharePoint developers, it would be easy to get lost in the specifics of SharePoint 2010 development. Every kind of custom SharePoint components like web parts, visual web parts, application pages, site pages, master pages, page layouts, content types, list definition, site definitions, workflows, event receivers, lists, content types, field types, etc. brings their own special challenge.

As a developer, as we focus on solving business problems with custom SharePoint solutions, sometimes it’s too late when we realize that it would be great if we knew some of the best SharePoint development practices and hope to assure that we are following industry best practices and building upgradable solutions.
I am going to use this blog entry to compile some of the SharePoint 2010 development best practices I try to follow whenever I am customizing SharePoint environments using solutions and features framework. I am planning to update this page over time.
  1. Don’t ever change the files in the out of the box SharePoint Root (14-Hive) directory.
  2. Never build your SharePoint development environment on the host machine. Use the Virtual Machine instead. Virtualized environment promotes portability, playground as a sandbox, and allows quick and easy ways to snapshot the development environments.
  3. Leverage WSPs (solutions and feature framework) while deploying and packaging code from development to staging to production environment.
  4. Make sure solutions have proper consistent naming convention e.g. OrganizationName.BusinessSolution.<ProjectName>
  5. Make sure solutions have proper feature name and description. Feature name and description would be visible on the site collection and site features page.
  6. Make sure custom code is compiled and packaged in release mode.
  7. Use SPUtility, SPUrlUtility, and HttpUtility if you can. e.g. Use SPEncode to encode the HTML and URL encoding.
  8. Since URLs can change between different environments, use site.serverrelativeurl instead of site.url to build the URL in code.
  9. Don’t forget to dispose the newly created SPWeb and SPSite objects. If you create an object using “new”, you must dispose of it. (e.g. SPSite site = new SPSite(url) or SPWeb web = site.OpenWeb()). Although SPWeb and SPSite objects use minimal managed memory, it allocates substantial unmanaged memory. You must free up unmanaged memory allocated during creation of SPWeb or SPSite objects by disposing of the objects. Best practice is to instantiate objects with “using” keyword in C#. (e.g. using (SPSite spSite = new SPSite(url))). Additionally, always run solution against SPDisposeCheck utility to ensure disposing all the objects properly before production deployment. (http://code.msdn.microsoft.com/SPDisposeCheck)
  10. Don’t dispose the SPContext.Current.Site or SPContext.Current.Web object. It will be disposed of automatically by the runtime. e.g. Do not use “using” keyword with the object referenced through SPContext (e.g. don’t use using(SPWeb spWeb = SPContext.Current.Web))
  11. Don’t use SPContext.Current.Site or SPContext.Current.Web objects in the Feature Receiver to access the current instance of SPWeb or SPSite . If you ever try to activate/deactivate features using PowerShell, SPContext will fail because it’s available only in the browser context. Instead use properties.Feature.Parent to access current instance of SPWeb or SPSite object. For Site collection level feature, it would return SPSite and for web level feature, it would return SPWeb object. (e.g. use using (SPWeb spWeb = (properties.Feature.Parent as SPWeb)))
  12. Plan to install SharePoint Manager 2010 from the codeplex. It is a SharePoint object model explorer and enables you to browse every site’s properties on the local farm by browsing through SharePoint Internals.(http://spm.codeplex.com/)
  13. Use SharePoint Developer Dashboard to Investigate the Page Performance bottlenecks. It gives detailed information on resource usage, performance, user interactions and error trapping. Use SPMonitoredScope code block to generate the custom logged counters on the Developer Dashboard. Please note that you can enable the Developer Dashboard at the farm level and never enable it in production environment.
  14. Use SPGridView instead of standard ASP.NET Gridview to inherit the SharePoint CSS, Look and Feel, and Column filtering mechanism. On other side, Use standard ASP.NET Gridview instead of SPGridView to have full control over the tabular design and functionality.
  15. Use the List Event Receivers to execute the code immediately. Workflows can perform similar function but it will run as a timer job which may delay the code execution.
  16. Use SharePoint Site Property Bag to classify the sites and persist site level metadata. You can either manage it using Object Model (SPWeb.AllProperties) or Site Property Bag Configuration Tool – http://pbs2010.codeplex.com/
  17. Don’t build State Workflows in SharePoint 2010 using Visual Studio 2010. State workflows may NOT be upgradable because they are not available in the .NET 4.0 which might be the foundation framework for the next version of SharePoint.
  18. Use field controls on the WCM sites instead of web parts because you won’t have page history with web parts.
  19. For the list data access using server side object model, Use LINQ if you can, CAML if you must. Another argument is – Use CAML for fastest performance and LINQ for object oriented development.
  20. Do not instantiate SPWeb, SPSite, SPList, or SPListItem objects within a list event receiver. It will cause significant performance overhead due to additional round trips to the database and fail other registered event receivers during subsequence update calls. Instead retrieve the SPWeb or SPListItem from SPItemEventProperties. (e.g. use SPWeb web = properties.OpenWeb() or SPListItem item = properties.ListItem)
  21. Do not use SPList.Items while accessing list items using server side object model and try to avoid SPList.Items in a loop expression. SPList.Items iterates through all list items from all subfolders and all fields in the list item. To retrieve the list items, instead use SPList.GetItems(SPQuery query).
  22. Avoid deploying DLLs to the GAC (this has risks because of security override), instead deploy it to the web application IIS bin directory and use custom CAS policies.
  23. Target farm level solutions to the specific web application instead of deploying to all web applications unless you are deploying a new feature to all the applications in the farm. This way a custom feature for the specific web application won’t be available on site collection features page or site features page on all the web applications in the farm.
  24. Build Sandboxed solutions over farm level solutions for site collection specific custom solutions to balance business agility and IT stability. Understand the limitations of the sandbox solutions. Create site collection resource quota templates in the central administration. Another argument against sandbox solutions is it has resource quota points estimation issues for heavily collaborated sites.
  25. Plan to disable SharePoint Designer at the farm level and enable at the web application and site collection level as needed.

SharePoint and BPM: What’s your Strategy

 

On June 20th, AIIM introduced the latest version of its SharePoint survey. 674 people took the survey in April/May 2011. The survey covers topics from how people are using SharePoint to challenges they face with it to expectations for future uses. Some interesting stats come from the survey.

For the second year in a row, the AIIM (Association for Information and Image Management) survey shows “workflow/BPM” as the most popular third-party add-on product for SharePoint. This points to the continued importance of organizations finding more value out of putting their content in motion across the organization by to help improve their overall business productivity. In many ways, this survey result is not surprising as the AIIM community has a strong history with the Enterprise Content Management (ECM) market; as their content management features were commoditized over the years, the ECM vendors looked to acquire smaller BPM vendors or to extend the value of their content by introducing basic workflow features. The SharePoint market is repeating the lessons learned by the ECM vendors by adopting or planning to introduce BPM applications or simple workflows.

2011-06-27-SPSBPMWhatStrategy-01.jpg
Source: AIIM SharePoint Survey, June 2011

One of the key challenges around SharePoint that I have been writing about this year was also revealed in the survey. The #1 issue for organizations deploying and using SharePoint is their “lack of strategic plans on what to use it for”. In my semi-annual survey How Businesses are Using SharePoint, “lack of business strategy” was the biggest obstacle business managers faced with the platform, but my survey also pointed to the IT Pro’s challenges of “lack of development time and effort to build business applications” and the business analyst’s challenge of “end user adoption”. As you might imagine, if there is no business strategy behind SharePoint, end users will be slow to adopt it, and IT will find it challenging to secure funds and resources needed to develop SharePoint based business applications for the end users to access. This challenge points to an inflection point in SharePoint deployments and expansion where unless the business strategies exist around SharePoint, its expansion in the enterprise will continue to be challenged.

If you are interested in learning more about SharePoint workflow/BPM, I would recommend checking out Sadie Van Buren’s SharePoint Maturity Model. It describes different maturity levels for how businesses are approaching workflow/BPM. You can use this model as a way to access how your organization might use workflow and BPM. If you don’t know much about the difference between workflow and BPM, I would recommend Forrester’s research paper: SharePoint and BPM – Finding the Sweet Spot (note: Forrester requires registration to download this report).

To further emphasize this point, I began a series of articles on SharePoint business strategies that were published on NothingButSharePoint.com earlier this year. The first article was entitled, “We Don’t Have a SharePoint Strategy”. If you have a moment, check it out – it is just as relevant today as when I published.

2011-06-27-SPSBPMWhatStrategy-02.jpg
Source: AIIM SharePoint Survey, June 2011

For those organizations that are already working with SharePoint workflows and BPM solutions, the AIIM survey shows the top business process applications targeted. The important thing to note here is that Microsoft is not investing in delivering these applications to end users. Microsoft is emphasizing the role of SharePoint as a platform on which third parties develop business applications. If you are using SharePoint to better manage business processes, ask yourself if your process is highlighted in this list. If you are not using SharePoint for managing business processes, you might want to consider one of the elements from the list below as a place to start. If you are looking for third party application vendors to help you deliver or develop one of these applications, you can ask your local Microsoft rep for a contact they are familiar with, attend a SharePoint Saturday event to ask others for recommendations, or attend one of the many SharePoint events/tradeshows where many of these vendors participate.

2011-06-27-SPSBPMWhatStrategy-03.jpg
Source: AIIM SharePoint Survey, June 2011

I highly recommend downloading and reviewing the latest AIIM survey on SharePoint. I encourage you to discuss and compare the results with your own organization. If you are challenged about your own SharePoint strategy, the survey report might give you some ideas. You can find the full AIIM survey at: http://bit.ly/AIIM_SharePoint.

For those of you wondering about the next installment of my How Businesses are Using SharePoint survey, it will open again in the first week of August 2011. We will promote the survey availability here on NothingButSharePoint. As always, everyone who takes the survey will receive the results summary.

SharePoint 2007 Beginner Project: How to Design and Build a Simple Help Desk Ticketing System – Part 1 (Screencast)

 

Not everyone will agree with me, but I believe passionately that SharePoint has the potential to transform business by empowering knowledge workers to significantly increase their productivity. I insist that someone with a normal amount of computer knowledge and the desire to do so can learn how to create real-world business solutions in SharePoint quickly. I’m talking a few hours, not days or weeks.

I also believe that SharePoint training needs to become much more affordable than at present, if SharePoint is to drive significant business productivity increases. I’m not arguing that every end user should be given the keys to the kingdom, but simply that every knowledge worker who has the desire to do so should be given an affordable way to learn and practice SharePoint, and after proving their skills, be given a departmental site collection to streamline and automate their processes. (Power to the end user!) I envision a day in the not-too-distant future in which the ability to build a basic business solution in SharePoint using the SharePoint GUI and custom workflows in SharePoint Designer is a basic knowledge worker skill, just as using Word and Excel are now.

In order to help move the world toward that goal, I have created a free 10-part training video series totaling 72 minutes of instruction that teaches a new SharePoint user how to design and build a simple SharePoint solution. Nothing But SharePoint.com has graciously agreed to offer this video series to their readers.

The first video will tell you what you need in order to learn SharePoint using this project. It also begins teaching a simple method for analyzing a business problem and designing a solution in SharePoint. (Length: 5 minutes 46 seconds)

2011-06-24-SP2007Project-Part01-01.png

(Those who would like to access all ten parts of the video series on one page can sign up for my email newsletter at spmastery.com and receive the password to access the Project 1 page on my blog).