Windows Phone 7 Deve Launch
# Thursday, October 11, 2012

Have you heard about the Succinctly Series? Syncfusion has produced a number of free e-Books on various subjects ranging from source control to jQuery to HTTP.  I highly recommend you pick up these free books. You’ll have to register but it’s worth it. This is an unsolicited review. Smile

So far I’ve read the Knockout.js Succintly, ASP.NET MVC 4 Mobile Websites Succinctly, PDF Succinctly and JavaScript Succinctly. They are great beginner books and very quick reads especially if you are beyond the basic level. They average around 60 pages per book with 150 pages being the biggest I’ve seen.

They seem to be rolling out a new book every few months. So far they have:

Knockout.js Succinctly

C++ Succinctly

ASP.NET MVC 4 Mobile Websites Succinctly

LightSwitch Succinctly

Javascript Succinctly

HTTP Succinctly

PDF Succinctly

Git Succinctly

jQuery Succinctly

Happy Coding! Smile

Books | Git | JavaScript | jQuery | Knockout | review
Posted 10.11.2012  #    Comments [0]  | 
# Thursday, May 24, 2012

At my current job and my last I either worked solo often on projects or in very small overlapping efforts of a few team members.  In both of these jobs the team used Visual SourceSafe (VSS) and it was working well enough but no longer supported. Jumping to TFS felt like overkill for a team on VSS and not affordable. 

MS has announced TFS Express which might go a long way in changing this. However, I have found the world of Distributed Version Control Systems (DVCS) with Git and Mercurial to be game changers.

As I have been learning more and more about DVCS I found a need to work up a new process that I can hand over to my team members or a new employee to help them get up to speed fast. Teams of larger size or even code bases of much larger complexity require sophisticated workflows. In my last two jobs I haven’t fallen into this category. 

This series reviews the process I have put together for a small team (1-5 members) with less complex code bases.  I’m not a Mercurial or Git expert by any stretch of the mind but I have found a flow that is working great. I welcome any thoughts and suggestions for improvement from the more seasoned DVCS pro’s.

Let’s get started.

1. Mercurial or Git?

2. Installing and basic configuration of Mercurial

3. Workflow basics

4. Setting up your repository

5. Working in default

6. Reverting/Deleting

7. Branching

8. Tagging & further reading

Posted 05.24.2012  #    Comments [0]  | 

This is the first in the series Getting started with Mercurial for a small team.

Distributed Version Control Systems (DVCS)

DVCS offer many advantages over traditional systems such as Subversion.  Most agree that branching and merging are much easier, the operations are usually much faster and the reason I like the most – their distributed.

Distributed

Every developer has a copy of the repository on their drive and can work on this copy however they like. This results in much faster operations as well as a new freedom for a developer to work on code locally WITH source control operations and not having to worry about what it is doing to the server version or other users.  Commit 50 times, add two branches, delete a branch, etc.... No more having to worry about checking in to the central server.  Work how you need to complete the task with local source control support!  When your ready you can get an update for the "central" server and check your work/build locally.  Then commit and since merging is so much more powerful and intelligent this isn't as scary as before.  A developer can get your changes from the central repository OR EVEN YOUR repo (if setup) when they want to their repository.

Trust me, I'm not giving it enough justice.  DCVS is here to stay and is the only way moving forward.  Now it comes down to currently two really great choices. 

Mercurial vs. Git

Both are great,  so why Mercurial?  My decision came down to three reasons.

  1. Mercurial has better tooling on Windows.  I am sure Git will change this but today this is the case.
    • As of this week, Git released a Windows client.  This may change the game but I haven’t had a look at it yet.
  2. Mercurial is a little simpler to use. Think of Mercurial as less options but not hobbled and Git as the option full, can easily shoot yourself if you don't know what you are doing option. 

They both are great!!!! In fact I recommend a developer learn both. #3 is listed below.

Bitbucket vs. Github vs. Self-Hosting

The final reason for Mercurial is not based on Mercurial.  The cloud hosting service Bitbucket offers a free plan that includes unlimited private repositories for up to five users.  Github offers free to open source. 

Bitbucket offers both Mercurial and Git hosting so choosing which DVCS is a little easier as it can be changed fairly easily. Bitbucket offers repo conversion tools as well.

Self-Hosting? - Yes, it's possible but setting up a Mercurial server at this time seemed more work and maintenance than it's worth compared to cloud hosting.

Here’s a few more examples of others who use Mercurial.

http://wildermuth.com/2012/03/06/Modern_Web_Development_-_Part_7

http://www.headspring.com/2012/03/migrating-from-bitbucket-to-github (Using both)

The team making stack exchange (stack overflow sites) also use Mercurial and have created a terrific tutorial.

Security with the Cloud

Worried about your source? Bitbucket is secured by HTTPS and requires a login with access to the repositories and / or SSH Keys per machine accessing the repository. A repository is owned by an account and that account can grant access to other accounts. Ownership of a repository can be transferred to another but only by contacting Bitbucket support.

While this is secure, dillegence in coding & backup practices should still be followed such as avoiding storing passwords where possible and backing up our source.

Secure Code

Storing the connection string in the clear in the web.config is a risk that can be mitigated. You can encrypt your connection string information and other sections that might contain sensitive information. You could have a connection string configuration file on each machine/server you use at a specified location and just have your web.config point to it to keep it completely out of source control. 

Backup

Relying solely on any cloud vendor as your source code backup strategy is a nightmare waiting to happen. The cloud never goes down or looses data. Don't kid yourself. Don't play the fool and leave it all up to the cloud. 

Going down for a little while using a DVCS is not that big of a deal.  You can keep working and there are ways to get work from another peer box (hg serve).

DVCS being distributed by nature can make small outages very tenable. When you pull down a repo from the "central" repo, which in DVCS can change but for our purposes will always be considered Bitbucket, you are getting the entire repo UNLESS you purposefully choose different.  This means your local repo is a copy/backup.  That does not mean you should entirely rely on this in a disaster BUT it is an extra layer. 

I recommend backing up the Bitbucket repositories on a regular interval and store them elsewhere.

Currently, there are two ways to do this. 

  1. Log into bitbucket and download the source for each repo in a zip file.  This has one major drawback.  The zipped version will not include any version control history. 
  2. Use https://bitbucket.org/christianspecht/bitbucket-backup script. This script will download all repo's with version information.  The script is actually cloning all repo's to a destination directory.  The script requires Mercurial to be installed on the machine running it and login information.

The next in the series is Installing and basic configuration of Mercurial.

Posted 05.24.2012  #    Comments [2]  | 
# Thursday, September 15, 2011

I updated Adam Anderly’s SimpleMembershipMvc3.Sample application available as a nuget package and on GitHub.  The sample as is only hooks up the registration and login for the Account Controller. 

What I Added

  • Require Email Verification for sign up.
  • Resetting Password
  • Forgotten Password
  • In doing so I had to add the reset and forgotten models to the AccountModels class.  If you are interested in using this code please be aware of this and take the necessary steps to backup your AccountModels and/or merge the two.

    How to get it

    In talking to Adam he is likely going to create a new sample available via NuGet for those wanting this more complete solution.

    For now you can get it via my GitHub Fork of Adam’s work.  Hopefully soon, either Adam or myself will create a nuget package for it.

    Happy Coding!

    Posted 09.15.2011  #    Comments [1]  |