ConfigLabs

February 6, 2009

Rampup Modules for SharePoint Development

Filed under: Programming, SharePoint 2007, TechNet — Jag @ 12:20 pm

Previously I posted about learning SharePoint development for Jr SharePoint developers. To further add to that, Microsoft just released new module for SharePoint development in their rampup incentive.

For those of you who don’t know Ramup.

Ramp Up is a free, online, community-based learning program, with a number of different tracks that will help you build your portfolio of professional development skills. Ramp Up has a solid foundation of premium technical content from subject-matter gurus, and provides easy-to-access content in a variety of forms that guide you in learning the important skills. Join Ramp Up (it’s free!) and help advance your career

So why are still reading this! Go to Ramp up site and sharpen your skills.

Ramp Up SharePoint Modules.

Part 1

Part 2

All the best!

August 19, 2008

Points to remember when building custom SharePoint Solutions

Filed under: Programming, SharePoint 2007 — Jag @ 6:00 pm

It is very important to remember the below points when you build custom SharePoint Solutions.

  • Manageability   If you have to back up and restore the complete environment (such as in a disaster recovery scenario or if you are moving hardware), you must have backups for all custom elements (such as a custom Web Part that was developed for the environment or a custom site definition) and remember to add them back to the environment again when you restore. This is because you cannot restore the configuration database, which contains all of the references to these custom elements. Therefore, you must add them back in to the restored environment. For example, you have to add back the custom site definitions and install the custom Web Parts. If you forget a custom element when you move to a new server or restore a server, you can cause errors in users’ team sites and you will have to track down the code that you need while users wait.

  • Supportability   Having custom elements in the environment can add to troubleshooting time when something goes wrong. Each custom piece of code is unique, and can be either complex or simple, and can consume additional memory to run. Consider the number of places the custom code is used and what its effect is on the system. Also, consider how you can exclude the customizations as part of the cause of a problem when troubleshooting. If you are creating the custom code, be sure to design it so that any errors from the customizations are logged in both the event log — for Microsoft Operations Manager (MOM) events — and any other location that the organization uses for troubleshooting so that you can troubleshoot the errors.

  • Usability   Consider the usability of solutions, Web Parts, and templates. If you have so many custom templates for team sites in the environment that the list of templates or Web Parts scrolls for multiple screens (for example, 50 is too many to read and differentiate), consider whether you must have all those custom elements, whether you can break the list up in some way, or whether you should roll them up into common feature packs for easier browsing and tracking.

  • Source: Plan for custom elements

    SharePoint Development Best Practices – Checklist

    Today, I came across a checklist for SharePoint Custom Solution Code Acceptance. I reckon this checklist (modified if necessary) should be part of your test plans if your SharePoint Project needs custom solution bits. Code acceptance checklist outlines best practices for security, session management, validation, sensitive data, exception handling, Web parts, documentation, general software development. I think it is very important for any SharePoint developer to keep these best practices in mind. Of all the best practices I feel every SharePoint developer (novice to experienced) should at least follow ‘Web part development’ and ‘general software development’ best practices as a mantra!!

    Best Practices for SharePoint Web part Development:

    1. Custom Web parts (including resource files) are contained within a SharePoint Feature and are packaged as a SharePoint solution in order to be deployed.
    2. The configuration of Web parts that are being deployed gives the administrator the flexibility of deploying to the Web application level or lower.
    3. You use the SharePoint Web part infrastructure’s standardized set of connection interfaces for Web parts to exchange information with each other at run time.
    4. Source code for third party Web parts solutions, whenever possible, is provided with adequate documentation to ensure good technical support.
    5. All custom Web parts utilize the SharePoint architecture to ensure consistent behaviour across the application for functionality such as single sign-on, feature deployment, and so on.

    Best Practices for General SharePoint Software Development:

    1. Assemblies have a strong name. (Dynamically generated ASP.NET Web page assemblies cannot currently have a strong name.)
    2. You use delay signing as a way to protect and restrict the private key that is used in the strong name and signing process.
    3. Assemblies include declarative security attributes (with SecurityAction.RequestMinimum) to specify minimum permission requirements.
    4. Highly privileged assemblies are separated from lower privileged assemblies.
    5. If an assembly is to be used in a partial-trust environment (for example, it is called from a partial-trust Web application), then privileged code is in a separate assembly.
    6. You rely on a native configuration file to support the application instead of changing the configuration to the Web.config.
    7. You use .NET Framework 2.0, 3.0, or 3.5.
    8. You use a single .NET Framework version. You do not mix multiple versions.
    9. Your code is 64 bit compatible.
    10. Your application does not try to directly access any SharePoint databases. Data stores in SharePoint databases are only updated by using the SharePoint object model.
    11. You avoid hard coding strings and labels. You use resources or language files instead.
    12. When referencing the SPWeb or SPSite objects, you employ a using statement or, alternatively, you use an explicit call of the .Dispose method to ensure proper use and disposing of the memory objects.
    13. You use caching as appropriate to reduce unnecessary round trips. For Web parts, you expose the cache expiration (duration) as a Web part property.
    14. When packaging your solution, you include a Code Access Security policy for the solution and, if necessary, include your assembly in the Safe Controls list though the solution.
    15. When logging code, you use the Portal Log class to log the SharePoint Unified Logging Service (ULS) logs.
    16. If you need to update multiple list items by using remote code, you use the Web service to update list items. You only use SPListItem.Update() if you have to update more than one item at a time by using local OM-based code.
    17. When using the Count property of a SPListItemCollection, you only call it once and then store it in a variable that you can refer to when looping. You do not call it inside a loop.
    18. The solution uses the AppSettings object to implement XML mapping. (This can be provided by using the settings persistence framework in .NET 2.0, 3.0, or 3.5.) The solution avoids creating custom XML files and a strongly typed object for XML mapping.
    19. Installation and deployment logging are provided in the event logs to enable appropriate operational troubleshooting during installation and uninstallation.

    Please note that, the best practices are not limited to ones mentioned above. Best Practices are something which evolve with experience. If you know of any other best practices which you think are worth sharing don’t hesitate to share them in comments.

    For other best practices please refer to Sample code acceptance checklist for IT organizations.

    For a printable version of the sample code checklist that you can edit, download the list as a Word 2007 document (.doc).

    Sample code acceptance checklist for IT organizations (http://go.microsoft.com/fwlink/?LinkId=125134)

    Additional Resources for Best Practice SharePoint Development

    May 27, 2008

    Web Development Helper plugs into Internet Explorer and provides tools for Ajax and Web development

    Filed under: Microsoft, Programming — Jag @ 6:14 pm

    If you haven’t seen this before…

    Web Development Helper is a free browser extension for Internet Explorer that provides a set of tools and utilities for the Web developer, esp. Ajax and ASP.NET developers. The tool provides features such as a DOM inspector, an HTTP tracing tool, and script diagnostics and immediate window.

    Web Development Helper works against IE6+, and requires the .NET Framework 2.0 or greater to be installed on the machine.

    Once installed, the tool can be activated using the Tools | Web Development Helper command. You can also customize your browser’s toolbar to add a button for this command to facilitate frequent use. Clicking on the menu command or browser button brings up the tool’s console window and set of commands.

    Page Features:

    · DOM inspector allows viewing all elements, selected elements, or elements matching an ID or CSS class, their attributes and styles.

    · Capturing a screen shot of the current page.

    · Viewing page information such as metadata, tags, and linked resources.

    Networking Features:

    · Logging HTTP (and HTTPS) requests initiated by the browser or Ajax scripts

    · Viewing request and response details.

    · Ability to filter the types of URLs to log.

    Scripting Features:

    · Trap script errors to see detailed (and correct) call stack for the script error.

    · A script console to provide trace functionality to scripts using the window.debugService script API.

    · An immediate window to write and run script.

    · A script class browser to browse classes defined in script (specifically classes written to the ASP.NET Ajax or Script# pattern).

    ASP.NET Features:

    · View view state in the page in raw, decoded, and parsed forms, to understand what is being generated into the view state (esp. useful for control developers).

    · View items stored by applications into cache, and the ability to remove them for purposes of testing.

    · View trace information, and hide it from the page, so it does not get in the way of your page layout.

    http://www.codeplex.com/webdevhelper/Release/ProjectReleases.aspx?ReleaseId=11062

    Note: Cross posted from an email sent by my colleague Paul Turner.

    May 14, 2008

    Resources for Junior SharePoint Developers

    Filed under: Microsoft, Programming, SharePoint 2007 — Jag @ 11:40 am

    We all know that, SharePoint is rapidly becoming a most liked and wanted collaboration PLATFORM for enterprises across the world and many developers from different platforms are eyeing on become a SharePoint developer. Especially, I can see a huge demand for SharePoint Developers here in Australia. So guys its time to pull your socks and learn SharePoint.

    Paul Andrew from Microsoft has put together a great list of resources and guidelines (I should say!) for entry level SharePoint developers. If you really want to become a SharePoint developer and standout in the crowd, please checkout http://blogs.msdn.com/pandrew/archive/2008/05/01/getting-started-with-sharepoint-development.aspx 

    Following the list should make your life lot easier!!  

    Forthcoming Introductory SharePoint Development Web Casts

    Filed under: MOSS 2007, Microsoft, Programming — Jag @ 11:27 am

    Microsoft is putting a series of Introductory SharePoint development web casts by SharePoint Community Leaders!

    Please find the schedule @

    http://blogs.msdn.com/pandrew/archive/2008/05/12/sharepoint-developer-msdn-web-cast-series.aspx

    November 30, 2007

    I am aspiring to become a SharePoint developer. Where should I begin?

    Filed under: Microsoft, Programming, SharePoint 2007, WSS 3.0 — Jag @ 1:21 am

    With SharePoint 2007 picking up MOSS as it rolls across different enterprises, people (especially aspiring developers) are looking forward to get into SharePoint Developer’s hat. I would say this is easy and hard! It depends on how committed you are. I am recently getting this question more often either from my friends or through comments on this blog. So thought I should make it clear for the whole community on how to become one. Here is my two cents.

    If you never had your hands on a Visual Studio or know nothing about SharePoint or other Microsoft Technologies, I recommend you start off from knowing how to program using either C# or VB.NET. People at Redmond, put together a vast list of resources keeping you in mind. Just go through each of the modules in all 3 tiers and you should be ready to have a look at SharePoint OM (Object Model). Its never a different ball, if you know how to program using C#. It is just a different day at work. More like the difference in Cricket Test match and Twenty20 (guys in US you will not understand this analogy!!)

    http://msdn2.microsoft.com/en-us/beginner/bb308786.aspx 

    Ok what if you already know how to program using C# and also know something about ASP.NET, XML and JavaScript. Well and good, spend some time to quickly revise the modules in the above link. And you should be ready rock and roll. But where shall I start mate? Good you asked this question. You should understand what is SharePoint, pros and cons of using it etc (this is more like end user stuff). This will help you to get your heads around SharePoint thingy. Find some solid time to go through the links below;

    http://office.microsoft.com/en-au/sharepointserver/FX100492001033.aspx?ofcresset=1

    http://www.microsoft.com/sharepoint/default.mspx

    http://technet.microsoft.com/en-us/office/sharepointserver/default.aspx

    And finally http://msdn2.microsoft.com/en-us/sharepoint/default.aspx (this is more developer focused)

    Also got some mood for watching SharePoint videos and Virtual Labs. Start looking at videos Here 

    All the best guys, if you find this post interesting and helpful and also found this resources great for your SharePoint Developer Journey, please don’t hesitate to share your experience with Jag. That’s me!   

    Thank You!

    Older Posts »

    Blog at WordPress.com.