Showing posts with label Agile. Show all posts
Showing posts with label Agile. Show all posts

Monday, 8 May 2017

Resetting the product.

OK – so my audax applicaiton has not received an update in 4 months and I have just completed the paperwork for the Titanic Torr 2017.

Failed.

Thinking about it on my bike the MVP was far to big.

All I really want is a list of entrants details – that’s the MVP – one page – fill in the form.

To close for the North to the South and only a select few idiots elite riders do this but Antrim 300 will be a target!

Saturday, 7 January 2017

On very small tasks

Yes I am still going – and starting to get things done.  Spare time projects are hard to work on because code requires lots of long focus.  But, I’ve found that by really breaking down tasks (I believe they call that pebbleisation) to items taking less than an hour I can quickly pick things up and get something done.  On a full time project you can get the whole thing straight in your head and then go ahead and implement but when there’s days or even weeks between then you need to have really recorded what you were going to do.

 

image_thumb[7]

Friday, 18 November 2016

Sprint 4–put it live.

Not quite as easy as deploying the sql as connecting locally I’ve been using my own credentials.  For an azure connection I need to:

  1. Create a database role and grant exec on the stored procs to that role.
  2. Create a new database login
  3. Put the database login in the role.

Why don’t I just use the “sa” password.

Well – least privilege – a good security practice.

Sprints 2 and 3 retrospective–an hour really isn’t long.

So – sprint 2 took about an hour and a half of coding – so a lot closer than the first.

I then noticed that I still had some inline nasty SQL in my powershell – so I cracked out another hour and got another proc and changes in.

Main lesson so far – an hour is a really short time – keep pebbleising the tasks.

Outcome

Ok – so the work got done and hopefully I’ll have a list of riders on production soon.

 

I’ve thought hard about it and its definitely a useful task towards the end goal as the first “Minimum” viable product is for riders to sign up.  I’m going to allow google authentication/Oath which will strongly (enough for this) validate the users email which I can then use to look up there details in the data I have.

 

 

A good start.

 

Some feedback on the tasks here – really putting this code here for anyone to look @ until I work out if/what to open source.  Unless you particularly want to critique my sql or look at how I use powerhell to call stored procs then not much excitement.

 

“Work out how to deploy database project to local database and how to connect to it. “

this was pretty easy – just set the PowerShell script to depend on the database project and then it deploys all your changes as it builds – pretty nifty stuff

 

“Create stored procs for crud operations required by script – include find rider.”

CREATE PROCEDURE [dbo].[ups_RiderInsert]
    @vcrFirstName    NVARCHAR (100) ,
    @vcrSurname      NVARCHAR (100) ,
    @vcrAddressLine1 NVARCHAR (100) ,
    @vcrAddressLine2 NVARCHAR (100) ,
    @vcrTown         VARCHAR (100)  ,
    @vcrCountryCode  VARCHAR (2)    ,
    @vcrCountry      VARCHAR (100)  ,
    @vcrPhoneNumber  VARCHAR (20)   ,
    @vcrClub         VARCHAR (50)   ,
    @vcrClubNumber   VARCHAR (20)   ,
    @vcrECName       VARCHAR (100)  ,
    @vcrECTelephone  VARCHAR (100) 
AS
SET XACT_ABORT ON

BEGIN TRANSACTION
	INSERT INTO tblRider
	VALUES( 
	@vcrFirstName,
	 @vcrSurname      ,
    @vcrAddressLine1 ,
    @vcrAddressLine2 ,
    @vcrTown           ,
    @vcrCountryCode  ,
    @vcrCountry        ,
    @vcrPhoneNumber  ,
    @vcrClub            ,
    @vcrClubNumber      ,
    @vcrECName       ,
    @vcrECTelephone)

	SELECT SCOPE_IDENTITY()  AS INT
COMMIT TRANSACTION



CREATE PROCEDURE [dbo].[usp_EventParticipentInsert]
    @intRiderId       INT  ,
    @intEventId       INT  ,
    @decPaidSTG       MONEY,
    @decPaidEUR       MONEY
AS
SET XACT_ABORT ON
BEGIN TRANSACTION
INSERT INTO tblEventParticipant
VALUES(
   @intRiderId       ,
    @intEventId      ,
    @decPaidSTG      ,
    @decPaidEUR      
)
	SELECT SCOPE_IDENTITY()  AS INT

COMMIT
CREATE PROCEDURE [dbo].[usp_LicenceGetByRiderAndYear]
	@intRiderId int,
	@intYear int
AS
	SELECT * FROM dbo.tblLicense 
	WHERE
	intRiderId = @intRiderId
	AND intYear = @intYear
CREATE PROCEDURE [dbo].[usp_LicenseInsert]
    @intYear          INT,
    @intRiderId       INT,
    @vcrLicenceNumber NVARCHAR(20)

AS
SET XACT_ABORT ON
BEGIN TRANSACTION
INSERT INTO tblLicense 
VALUES(@intYear , @intRiderId, @vcrLicenceNumber)
COMMIT
CREATE PROCEDURE [dbo].[usp_RiderSearchByName]
	@FirstName nvarchar(100) ,
	@SurName nvarchar(100)
AS
	SELECT * FROM tblRider r
	WHERE (r.vcrFirstName like @FirstName + '%' OR @FirstName IS NULL)
	AND (r.vcrSurname like @SurName + '%' OR @SurName IS NULL)
	

 

 

    “Enahance script / tidy up for stored proc use and other comments in script below.”

param (
	   [Parameter(Mandatory=$true)][string]$fileName,
		[Parameter(Mandatory=$true)][string]$connString,
		[Parameter(Mandatory=$true)][int]$intEventId,
	[Parameter(Mandatory=$true)][int]$intYear
)


function ToDBNull($var) {
	if($var -eq $null) {return [System.DBNull]::Value}
	return $var;
}

#
# Script.ps1
# TODO - rename the bit above and document this method
function parseExcel([String] $fileName){
	$excel=new-object -com excel.application
	$wb=$excel.workbooks.open($fileName)
	$sh = $wb.Sheets.Item(1)
	# TODO de hard code teh endrow.
	$startrow = 2
	$endrow = 16#Connection and Query Info

# prpbably best to pass the database name etc. through as Parameters

$conn = new-object System.Data.SqlClient.SqlConnection $connString 
	#TODO Should the open be in the try/catch?
$conn.Open()
try{

	# Main for loop for parsing sheet
	# TODO rather than hard coding rows do until no end.

	for($i = $startrow;
		($sh.Cells.Item($i,1).Value2 -ne $null) -and ($sh.Cells.Item($i,1).Value2.Trim() -ne "") ; 
		$i++) {
$Name = $sh.Cells.Item($i,1).Value2
$Surname = $sh.Cells.Item($i,2).Value2
[String]$Address = $sh.Cells.Item($i,3).Value2
$Tel = $sh.Cells.Item($i,4).Value2
$email = $sh.Cells.Item($i,5).Value2
$Club = $sh.Cells.Item($i,6).Value2
$CI = $sh.Cells.Item($i,7).Value2
$ClubNo = $sh.Cells.Item($i,8).Value2();
$EC = $sh.Cells.Item($i,9).Value2
$ECTel = $sh.Cells.Item($i,10).Value2
$PaidE = $sh.Cells.Item($i,11).Value2
$PaidS = $sh.Cells.Item($i,12).Value2 
		# TODO - do we need to close the command - check documentation 
		# to see if it implements IDisposable - and is there a using equivalent in PowerShell
[System.Data.SQLClient.SQLCommand]$Command = New-Object System.Data.SQLClient.SQLCommand

	$Command.Connection = $conn
			$Command.CommandType = [System.Data.CommandType]::StoredProcedure
			# - lookup first - do within proc?.

	$Command.CommandText = "[dbo].[usp_RiderSearchByName]"
	
	$Command.Parameters.aDD("@FirstName",[System.Data.SqlDbType]::NVarChar)
	$Command.Parameters["@FirstName"].Value = $Name
	$Command.Parameters.Add("@SurName",[System.Data.SqlDbType]::NVarChar ).Value = $Surname
	[int]$ID = $null
   [System.Data.SqlClient.SqlDataReader ]$reader = $Command.ExecuteReader()
			try{
				if($reader.Read()){
					$ID = $reader["intRiderID"]
				}
			}
			finally{
				$reader.Close()
			}
			# if we didn'te find a rider then create on
			if($ID -eq 0) {
				[System.Data.SQLClient.SQLCommand]$Command =  $Command = New-Object System.Data.SQLClient.SQLCommand

			$Command.Connection = $conn
			$command.CommandType = [System.Data.CommandType]::StoredProcedure

				$Command.CommandText = "[dbo].[ups_RiderInsert]"
				$Command.Parameters.Add("@vcrFirstName",[System.Data.SqlDbType]::NVarChar ).Value = $Name
				$Command.Parameters.Add("@vcrSurname",[System.Data.SqlDbType]::NVarChar ).Value = $Surname
				$Command.Parameters.Add("@vcrAddressLine1",[System.Data.SqlDbType]::NVarChar ).Value = ToDBNull($Address.Split(',')[0])
				$Command.Parameters.Add("@vcrAddressLine2",[System.Data.SqlDbType]::NVarChar ).Value = ToDBNull($Address.Split(',')[1])
				$Command.Parameters.Add("@vcrTown",[System.Data.SqlDbType]::NVarChar ).Value = ToDBNull($Address.Split(',')[2])
				$Command.Parameters.Add("@vcrCountryCode",[System.Data.SqlDbType]::NVarChar ).Value = ToDBNull($null)
				$Command.Parameters.Add("@vcrCountry",[System.Data.SqlDbType]::NVarChar ).Value = ToDBNull($null)
				$Command.Parameters.Add("@vcrPhoneNumber",[System.Data.SqlDbType]::NVarChar ).Value = ToDBNull($Tel)
				$Command.Parameters.Add("@vcrClub",[System.Data.SqlDbType]::NVarChar ).Value = ToDBNull($Club)
				$Command.Parameters.Add("@vcrClubNumber",[System.Data.SqlDbType]::NVarChar ).Value = ToDBNull($ClubNo)
				$Command.Parameters.Add("@vcrECName",[System.Data.SqlDbType]::NVarChar ).Value = ToDBNull($EC)
				$Command.Parameters.Add("@vcrECTelephone",[System.Data.SqlDbType]::NVarChar ).Value = ToDBNull($ECTel)
		
				[int]$ID = $Command.ExecuteScalar()
				}
	
[System.Data.SQLClient.SQLCommand]$Command =  $Command = New-Object System.Data.SQLClient.SQLCommand

	$Command.Connection = $conn
			$command.CommandType = [System.Data.CommandType]::StoredProcedure
	$Command.CommandText = "[dbo].[usp_EventParticipentInsert]"
				$Command.Parameters.Add("@intRiderId",[System.Data.SqlDbType]::Int).Value = $ID
				$Command.Parameters.Add("@intEventId",[System.Data.SqlDbType]::Int).Value = $intEventId
					$Command.Parameters.Add("@decPaidSTG",[System.Data.SqlDbType]::Money).Value = If($PaidS -ne $null)  {$PaidS} else {0}
					$Command.Parameters.Add("@decPaidEUR",[System.Data.SqlDbType]::Money).Value = If($PaidE -ne $null)  {$PaidE} else {0}


		

	$Command.ExecuteScalar()
			# if got a CI number
			if($CI -ne $null -and $CI.Trim() -ne '') { 
# search for a licence

			[System.Data.SQLClient.SQLCommand]$Command =  $Command = New-Object System.Data.SQLClient.SQLCommand

			$Command.Connection = $conn
			$command.CommandType = [System.Data.CommandType]::StoredProcedure
			$Command.CommandText = "[dbo].[usp_LicenceGetByRiderAndYear]"
			$Command.Parameters.Add("@intRiderId",[System.Data.SqlDbType]::Int).Value = $ID
			$Command.Parameters.Add("@intYear",[System.Data.SqlDbType]::Int).Value = $intYear
	
			[int]$LID = $null
   [System.Data.SqlClient.SqlDataReader ]$reader = $Command.ExecuteReader()
			try{
				if($reader.Read()){
					$LID = $reader["intRiderID"]
				}
			}
			finally{
				$reader.Close()
			}
				# no licence found - create one
	if($LID -eq 0){
	[System.Data.SQLClient.SQLCommand]$Command =  $Command = New-Object System.Data.SQLClient.SQLCommand

			$Command.Connection = $conn
			$command.CommandType = [System.Data.CommandType]::StoredProcedure
			$Command.CommandText = "[dbo].[usp_LicenseInsert]"
			$Command.Parameters.Add("@intRiderId",[System.Data.SqlDbType]::Int).Value = $ID
			$Command.Parameters.Add("@intYear",[System.Data.SqlDbType]::Int).Value = $intYear
	$Command.Parameters.Add("@vcrLicenceNumber",[System.Data.SqlDbType]::NVarChar).Value = $CI
		$Command.ExecuteScalar()
				}
	

	}

	}
}
Finally
{
$conn.Close()
}
$wb.Close()
$excel.Quit()
[System.Runtime.Interopservices.Marshal]::ReleaseComObject($excel)

	}


	parseExcel($fileName)

Thursday, 10 November 2016

Sprint 2

Goal

Refactor the import script so it is fit for purpose.

Tasks

  1. Work out how to deploy database project to local database and how to connect to it.
  2. Create stored procs for crud operations required by script – include find rider.
  3. Enahance script / tidy up for stored proc use and other comments in script below.

Outcome

I can parse all the sheets I have to load an initial dataset.  I have a set of re-useable stored procedures for the application.

 

The script to fix

#
# Script.ps1
# TODO - rename the bit above and document this method
function parseExcel([String] $fileName){
	$excel=new-object -com excel.application
	$wb=$excel.workbooks.open($fileName)
	$sh = $wb.Sheets.Item(1)
	# TODO de hard code teh endrow.
	$startrow = 2
	$endrow = 16#Connection and Query Info

# prpbably best to pass the database name etc. through as paramaters
$serverName="uj6arxo0jh.database.windows.net" 
$databaseName='AudaxDB' 
#TODO  And this really shouldn't be here!
$connString = "Server=$serverName;Database=$databaseName;" 
$conn = new-object System.Data.SqlClient.SqlConnection $connString 
	#TODO Should the open be in the try/catch?
$conn.Open()
try{

	# Main for loop for parsing sheet
	# TODO rather than hard coding rows do until no end.

	for($i = $startrow; $i -le $endrow; $i++) {
$Name = $sh.Cells.Item($i,1).Value2
$Surname = $sh.Cells.Item($i,2).Value2
[String]$Address = $sh.Cells.Item($i,3).Value2
$Tel = $sh.Cells.Item($i,4).Value2
$email = $sh.Cells.Item($i,5).Value2
$Club = $sh.Cells.Item($i,6).Value2
$CI = $sh.Cells.Item($i,7).Value2
$ClubNo = $sh.Cells.Item($i,8).Value2();
$EC = $sh.Cells.Item($i,9).Value2
$ECTel = $sh.Cells.Item($i,10).Value2
$PaidE = $sh.Cells.Item($i,11).Value2
$PaidS = $sh.Cells.Item($i,12).Value2 
		# TODO - do we need to close the command - check documentation 
		# to see if it implements IDisposable - and is there a using equivalent in PowerShell
$Command =  $Command = New-Object System.Data.SQLClient.SQLCommand

    $Command.Connection = $conn
		# TODO - convert to strongly typed stored procedure.
		# also - lookup first - do within proc?.
    $Command.CommandText = "INSERT INTO tblRider VALUES( '" + $Name  + "'" +
    ",'" + $Surname.Replace("'","''") + "'" + # notice the fancy replace here for the O' people
    ",'" + $Address.Split(',')[0] + "'" +
    ",'" + $Address.Split(',')[1] + "'" +
    ",'" + $Address.Split(',')[2] + "'" +
    ",NULL" + 
    ",NULL" +
    ",'" + $Tel + "'" +
    ",'" + $Club + "'" +
    ",'" + $ClubNo + "'" +
    ",'" + $EC + "'" +
    ",'" + $ECTEL + "'" +
        ")`n`r" + 
        "SELECT @@IDENTITY `n`r"
        
        
        $Command
        [int]$ID = $Command.ExecuteScalar()
        $ID
$Command =  $Command = New-Object System.Data.SQLClient.SQLCommand
		# TODO - remove not required
		#TODO create stronly typed proc.
    $Command.Connection = $conn
    $Command.CommandText = 
       "INSERT INTO tblEventParticipant VALUES( " +  $ID  +",1,'" + $PaidS + "','" + $PaidE +"')" 
    $Command
    $Command.ExecuteScalar()

		# TODO again - needs stored proc.
		# 
if($CI -ne $null -and $CI.Trim() -ne '') { 
$Command =  $Command = New-Object System.Data.SQLClient.SQLCommand

    $Command.Connection = $conn
    $Command.CommandText = 
       "INSERT INTO tblLicense  VALUES( 2016, " +  $ID  + ",'" + $CI +"')" 
    $Command
        $Command.ExecuteScalar()

    }

	}
}
Finally
{
$conn.Close()
}
$wb.Close()
$excel.Quit()
[System.Runtime.Interopservices.Marshal]::ReleaseComObject($excel)

	}

	parseExcel("C:\Users\stuartm\OneDrive\Documents\Audax\A300_2016\A30002016Entrants.xlsx")

Wednesday, 9 November 2016

One hour sprinting - change in strategy–a sprint is a week (or shorter) but the code in an hour

This is a part time project and the thinking is taking a lot more time than the coding – which is good because I’ve a lot of time on the bike for thinking and not much time at the keyboard for coding.

Bit of a change in strategy – a sprint is going to take a week or less but will have just one hour of coding!  This should try and make me actually do some coding each week rather than continuously think.

Sprint 1 Retrospection3–a bit of direction, information security and plans and other musings

 

Not only did I massively overshoot my one hour development time, I also have doubts as to weather I was really adding value to the “product”.

OK – so I’ve uploaded a load of data – but I’m not sure I can actually use that data.  But, upon thinking about it, I might be able to implement user stories whereby I already have the rider data and just get them to confirm it.  Since they supplied the data for my events – I’m kind of assuming that they’ve allowed me to use it for my events but there is obviously  a massive legal bag of spanners to do with data shareing etc. that I’ll have to try and put something together on.

I guess the value added bit is that I’ve validated the schema.

Going forward the focus needs to be

image

Epic – 4307 – “I want a rider to be able to enter all there details online when the event opens and to be able to prepare brevet cards for the event.”

Saturday, 5 November 2016

Sprint 1 - Sprint planning

Tasks

  1. Create database project.  I already have a VS solution with some work I did for audax before to publish/search the club numbers **
  2. Create schema and deploy to Azure
  3. Create PowerShell script that takes inputs (parameters) eventId, year (for license number) and filename, parses the file (CSV) and inserts the data.
  4. Create the route and event (manually using ssms)
  5. Call script above until it works!
** http://audax.azurewebsites.net/WebApp/ will look up an Audax Club Parisien (ACP) club number from name and country.  It's part of the  paperwork for ACP. 

Data

Headers

Name
Surname
Address
Tel
email
Club
CI license
Club
No
EC Name
EC Tel
Paid EUR
Paid STG

Sample

Stuart MCLEAN 20 Ben Madigan Park South, Belfast   Audax Ireland 16LC0430 (M24) 01500    

What I'm not doing

I did think about handling the duplicates/matching riders etc. because I know I'll need this - but I've one hour!

Issues

Noticed there is some proprietary Stiona Software code in the current solution - will need to refactor if / when I open source.

Risks and mitigation

Never used db projects before - even a sample.  Could do a sample project but suspect this might mean my coding slips another week and I'll lose interest.
Mitigation: re-read samples, have samples open, just do a script or use SSMS straight onto database and reverse engineer later. 
Powershell done this bit before but all my samples are on a clients computer and strictly speaking don't belong to me!
Mitigation - open / find all the samples used for the last time I did this.  Lets face it - when it comes to script google is king.
CSV there are ,'s in the address - need to look at a csv sample with ,'s or go fixed or something  before parsing. 
Mitigation - work this out before the hour!

Tuesday, 1 November 2016

Because I like a bit of schema

Great sketch eh!

OK - a route can be used in an event many times - usually every year but maybe more often.  (The route itself may actually change but I don't think were actually concerned with that in this model).
Each event has a bunch of Participants who are made up of the riders.  A rider can participate in multiple events.
The riders details are pretty much static except they get a new licence number each year.
Obviously they move and so on, but I don't see any particular need to track that against the events - just the current details should do.
Events have organisers - or maybe rides do - they can have more than one so I've just realised the model is wrong - need a join table.
Did think that the organisers were against the ride - but there not as they sometimes change year to year as the route gets passed from person to person.
Riders and organisers are users of some sort - but the chances are I'll pick up this bit of schema from the standard ASP.NET authentication database - or whatever those clever people at Redmond use these days.

I can smell the code ...

Sprint One - Still sharpening the sword

Not a single line of code has been written and Abe Lincoln is fast approaching his time to get the axe out.

So, whilst cycling of course, I went over my previous brief:

As "Stuart McLean" I want to be able to get a csv list of entrants for a brevet.


"I'm going to create a database - whoop whoop - to store:
Riders,
The Brevets,
Entrants to a brevet - i.e. the relationship between the Riders and the Brevets.
Then I'm going to upload the data from the excel files I have.  This should give me a list of riders, existing entries and previous brevets.
This should validate my data model.
I'm going to do all this in SQL Server management studio straight on the database!"

A couple of worries - in one hour.
  1. I have duplicates in my spreadsheets - not sure I'll have time in the hour to sort out these duplicates.
  2. Should I be starting with a database project?
I guess a "database project" is one of my technical user stories - after all I said in my first blog on this that doing some coal face work is part of the aim.
But I've never used the DB projects in anger.  I know they've been around for ages but scripts have been around even longer.
In an hour! 

OK - so heres another breakdown - 

"I'm going to create a database - whoop whoop - to store:
Riders,
The Brevets,
Entrants to a brevet - i.e. the relationship between the Riders and the Brevets.
Then I'm going to upload the data from the excel files I have.  This should give me a list of riders, existing entries and previous brevets.
I'm going to upload the data for one of the previous brevets.
This should validate my data model.
I'm going to do all this in SQL Server management studio straight on the database
I'm going to use a database project to create the schema and any procedures etc,
I'm going to create my brevets for 2016 - because I have them.
I'm going to use ssms to put the data in and out.
!"

Big question here that I need to address - how the heck am I going to get testing (system/uat) in in the hour?


Sunday, 30 October 2016

Can I Sprint in an hour?

ACP Brevet Cards

It seems the more I know, the less I get to do.  I'm currently a technical architect for 6 sprint teams - which is exciting and challenging but I'm getting less and less (read no) time at the coal face.
The pace of change in IT seems to be exponential and I like to keep my toes on the edge of the programming curve.
OK - so I'd love to get back into Unix, c++, java and all that stuff - but it's been 15 years or so so I'm going to stick with the Microsoft stack.

The Challenge

Deliver a user story in one hour.  That's one hour to code, test and release.  
"Give me six hours to chop down a tree and I will spend the first four sharpening the axe." 
Abraham Lincoln

I am going to allow - outside of the hour - study and plan.  Hopefully this will make the hour super productive.

The project

The project is simple - and combines programming with my other passion - cycling.  You can read about some of my cycling here.  Every year I organise a few "Brevets" - long distance cycle rides for Audax Ireland.  There is a bit of admin involved:

  1. Collect details of participants - currently they email or post a form with name, address etc.
  2. Collect money - I accept PayPal or cash on the day.  Not all organisers accept cash and some push the PayPal through the clubs.  Different events cost different amounts.  Payment can be made in € or £.
  3. Print "Brevet Cards" with the event details, riders details and control points.
  4. Sign on sheet for Cycling Ireland (CI) with list of riders to collect signature at start.
  5. One day licence form for riders who aren't members of cycling Ireland.
  6. On completion - fill in finisher details on spreadsheet for Audax Club Parisien to homogolate the rides and order medals where required.
  7. Submit accounts and pay balance toe Audax Ireland (AI).
  8. When homogolation stickers and medals arrive, post with brevet cards to riders.
Currently I run all this using a spreadsheet to collect the rider info on.  I then have a word mail merge for the Brevet cards and cut and paste onto the other documents.
The biggest pain is actually getting the data on the spreadsheet.  It is either keyed or cut an pasted depending on how the application arrives.  I can also sometimes cut and paste from an old spreadsheet - but the CI license numbers change every year and other details may change.

The tech

  • SQL Azure - assuming a relational database - might need other azure tech around the outside for large data or whatever.
  • C#.net for business object layer, processes etc.
  • MVC for serving HTML  to client
  • WEB API - for services
  • Angular
  • Visual Studio

Entity framework or ADO.NET + Strongly typed stored procedures.

Its a  question that's been worrying me for about 8 years!  
Currently I have projects working with ADO.NET and stored procs (most), EF and unit of work, and EF over stored procedures.  I'm still torn between development speed, security, maintanence and 

Strongly Typed Stored Procedures

  • Tick a big security box - giving lease privilege access to the database and strong type checking - a string is a string never a piece of sql, thus adding a layer of defence against many forms of attack, SQL injection being the most obvious.  OK - O know EF will have vendor backing and is paramaterised etc. etc. but believe me, when some external auditor comes in and says what layers of defence do you have against attack, the strongly typed stored procedure with least privilege (i.e. connection can only execute stored procs) is king.
  •  Are fast
  • Do set based operations where they belong - in an engine that has been optimised over about twenty five years for performing set based operations!
  • Allow provide an encapsulation layer over your data model, allowing it to be changed and maintained independent(ish) of your code.
  • Allow your database to be normalised and your object model to be de-normalised as. it should be.
  • Allow your interactions with the database to be as they should i.e. full control over how much data is fetched when.
  • Is stable with a very long support life ahead and behond - ADO.NET.
  • Can lead to business logic being scattered across code and sql depending on who wrote it!
  • Can result in stored procedure mountains.
  • Offer a great maintainence fix.

Entity Framework

  • Is quicker to develop - though I'd argue this might only be over the first few iterations of a project.
  • Supports more flexible query functionality for the application e.g. sorting, querying multiple parameters etc. without additional effort.
  • Can leave you fighting the framework.
  • Is not as stable
  • Is not as secure
  • Through web services - offers a consistent business layer for other applications e.g. reporting etc.
  • May lead to compromises in the data model (de-normalised) or the business object model (too normalised).
  • Requires a full code deploy.
I'm going to put this decision off a bit longer!

Project management and tools

OK - so its agile, obviously.  

Agile tool/work tracking

TBD - I have visual studio online/visual studio team system and this is the obvious choice but I might look at a more "open" product - after all I'm wearing shorts right!
I guess initially it'll be this blog as my Minimum Viable Product in an hour is going to be very minimum.

Source Code Repository

To open source or not to open source, that is the question - well - I really want to open source - not that I'm expecting a million IT pros to rock up and start working on this but, like I say, I wearing shorts.  I thing I need to be careful of is ideally I'd use some of Stiona Software's utility and platform code but this has IPR wrapped in it and I'm not wearing sandals.  Software is my living too.

Again - with my shorts on GIT - but frankly it's something else to learn at the moment.

So - probably codeplex.  I have an account and it integrates with visual studio.