My SVN & TortoiseSVN experience

November 18th, 2004

As a .Net developper I use VSS everyday. Recently we configured a VPN so that we could work at home, and also for external workers. VSS works fine with this system, but fine doesn't mean fast. I don't know if it is the VPN or VSS to be blamed but sometimes it's very slow >:(. So I decided to have a look at SVN, and how to use it with Visual Studio .Net. Just a word : impressive !!!

I did try all the functionnalities of the Visual Studio SVN plugin ANKH, but I found it not professional enough for me, as I was always anxious that it could crash any time. It works, but not so easy to use as with VSS. But then I tried TortoiseSVN, and this is just a wonderful tool. Let me explain all you need to make the same experience:

1- Download the stuff:

2- Install the Server

The server side package is a set of console applications. So there is just some xcopy deployment to do.

  • Unzip the package on your server, for instance in c:\svn\
  • Create a folder which will contain all your repositories (a database in VSS) for instance c:\svn_repositories\
  • Launch the stand alone server and specify our repositories' root
    c:\svn\bin\svnserve -d -r c:/svn_repositories/
  • Create a new repository for managing our files
    c:\svn\bin\svnadmin create c:/svn_repositories/test
  • Now the folder c:\svn_repositories\test was created, we have to set the permissions. There is a file for this in the /conf of each repository. For us it will be in c:\svn_repositories\test\conf\svnserve.conf. Here is a sample file:

    [general]
    anon-access = none
    auth-access = write
    password-db = passwd.txt

    This just means that anonymous access are not allowed, and authenticated users can read and write into the repository. This is the typical scenario in a profesional environment, while you could set a read access to anonymous users in an opensource project.

    We also have to create a file containing the credentials, passwd.txt as it is defined in the previous file.

    [users]
    user = password
    guest = guest

    And that's all. No need to start again the server as those files are processed each time a client tries to access the configured repository.

3- Install the Client

TortoiseSVN is a shell application which add some items to the Windows Explorer contextual menu. It's well integrated, the GUI is very professional and it's far self sufficient for any use of svn. Here is an example of the result directly in the explorer:

TortoiseSVN scrrenshot
  • Install TortoiseSVN and reboot your system
  • Search for a folder containing a set of files you want to add to your test repository
  • Right-click on it, and select TortoiseSVN -> Export, to transfert its content to a server repository:

    TortoiseSVN screenshot

    Now you can play with this tool and see all it is able to do ...
    You could also

    TortoiseSVN scrrenshot

4 - Some vocabulary for VSS users

Just notice that file are no more locked like in VSS, but this is an optimistic concurrency instead. While uploading your content to the repository, the modifications will be merged.

  • Create VSS database -> Create SVN repository
  • Extract project -> Check out
  • Get latest version / Check out -> Update
  • Check in -> Commit
  • You can also use "Check for update" if you want to see all the modifications between your files and the server's ones.
  • Please note that for creating a VS.Net solution, create a blank solution and then create projects in sub folders of this solution. You will also have to "Add" files manually, but ignore /bin and /obj folders.

I hope this little introduction will help you in your investigations for trying this wonderfull free tool.

Update:
Just a word to say that for administrative ease there is a tool to make svn run as a windows service. It's called SVNService, and all you need to do is this command, and put the service with automatic launch:
svnservice -install -d -r c:/svn_repositories

The bitrh and the death of o/r tools

November 13th, 2004

Last week I decided to have a sight at all my “competitors”, that is to say all other object relational mapping tools. I use the word competitor but in some way I don’t see them as competitors but more colleagues, in the way we try to make things better with data access. I remember 3 years ago when we released the first version of Data Tier Modeler for .Net, which was the first .Net commercial o/r mapping tool. Now they are about 40, and maybe even more.

What caught my attention just after we have released DTM is another tool on the .Net market, namely Pragmatier. It was using the same concept of code generation, and was a good tool in my opinion. I even exchanged some words with Mats Helander and Sebastian Ware who made this tool. But what was my surprise that their website did not exist anymore! It seems they failed at making enough money with their product and decided to distribute it for free through gotdotnet. It’s very hard to make a living with only a persistence engine. And Pragmatier is not the only example. After that I arrived of the website of the ORM.Net tool and guess what! They also left the commercial economic model to release their product as free. Them too - I suppose - had only this product to sell.

On the other side, Frans Bouma - the well known one - went from a free model to a commercial one. And it seems to work fine for him. I hope it will continue, he is a good “competitor” (in my way of competition ;) remember).

Then, if there was one thing to keep in mind it would be the importance of the business model you choose to sell your product. Concerning innovating tools, or development products, I would say the most difficult thing is to enter the market. Because there are so many tools, that people don’t have time to test everything, even more if they are expensive. That’s why Frans took the best decision IMHO: giving its tool to everyone, and then making a new commercial version. We also decided 2 years ago to change our strategy by providing the full product freely, and asking for production runtime licenses only. With this way of working, users can investigate freely with one’s tool and then decide if they take the production license or to give it away. You all know that each IT project is risky, so why taking another risk by using a tool that could cost a lot of money even if the project is not successful i.e. in production.

Welcome EGOE

September 3rd, 2004

Most of you may know that I'm the originator of the Data Tier Modeler object to relational persistence tool. With this tool we were the first to provide an OPath interpreter to convert object queries to sql queries, with an "XPath like" syntax. For instance, if you want to get all Person objects having a child whose name is John you would type:

Person.children[name = 'John']

This request will be translated into SQL statements making use of the mapping definitions between your object model and you relational model. This functionnality is one of the most interesting things in the current implementation of the DTM (Data Tier Modeler), but has some limitations in terms of implementations and also capabilities.

But now a brand new tool is born, arriving with a beautiful architecture, and some never seen functionnalities (this is only my own opinion ;) ). This tool is named EGOE, which stands for Evaluant Generic OPath Engine.

Here are the main improvements:
- Shipped as an independant tool. Will be included with new DTM releases soon
- Mappings defined in an external XML file, or dynamically in your application
- Queries are compiled and graphs are cached (configurable)
- Specific parser for syntax error detections and better messages
- Relation navigation (auto joins)
- Support for aggregation commands on relationships (count, avg, ...)
- Parameterized queries to execute the same query with different values
- Support for specific dialects (MSSQL, Access, Oracle, MySQL, DB2)
- Support for ordering and paging

Some queries examples, and comments are useless:

Saying that Person has a one-to-many relation against Person named Children.
- All Person whose age is greater than 25

Person[age > 25]

- All Person whose parents have more than 2 children

Person[count(Children) > 2].Children

- All Person whose parents have more than two children older than 10

Person[count(Children[age > 10]) > 2].Children

- All children named Steeve with a parent older than 30

Personne[age > 30].Children[name = 'Steeve']

Here is some code showing how to use a query in a real application:

OPathEngine opathEngine = new OPathEngine();
opathEngine.LoadMapping("Northwind.xml");
string opath = "Person[ avg(Children.age) > 18 ]";
Query query = opathEngine.CreateQuery(opath);
            
// You can get the resulting SQL query
Result = query.GetSQL(DbType.SQLServer);
        
// Or a filled DataSet with your data
DataSet ds = query.GetDataSet(
    mySqlConnection, 
    DbType.SQLServer);

There are many more functionnalities I can't show you in this post, but a first documentation will be released soon. Some people are currently evaluating it and you can ask me if you also want to test it. For the moment, we don't know if it will be distributed as a free product, in open source, or in any other way. But of course, it will be available for all DTM users.

In the next days, the first public release will be out, so keep connected ...

Back from vacation

August 3rd, 2004

Now I'm back ...
One week in Corsica and another one in Bordeaux to see my parents.
Not enough but better than nothing.

Just imagine you were there ...

Most of them with the help of my mountain bike and my two legs ;)

On vacation for two weeks ;)

July 9th, 2004

I won't be able to blog for at least one week, as I'm going on vacation.

AutoSize Label

July 6th, 2004

The current Windows.Forms.Label implementation is only able to autosize itself horizontally. Last year, as I needed one being able to resize itself vertically, I decided to implement it. Now, when you set the width, the height is automatically adapted to be able to display the whole text.

using System;
using System.Windows.Forms;

namespace ProgramBookInput.CustomComponents
{
    /// <summary>
    /// Description résumée de AutoSizeTextBox.
    /// </summary>
    public class AutoSizeLabel : Label
    {
        public AutoSizeLabel()
        {
            OnTextChanged(EventArgs.Empty);
        }

        public AutoSizeLabel(string text) : this()
        {
            Text = text;
        }

        protected override void OnTextChanged(System.EventArgs e)
        {
            AdaptVerticalSize();
            base.OnTextChanged(e);
        }

        protected override void OnFontChanged(System.EventArgs e)
        {
            AdaptVerticalSize();
            base.OnFontChanged(e);
        }

        private void AdaptVerticalSize()
        {
            SuspendLayout();
            System.Drawing.Graphics g = this.CreateGraphics();
            int newHeight = (int)Math.Ceiling(
                g.MeasureString(this.Text, 
                    this.Font, 
                    this.Width).Height);
            g.Dispose();

            if(this.Height != newHeight)
                this.Height = newHeight;
            ResumeLayout();
        }

        protected override void OnSizeChanged(System.EventArgs e)
        {
            AdaptVerticalSize();
            base.OnSizeChanged(e);
        }

        

    }
}

Update:

John came to me with a nice hint which makes this control useless. Thanks John !

this

July 6th, 2004

My name is Sébastien Ros, I'm 27 and french. Though I was born and grew in Bordeaux I've been living in Mulhouse for six years, in the very east of France. Not such a good town to live in, but the region is great.

this.Job
I'm the co-founder and currently the Chief Technical Officer of a company named Evaluant. We provide services on .Net technologies, i.e. consulting, training, and development. We made several tools in .Net: an O/R mapping tool, a Portfolio Asset Management tool, a search engine, a web portal, and different other specific solutions for some customers. You can get more details on our web site

this.Hobbies
Soccer (my favorite team)
Mountain Bike (some photographs will come soon)
James Taylor

You can contact me at s.ros@evaluant.com

first post

July 5th, 2004

This is the first official post on this blog. Now I need to find some time to blog about me and then about more interesting things.