Friday 12 December 2008

Profiler for .NET

A good profiler tool... not free but you can download and evaluate
http://www.jetbrains.com/profiler/

Monday 1 December 2008

JQuery - Count Paragraphs

Add following click handlers to page using console in FireBug
  • $('#NoOfParagraphs').click(showNoOfParagraphs)

Example taken from here docs.jquery.com

..1..

"The quick brown fox jumps over the lazy dog" is a pangram (a phrase that contains all of the letters of the alphabet). It has been used to test typewriters and computer keyboards, and in other applications involving all of the letters in the English alphabet, because it is also a short coherent sentence.

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into....

..4..



function showNoOfParagraphs(e) 
{
  $('#NoOfParagraphs').click(function() {
  $("div.FadeAndAnimation p.ParagraphResults").append("   Paragraph Count :-" +
$("div.FadeAndAnimation p").size() + "
"); }

JQuery - Basic Show and Hide

Add following click handlers to page using console in FireBug
  • $('#hideh1').click(function() {$("div[class='titlewrapper']").hide();});
  • $('#showh1').click(function() {$("div[class='titlewrapper']").show();});
  • $('#toggleh1').click(function(){$("div[class='titlewrapper']").toggle();});

Example taken from here... docs.jquery.com


Use the following buttons to show and hide this blogs title.

Sunday 30 November 2008

JQuery Predicates - Attribute contains

Add following click handlers to page using console in FireBug
  • $("#lnkRedAttributeContains").click(showRedContains);
  • $("#lnkYellowAttributeContains").click(showYellowContains);
To find an element with an id of 'HelloGoodbyeAttributeContains'
click me yellow
click me red

The click me red also finds the two links as their ids match the predicate. The click me yellow is specifically looking for div elements therefore the two links are not turned yellow.


JQuery Predicate, attribute Contains
$("[ @id *= 'ributeCont' ]").removeClass("YellowAttributeContains").addClass("RedAttributeContains"); 
$("div[ @id *= 'ributeCont']").removeClass("RedAttributeContains").addClass("YellowAttributeContains"); 

JQuery Predicates - Attribute ends with

Add following click handlers to page using console in FireBug
  • $("#lnkRedAttributeEndsWith").click(showRedEndsWith);
  • $("#lnkYellowAttributeEndsWith").click(showYellowEndsWith);
To find an element with an id of 'HelloGoodbyeAttributeEndsWith'
click me yellow
click me red

The click me red also finds the two links as their ids match the predicate. The click me yellow is specifically looking for div elements therefore the two links are not turned yellow.


JQuery Predicate, attribute Ends With
$("[id$='teEndsWith']").removeClass("YellowAttributeEndsWith").addClass("RedAttributeEndsWith"); 

or

$("div[id$='teEndsWith']").removeClass("RedAttributeEndsWith").addClass("YellowAttributeEndsWith"); 

JQuery Predicates - Attribute starts with

Add following click handlers to page using console in FireBug
  • $("#lnkRedAttributeStartsWith").click(showRedStartsWith);
  • $("#lnkYellowAttributeStartsWith").click(showYellowStartsWith);
To find an element with an id of 'HelloGoodbyeAttributeStartsWith'
click me yellow
click me red
JQuery Predicate, attribute Starts With


$("[id ^= 'HelloGoodbyeAttributeSt']")
    .removeClass("YellowAttributeStartsWith")
    .addClass("RedAttributeStartsWith"); 

  or

$("div[id^='HelloGoodbyeAttributeSt']")
    .removeClass("RedAttributeStartsWith")
    .addClass("YellowAttributeStartsWith"); 

JQuery Predicates - Attribute equals

This example uses JQuery attribute selector to add or remove a css class from an html element. Add following click handlers to page using console in FireBug
  • $("#lnkRedAttributeEquals").click(showRed)
  • $("#lnkYellowAttributeEquals").click(showYellow);
This is an html div element with an id="HelloGoodbyeAttributeEquals"

 

JQuery Predicate, id attribute equals
$("#HelloGoodbyeAttributeEquals").removeClass("YellowAttributeEquals").addClass("RedAttributeEquals"); 

or another syntax for an id attribute equals

$("[id='HelloGoodbyeAttributeEquals']").removeClass("YellowAttributeEquals").addClass("RedAttributeEquals"); 

or a div tag with an id equals

$("div[id='HelloGoodbyeAttributeEquals']").removeClass("YellowAttributeEquals").addClass("RedAttributeEquals"); 

function showRed(e) {
    e.preventDefault();
    $("[id='HelloGoodbyeAttributeEquals']").removeClass("YellowAttributeEquals")
                                           .addClass("RedAttributeEquals");
}

function showYellow(e) {
    e.preventDefault();
    $("#HelloGoodbyeAttributeEquals").removeClass("RedAttributeEquals")
                                     .addClass("YellowAttributeEquals"); 
}   

Friday 28 November 2008

A RadioButton is a Checkbox

If you have this code and you are dealing with a RadioButton control
then the output CSS class will be HighlightedBackgroundCheckbox because
a RadioButton is a Checkbox.

Simple fix is to check its a radiobutton first.



namespace System.Web.UI.WebControls
public class RadioButton : CheckBox







foreach (string boundNameToCompare in boundNames)
{
CheckBox cb =
this.FindControl(this.TargetControlID) as CheckBox;
if (cb != null)
{
cb.CssClass = "HighlightedBackgroundCheckbox";
continue;
}

RadioButton rb =
this.FindControl(this.TargetControlID) as RadioButton;
if (rb != null)
{
rb.CssClass = "radio HighlightedBackground";
continue;
}

}

Sunday 23 November 2008

Learning Simple JQuery - Part 4.

There are many plugins developers have created to use with JQuery, including this one "tablesorter" - http://tablesorter.com/docs/ The following table should then have clickable/sortable headings.
/tbody>
Row NumberBig NumberWordDate
14345Animal23 January 1987
232546Vegetable18 November 2005
3265Mineral9 September 1973
44456Element31 December 1976
556Zebra14 August 2008
This simple JQuery example was taken from Stephen Walthers PDC 2008 talk.
http://channel9.msdn.com/pdc2008/
http://channel9.msdn.com/pdc2008/PC31/

Learning Simple JQuery - Part 3.

This example demonstrates using JQuery selectors to add css classes to specific html table row elements. Add following JQuery to page using console in FireBug
  • $("#myColourTable tr:odd").addClass("tablerow"); $("#myColourTable tr:even").addClass("tablealtrow");
  • $("#myColourTable tr:first").removeClass("tablealtrow").addClass("heading");
Row NumberBig NumberWordDate
14345Animal23 January 1987
232546Vegetable18 November 2005
3265Mineral9 September 1973
44456Element31 December 1976
556Zebra14 August 2008
This simple JQuery example was taken from Stephen Walthers PDC 2008 talk.
http://channel9.msdn.com/pdc2008/
http://channel9.msdn.com/pdc2008/PC31/

Learning Simple JQuery - Part 2.

This example uses JQuery to set the background-color of input text boxes, and attaches the focus/blur events to those text boxes with a "required" class. Add following JavaScript to the page using the console tab in FireBug
  • $("input:text").css("background-color", "yellow");
  • $("input:text.required").focus(hilite); $("input:text.required").blur(unlite);
a textbox   a required textbox
 
  function hilite() {   
   $(this).css("background-color", "red"); 
  }
  
  function unlite() {   
   $(this).css("background-color", "yellow"); 
  }
This simple JQuery example was taken from Stephen Walthers PDC 2008 talk.
http://channel9.msdn.com/pdc2008/
http://channel9.msdn.com/pdc2008/PC31/

Friday 21 November 2008

Learning Simple JQuery - Part 1.

This example demonstrates using an jQuery id selector on anchor tags to attach a click event. It also uses an id selector to attach the slideDown and slideUp JQuery functions to a html div element. Add following click handlers to page using console in FireBug
  • $("#lnkShowLoginBox").click(showLoginBox);
  • $("#lnkHideLoginBox").click(hideLoginBox);
 
function showLoginBox(e) {  
   e.preventDefault();  
   console.log('in fn. showLoginBox');  
   $("#PaulsPointLoginBox").slideDown("slow");  
 }  
   
 function hideLoginBox(e) {  
   e.preventDefault();  
   console.log('in fn. hideLoginBox');  
   $("#PaulsPointLoginBox").slideUp("slow");  
 }  
This simple JQuery example was taken from Stephen Walthers PDC 2008 talk.
http://channel9.msdn.com/pdc2008/
http://channel9.msdn.com/pdc2008/PC31/

Thursday 6 November 2008

JavaScript - get the client Id inside a formview

Code snippet to get the client id of an asp control inside a formview




var radio = $get('<%= searchFormView.FindControl("RangeRadioButton").ClientID %>');
if (radio.checked)
{
}


Tuesday 16 September 2008

JavaScript - Loop around properties of a textbox



var allprops="";
var count = 0;
for (var prop in RangeFromTextbox)
{
allprops += prop + "=" + RangeFrom[prop] + " \n" ;
if (count > 20)
{
alert(allprops);
allprops = "";
count = 0;
}
count++;
}
alert(allprops);

Tuesday 9 September 2008

Ajax Page Methods / Update Panels

Here is a blog post suggesting that UpdatePanels are often used in places where an Ajax Page Method would be better suited, it goes on to give an example of how to use Ajax Page Methods.

ASP.NET AJAX Page Methods


Heres another article with the same idea - Page Methods good, UpdatePanel bad.

Why ASP.NET AJAX UpdatePanels are dangerous

Monday 8 September 2008

Recursive function through controls



///
/// Recursive loop through form controls.
///

private void SetFormDisabled (Control control)
{
foreach (Control ctrl in control.Controls)
{
if (ctrl is TextBox)
{
((TextBox)(ctrl)).Enabled = false;
}
else if (ctrl is Telerik.WebControls.RadNumericTextBox)
{
((Telerik.WebControls.RadNumericTextBox)(ctrl)).Enabled = false;
}
else if (ctrl is CheckBox)
{
((CheckBox)(ctrl)).Enabled = false;
}
else
{
if (ctrl.Controls.Count > 0)
{
SetFormDisabled (ctrl);
}
}
}
}

Monday 28 July 2008

Exam 70-630: TS: Microsoft Office SharePoint Server 2007, Configuring

Today I passed Exam 70-630: TS: Microsoft Office SharePoint Server 2007, Configuring.


Exam link


Well done me!

Thursday 17 July 2008

Tuesday 1 July 2008

Last Months SharePoint Bootcamp Course

During 27-30 May I was on the Microsoft Office SharePoint Server 2007 Bootcamp course, the instructor was Mick Badran again which was good. This time the course was longer and included lab work which is definitely an easier way to learn.

Some random notes from the week;
  • its possible to map Features to Delegate controls
  • admin tools --> active directory users and computers -- > 'saved queries' --> use to build LDAP queries.
  • key focus points to take away include
  • Content Types - good to attach workflow to a content type not a type
  • VS Extensions for SharePoint - has solution generator, can point to a site and generate a solution for it.
  • SharePoint Exporer - codeplex tool
  • Silverlight.Net - SharePoint starter kit for SilverLight
  • SPLA Licensing - Leasing payments, usually no contracts, you pay for usage. eg SharePoint user = $50 per month. If you have a floor of 80 people, 200 need MOSS usually Microsoft answer is whole floor requires MOSS - with SPLA licensing you can pay for just the 20 MOSS you require. SPLA Licensing is also good for seasonal pressures.
  • Enterprise Content Management not really covered in this course, its more of a niche thing, its UI section of product
  • Pretty much anything you do in SharePoint browser UI can be done via developer API
  • www.wssdemo.com
  • Enterprise Search Resource Kit - get from Microsoft Rep.
  • SharePoint Team Services - previous version of SharePoint
  • MOSS can be installed on top of WSS
  • Outlook 2007 allows you to edit portal calendar within Outlook
  • Word 2007 Research pane you can search your portal
  • 64 bit good, especially for SQL
  • No IIS configuration is necessary for SharePoint, its all in web.config
  • at site collection level you can nominate a content database
  • Joel Olsons blog - Sharepoint capacity and performance white paper
  • you can have 50,000 site collections per server
  • SharePoint Designer - gives the ability to work with DataView web parts
  • SharePoint Designer - recognizes the master page, VS doesnt due to way SharePoint does it
  • SharePoint Designer - doesnt lend itelf well to deployment
  • Development team should be using virtual servers
  • Subversion with cruise control for auto builds
  • rename a .docx file to .zip and open it to see folder structure of file
  • Forms Services can be a stand alone add-in to WSS
  • add the '12' directory to your favourites
  • add the 'bin' directory to your environment variables can then use cd %12%
  • always install WSS in farm mode - it gives you the option to extend, if you dont you cant switch to farm later
  • its WSS that is farm aware not MOSS
  • central admin database gets created on install
  • PSConfigUI.exe is wizard that create Sharepoint admin database, so you can give your own db name
  • 3rd party web parts can be used to write back to AD
  • Permissions - keep it simple - keep the same default groups
  • Permissions - you can use the AD groups you already have within SharePoint
  • Upgrading - make sure first step is back up your content db
  • reason to move content into sharepoint is if it lacks a sensible structure
  • if directory has '_' in front of it then stuff runs in elevated mode, ie has high priority set, _layouts
  • Master page - to minimise processing you can put unused content place holders into a visible=false panel
  • SPContext class can be used when coding web parts to get handle on SharePoint context
  • For 'complicated' web parts you can configure it, then save it , then add it back in as a new web part already configured for the user
  • On deployment, modified pages are considered as 'customised' pages and are treated differently
  • VS Extensions for SharePoint should be used for packaging and deploying web parts
  • Heather Soliman blog - has css snippets with what they affect within SharePoint
  • keep away from site definitions as much as possible - these were used in V2 for customisations
  • 'MasterPage' pack is a download available from Microsoft.
  • deployment is a significant part of the total amount of work that needs to be done

Monday 30 June 2008

Utility Programs, Tools, Add-Ins plus other stuff.


If your looking for a tool/utility list, this is a good place to start - Scott Hanselman's 2007 Ultimate Developer and Power Users Tool List for Windows.




This is my list,




Utility Programs
  • Unlocker Assistant - When you try and delete something and you get the file locked message, the Unlocker Assistant will pop up, giving you the option to unlock the files and perform your delete. Download from here
  • DiffMerge -is an application to visually compare and merge files for Windows, Mac OS X and Unix. Download from here
    • If using DiffMerge with Subversion, the following settings can be used to 'Diff' and 'Merge'

      Diff Viewer
      C:\Program Files\SourceGear\DiffMerge\DiffMerge.exe /t1=%bname /t2=%yname %base %mine

      Merge
      C:\Program Files\SourceGear\DiffMerge\DiffMerge.exe /m /r=%merged /t1=%yname /t2=%bname /t3=%tname /c=%mname %mine %base %theirs
  • AutoRuns - This utility shows you what programs are configured to run during system bootup or login. Download from here.

  • BgInfo - is a little tool that displays a load of your system information as a bmp on your desktop. More information from here

  • Daemon Tools

  • Regular Expression Workbench
  • SqlScripter

  • pdf reader

  • Paint.Net



FireFox Add-Ins

  • Adblock Plus
  • ColorZilla
  • del.icio.us Bookmarks
  • Firebug
  • Snap Links
  • YSlow
Visual Studio Add-Ins/Registry Settings
  • GhostDoc
  • ReSharper
  • Consolas Font Pack for Visual Studio. Download from here. More information from here.
  • Line Character Length Indicator - More information from here.
    • Run one of these registry files,

      VS2005 .reg file

      Windows Registry Editor Version 5.00
      [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor]
      "Guides"="RGB(128,0,0) 80, 120"


      VS2008 .reg file

      Windows Registry Editor Version 5.00

      [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor]
      "Guides"="RGB(128,0,0) 80, 120"

Other Stuff
  • Add "Delete SVN Folders" to Windows Explorer Context Menu. More Information here.

    • Create a registry file with the following.

      Windows Registry Editor Version 5.00

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN]

      @="Delete SVN Folders"

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command]
      @="cmd.exe /c \"TITLE Removing SVN Folders in %1 && COLOR 9A && FOR /r \"%1\" %%f IN (_svn) DO RD /s /q \"%%f\" \""





Monday 23 June 2008

Ajax Control Toolkit Popupcontrol and fieldsets

If you have


<fieldset> some content... including ajax popup </fieldset>



<fieldset> some more content </fieldset>





then the ajax popup pops up underneath the second fieldset,

to fix set the z-index on the first fieldset to be higher than the one on the second, ie as below.






<fieldset style="z-index: 2;"> some content... including ajax popup </fieldset>



<fieldset style="z-index: 1;"> some more content </fieldset>

Thursday 19 June 2008

Deleting takes a long time

Deleting files was taking a long time. Windows Explorer was freezing for 30 seconds plus. Checked out my recycle bin and it was full of big files.

Solution - empty your recycle bin more often

Wednesday 18 June 2008

AgilePoint Snippet - Stored Procedure and Custom Attributes



To get data out of your database and into a custom attribute, you can use the Query Database shape, set the SqlType property to StoredProcedure. the above shape would set the $ProjectName custom attribute.

Below is the start of the create script for the stored procedure,

CREATE PROCEDURE [dbo].[spGetProject]
@ProjectId int
, @ProjectName varchar(50) output

AS
BEGIN


Below is the sql to call the stored procedure for testing,

declare @pn varchar(50)
exec spgetproject @projectid=320, @projectname=@pn out
select @pn

Tuesday 17 June 2008

AgilePoint Snippet - Get/Set Custom Attributes

In a C# snippet shape, or in aspx code you can use the following to Get and/or Set a Custom Attribute.

if (api.GetCustomAttr(pi.WorkObjectID,"MyAttrName") == null)

{
api.SetCustomAttr(pi.WorkObjectID,"MyAttrName","My Custom Attr Value");
}

Tuesday 3 June 2008

SQL Snippet - Common Table Expressions

A Common Table Expression can be used to:-
  • Create a recursive query.
  • Substitute for a view when the general use of a view is not required; that is, you do not have to store the definition in metadata.
  • Enable grouping by a column that is derived from a scalar subselect, or a function that is either not deterministic or has external access.
  • Reference the resulting table multiple times in the same statement.
see Using Common Table Expressions and Recursive Queries Using Common Table Expressions

SQL Snippet - Using Cross Apply

Use Cross Apply with a user defined table-valued function.

read about it here..
Using CROSS APPLY in SQL Server 2005

SQL Snippet - Returning Ranked Results with Microsoft SQL Server 2005

TSQL in SQL 2005 provides the following options for ranking your result set.
  • ROW_NUMBER()
  • Ntile(int)
  • Rank
  • Dense_Rank

The above can optionally be used with "Partition By"

see this article. Returning Ranked Results with Microsoft SQL Server 2005 from 4guysfromrolla.

Wednesday 23 April 2008

What does 'Strongly Typed' mean exactly?

Some links explaining that there is not necessarily a definite answer without the question being asked in context.

Perl *is* strongly typed (was Re: Perl description)
Wikipedia - Strong Typing

Monday 21 April 2008

Last Months AgilePoint BPM Technical Training

Last month the project team got trained up on AgilePoint by Ascentn consultant Chris Custer.

AgilePoint BPM Technical Training 10th-14th March 2008

This was the course outline.

Day One

Module 1 - What is BPM?
This module will review the concepts and requirements for BPM.

Module 2 - How do I develop a BPM solution?
This module reviews a best practices approach for defining, developing, managing and analysing business processes with BPM.

Module 3 - What is AgilePoint BPM Suite? (What are the differentiators?)
This module reviews the components, the architecture, system usage roles for the product suite, and reviews the functionality of each product in the suite.

Module 4 - What Solution Architectures does AgilePoint BPM Support?
This module reviews a number of development scenarios that are supported.

Module 5 - How do I develop a BPM Solution with AgilePoint BPM Suite?
This module will provide the participants an opportunity to build, debug and deploy a basic process template that is integrated with InfoPath.

Day Two

Module 6 - How do I develop a BPM Solution with a SharePoint Document Library?
This module will provide the participants an opportunity to build a basic SharePoint BPM Solution using the asp.net pages provided during install.

Module 7 - Hos do I develop a BPM Solution with ASP.Net Forms?
This module will provide the participants an opportunity to build a solution that interacts with asp.net forms for the manual activities

Module 8 - Am I up for the Challenge?
This module will include a practical exercise to design a process template to meet the requirements for a BPM solution. The practical exercise will include a role playing exercise to gather the requirements for the solution from the key business stakeholder.

The resulting designs will be reviewed and discussed by the participants.

Day Three

Module 9 - What are the System Usage Roles (SURs) for the AgilePoint BPM Suite?

This module revies the different SURs involved in an AgilePoint workflow environment.

Module 10 - How is the AgilePoint BPM Suite deployed?
This module reviews the installation scenarios and requirements to install the AgilePoint BPM Suite in your clients environment.

Module 11 - How do you manage users and permissions in an AgilePoint BPM environment?
This module reviews the options to add users and manager groups and roles.

Module 12 - How do I monitor the AgilePoint BPM Environment?
This module provides the participants with a review of best practices for monitoring system health and performance.

Module 13 - How do I backup and recover the AgilePoint BPM data?
This module provides the participants with a review of best practices to protect BPM data.

Day Four

Module 14 - How do I develop a custom BPM Solution using Custom SOA Components?
This module will provide the participants an opportunity to build a solution that includes a custom web service and AgilePart to abstract the service as a business service in AgilePoint Envision.

Module 15 - How do I develop a custom BPM Solution using Multiple Forms for Single Activities within a Process Model?
This module will provide the particpants an opportunity to build a BPM Solution that leverages InfoPath and asp.net for each approval step in the process.
A cusom AgileWork component will be developed to synchronise the data collected in the asp.net form with the InfoPath XML.
This module focuses on the composite application framework and SOA design.


Day Five

Module 16 - What are the Advance development components to extend the AgilePoint BPM Suite?
This module will review the AgileStub and AgileConnector components, The module will provide participants with the opportunity to explore the .Net class structure of the components and discuss scenarios in which they should be used.
Code samples will be provided for future reference.

Module 17 - How do I develop Reports for AgilePoint BPM Solutions?
This module will first review the sample reports delivered with the AgilePoint BPM Suite.
The remainder of the module will demonstrate Microsoft SQL Reporting Services capabilities.
The exercise will create a process analysis report to identify average task times and list the tasks that exceed that average for exception reporting.

Saturday 19 April 2008

FireFox Keyboard ShortCuts

Ctrl wClose Tab
Ctrl Enteradds '.com' to what you enter in address bar
Ctrl Shift Enteradds '.org' to what you enter in address bar
Shift Enteradds '.net' to what you enter in address bar
Alt Enteropens a website in another tab
Alt +Dnavigate directly to the browser address bar
Ctrl T open a new tab
Ctrl Shift Treopens the last closed tab
Deletekeydelete specific addresses in browser history or autocomplete forms
Ctrl tabnavigate between different tabs
Ctrl 'tab number'Ex:To go to the 3rd tab use Ctrl+3
Spacebar or PageDownscrolls down the webpage you’re on
Shift Spacebar or PageUpscrolls up the webpage you’re on
middle mouse(scroll) buttonopens the page in a new tab

Saturday 12 April 2008

SharePoint Course.

I've been on a MOSS course the past couple of days, which has been good...

Microsoft Office SharePoint 2007 Chalk Talk

The facilitator was Mick Badran,
blogs.breezetraining.com.au/mickb/


Course Outline

Day One
  • Module 1: Platform Overview

  • Module 2: Server Topology and Administration

  • Module 3: Collaboration



  • Day Two
  • Module 4: Search

  • Module 5: Web Content Management

  • Module 6: Business Data Catalog


  • These are my random notes taken during the two days.

    • 81m licences in 2007 expected 170m in 2008
    • http://www.wssdemo.com/default.aspx
      • list of publishing sites for references on what you can do with WSS publishing.
    • Search - there are web services that you can consume in your own web app.
    • Talks about importance of classifying documents with extra meta data.
    • free MSFT search product "Search Server Express" that you should use if deploying just WSS search
    • there are 9 different web parts providing search functionality
    • Sharepoint is base for other MSFT products eg Performance Point
    • BDC - link up other sources of information into your portal
    • magnifying part of screen zoomit.exe
    • wss comes free with Win 2003 licence
    • MOSS has 153 features some of which turn on/off on installation
    • "SPLA" licencing can be against features for eg. you can have 20 enterprise licences and n other licences on the same deployment
    • could manage licencing through groups but is basically on a trust basis
    • about 20 different licensing programs available - so if licensing is issue with partner then contact MSFT for information
    • Win 2008 - runs faster
    • 64 bit better again, supports more users
    • Application Pool - set memory recycling - max virtual memory should be 700M on 32 bit
    • once MOSS successfully installed you do have Central Admin web site up and running
    • Advice - alwasy install in farm mode as you then have option to grow
    • Sharepoint solution can have 1 or more fetures to be developed within them
    • Visual Studio Extensions for SharePoint
    • Site Features not only apply to new creations but also apply to all past ones as well
    • you can have dependencies between features
    • 2 main areas of Central Admin site - Operations and Application Mgmt
    • Biggest benefit to V3 is "Site Features" eg
      • Master page deploy
      • publishing
      • 3rd party
    • Partners might create site features as a good differentiator.
    • Sharepoint Solution Generator allows you goto exisiting sharepoint installation and pick out libraries/sites/whatever that you might want to generation a solution from
    • WSP View in VS2005 - windows sharepoint project
    • Reporting Service Integration Features
    • Sharepoint Capacity Planner - used to give guide line on how many servers you require on your system.
    • 3rd party - wan accelerators
    • one way to deply would be to save site as template then you can move this template around
    • use Kerberos (not NTLM) security - will save effort down the track
    • Sharepoint workflows are document centric - they are built on WWF
    • User Profiles can be sucked down from AD
    • Audiences - based on series of rules - ie yrs of svc, first name beginning with A
    • when selecting web part you can set display only for 'target audience'
    • 'target audience' could also be an AD group
    • set environment variable to 12 for the long folder name
      • program files\common files\msft shared\web server extensions\12\
    • can then use %12% in explorer
    • logs folder has the logs
    • bin folder has psconfig.exe
      • enables you to name your admin database without a GUID in the db name
    • with sharepoint v3 you can incorporate sharepoint url into your own separate web application
    • run 'winword' for office word
    • my site url gets written to AD only time sharepoint writes to AD
    • my site url also gets written to registry
    • Open docs in word and have sharepoint lists available to open doc from - these lists can be controlled in 'Published links to Office Client Applications under SSP admin
    • Usage reporting - turn on SSP admin
    • Word 2007 - 'Research Window' can integrate Sharepoint searching into this search tool - by adding a service. moss/vti bin/search.asmx
    • can leverage this search service in your own apps
    • each person under my site is their own site collection
    • you can switch a web sites SSP but you would lose what the original SSP stores, eg index,audiences,my site
    • in central admin web site, sites are site collections, webs are sites, also known as sub sites
    • due to size/usage/load you may choose to have a site collection in its own content db
    • you can 50,000 site collections in a content db.
    • site collection is smallest granular unit you can move from 1 content db to another.
    • Incoming Email Settings - enable sites on this server to receive email
      • ie email a doc to a list
      • this doesnt need exchange - its just a drop folder for email
    • does need configuration on exchange server
      • eg create a moss sub domain - mylist@moss.mycompany.com
    • Directory Mgmt service will enable AD tie in that will mean address list in outlook will have document lists email address
    • under doc lib settings you will have communications --> incoming email settings
    • alternate access mappings - gives you url rewriting
    • a lot of users dont know enought about lists - havent used the 'actions' menu
    • there are maybe other company polikcy/politics that affect way you would do collaboration
    • smallest unit of division you can move is a site collection
    • within site collection certain things inherited like
      • regional settings
      • quotes
      • recycle bin settings
    • 'Site Collection Administration' area in Site Admin is only available at the root subsite
    • If for example
      • Add 15 cols to your doc library in your root site
      • the cols will be inherited down at sub site level, but you still need to add those 15 cols into the doc lib at that level
      • instead at 15 cols to content type at root level
      • you then just need to at single thing at sub site level
    • rule of thumb is always create stuff at root level even if you think you are only going to use it at a single sub site.
    • Managed Paths - tell browser things under this address are/are not sharepoint sites
    • MAjor version increases whenever doc is published and approved
    • minor version increases when doc is checked in
    • if you have do with version 0.2, a user with read priv for that library wont see anything
      • if the doc is version 1.5, a user with read priv will beable to read v1.0
    • if the search indexer is under an admin account they will beable to index V1.5 and see a snippet of V1.5 in the search results but if you just have read priv when you click on the link it will take you to V1.0
    • to stop above point happening you should set up crawl rule
    • users docs default is 90 days in their recycle bin
    • sites/subsites dont go into recycle bin
    • add network place
      • paste url of doc lib and you get webdav view of doc library
    • stsadm tool can be used to increase defaut content limit of 10MB when creating document library template by UI interface 'exporting template'
    • you could also use sharepoint designer if content is larger than 10Mb
    • Prune your doc versions - find out requirements for company - what is cut off time - then move content to an archive
    • Document Library is implemented as a feature
    • you can turn of any menu settings for you doc lib
    • you can only have 1 indexer machine per SSP
    • if you add a new property - eg content type, then you need to do a full index for that property to be searchedon
    • search was rebuilt from ground up concentrating on importance of relevance
    • Foxit software - pdf plugin for crawling
    • make site 'authoritative' and it will bump up in the rankings
    • 'search for "hammer and nail" will normally never be found as "and" is noise word
    • can map properties from sources to be certain thing in index - eg search for name = 'friday'
      • source = people = map first/last name to name
      • source = files = map filename to name
      • source = sps sites = map page title to name
    • can set best bets to expire
    • index engine known as gatherer service
    • can set best bets to expire
    • configuring search
      • sps3://moss/ - tells crawler to activate SP APIs and get more goodies out
    • Incremental Index - doing this often - every 5 mins perfectly possible
    • to add pdf icon add to images folder in '12' folder
      • and modify doc icon xml file
    • Scopes can be used to generate diff search page and search results page
    • search for "author:Paul" any property can be searched in same way as author
    • 'Form Web Part' can be used to do searching if you want.. doesnt matter what form is used just pass query to searchresults.aspx with 'k=' is querystring
    • WCM - telerik have some free useful controls
    • Content types,master page, layout page combine to give you your WCM
    • WCM needs 'Office Sharepoint Publising Infrastructure' feature turned on
    • when publishing public sites - look at core.js (400k) to see if you still need it all
    • BDC Action could be developed to write back to LOB system
    • sharepoint exams have lots of Q about BDC API
    • SSO is enterprise feature
    • App Def file is an xml file
    • BDC MetaMan 3rd party tool allows write to LOB
    • other tools on codeplex and the net
    • you could point VStudio at xsd filer and then get intellisense

    Wednesday 2 April 2008

    Tools and Utils - File/Folder Compare and Merge

    DiffMerge can be used to compare and merge files, also folder compare.

    http://www.sourcegear.com/diffmerge/

    Tools and Utils - Firefox Add-ons

    Useful Firefox add-ons.

    • Adblock Plus
    • ColorZilla
    • del.icio.us Bookmarks
    • Firebug
    • Snap Links

    Monday 31 March 2008

    SQL Snippet - Reseed Identity Column to Zero

    Reseed Identity Column to Zero


    delete from Table_Name

    DBCC CHECKIDENT (Table_Name, RESEED, 0)

    Sql Snippet - Get Table Column Names In A Query

    Get Table Column Names In A Query



    SELECT Column_Name + ', '
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'Table_Name'

    Wednesday 19 March 2008

    CTRL ALT DEL in Remote Desktop

    Use CTRL ALT End in Remote Desktop (mstsc)

    Monday 18 February 2008

    Documentation - Software Projects

    I'm currently writing technical documentation for a $2.6 million dollar software project. Most people you ask about what this documentation should include and what format it should be in will have a different answer for you.

    So I guess the first step is to talk to who you are writing the documents for and see what they want, are there existing templates being used in your organisation? Are these templates relevant for your project?

    Thursday 14 February 2008

    Tools and Utils - System Information

    BGInfo is a little tool that displays a load of your system information as a bmp on your desktop. Follow the link for more information

    BGInfo

    Excel Training - Small Tips - Pasting

    Some small tips when using Excel.

    On pasting you get smart tag next to the newly pasted cell where you can select to maintain existing formatting.

    Excel Training - Small Tips - WorkSheet Size

    Some small tips when using Excel.

    There are 256 columns in default sheet to get to last column CTRL + {right arrow}
    There are 65536 rows in default sheet to get to last column CTRL + {down arrow}

    Excel Training - Small Tips - Password

    Some small tips when using Excel.

    To enforce a password when opening or modifying your spreadsheet.

    File - Save As - General Options.

    Excel Training - Small Tips - Insert Comments

    Some small tips when using Excel.

    To Insert a comment, select your cell then right click and Select Insert comments.

    Excel Training - Small Tips - Entering Data

    Some small tips when using Excel.

    You can enter the same data to multiple cells by highlighting them, enter your data, then hold down CTRL when pressing Enter.

    Or.
    On selecting a cell, move your mouse over thick border, you get big 4 way arrow, click and drag to move the data to another cell.

    Or.
    On selecting a cell, move your mouse over bottom right corner get smaller 4 way cross, click and drag to copy to data to new cells. At this point you can also select the smart tag and select Fill Series to generate series of data.

    Excel Training - Small Tips - Undo Button

    Some small tips when using Excel.

    Next to the Undo button in the toolbar there is a little down arrow. When selected you can select and undo multiple previous steps.

    Excel Training - Small Tips - Default Data Entry

    Some small tips when using Excel.

    To change the default direction of cell selection after entering data, then pressing Enter, goto Tools - Options - Edit

    Thursday 7 February 2008

    Agile - Scrum for Team Systems.

    I'm starting on a new project at the moment and we are going to use Scrum for Team Systems as a project management methodology. More info on here.

    • SCRUM
    • SPRINT

    Sprint is duration of work.
    Scrum is meeting to discuss this duration of work

    Product Backlog – list of activities eg
    • Create install doc
    • Implement AD security
    • Create LOA workflow

    Prioritise and Precedent your list

    Add length of time to each activity.

    Create Sprint of 1 month say this equals 160 hours.


    Team MemberHoursTime AvailableDrag CoefficientTotal
    Donald160 0.80.8103
    Carlos160 0.50.216
    Jim 160 1.00.9144
    Michael1601.0 0.9144
    407


    Pick items from Product backlog for Sprint Backlog.

    Expand each item from product backlog to have more detail and give each item length of time eg between 2 and 16 hours.

    Get to your total of 407 hours and this what your going to do complete in the Sprint.


    SCRUM is daily or regular meeting that is around 15 minutes long and has 3 questions.
    • How did you go with yesterdays tasks
    • Are any impediments stopping you from completing tasks
    • What are you going to do today.

    Have ‘burn graph’
    Y axis max is 407 min 0 and is hours in sprint
    X axis min is 0 to 15 days in sprint.

    Ideally you will follow linear line down to 0 hours left…. But realistically you will have visual indication how sprint is progressing and you can react to it…

    Wednesday 6 February 2008

    Excel Training - Templates on Office Online

    I'm just flicking through some xls training videos and was reminded of this link which can be found in Excel when you go File > New Workbook - Templates on Office Online.

    Friday 1 February 2008

    Tuesday 29 January 2008

    New job Links

    I've been in my current position for over 3 months now, I found this series of articles from Rands in Repose interesting,

    "First off, there’s A Glimpse and a Hook, which will describe how managers read your resume. Then we’ve got The Sanity Check, which will prepare you for the phone screen. And finally, there’s Ninety Days, which sketches out a plan for the first three months of your new gig."

    Tuesday 15 January 2008

    Visual Studio 2008 - Unrecoverable Build Error

    Using VS 2008, I just started getting this error for no apparent reason, after a few hours of frustration recreating the solution adding fresh web setup projects etc, I found this link.

    http://support.microsoft.com/kb/329214/EN-US/

    which didnt work,

    then this link
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=128028&SiteID=1

    suggested trying
    "regsvr32 ole32.dll".

    which did work...

    Using the System Restore wizard I was reminded that yesterday I uninstalled SnagIt as the trial period had expired... putting SnagIt and ole32.dll into google brings me the SnagItGuide page telling me that back in March
    2007 - "Fixed the bug where SnagIt removes ole32.dll registry keys." As I just got the SnagIt trial a month ago I guess the bug wasnt fixed to well after all.


    Monday 14 January 2008

    Stored Procedures - Reasons to use/not use them

    Some reasons to use/not use stored procedures found from doing a bit of googling..

    Reasons to use them

    • Your organization's DBAs won't give users or applications SELECT privileges on production SQL Server tables.
    • Stored procedures result in easier maintenance because it is generally easier to modify a stored procedure than it is to change a hard-coded SQL statement within a deployed coponent.
    • Stored procedures add an extra level of abstraction from the underlying database schema. The client of the stored procedure is isolated from the implementation details of the stored procedure and from the underlying schema.
    Reasons not to use them

    • LINQ

    Validation of viewstate MAC failed....


    Getting this error just after release to prod. Its a simple .NET 3.5 app without any web farms etc... this thread suggests the following solution is to update your web.config as following..

    <pages validaterequest="false" enableeventvalidation="false" viewstateencryptionmode="Never">
    </pages>

    Thread title is
    Validation of viewstate MAC failed / The state information is invalid for this page and might be corrupted

    Thread link is
    http://forums.asp.net/t/955145.aspx

    Visual Studio Keyboard Shortcuts

    F12Goto declaration for selected symbol in code
    CTRL - Return to where you were before pressing F12
    CTRL K CTRL NGoto Next Bookmark
    CTRL K CTRL P Goto Previous Bookmark
    SHIFT ALT ENTERToggle Full Screen
    CTRL M CTRL Ominimise functions in code view
    CTRL K CTRL CComment section
    CTRL K CTRL UUnComment section
    ALT W ALT LClose active windows.
    CTRL K CTRL Madd a method to existing class.. by writing it as if it exists bool b = aNewMethod()
    CTRL .add a method to another class.. by writing it as if it exists bool b = myClass.aNewMethod()
    CTRL ALT POpen up Process window


    Links to the Microsoft Visual C# Default Key bindings

    VS2005
    http://download.microsoft.com/download/e/7/9/e79cce22-b196-4b9f-9ea7-b1a21f5342e9/VCSharp_2005_color.pdf

    VS 2008
    http://www.microsoft.com/downloads/details.aspx?familyid=E5F902A8-5BB5-4CC6-907E-472809749973&displaylang=en

    Thursday 10 January 2008

    Tools and Utils - Install an iso image

    Tool to emulate mounting a drive, point Daemon tool at iso image and you can then install as normal.

    http://www.daemon-tools.cc/dtcc/download.php

    Tools and Utils - Regular Expressions

    Simple application to help you write and learn Regular Expressions.. "Regular Expression Workbench"

    http://blogs.msdn.com/ericgu/archive/2003/07/07/52362.aspx


    Tools and Utils - SQL Scripts

    Generate INSERT scripts from existing data (amongst other things)

    http://www.sqlscripter.com/

    Tools and Utils - PDF Reader

    One that is small in size and doesn't do to much in the background...

    http://www.foxitsoftware.com/pdf/reader_2/down_reader.htm