Skip to content
Patrick Desjardins Blog
Patrick Desjardins picture from a conference

Asp.Net MVC Project, SQL Server, Redis and managed with VSTS

Posted on: 2016-04-04

In the winter of 2014 I decided to re-code my virtual stock exchange boursevirtuelle.com. The initial project started in 2004 and got released in 2005. From there, features got added, some removed. Technologies changed from not having Jquery to a transition with mostly only using it. The backend was done in MySql and MemCached on a Linux VPS. I have learned a lot and while the website is still running, around 2008 I was less interested into it. Mostly because with Asp.Net MVC I was able to have more control hover the Html than the traditional Asp.Net Webform, I loved Microsoft's tool and I was working in the Microsoft ecosystem professionally. This side project always was a playground to try new things, experiment on technologies and patterns and I wanted to try more stuff on my own with the .Net environment. The PHP project started to feel older, adding feature was more and more problematic due to the lack of automation. Unit tests were introduced in the last month of 2008, new features added around 2010 got some but never had anything automated. While I am glad to got that experience, I was ready to work on something else without killing the whole project.

This is when I thought that I can redo the virtual stock exchange instead of a new complete idea. I had a strong view about what is the business logic and could just jump on the code. I started a blog where I was describing every sprints (1 month). This one ran from January 2014 to August 2014 where I got approached by Microsoft to come work for them, at Redmond USA. I have been continue to develop the new simulator but stopped blogging about it. This post contains the information that I posed in the old blog that is now not anymore online. I will post further detail about what I have learn during the project directly on this blog in the future.

Setuping Team Foundation Server (TFS) January 26, 2014 By: pdesjardins

Posted in Application Life Cycle The project is just starting and before even thinking about how to create the code, we need to do some application life cycle management. Team Foundation Server offers an online edition since few months and I believe it is the perfect software for this open source online application. You can get an account at VisualStudio.com. Once logged, you can create you own repository. I have created one named “BourseVirtuelle.com” which is the name of the website.

TFS online provides many tools. First, it has the TFS source control. All code will be located online with TFS. TFS and Visual Studio is tightly coupled with TFS which confirm the use of TFS. TFS also gives a good platform for activities. This is essential if we want to track the work to be done, bug tracking and future features to add. It has also a build server and testing capability. Since we are creating a enterprise website and not only a simple Asp.Net MVC tutorial, we will create unit test and we will execute automatized unit tests. Finally, TFS online offer the possibilities for deployment. Since this website is about how to create an Asp.Net MVC from the beginning to the end, we want to deploy everything in a later stage.

The TFS account used for this project is mine : https://patrickdesjardins.visualstudio.com and the project name is BourseVirtuelle.com (which will have its English version at StockVirtual.com).

Once created, it is the time to synchronize Visual Studio with TFS. Open Visual Studio and click Open from Source Control …

A window popup opens with the possibility to select a Team Foundation Server. I enter the URL that I have previously specified in this blog post and hit enter. From here, I can see all Team Projects available. I choose the BourseVirtuelle.com project and hit Connect.

This step synchronize TFS and Visual Studio. It is possible to control TFS from Visual Studio with the Team Explorer tab.

I will end this post here and continue later. The next step is to create some Work Items. Work Items are element for managing the work to be done on the project. Since it is a big project that will be built part-time on spare time, it is a good idea to keep track of what needs to be done.

Creating task with Team Foundation Server February 3, 2014 By: pdesjardins

We have now Visual Studio and TFS connected. It is the time to plan what we will do for the next sprint. Since we are not full time on this project, I plan to have monthly sprint. Maybe 10 hours per week will be set on this project, so a month is about 40 hours for 1 person. The first month will be mostly on configuring the project. But before planning anything, let’s setup TFS.

Visual Studio cannot change the backlog time frame. This is why, we will jump into the web portal. Once in the web portal, select WORK at the top of the screen. From there, you can choose Backlogs. When you select a sprint, you can then click at the top right the “No iteration dates” to setup and assign a range. At anytime it is possible to click the date and change the starting and ending date. It is also possible to rename the sprint.

We are now ready to enter few back log items. Back log items are a use case. This one will be defined later in smaller task. A group of back log can be a feature. It is possible to work with TFS from big to small or small to big. I am note sure that I will go as much deep with Work Item for this project and will start just by defining Work Item as back log item.

The first step is to click BackLog items in the Work->Backlogs menu.

The type can be “Product Backlog Item” or “Bug”. Every time title are entered and the Add button is hit, then the grid below the form is filled up. But this is not the only way to create Backlog items. We can do it directly into Visual Studio 2013. First, open the Team Explorer. Second, on the home screen, click Work Items. Third, click New Work Item at the top of this panel.

In both case system, the web portal and Visual Studio, it is possible to create a list of Work Item. Visual Studio may looks to have more field but in fact, the web portal does have them too. Once it is created from the team portal, right clicking Work Item in the grid and selecting Open, opens the Work Item with all fields.

At any time, from Visual Studio or the web portal, it is possible to see the list of backlog item. In Visual Studio, the list if under the Team Explorer, Work Items. A sub panel labelled Queries has a Shared Queries folder. Under this one, a pre-defined query “Product Backlog” exist. Double clicking this query execute this one.

From here, it is possible to assign to double click any of the Work Item and to assign the effort and to who the Work Item is assigned. For the moment, I am sure that the four first Work Item can fit in the first sprint. So, I can with Visual Studio opens the Work Item and change the Iteration for the first sprint.

But, it is not efficient because it is slow. A faster way is to use the web portal because you can drag and drop Work Item.

![](/images/blog/TFS_Drag_Drop_WorkItemToSprint.mp4" controls/>

This have move everything into the Sprint 1. Visual Studio has a Shared Query called “Sprint Backlog” and the web portal has the Sprint 1. Both display not only Work Items but also Task. Here is the two side by side that show the difference. I personally prefer the web portal.

The next step is to assign capability for the team. For the sprint 1 (and for all other sprint) I will be alone. Nevertheless, let’s configure everything correctly. Inside the web portal, click the Sprint 1 and select the Capacity sub menu. From here, it is possible to select the capacity per day. We have defined that I will work about 10 hours per week, so it is 2 hours per day (5 workings day on 7 days).

What is most interesting is to assign time into each task. I have say TASK because time cannot be assigned to Work Item directly. Work Item remaining time is the sum of every task times. It is possible to set the remaining time directly inside each Work Item but the fastest way is to open the web portal and to go inside the sprint ans select “Board”. This give a view where each Work Item has its row and each task has its square. It is possible from here to click an assign the time and to who the task is assigned.