Me, Myself and Mayvelous
26 Mar
The core mission of a version control system is to enable collaborative editing and sharing of data. Different systems use different strategies to achieve this. There are two main versioning models namely “Lock-Modify-Unlock” and “Copy-Modify-Merge“.
Lock-modify-unlock
In this model, the repository allows only one person to change a file at a time. This exclusively policy is managed using locks. VSS and old style source controls use this approach where only one person at a time can modify a file. Lock the file, edit, then check in and release the lock. This model is only suitable for a small teams. For a bigger team with many developers, it would be inefficient to use this model as locking isolates a file to only one developer which delays the work among other team members who want to work on the file.

The lock-modify-unlock model (Ref #)
The problem with the lock-modify-unlock model is that it’s a bit restrictive, and often becomes a roadblock for users:
(Ref: pp. 4)
Copy-modify-merge
In this model, each user’s client contacts the project repository and creates a personal working copy – a local reflection of the repository’s files and directories. Users then work simultaneously and independently, modifying their private copies. Subversion, CVS and a number of other version control systems uses this model as an alternative to locking. Early version of Subversion did not support locking at all, but this is no longer the case. You can now lock files, query files to see who has locked then, and even mark files as requiring locks before edits. This make sense for binary files where merging is impossible. (Ref: pp 5)


Copy-Modify-Merge model (Ref #)
NB: TortoiseSVN provides a good built-in diff tool; you can also install WinMerge (http://winmerge.org), which integrate itself into TortoiseSVN.
When Locking is Necessary
While the lock-modify-unlock model is considered generally harmful to collaboration, there are still times when locking is appropriate.
The copy-modify-merge model is based on assumption that files are contextually mergeable: ie. that the majority of the files in the repository are line-based text files(such as program source code). But for files with bonary formats, such as artwork or sound, it’s ofter impossible to merge conflicting changes. In these situations, it really is necessary to users to take strict turns when changing the file. Without serialized access, somebody ends up wasting time on changes that are ultimately discarded.
While Subversion is still primarily a copy-modify-merge system, it still recognizes the need to lock an occasional file and provide mechanisms for this. (Ref: pp 7)
Ref:
#Don’t Use Microsoft Visual SourceSafe!,
# subversion documentation | Online version
20 Mar
Crazy Egg is yet another web statistic tracking service. It displays in 3 formats:
There are 3 paid plans and a free plan. A free account is ideal for a small personal site such as blog to track the visitor stats. Ofcos, there is a limit of 5,000 visit/month, 4 pages and 4 screenshots archive for the free plan. Very neat interfaces so you can consider using it for your blog stats tracking.
20 Mar
Here are some of the readings on Subversion and VSS that I came across. Whoever interested in Source Control and its available tools should go through these links first to get to know the technologies out there. I’m just concentrating on SVN and VSS, but there are a lot more to look at. Depending on your choice of technology, google would be your best reference.
Documentations:
Good Reference Articles
No to Visual SourceSafe? Bad Toad! Bad Toad!
I’ll be adding more later and if you find some good readings/articles, do let me know too.
14 Mar
Oie Turtle turtle, little tortoise, kuchi kuchi kooo…
Oh hello, I’ve just adopted a Tortoise recently. You see, we use to play with this creature called VSS before, but it got wild from time to time and the guys don’t like it much. I don’t like it in the beginning too. I did strangled and fist-fight with it for many times. But the thing is, you only need a bit of patience and time to tame him down. Once I start petting and playing with it, I tend to understand it’s tender part as well as bewilder sides. As you all know, everything has its own pros and cons; our VSS rode a bumpy road and came as an arse but it has soothen out after a while. At least for me, I’m on fair term with him.
Now I found a new pet. It’s really a sweet and gentle thing to start with. It says “Hello” and wags a little tail. Oh just so cute!
Before you start with the tortoise, you have to know its family tree; the big fat “Turtles” – Subversion (SVN) evolved from their ancestors called CVS back in ice-age. I’m not interested in CVS but I’m very much interested in SVN and how the little TortoiseSVN communicates to its parents.
So I did a bit of research on Googology and started learning about the whole Tortoise family and their neighborhood. So here we go…
What is SVN?
Subversion is an open source application for revision control, is a replacement for CVS. The goal of the subversion project is to build a version control system that is a compelling replacement for CVS in the open source community.
Subversion’s Features (# Parent Site) (# Wiki)
What operating systems does Subversion run on? (# Portability)
All modern flavors of Unix, Win32, BeOS, OS/2, MacOS X.
Subversion is written in ANSI C and uses APR, the Apache Portable Runtime library, as a portability layer. The Subversion client will run anywhere APR runs, which is most places. The Subversion server (i.e., the repository side) is the same, except that it will not host a Berkeley DB repository on Win9x platforms (Win95/Win98/WinME), because Berkeley DB has shared-memory segment problems on Win9x. FSFS repositories (introduced in version 1.1) do not have this restriction; however, due to a limitation in Win9x’s file-locking support, they also don’t work in Win9x.
To reiterate, the Subversion client can be run on any platform where APR runs. The Subversion server can also be run on any platform where APR runs, but cannot host a repository on Win95/Win98/WinMe.
It’s not necessary to set up Apache to use Subversion on the client sides.If you just want to access a repository then can use subversion client such as TortoiseSVN to integrate with the server. Only when you want to host a networked repository then you have to set up on Apache2 or an “svnserver” server. More info see FAQs (#)
What is TortoiseSVN?
It’s a free open-source client for the Subversion version control system, implemented as Windows shell extension. TortoiseSVN manages files and directories over time. Files are stored in a central repository. Its immediate ancestor was TortoiseCVS which talks to CVS server. (# Doc)
TortoiseSVN’s Features (# Doc)
You can also integrade with Visual Studio.net using this tool called AnkhSVN. It is a Visual Studio .NET addin for the Subversion version control system. It allows you to perform the most common version control operations directly from inside the VS.NET IDE. Not all the functionality provided by SVN is (yet) supported, but the majority of operations that support the daily workflow are implemented. (#)
I think this is all for today’s learning about my new pet. I’ll add more detail on how to feed things and teach your pet A,B,C,D later.
So you want to adopt a Tortoise too? Here are where you can get it from and how to look after it.
# Get Subversion here
# Get TortoiseSVN here.
# Download AnkhSVN
13 Mar
Whenever people ask for my job title, I have to stop and think for a while. I am not sure what exactly my job title is. I got a few documents saying different job titles for me. One as Analyst Programmer, another as Web developer and yet another as Software Engineer. Since I prefer working with webforms than winforms, I answer myself as a webdeveloper. What exactly am I? I’m still figuring out. May be I’m just a “Developer” among millions of “Developers”. Developers Developers Developers Developers Developers
8 Mar
Comparison between LLBLGen Pro and CodeSmith tools. I’m very new to both so the following points might be completely wrong. So correct me please and do fill in more.
| LLBLGen | CodeSmith |
|---|---|
| O/R Mapper + Code Generator | Template based Code Generator |
| Uses Parameterized Dynamic Queries | Mainly Stored procedures |
| Cost license fee, Need to buy template studio for custom template creation/management. |
Free (console version) Comes as templates so add/update or manage as you wish. |
| On-fly code generation, you don’t get to see templates or whatsoever. | Gives control over the whole process, top-bottom, as they are managed by individual templates |
| Does not create DB schema/generation. | Creates the whole DB structure ie. Storeprocs, triggers, tables, functions etc |
| N-tier generated with one go ie. If you change something in DB, you just regenerate the llblgen project and all files get updated. | Individual template/batch file generation ie. You need to run B&D batch, channel batch etc one by one to get update files across 3 layer solutions. |
| No webservices, remoting or channel server. Just uses classes and collections – entities, typelist, typeviews etc | Can add as much layer separation between DB end and UI end. Can manage as you wish just by working on templates |
| Less code – 2 projects, 1 solution | More code, some redundant – multiple projects, 3 solutions |
| N-tier project structure - Database Generic - Database Specific - UI (2 types: Adapter based or SelfServicing) |
N-tier project structure - Business and Data - Public Channels - Presentations (Add more as you wish) |
| Do sorting, filtering, grouping, paging, all DB queries by a few class calls. (Dynamic queries) | Need individual storeproc for each function. Adding one function needs to do individual updates for all projects and across solutions as well. Extensive use of storeproc. |
| It is n-tier but basic multi tier structure which separate Business data code from UI codes. | Advance/better n-tier architecture. Greater security and more control over each layers. |
| Easier code generation + usage + less error generation. | Need proper setup or you’ll get tangle in between. Small error in your base template will affect the entire project code. |
| You write very little code ie. Only need to write for UI code. | You have to write all the codes for your based templates if you don’t already have templates in hand. |
| Provide .net 1.1, and .net 2.0 classes, ready to use and choose whichever you need. | No .net 2.0 codesmith templates for us yet. Can use third-party templates but it will cost us. |
| It doesn’t require dotnet framework and work independently. | Uses dotnet framework as main backbone. |
# References:
# Debate: O/R Mapping or Code Generation : Lots of discussion going on there in the reply threads.
# Your Favorite O/R Mapper? : A discussion on O/R Mappers
# CodeSmith Rocks! | When code generation goes bad…
# LLBLGenPro vs CodeSmith w/ .netTiers
8 Mar
What is O/R Mapper?
O/R Mapper (Object-Relational Mappers) is a programming technique for converting data between incompatible type systems in databases and Object Oriented Programming languages. (# Ref)
What does it do?
The generated code from the O/R Mapper handles all of the steps that you would normally have to code yourself, saving you from having to:
What is LLBLGen Pro
LLBLGen Pro is a complete O/R mapper and data-access tier generator for .NET. It generates a data-access tier and business façade/support tier (in C# or VB.NET), using an existing database schema set. The generated .NET code is provided as a Visual Studio.NET project that can be added to a solution or compiled separately. (# Ref + More Info)
LLBLGen Pro Features
A key feature in LLBLGen Pro is dynamically-generated SQL. When retrieving or manipulating data in a database, the SQL script — the code understood by the database — is generated at run-time based off the requested information and dirty flags in each entity’s fields. This enables a generic save entity function on the Data Access Tier to produce different and optimized SQL code each time it is called, optimizing bandwidth usage and database load. (# Ref)
# Ref: Rapic CSharp Windows Development. pp. 17
LLBLGen Pro Objects
Project Types: SelfServicing Vs. Adapter
There are two types of LLBLGen Pro Projects namely – SelfServicing and Adapter.
# In SelfServicing template group, entity objects are responsible for their own persistence (saving their own changes to DB).
# The entity class itself contains logic to know which fields were updated and where to find the database.
# Lazy Loading is useful cos’ it abstracts the specific DB call from the upper layers of code.
# Adapter template group: uses an object called a DataAccessAdapter to interact with DB
# SelfServicing: bundles persistence inside entity objects
# Allows data to load itself automoatically as it is needed without explicit commands.