Eamon Barker's eb.NET

Not quite vb.NET, but getting close!

Filter by APML
RSS Feed

Search

Profiles/Groups

Google Ads

Top Posts

Tags

Categories

Archive

Calendar

<<  July 2009  >>
SuMoTuWeThFrSa
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

Blogroll

Disclaimer

All postings are provided AS IS with no warranties, and confer no rights.

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright Eamon Barker 2009

CC License

Visitor Map

Locations of visitors to this page
Welcome to eb.NET... a place that I can keep the things that help me in my day, that might help you in your's!

Development Tools I use Everyday

Development tools I use on a daily basis!

 

The topic at last nights local .NET User Group was "Tools I can’t live without". Joel Meikle (from Meikle Programming) had a massive list of tools... I use most of  them and the ones I don't use I will be looking into. Below is a list of tools I can't do without. This table below doesn't include any of the SharePoint Development Tools or Administration Tools I previously blogged about. NOTE: These tools are in no particular order!

 

Tool Name Description Category
Refactor Code refactoring is the process of changing a computer program's code to make it amenable to change, improve its readability, or simplify its structure, while preserving its existing functionality... Visual Studio Plug-in, Code Analysis & Improvement
Lutz Reflector .NET Reflector enables you to easily view, navigate, and search through the class hierarchies of .NET assemblies even if you don't have the code for them. With it, you can decompile and analyse .NET assemblies in C#, Visual Basic and IL... Code Analysis & Improvement
Key Jedi Key Jedi allows learning and training to use keyboard shortcuts. It can be used in presentations, screencasts and videos, as well as when working with someone else on the same machine to teach new shortcuts. It shows a visual list of shortcuts as you type them, no matter what application you work in. It is free, simple and quick to use... Productivity Improvement
Paint.NET

Paint.NET is an open source, raster graphics editing program for Windows, developed on the .NET Framework. Originally created as a Washington State University student project, Paint.NET has evolved from a simple replacement for the Microsoft Paint program, which is included with Windows, into a powerful editor with support for layers, blending, transparency, and plug-ins. It is often used as a free alternative to Adobe Photoshop. It is available under the MIT License...

Image Manipulation & Design
LINQ Pad

LINQPad is also a great way to learn LINQ: it comes preloaded with 200 examples from my book, C# 3.0 in a Nutshell.  There's no better way to experience the coolness of LINQ and functional programming.

And LINQPad is more than just a LINQ query tool: it's a code snippet IDE. Instantly execute any C# 3 or VB 9 expression or statement block!...

Code Analysis & Improvement
NotePad++

Notepad++ is a free (as in "free speech" and also as in "free beer") source code editor and Notepad replacement that supports several languages. It runs in the MS Windows environment...

Code Analysis & Improvement
Sandcastle Help File Builder Sandcastle, created by Microsoft, is a tool used for creating MSDN-style documentation from .NET assemblies and their associated XML comments files. The current version is the May 2008 release. It is command line based and has no GUI front-end, project management features, or an automated build process like those that you can find in NDoc... Documentation Tools
SharpDevelop

SharpDevelop is a free and open source IDE for the C#, Visual Basic .NET (VB.NET), Boo (programming language) and (starting from version 3.0) F# and IronPython programming languages.

It is typically used as an alternative to Microsoft's Visual Studio .NET. Early in its development there was a fork to Mono/Gtk# called MonoDevelop which includes multi-platform support...

Development Tool
ZoomIT ZoomIt is screen zoom and annotation tool for technical presentations that include application demonstrations. ZoomIt runs unobtrusively in the tray and activates with customisable hot-keys to zoom in on an area of the screen, move around while zoomed, and draw on the zoomed image. I wrote ZoomIt to fit my specific needs and use it in all my presentations Presentation Tool
FireBug & YSlow Firebug integrates with Firefox to put a wealth of web development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page...

YSlow analyzes web pages and tells you why they're slow based on the rules for high performance web sites. YSlow is a Firefox add-on integrated with the popular Firebug web development tool.
Code Analysis & Improvement
Ultramon UltraMon is a utility for multi-monitor systems, designed to increase productivity and unlock the full potential of multiple monitors... Productivity Improvement
Enso Enso is dead simple to use. You just hold down the Caps Lock key and type an Enso command, which is displayed in a translucent overlay. Once the command is typed, you simply release the Caps Lock key to activate it, and the overlay disappears. If you type fast, it all happens in a flash. For instance, to launch the Firefox Web browser, you just hold down the Caps Lock key and type "open firefox." To look up the meaning of the word "proclivity," you just hold down the Caps Lock key and type "define proclivity." Productivity Improvement

Currently rated 4.5 by 2 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


SharePoint Development - Three Phases for Customisation

In this post I cover the steps I use when developing in SharePoint and when to use out-of-the-box functionally or custom code.

image

After a couple of weeks on holiday, I am back into it... and I thought I would get started with a post on the way I customise a SharePoint project. This post  won't cover coding or how to configure sites, but more of the philosophy behind the customisation of a deployment.

When I get a new project to sink my teeth into I generally split the customisation into three parts: Configuration, SharePoint Designer and Custom Coding.

The three phases

As I explained above, I use three phases when I do any customisation in SharePoint. Some projects may only need to use the first, some may need all three. Below is an explanation of each of those phases:

Configuration

Using SharePoint's out-of-the-box functionality you should be able to achieve between 60%-80% of the required customisation (or 100% if it is a less complicated project).

imageUsing Sites, Lists, Content Types, etc. you should be able to get a working example of a site. Usually this can be done with the users to ensure your requirements are correct and saves re-work later on.

I also find starting the build like this, you can let the project team loose on the site and as they get a feel for it they may move the requirements... it is better it happens at this stage, rather than on delivery when a lot more work has been done to the solution.

Once the initial configuration has been completed and a gap analysis has been done to determine what (if any) further customisation needs to be done you will need to crack open either SharePoint Designer (SPD) or Visual Studio (VS).

SharePoint Designer image

The next phase of any custom work I do requires SharePoint Designer (SPD). SPD is a tool that doesn't require masses of coding (VB.NET or C#) knowledge and can be used by technical BA's or skilled up power users. This doesn't mean developers can't use it as well!

I generally use SharePoint designer to:

  • Change the look and feel for the site
  • Display Cross-Site information in the Data View Web Part
  • Use SP Data source controls to populate ASPX controls
  • Do basic customisation of list views using the Custom List Form Web Part
  • Create basic workflows
  • Generally messing with the SharePoint Pages

Most of the time SharePoint Designer will get you close to the finish line. There are a few issues with it (not being able to easily move Workflows is one of them), but the good out-weights the bad!

Custom Coding (Visual Studio)

The third and final phase in any custom work is the cutting of custom code. The tool I use when customising a project in this way is Visual Studio. This is the realm of the developer and comes with all of the "extras" that go with full custom development (support, bugs, upgrade changes, etc.). But, VS allows you to really make the final changes to customise the project to 100% of the users requirements.

I use VSeWSS and other tools along with VS to do the following tweaks:

  • Create full site definitions so re-deploying the same site template is easy!
  • Create state machine and complex sequential workflows
  • Create custom Web Parts to modify and display information
  • Write event handlers to catch and process requests

and the list can go on and on... Where there are any gaps left after the first two steps, it should be cleaned up with code.

What to use and When

The size of the project generally dictates how far down the list you will need to go to get the solution you want. Below is a table that shows where you which direction you need to head:

Project Outline Skills Required Products to use
You are required to create a project management site that has the following functionality:
  • A place to store Risks, Issues, Communication Plans, Team Tasks
  • A place to store meeting information
  • A place to keep documents
  • A calendar to keep track of important events
  • A way to track tasks and view due/over due information
Knowledge of List & Site creation. This can be a Power User, BA, IT Pro or Developer. General SharePoint Configuration
You are asked to enhance the site with the following functionality:
  • A workflow that creates an unassigned task when an issue has been raised
  • A summary page displaying information on different phases of the project
  • Dashboard showing risk information using Red Light/Green Light indicators
SharePoint Designer Experience, HTML & CSS.
This can be a Technical BA, Web Designer or Developer
SharePoint Designer
The project team have used the site for several weeks and come back with the following enhancements:
  • A Web Part that shows statistical information about communications that have taken place. This Web Part is to be available to anyone to place on their personal page views
  • A workflow that produces an Office 2007 document with information from the issues & risk list to be used as a weekly report
VB.NET or C# programming skills & SharePoint development experience, generally this is the domain of a programmer. Visual Studio and any other development tools

Conclusion

Hopefully the above information will prove useful when deciding what path to take with customisation of your SharePoint project. If you have a large project that requires a fair bit of custom work, try and get the most out of SharePoint before you start using SharePoint Designer or Visual Studio... it is amazing what a little bit of planning and architecture can do! Anywhere from 60% - 80% of a large project can be completed without even opening SPD or VS.

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


UNPLUGGED MSDN update & HP-Microsoft SBS Road Show

Road show for the latest and greatest from MSFT & HP in the Small Business and Cloud-Based Services space

This post is for anyone in New Zealand that is interested in the latest and greatest from MSFT & HP in the Small Business and Cloud-Based Services space... If you haven't already done so, check out the following two events:

Both events are being run on the same day in most centres, with the HP-MSFT session in the morning and the unplugged session in the afternoon. For more details on both the events visit the NZ SBSC (Small Business Specialist Community) blog.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


BOP SPUG Presentation: SharePoint Workflows from a Developers Point-of-View

Details on my upcoming BOP SPUG presentation.

I am presenting at this months Bay of Plenty SharePoint User Group... The topic is: SharePoint Workflows from a Developers Point-of-View.

Here is a blurb about the presentation:

Workflows can be a powerful tool for an organisation to automate many processes and decrease information duplication and becoming misplaced. In this session Eamon will create a workflow using Visual Studio to show the power of SharePoint’s Workflow Engine working with enterprise line-of-business applications. This session is aimed at developers, but it may be useful for power users to get a look at what is possible with customised workflows.

I will record the session and post it on here, so anyone that misses it will be able to watch it and post questions.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


SharePoint Development Tip: Using LINQ to query a SharePoint List

Do you want to use LINQ to query SharePoint information? Read on!

Over the past couple of days I have been playing with an internal project, so I thought I would play and query the lists with LINQ... here is what I came up with!

Because a SPListItemCollection inherits from ICollection, we can attack it with a LINQ query... and that we shall!

A bit of background, I am using a Web Part to render the information to the user. The Web Part has a several properties for the user to supply information to configure it (they will appear in the "Miscellaneous" section of the Web Part Properties Pane). The properties are as follows, the CAML property is optional, but it gives an easy way to filter information from the list without going into the code:

   1: Private _siteurl As String = ""
   2: <WebBrowsable(True), _
   3: WebDisplayName("Web Site URL *"), _
   4: WebDescription("The site the list is located."), _
   5: Personalizable(PersonalizationScope.User)> _
   6: Public Property SiteURL() As String
   7:     Get
   8:         Return Me._siteurl
   9:     End Get
  10:     Set(ByVal value As String)
  11:         Me._siteurl = value
  12:     End Set
  13: End Property
  14:  
  15: Private _listGuid As String = ""
  16: <WebBrowsable(True), _
  17: WebDisplayName("Test Management List GUID *"), _
  18: WebDescription("Enter the GUID for the List."), _
  19: Personalizable(PersonalizationScope.User)> _
  20: Public Property ListGUID() As String
  21:     Get
  22:         Return Me._listGuid
  23:     End Get
  24:     Set(ByVal value As String)
  25:         Me._listGuid = value
  26:     End Set
  27: End Property
  28:  
  29: Private _camlQuery As String = ""
  30: <WebBrowsable(True), _
  31: WebDisplayName("CAML query for the webpart"), _
  32: WebDescription("Enter the CAML for the List."), _
  33: Personalizable(PersonalizationScope.User)> _
  34: Public Property CAML() As String
  35:     Get
  36:         Return Me._camlQuery
  37:     End Get
  38:     Set(ByVal value As String)
  39:         Me._camlQuery = value
  40:     End Set
  41: End Property

The first thing we need to do in the process is attach to the site and then web that we want we want to query. To do this I do the following:

   1: ' Create a Web object to use through the routine
   2: Dim Web as SPWeb
   3: ' Crate a local SPWeb Object
   4: Dim _thisweb As SPWeb
   5: ' Open the site with the URL supplied by the user
   6: Dim SiteColl As SPSite = New SPSite(SiteURL)
   7: _thisweb = SiteColl.OpenWeb
   8: ' Write the SPWeb Object to the property
   9: Web = _thisweb
  10: ' Clean up the SPWeb Object
  11: _thisweb.Dispose()
  12: _thisweb.Close()

This gives us an SPWeb object to play with. In the next snippet of code we attach to the list and create a CAML query object (SPQuery) that we will apply if it was supplied:

   1: ' Attach to the list
   2: Dim thisListGUID As Guid = New Guid(_listGuid)
   3: Dim list As SPList = Web.Lists(thisListGUID)
   4:  
   5: ' Define the Query
   6: Dim query As SPQuery = New SPQuery(list.DefaultView)
   7: If CAML <> "" Then
   8:     query.Query = CAML
   9: End If

Now we have all of that set up, we can make the LINQ query. in this query we are simply retrieving the data, but it is possible to sort, group by etc. as well.

   1: Dim linqQuery = From Z As SPListItem In list.GetItems(query) _
   2:                                   Select Z

Now we have the information, we can loop through it and do what we want with it. Below I have shown we can use a Lambda Query to group SharePoint information. In the example list I have Title, Category and Status fields and I want to group the information by the Category and then do something depending on the status, it may be some conditional formatting depending on other properties or maybe assign a task... anything really.

The reason for the substring is that SharePoint formats fields with an ID and then the Human Readable value, e.g. 1;#Status. We only want what is after the #.

   1: Dim CategoryTitle as String = ""
   2: For Each i In linqQuery.GroupBy(Function(a As SPListItem) a("Category"))
   3:     CategoryTitle = i.Key.ToString.Substring(i.Key.ToString.LastIndexOf("#") + 1)
   4:     For Each item In i
   5:         Select Case item("Status").ToString
   6:             Case "Open"
   7:                 ' Do Something
   8:             Case "Closed"
   9:                 ' Do Something
  10:             Case Else
  11:                 ' Do Something else
  12:         End Select
  13:     Next
  14: Next 

Hopefully that is a fairly quick and easy demo of how to get information from SharePoint as objects and use them!

Currently rated 3.3 by 4 people

  • Currently 3.25/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5