In many ways a seasoned ASP.Net developer can have a difficult time learning SharePoint 2007 development because they have become accustomed to the practices ascribed to by the Microsoft ASP.Net team. One of these practices is so benign and intuitive, that most developers find it incomprehensible that it is not available when using a WSPBuilder project template. The practice that I am referring to is right clicking your declarative markup and selecting “View Code”. The menu item is not available, because the WSPBuilder Project type is based on the standard C# project type, and does not include the web application project type. Because of this, you cannot add regular web application based items such as web forms and web controls. This has lead many developers, including myself, to develop SharePoint solutions by hand, manually linking our declarative markup and code behind files, all the while not using designers and in some cases intellisense.
Saturday, July 16, 2011
Friday, June 24, 2011
Visual Studio Styles
I was recently asked where I got the Visual Studio color scheme that I used in this post:
http://www.viamacchina.com/2011/06/a-better-inputformsection-for-sharepoint.html
Originally I had been turned on to the VS Theming trend by Scott Hanselman’s post about theming Visual Studio.
http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx
When I went back to his blog to get the link for his post, I saw that it has been updated and now there is an entire site dedicated to Visual Studio themes:
http://studiostyl.es/
There are a ton of great themes on this site, and you can even make your own.
For the most part theming your environment is just a fun way to beak up the monotony of an application that you spend WAY too much time with. But, I have also found that after switching to a darker theme that I have reduced the amount of eye strain and fatigue associated with marathon coding sessions.
Have fun!
http://www.viamacchina.com/2011/06/a-better-inputformsection-for-sharepoint.html
Originally I had been turned on to the VS Theming trend by Scott Hanselman’s post about theming Visual Studio.
http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx
When I went back to his blog to get the link for his post, I saw that it has been updated and now there is an entire site dedicated to Visual Studio themes:
http://studiostyl.es/
There are a ton of great themes on this site, and you can even make your own.
For the most part theming your environment is just a fun way to beak up the monotony of an application that you spend WAY too much time with. But, I have also found that after switching to a darker theme that I have reduced the amount of eye strain and fatigue associated with marathon coding sessions.
Have fun!
Saturday, June 18, 2011
A better InputFormSection for SharePoint
One of my biggest annoyances with developing solutions SharePoint 2007 is the fact that many of the web controls available in the SharePoint framework do not support the same development paradigm that traditional ASP.Net controls support. Specifically, many controls in the Microsoft.SharePoint.WebControls namespace do not support two way data binding. The best example of this is the InputFormSection control. Like many ASP.Net Templated controls, the InputFormSection control allows you to encapsulate items of your choosing in regions within the control. The control takes care of the layout and positioning of your controls, and reduces the need for redundant declarative markup.
Friday, June 17, 2011
GhostDoc - My favorite “New to Me” extension for Visual Studio
Commenting our code is a necessary but sometimes painful exercise for developers. We tend to scrutinize our object structure, method names, and overall terseness and readability of the code itself, but leave commenting for last. I recently ran across a free extension for Visual Studio that makes adding XML documentation comments for your code as simple as a key stroke.
Monday, June 6, 2011
Using a base web part class when developing SharePoint web parts
When developing solutions for SharePoint 2007, I use WSPBuilder almost exclusively. Carsten Keutmann has created an excellent tool that automates and eases much of the work that is involved in creating a solution for SharePoint. In fact, in some ways, WSPBuilder makes things too easy. When creating a project using the out of the box WSPBuilder project and item templates, it is easy to fall into some bad practices.
One of these practices that I see far too often involves the use of the OOTB Web Part Feature Template. If you add a new Web Part Feature to your project using the WSPBuilder Item Template, WSPBuilder will automatically add a Template folder, a Features folder, and then a folder of the same name as your web part. Within your web part feature folder, four files will automatically be added. An elements.xml file, a feature.xml file, a .webpart file, and your web part code behind .cs file.
One of these practices that I see far too often involves the use of the OOTB Web Part Feature Template. If you add a new Web Part Feature to your project using the WSPBuilder Item Template, WSPBuilder will automatically add a Template folder, a Features folder, and then a folder of the same name as your web part. Within your web part feature folder, four files will automatically be added. An elements.xml file, a feature.xml file, a .webpart file, and your web part code behind .cs file.
Subscribe to:
Posts (Atom)