Thursday, August 23, 2012

So true!!!

The effect of a broken build generally, and specifically a build left broken at the end of a day’s work, is magnified if you are working in a distributed development team with groups in different time zones. In these circumstances, going home on a broken build is perhaps one of the most effective ways of alienating your remote colleagues.

Farley, David; Humble, Jez (2010-07-27). Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation (Addison-Wesley Signature Series (Fowler)) (Kindle Locations 2024-2026). Pearson Education (USA). Kindle Edition.

Tuesday, August 21, 2012

Really good advise on configuration management

Keep the available configuration options for your application in the same repository as its source code, but keep the values somewhere else. Configuration settings have a lifecycle completely different from that of code, while passwords and other sensitive information should not be checked in to version control at all.

Farley, David; Humble, Jez (2010-07-27). Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation (Addison-Wesley Signature Series (Fowler)) (Kindle Locations 1581-1583). Pearson Education (USA). Kindle Edition.

Thursday, June 07, 2012

Tuesday, May 01, 2012

More performant way to add items to SharePoint List

SPList.Items.Add(); -this code actually attempts to retrieve all items of the list.

Actually, you may retrieve an empty SPListItemCollection without querying the database by calling SPList.GetItems() and passing an SPQuery object designed to return no rows. So to add an item to a SharePoint list, use the following code instead: SPListItem newItem = SPList.GetItems(new SPQuery(){Query = "0"}).Add();

Mann, Steven; Murphy, Colin; Gazmuri, Pablo; Wheeler, Christina; Caravajal, Chris (2012-01-31). SharePoint 2010 Field Guide (Kindle Locations 8516-8520). John Wiley and Sons. Kindle Edition.

Monday, April 16, 2012

List of JavaScript MVC frameworks

http://www.hanselman.com/blog/TheBigGlossaryOfOpenSourceJavaScriptAndWebFrameworksWithCoolNames.aspx

Wednesday, January 11, 2012

My Powershell Profile

I updated my profile in .\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 to include SharePoint:

function prompt {
$Host.UI.RawUI.WindowTitle=$(get-location)
"$ ";
}

#Set environment variables for Visual Studio Command Prompt
pushd 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC'
cmd /c "vcvarsall.bat&set" |
foreach {
if ($_ -match "=") {
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
}
}
popd
write-host "`nVisual Studio 2010 Command Prompt variables set." -ForegroundColor Yellow

& ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1'
write-host "`nSharePoint environment set." -ForegroundColor Yellow

Thursday, June 30, 2011

Kill Projects and Develop Agile Programs

http://ctotodevelopers.blogspot.com/2011/06/kill-projects-and-develop-agile.html

Wednesday, June 29, 2011

Best practices of the past

Looks like SharePoint faithfully following the best practices of 10 years ago. Lots of XML files, XSLT - some of younger developers don't remember the hype surrounding these at the turn of the millennium. When I experienced pain of setting up BCS in SharePoint 2010, it reminded me of EJB as they were around 2000: lots of duplication in various XML and code files, typo-unforgiving environment, etc.

Come on! It's 2011! Everyone is talking about "convention over configuration", "view engine", Razr, code-first Entity Framework, etc. Are we going to see these in SharePoint 2020?

Tuesday, June 28, 2011

Evil security in Win2008R2

On Windows Server 2008 R2 there is no way to install assembly into GAC. Drag and drop - get "Access denied". Gacutil is not installed!

Had to copy gacutil.exe and gacutil.exe.config from my Windows 7 workstation to the server, then can install assemblies without any problems. Evil security again???

Development experience in SharePoint still sucks!

Struggling through BDC Model creation in Visual Studio: what a tedious and unforgiving process. Almost no feedback or error messages...

To create a List I have to edit an XML file...

Wednesday, March 23, 2011

Aspect-oriented programming

AOP and policy injection has low adoption because the use cases suggested are not that important. After all, security and logging has already pretty robust frameworks in both .Net and Java, and other use cases seem just lame...

Instead, where AOP can actually help is to enforce the Open-Closed principle, because it gives you a better alternative to subclass the classes trying to avoid modification. Rather than create derived classes a developer can create aspects or policies that extend the behavior of the class without having to modify it or create a string dependency through rigid inheritance structure.

Tuesday, January 04, 2011

Monday, October 11, 2010

Two lessons

I learned two lessons last week:
1. Friends don't let friends use ASP.Net Login Control
2. JQuery is the best way to fix bugs in ASP.Net.

Wednesday, August 11, 2010

Visual Studio command prompt with Powershell

I updated my profile in .\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 to include VS2010 prompt:


function prompt {
$Host.UI.RawUI.WindowTitle=$(get-location)
"$ ";
}

#Set environment variables for Visual Studio Command Prompt
pushd 'c:\Program Files\Microsoft Visual Studio 10.0\VC'
cmd /c "vcvarsall.bat&set" |
foreach {
if ($_ -match "=") {
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
}
}
popd
write-host "`nVisual Studio 2010 Command Prompt variables set." -ForegroundColor Yellow

Thursday, August 05, 2010

Good TFS! Bad WebDeploy!

Evil MsDeploy wiped out my SharePoint site that was used to support TFS projects. Luckily I am on TFS 2010, so eventually I managed to get the site back without doing some low-level XML editing. I have to admit Microsoft did a very good job in making TFS more manageable.

I wish the next version of WebDeploy will be safer...

Wednesday, August 04, 2010

Comma in Powershell

Mmm Learned today the hard way that comma should not be used to separate parameters. That is, instead of:
Encrypt-String "Alex", "089234kljhwsdf=", "98qasdlfkjhasdflkjh==
you should use
Encrypt-String "Alex" "089234kljhwsdf=" "98qasdlfkjhasdflkjh==

Great explanation here.