These postings are provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.
Jonathan RozenblitDeveloper Evangelist
Susan IbachDeveloper Evangelist
If the answer is yes, could your hatred be caused by your local implementation? In this blog series we look at four common problems with SharePoint implementations and how you can address them.
SharePoint is one of those tools where the line blurs between the developer and the administrator, much like SQL Server and much like SQL Server, SharePoint is everywhere! So even though this post is not about coding for SharePoint, I thought it had some great information that many of us could use when dealing with SharePoint implementations, either as a developer supporting an implementation, or even as an end user (did I mention I use SharePoint at work? Hey boss, you reading this?). A huge thank you to Neil McIsaac, SharePoint trainer extraordinaire, (bio at the end of the blog) for putting this together. Happy reading!
SharePoint is an interesting platform and as it grows as a product and with its already incredible adoption, it is an important cornerstone for many organizations. But ask the people that work with it, and you will find a divided love it or hate it passion for the product.
Why hate it?
It’s my experience (which dates back to the site server/dashboard days), that many customers have difficulty handling the product and I mean this a number of ways. Here’s the issue:
SharePoint will amplify your problems.
SharePoint will amplify your problems.
So why do we hate it? I would hate anything that made my problems larger. But did SharePoint create the problem? That would be like blaming the carpenters hammer for building a crooked house. The problems are our own doing in the majority of cases. In my experience, the most common problem SharePoint seems to amplify are the following;
Without a doubt, this is not a definitive list of problem areas, but from my experience, these are the key ones that help make or break your experience with SharePoint. So let's take a look at them.
In my mind, this is the biggest problem area and by a considerable margin. Why? Well, if you think about information management, it really encompasses all of the other areas. It is a really broad topic. What is surprising is as an industry whose core revolves around titles such as Information Management and Information Technology; you would think that we'd be better at it. Let's look at an example: The shared documents library within the default team site is fairly widely used by organizations. At face value it seems like a perfect solution for the sharing of documents. After all, it is called the 'shared documents' library.
When I was a kid, I remember going to the library. I am talking about the real one that had shelves and shelves of books that you couldn't carry around in your pocket. I won't refer to those times as 'the good old days' because they simply weren't. What fascinated me was the organization. I had the power as a kid, to walk in to the library and find various books on a topic that interested me, and to browse some additional information about each book before ever finding the book on the shelf. You might be thinking that I am referring to the ability to sit down in front of a computer and search, but I'm older than that. I'm referring to the cataloguing system called the Dewey Decimal system.
That's right, no computers. Yet I could search amongst a huge amount of material systematically and rapidly (for the times). 135 years later, and I'm watching organizations fumble with taxonomy and metadata like new borns driving a car.
So what's the problem?
If we look at the shared documents library like a real library and a document like a book, if you let your employees simply start saving their document in the library it becomes almost the equivalent of having a library where you open up the front door, and chuck your book into the building. Imagine trying to find that book a week later. For the first hundred books or so, you might be ok, but what about the first thousand? Every time you see the default shared documents library being used, you should picture a real library, with nothing more than a mound of books in the middle of the room and people frantically trying to find things in the pile. The first thing that might come to many peoples mind is that "Well that is what we have Search for!" No we don't. Well, not exactly. Search doesn't organize our data for us; it makes the retrieval faster in larger systems. If you don't believe me, do an internet search for a topic such as Shakespeare and tell me what the most current and correct material is on the subject. So how do we go from a pile of books on the floor, to nicely organized books on the proper shelves? The answer is 2/3rds metadata, and 1/3rd taxonomy.
Metadata is data that describes data. In the case of the Dewey Decimal system, that data helped to organize books into categories such as fiction or non-fiction, and provide additional tags such as animals, psychology, religion etc. so that you could much more easily identify basic keywords that described the material. In the library system, that information is collected, identified, and then recorded when the book is first brought into the library so that the material can be properly placed as well as be identified within a cataloguing system to be more easily retrieved. Do your SharePoint libraries behave like that?
Taxonomy is the organization of metadata. In the example of the library, who determined that fiction and non-fiction should be one of the primary organizational metadata to categorize books? Why not hard cover and soft cover? Within your own organization, the determination of metadata and the taxonomy surrounding it is purely yours. It needs to reflect your organizational goals, which is why companies like Microsoft can't exactly make that an out of the box feature. YOU have to address it, and unless you like sorting through a million books, you need to address it yesterday.
If you haven't already addressed it, let me help you with a few tips.
Data is a byproduct of process. Data simply wouldn't exist if it didn't have somewhere to go or something to be done to it. Knowing and understanding the key processes in your organization is a must. What can be more difficult is the identification of key areas where your processes will likely change, or where you would like to change in the future. The reason we need to identify this as best as we can is so that we can better lay the ground work now. In other words, after we know what the current process is, we need to ask "What is likely to change? What additional information might be needed to identify problems or opportunities that we could leverage to further improve the process?" As an example, if we examine a simple project management site where we record change requests and have their statuses updated, could you easily identify the total amount of time it took to go from request to resolution? Could I easily identify the chain of events that happened after receiving a change request? And is either of those 2 details important to me or will be important to me in the future? Questions such as those will help take you beyond simply recording a change request and marking it as 'resolved'. Better metadata = better taxonomy = better processes.
Taxonomy is fairly simple in concept in that it is leveraged metadata. I think I've already established the importance of having some type of taxonomy. Although what I am about to say is really two versions of the same thing, for the sake of the SharePoint argument I am going to separate the taxonomies into 2 types; Navigational taxonomies and categorical taxonomies. The reason for the separation is so they can be planned according to their primary usage in that users are either finding the data they need, or working with the data to make decisions. By focusing on their usage, we can hopefully make a better taxonomy.
With navigational taxonomies our focus should be on the Use Cases that you have established for the project. By focusing on what people do with the site, we can streamline their access to their data. You won't be able to establish that unless you understand what people do with your site, and Use Cases are the best way to establish that.
You should also support more than one navigational taxonomy since there isn't only one way to complete a task. The goal of the menu navigation should be task focused, so how do we add a second navigational taxonomy? By adding more menus? No. In SharePoint, we can add these extra navigational taxonomies through the introduction of a Site Directory focused site, and/or through the use of custom search pages and results. Both of these options are relatively easy to implement and will allow your users a second and or third way to find a location in your growing architecture.
Categorical taxonomy can be a bit harder to implement since it deals directly with content. We need to collect metadata on content to better describe it, but what should that metadata be? How should it be best structured? Great questions and the first answer lies within understanding the various processes surrounding your data. How it will be used, what decisions need to be made on it, etc. The metadata from this is typically well understood and most organizations have little trouble in establishing what the metadata is rather they have trouble in establishing how to best implement it within SharePoint.
Let me give you some tips in establishing categorical taxonomies;
Use Content Types Content types are a way of establishing a common structure that can be shared amongst lists and libraries. Use them if you want to establish some consistency. Use the Managed Metadata Service (MMS) You can think of the MMS as a place to store the common vocabulary for your organization which can be used and shared in a number of ways. Another advantage is that you can disseminate the administration of the terms to the people that use them and not IT. Be aware that the MMS interface within the Document Information Panel is only supported within Office 2010. Support Views Views are a great way to change to look and organization of a list or library. They work by changing the display of the data, such as sort order, which columns are shown etc. Good views require good metadata. Support Soft Metadata Hard metadata is metadata that directly fulfills a business requirement. In other words, it really needs to be there and usually in a very structured way where we control the terms and their usage. Soft metadata on the other hand is metadata that doesn't have a direct business relationship but can offer some insight to the content. A good example would be in the way that we tag photos. Quite often we will need some hard metadata such as the date that the photo was taken and the location, but we want to support soft metadata so that users are able to tag the photo with open terms, such as 'wildlife' or 'Christmas Party'. But why do we want to support this? To which my answer is 'Do we really want to turn away free information?' Granted there is a minimal support cost to this. In the end, we have content that is simply more usable, and with any luck, could be leveraged one day, so I often tout that the support costs are minimal with a potential for much gain, so why not. SharePoint 2010 can implement this many ways including using keywords, and/or open MMS term stores.
Content types are a way of establishing a common structure that can be shared amongst lists and libraries. Use them if you want to establish some consistency.
You can think of the MMS as a place to store the common vocabulary for your organization which can be used and shared in a number of ways. Another advantage is that you can disseminate the administration of the terms to the people that use them and not IT. Be aware that the MMS interface within the Document Information Panel is only supported within Office 2010.
Views are a great way to change to look and organization of a list or library. They work by changing the display of the data, such as sort order, which columns are shown etc. Good views require good metadata.
Hard metadata is metadata that directly fulfills a business requirement. In other words, it really needs to be there and usually in a very structured way where we control the terms and their usage. Soft metadata on the other hand is metadata that doesn't have a direct business relationship but can offer some insight to the content. A good example would be in the way that we tag photos. Quite often we will need some hard metadata such as the date that the photo was taken and the location, but we want to support soft metadata so that users are able to tag the photo with open terms, such as 'wildlife' or 'Christmas Party'. But why do we want to support this? To which my answer is 'Do we really want to turn away free information?' Granted there is a minimal support cost to this. In the end, we have content that is simply more usable, and with any luck, could be leveraged one day, so I often tout that the support costs are minimal with a potential for much gain, so why not. SharePoint 2010 can implement this many ways including using keywords, and/or open MMS term stores.
This has been a thorn in my side almost wherever I go. We work in the information age and are so-called masters of information technologies, so why are we so bad at archiving strategies? A common dialog I often have with my clients goes something like this: "Our data retrieval is slow because we have a lot of it, over a million rows.", "Why do you have over a million rows in your table?", "We need to keep our data for X years.", "Did anyone say you need to keep it in the same storage medium as the daily production data?", "Ummm, no.". Archiving data does not have to be offline, it can be online and accessible, it simply has a different purpose than your live, day to day, data, most importantly it should be separated. Every time you create a new location where users can add content, whether it be a list, or a library, or a database, or a file share, you should ask yourself "How does this content retire?" and "When does it change its purpose?" After that, automate the process. Without an archival strategy you are setup for failure, you just don’t know when. By accumulating data over time, you cause the live, day to day, data to slowly become harder to use when it is left in the same storage medium. Retrieving data will be slow, and it will often get in the way of users trying to find the correct content while they are trying to accomplish their day to day tasks.
Next week Part 2. Project management…
Neil McIsaac (MCPD, MCITP, MCTS, MCSD, MCDBA, MCSE, MCSA, MCT) is an accomplished educator, consultant, and developer who specializes in enterprise application development and integration, application architecture, and business intelligence. As an instructor, Neil shares his knowledge and years of experience with students on a wide range of topics including SharePoint, BizTalk, SQL, .NET development, and PowerShell. He recently did an interview about SharePoint in the Cloud with .NET Rocks
Neil is an owner of BlueGreen Information Technologies Inc., and has over 18 years experience working in the IT industry in both the private and public sectors. His focus on large scale application development and integration keeps Neil involved almost exclusively with enterprise level companies. However, he also works in every level of government.
Neil lives in Moncton, New Brunswick Canada. In his spare time, Neil enjoys downhill skiing, golf and a new motorcycle.
We continue our series by Neil McIsaac, SharePoint MCT, for putting this together. Happy reading! If you missed it you can still read Part 1 and Part 2 of the series
This week we look at Information Security.
SharePoint has a confusing security architecture. A friend of mine continually jokes that you can do anything in SharePoint, as long as you know the 6 strategically placed security settings you need to set to allow users to interact with your content. I like to keep things simple. I always start addressing security by asking these 3 basic questions;
This question is pretty straight forward and we do it relatively well. Who gets access, and who doesn't.
This is one area where SharePoint poses some difficulty, since it lacks any worthwhile reporting tools and has enough security layers that are hidden in the UI that it feels like finding an answer to this question is akin to finding the meaning of life itself. Paired with the products inability to properly handle security inheritance and the lack of a proper method to deny permissions and you are on a never ending hunt for individualized permissions. Yuck. Unfortunately the best security reporting tools are third party. Your team needs to sit down and address how your organization will address security reporting and auditing.
Security audits are often checked at implementation, but rarely checked afterwards. Permission elevation happens for various reasons such as troubleshooting, making it necessary to schedule our audits. If running an audit is painful because we haven't properly addressed the above question, then scheduling it will hurt that much more. Again, get a good security tool.
Here are a few tips on implementing security in SharePoint to help make things a little more manageable.
I am not a fan of the Shared Documents Library which comes as a default. If you have ever heard me talk on the subject, you know I get a bit worked up about it. I am a fan of lists/libraries in SharePoint and I completely understand Microsoft's position in adding it. It was a necessary evil. The problem that I have with it is what most people put in it. It goes against pretty much every information management principal that we have. Many organizations use this library and why not? It says "Shared" and I want to share my stuff, so why not? The reasons are many, but at a simple level, you will end up with a folder structure that mimics your old file shares, and make it work by placing individual permissions on folders and files to compensate for your lack of proper architecture. If you think of lists and libraries as containers, which if you were paying attention in the previous blog post when I ranted about the importance of structure, you can shape these containers to better store its information. You can change the shape (think 'content types'), and you can change the behaviour (think 'workflows' and 'views') to better aid the end user in the task they have at hand (think 'Use Cases'). Coming back to permissions, if we have a container with similar information in it, we can control permissions to all of its content by controlling permissions to the container. In other words, permissions in SharePoint are best handled at the list and library level and not at the folder or file/item level. Which brings me to a solid point: If you are not sure how many libraries you should have, look at the common permissions to your content. If a group of people need read access to one type of content but not to another type of content, then the content should be in the same list/library and we can control permissions to the content by setting the permissions once on the list or library. So how many lists or libraries should you have? The answer is in how many groups of content with the same permissions you have. This is not always the answer, but it is a good starting point.
SharePoint groups are best used to reflect functionality rather than entity. Since we typically use Active Directory groups, adding the AD groups to our SharePoint groups to reflect the same group would be redundant. For example, having a Sales group in AD, which we mimic and create a Sales group in SharePoint usually offers little benefit. Having a group in SharePoint that reflects their ability is preferred. For example, I can create a group in SharePoint called Sales Lead Generators that can better reflect what anyone in that group can 'do' rather than who they are. Not only does it simplify security administration, it makes audit reporting a lot easier to read and verify.
Information Rights Management has been around for some time now. Surprisingly, most organizations that want to secure documents rely on securing the folder or physical media where the file is stored. The problem is that this security simply doesn't follow the document where ever it goes. IRM on the other hand, does! You just have to ask someone if their documents are just as secure after an employee that has proper permissions to the file copies it to a thumb drive, or inadvertently emails it to the wrong person. SharePoint and IRM integrate very well. You can check out more about IRM here.
Next week, part 4 business intelligence…
Thursday January 19th, 1PM Eastern time is a free webcast discussing the challenges of Release Management and how you can use Visual Studio features to help.
Release Management is a tricky business to get right and it’s crucial to the success of a project. There are so many things that need to come together to ensure a release goes smoothly. Applying a few good best practices and leveraging tools that you may already have can certainly help!
Join Adam Gallant, a Senior Technology Solutions Professional from Microsoft and Claude Remillard the President of InCycle Software as they present The Release Management Challenge and Visual Studio ALM part two of the ALM Webcast series.
Learn how Release Management practices and tools can help reduce the risks and costs of the go-to-market. Application Release is often complex, brittle and error-prone resulting in delays and many frustrations along the way. Thanks to new tools and approaches, the release process can now be successfully automated and managed. Learn how to integrate Visual Studio 2010-based tools and InRelease to implement fully automated Release Paths for your .Net based applications. We will take you through all the step and tools required from developer check-in to production.
FAST university has free webcasts on Enterprise Search and other SharePoint topics
At the MCT Summit in October, I had a chance to chat with Larry Kaye, a Microsoft Certified Trainer. Larry works with FAST University. I hadn’t heard of that organization before, so I asked Larry to fill me in on what they do. I’ll summarize the key offerings here, but if you don’t feel like reading, just watch my interview with Larry below (apologies for the camera shake, I am prone to that, I think I should get a tripod)
FAST University offers training and resources on SharePoint for administrators and developers. Although they cover other topics as well, they offer a lot of training on search features. They have classroom training, and just in case there are no classroom dates or locations convenient for you, they also offer virtual and e-learning courses.
If you register at their website, you can see a full list of the resources, and access a number of free webcasts! Including the following which I thought might be of interest to SharePoint developers:
Here’s Larry talking about FAST University and their courses.
If the answer is yes, could your hatred be caused by your local implementation? In this second part of our blog series we continue to explore four common problems with SharePoint implementations and how you can address them.
Once again, a huge thank you to Neil McIsaac, SharePoint MCT, for putting this together. Happy reading! If you missed Part 1 – Information Management, you can read it here
Last week we looked at Information Management, this week let’s look at Project Management.
There are some interesting numbers on the frequency in which SharePoint projects fail. I won't bore you with numbers mainly because individually they succumb to a lot of subjectivity, but ask anyone that's been around the block a few times and they will tell you that the majority of SharePoint projects fail. Why? Blaming SharePoint for a bad project is kind of like blaming a poor house design on the hammer in the carpenter's hand. SharePoint is a tool, albeit a very complex one, but the result is always the result of its usage and rarely the tool itself. SharePoint has its quirks, the vast majority of products do, and part of a proper SharePoint implementation is to address those quirks as best we can. But that's not where projects tend to fail. The common culprits are the following;
This is a really tough one to control in a SharePoint project. When the decision has been made to use SharePoint and people soon realize that it has the potential to solve the majority of your organizations problems, many organizations attempt to solve everything at once or completely the opposite, choose to only solve a single problem with SharePoint.
SharePoint projects are commonly either scoped too large, or too small. Too large a scope, and you are overwhelmed trying to coordinate a very complex solution. You get bogged down with the intricate under wirings of your organization to the point that your project will be stuck in the requirement gathering stages for years. I've seen it. I've seen organizations that have planned for a year and not really yielded any results. On the other hand, organizations that start too small usually create an inadequate solution for growth. So where is the happy medium?
To properly manage scope within a SharePoint project you need to understand a bit of the big picture of your environment and then focus on one problem at a time. The best place I have found to start is by establishing proper Use Cases for your organization, and not just the ones you think should go into SharePoint. Properly created Use Cases are one of the most powerful architecture tools that we have in IT and is something that every IT department should have on hand already. They truly help focus our solutions to be task oriented and not data oriented. By understanding what our people do or need to be able to do, we can create a better solution for them. After collecting Use Cases, we need to establish an overall vision for the SharePoint solution. This can be a little bit daunting to staff that are new to SharePoint structures. If we look to our Use Cases, we can group the cases that are shared by common roles with the idea being that those roles should be able to complete those tasks as easily as possible. By grouping them, we can establish areas in SharePoint where an employee in that role can go to and complete those tasks. We now have an idea as to the scope of our project - make an area in SharePoint do cases x, y and z. Many areas can be identified with their Use Cases bound to them, and realistic timelines could be better established for each area.
Most organizations feel they are pretty good at requirements gathering because they've been doing it for so long. In my experience, they've just established that they don't understand process improvement. It is the question "How can we do this better?" where we establish our daily pursuit of perfection and question our assumed excellence. There is a lot of information elsewhere on different approaches, so I will cut this down as simply as I can. If you are not using an iterative process in your IT projects, you are doing it wrong, plain and simple.
I should expand on this a bit. You should have a qualified SharePoint architect or architecture committee. "We don't have one, so where can we find one?" Good luck. There are a lot of lousy consultants out there for various reasons, but you really need to have a good architect in an IT project who understands the impact of various choices they make. When it comes to SharePoint, I offer this advice. Give your solution architect a business problem you wish them to solve in SharePoint, and ask for 3 different solutions and the pros and cons of each. If they can't do it, RUN! They are obviously under-qualified to be supporting you. A really good architect should be able to rough out more than 3 different solutions.
Wow. This is one of my absolute worst pet peeves of the IT industry. If the only testing you are doing is User Acceptance Testing (UAT), and maybe some regression testing, you have really missed the boat. I have a whole spiel on this topic which I will save for another blog someday. When it comes to SharePoint, test your solutions including your code and go beyond the question of "Does it work", and ask "Does it work well?"
This is one of my favourites mainly because it is one of the most overlooked. I often ask my clients how someone in their organization would go about creating a new site, say, to manage a project. The answer is typically that the person making the request would send an email to their manager, where it would eventually be forwarded to IT after a couple of emails going back and forth for approvals and information gathering, an IT staff member would then go and manually create a site for the requestor. My reply usually goes something along the lines of "So, you gather some required information, invoke a workflow with steps for approvals and further data collection, and create a site based on the data. Why isn't that automated in SharePoint?" By using SharePoint to manage SharePoint, you can establish a more consistent structure and daily routine. In the above example, the data can be collected via a list. Workflows can be initiated for the approvals and further data collection and in the end a site could be created automatically as the final successful step in the workflow process. The result would allow IT staff to be involved less, the results more consistent since we reduce the amount of manual steps, and the process to flow much faster. Managing IT requests are also business procedures so don't ignore them when developing your Use Cases for SharePoint.
Next week part 3 Information Security…
There are user groups all over the country where fellow geeks meet, share knowledge, network, and talk technology. Find your nearest user group and check it out!
I was speaking recently about HTML5 and pinned sites in Internet Explorer 9 to 58 developers in Fredericton, New Brunswick. It was a meeting of the Fredericton Developer User Group. They meet once a month. A typical evening involves pizza and pop, time to network with the others at the meeting and then a presentation on a topic of interest by either a group member or a guest speaker.
Sometimes we get so caught up in our own department or our own projects that we forget to take time to learn, grow and just have a little fun from time to time with other people who will get our jokes about constructors and garbage collectors. If you are fortunate, you may get to attend conferences like TechDays, DevTeach, or Prairie DevCon but not all of us can get away for a conference and even if you do those are usually just once a year.
Joining a user group gives you a chance to be part of a like minded community who deal with the same sorts of challenges you do, day in and day out. It can keep you motivated, interested, and can help you stay on top of technology. We often co-ordinate with user groups when we have new content we want to share across the country. We’ve organized a Windows Phone Mango Tour, Cloud camps, and an ITpro tour tour through local user groups, so you can trust them to know about any significant events and promotions going on in Canada that could help you.
There are two places you can look up your local user group: MSDN Canadian Community and TechNet Canada User Groups. Check both lists because some user groups are listed on one and not the other. There are even a few virtual user groups if you don’t find one physically located near you.
Find your nearest user group and go geek out!
The shorter version of this interview originally aired on Episode 2 of D³: LIVE & INTERACTiVE, streamed live on January 4, 2012. Watch D³: LIVE & INTERACTiVE every 1st Wednesday of the month and on-demand. More >>
Continuing with the theme from the last D³: LIVE & INTERACTiVE, starting something, well known community expert, Microsoft MVP, and career coach Miguel Carrasco was on the show to talk about LinkedIn; the opportunities it provides for you to learn, network, and grow; and most importantly, the positive impact it can have on your career. Miguel talks about how to use network connections, recommendations, and groups. He then provides valuable insights from the other side of the desk – the employer. He shares how he (at Imaginet) gets to know job candidates better by checking out their profiles and activity on LinkedIn.
As a final thought, he introduces a challenge – a challenge that will get you to see the value of LinkedIn.
Download: WMV (HQ, MQ) | MP4 (HQ, MQ, LQ) | MP3
Some interesting points
On LinkedIn in general
On network connections
LinkedIn from an employer’s perspective
Miguel’s 30x7 Challenge
As a last thought, I asked Miguel what advice he has for someone who is not actively using their LinkedIn or has not created a LinkedIn profile in order to understand its value. Miguel’s advice – take the 30x7 challenge. Spend 30 minutes a day for at least 7 days to connect with people, join groups, read questions and answers, post questions of your own, and answer questions if you can. You’ll very quickly be able to see how, through connecting with people, you can learn new things, network, and meet people, ultimately helping you grow your online professional presence and career.
Check out Miguel’s 10 LinkedIn Tips and Tricks to Take Your Career to the Next Level.
Join the Conversation
Do you consider LinkedIn as important tool to grow your career? What has worked for you on LinkedIn? What hasn’t? Join the conversation and share your thoughts in the Canadian Developer Connection group.
More on Miguel Miguel Carrasco is a digital marketing thought leader, software developer, architect, team leader, blogger and software development evangelist. Currently, Carrasco is the Director of Imaginet Interactive, and has been a Microsoft MVP for over 4 years. Before that, he was software development manager at E.H. Price, Ltd. for 6 years and chief software architect and head of software development at Anvil Digital. He started his career as solutions developer and Microsoft trainer at Imaginet. He contributes and runs many high profile blogs including MiguelCarrasco.com and Software Development in the Real World.
Special thanks to Miguel Carrasco for joining me on D³: LIVE & INTERACTiVE.
I have been working with Visual Studio for years, and I’ve found a few tricks along the way that make my coding easier. In this blog post I’ll show one of my favourite time savers the Error Correction feature.
When you are writing code for a form or a class as part of a team, or even if you are just starting work on a project which will be made up of multiple classes, you always end up having to reference classes, properties, or methods in your code that haven’t been written yet. So you either have to comment out those calls, add them later, or add stubs so your code will compile. In Visual Studio 2010 they added a neat little feature that will add the stubs for you!
Say I am writing code for a click event handler that will create and populate an instance of a Student object who will be registering for a course. I haven’t created the Student class yet so I see a squiggly under the word student and this little rectangle at the end of the squiggly.
Now comes the cool part, I can carefully hover the mouse over the tiny rectangle and a little warning symbol will appear, if I hover just right it will appear with an arrow beside it that I can click on.
Clicking on that little arrow will bring up a menu of options that will fix the error for me! By the way, if like me, you find using the mouse to bring up the list fiddly, you can use the keyboard to bring up the correction menu by putting the cursor on the word student and hitting CTRL + . that’s CONTROL KEY and a PERIOD.
Visual Studio is offering to create a Student class for me, or to define a new type (variable essentially). If I click on Generate ‘Class Student’ I can see a new class appear in Solution Explorer called Student.vb
If I open up the Student class I see it has not only created a class, but because my code called a constructor and passed in two variables, it created a constructor method in the class as well that accepts two variables!
The code isn’t complete by any means, but it’s enough to get rid of the squiggly on Student in my event handler!
Of course now I have squiggly lines under vFirstName and vLastName because I haven’t declared those yet, but if I bring up the Error Correction list for those variables I select Generate field for vFirstName and then Generate field for vLastName and it adds the declarations for me!
Sure, it didn't’ know what data type to make the variables, it’s not perfect, but when I am trying to test something quickly these little Error Correction tools that will generate code stubs for me can be a real time-saver.