Dec
13
2006

Jetbrains Resharper 2.5 RTM

As you certainly know I you sometimes read my blog I am absolutely addicted to that tool and can't work without it anymore in Visual Studio 2005.

So I am happy to announce that Jetbrains finally released ReSharper 2.5. This version is for Visual Studio 2005 only. So what's new on this new version?

Main focus was on the improvement of performance; faster installation and startup, faster typing (including auto-popup on Code Completions), plus speedups for code formatting, error highlighting, Live Templates, parameter info, and more.

For sure they also added some new stuff like Navigate from here, Enable/Disable Context Actions, Go To File Member, an improved find results view, Analyze Null References.

But wait!!! You are using VB? hey Wygwam guys ;) They now support VB

ReSharper now recognizes VB code in your project and extends the following features to it:

  • All navigation and search features
  • Matching brace highlighting
  • Ctrl + W (Expand selection)
  • Ctrl + Q (Quick Documentation Lookup)
  • Parameter info (no autopopup, works only by Ctrl + P)
  • Identifier highlighting
  • Also, when you apply refactorings to C# code, ReSharper warns you if VB usages need to be updated
  • I guess the refactoring will also come soon.

    And the best for the end the upgrade is free for all users of Resharper.

    Don't wait, download it here, and try it.

    Dec
    2
    2006

    Interview of Christof Wittig CEO of db4o

    Patrice Lamarche had the opportunity to interview Christoff Wittig, CEO of db4objects.

    db4objects sponsors the open source database db4o which is a native object database engine for .NET and Java.

    There are several aspects that I particularly like in what I read:

    • The way the company seems to work with distributed employees all around the world
    • The open source development model

    And from a technical aspect I really like this kind of code:

    IList<Student> students = db.Query<Student>(delegate(Student student){
        return student.Age < 20
          && student.Grade == gradeA;
      });

    It is named Native Queries, and it is 100% type safe, I like when the compiler already tells me that my code has a defect.

    There are other good points about it that I will have to test, when I get time...

    Jul
    18
    2006

    Tech Head Brothers Authoring Tool - Part 1 Video

    I have quickly posted a video showing the insertion of an image and source code using the Tech Head Brothers Authoring tool on YouTube.

    This demo demonstrates offline preview and the ease of inserting images and source code in authored articles.

    I used the fantastic Camtasia from TechSmith to realize the video and was able to upload on YouTube in minutes, really cool tool and service.

    Remark: It is a shame that we can't add <object> tag on this blog.

    Mar
    18
    2006

    Yeah!!! :-) Publications are working.

    Today is a big day with a really cool milestone for Tech Head Brothers website.

    First I am able to publish/update content on the site with my new publishing tool; a word template using vsto 2005 and secured web services. This piece of code let me publish content with pictures, colorized source code, zip files for sample applictions and this directly out of Word 2003. Really cool!!!

    Second I can also publish/update/delete news directly from my prefered blog tool: PostXING. By the way the 2.0 Beta 1.0 was realized and I have to say: "Chris you made an awesome work, congrats".

    Dec
    10
    2005

    Visual Studio 2005 Team Suite installation

    It was a nightmare to have this installed and working!!! For all previous versions, since the alpha version, I used a Virtual PC. And now that the product went RTM I decided that it was time to install it on my productive machine.

    I had not installed any piece of alpha nor beta software on my productive environment before starting the installation of Visual Studio 2005 Team Suite.

    I ran the setup with default options except the location of the folder to install. Everything went fine till the end and then I had a strange message about Office 2003 missing SP2 and PIA... It was proposed that I run VSTOR.EXE manually.

    Running VSTOR.EXE I get an error message saying that I need to uninstall "Visual Studio .NET prerequisites - English", but I don't had that as an option in the Add/Remove.

    From the support page (http://msdn.microsoft.com/vstudio/express/support/uninstall/) I downloaded the uninstall tool, even if I never installed beta version before. Running it, it does uninstall SQL Server 2005 Express, then I get this error:

    The following task did not complete successfully:
    Uninstall Visual Studio components

    I then decided to uninstall and try to re-install, I did it two times with some operations in between. No way still not working. I started to be really really pissed off.

    To cooooool down I decided to get some music: Jack Johnson - In Between Dreams, really really cool. Thanks Mathieu.

    Then I went with regedit to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
    and started to uninstall stuff with msiexec /x {guid}

    I finally managed to be able to install VSTOR.EXE after installing .Net Framework 2. Then a full re-install  of Visual Studio 2005 Team Suite without SQL Server 2005 Express that I installed by hand and also with several trial before being successful.

    I finally have a development environment again and I can go on with the development of Tech Head Brothers in ASP.NET 2.0 and the new version of the publishing tool based on Word 2003.

    [ Currently Playing : Better Together - Jack Johnson - In Between Dreams (03:28) ]

    Aug
    18
    2005

    Codezone search integration in Visual Studio 2005 !!! Cooool stuf :-)

    As previously announced in this post: "Microsoft Announces CodeZone!",  Tech Head Brothers, my French portal about Microsoft .NET technologies, will be part of Codezone.  Today for the first time I am able to see what this means to be a part of the Codezone program.

    As you can see in the option dialog of the Visual Studio 2005 help, you will be able to choose from a list of currently 28 world wide community web sites (we are 32nd - at the end, as far as I can remember).

    And Tech Head Brothers is in the list. Great!!!

    When doing a search you will get results from the various community sites that participate in Codezone.
    For example a search about gzip returns two articles from Tech Head Brothers: one from me and one from Mathieu.

    This has been in place for a while but had not been working on my VPC because (Thanks Doug ;) my clock was not set correctly. It has to be set within 7 minutes of the corresponding time i.e. present time.

    For more information on what I am talking about read: "What is Codezone Community Search?"

    Jul
    20
    2005

    Jetbrains Resharper 2.0 Early Access Program (EAP) started !!!

    Great news from Jetbrains tonight with the launch of the ReSharper 2.0 EAP started. You can download the version for Visual Studio 2003 and Visual Studio 2005 Beta 2 and VS 2005 June CTP are supported on this page. I can't work anymore without that tool . There is for sure some refactoring capabilities in Visual Studio 2005 Beta 2, but it is far from being enough.

    Build 201 (Changes from ReSharper 1.5)

    General
    • Support of Visual Studio 2005 (Beta 2 and June CTP are currently supported)
    • Support of C# 2.0 constructs (for Visual Studio 2005) - not all constructs are properly supported yet
    • Support of ASP.NET - in progress, not all features work properly
    • New preprocessor directives handling (no errors caused by use of preprocessor directives anymore!)
    On-the-fly Code Highlighting
    • New warning highlightings: redundant 'as' type cast; redundant empty constructor; sealed member in sealed class; new virtual member in ....; 'new' modifier is missing; redundant 'new' modifier; redundant boolean comparison; redundant qualifiers; local or parameter hides member; empty control statement body
    • More syntax errors highlighted
    • Lots of new quickfixes
    • Quickly enable/disable highlighting for particular file (Ctrl+8)
    Live Templates
    • Support for templates sharing, import/export, etc
    • "Create template from selection" feature
    Code Formatter
    • Line wrapping
    • Code style settings: support for sharing, import/export
    Other
    • Unit tests support (NUnit, csUnit, TeamTest tests are supported)
    • "Go to Symbol" feature - Ctrl+Shift+Alt+N (the same as Ctrl+N and Ctrl+Shift+N but navigates to all types and members)
    • Quick-documentation feature (Ctrl+Q) shows popup with documentation for symbol under caret (also works within doc-comment to show presentable form of it)
    • File structure view with reqions, drag&drop etc
    • Mouse-click on implements/overrides/hides gutter icons to navigate
    • Rename refactoring suggests to rename overloaded methods
    • Rename refactoring suggests to rename the corresponding property when renaming field and vise versa
    • Code completion after dot shows indexers
    • Code completion in namespace declarations

    You can check the whole plan for ReSharper 2.0 on this page.

    Apr
    9
    2005

    Visual Studio 2005, Team Foundation (aka Whidbey) Beta 2 will be here on the 25 of April

    What can you expect from the Beta Experience?

    • Visual Studio 2005 Team System Beta 2
    • Team Foundation Server Beta 2
    • WeFly247 training DVD
    • SQL Server 2005 Standard Edition Community Technology Preview
    • The Beta Experience newsletter (6-weekly, terminated with the launch of the final version of Visual Studio 2005)

    I hope that this time Team Foundation can be installed on one VPC.

    Updated: The information is comming from this page: The Beta Experience (Thanks Alex).

    Mar
    16
    2005

    Introducing Custom Entity Classes

    If you read my two last posts:

    1. DataAccessLayer.FindAll(PublishedBy(Author))
    2. Refactoring the set of Predicate with an Interpreter

    Then I encourage you to read the article by Karl Seguin From Microsoft Corporation: "On the Way to Mastering ASP.NET: Introducing Custom Entity Classes" published on MSDN. It is a clear explanation of what I started on that two posts full of source code.

    [ Currently Playing : hotel intro - Moby - hotel (01:55) ]

    Mar
    12
    2005

    Refactoring the set of Predicate with an Interpreter

    This evening I continued my journey with the C# Generics. I refactored what I described in my post "DataAccessLayer.FindAll(PublishedBy(Author)) " to be able to use the Design Pattern Interpreter.

    The result in the ASPX code behind file is the following:

      1 AndSpec spec = new AndSpec(
      2                         new AndSpec(
      3                             new PublishedSpec(),
      4                             new BeforeDateSpec(DateTime.Parse("01/01/2005"))
      5                         ),
      6                         new OrSpec(
      7                             new AuthorSpec("Mathieu Kempé"),
      8                             new AuthorSpec("Laurent Kempé")
      9                         )
     10                     );
     11 
     12 DataAccessor<Article> articles = new DataAccessor<Article>("GetArticles");
     13 GridView3.DataSource = articles.FindAll(Matching(spec));
     14 GridView3.DataBind();
    With the unique Matching Predicate, replacing all the other Predicate:
      1 protected Predicate<Article> Matching(Spec spec)
      2 {
      3 	return delegate(Article a)
      4 	{
      5 		return spec.isSatisfiedBy(a);
      6 	};
      7 }

    To achieve this I first added two more properties to my Entity, Article. I did not added new constructors because those two properties are not mandatory:

      1 private DateTime datePublished;
      2 
      3 public DateTime DatePublished
      4 {
      5 	get { return datePublished; }
      6 	set { datePublished = value; }
      7 }
      8 
      9 private DateTime dateModified;
     10 
     11 public DateTime DateModified
     12 {
     13 	get { return dateModified; }
     14 	set { dateModified = value; }
     15 }
    Then I modified my Data Access Layer to have it a bit more generic, starting with the interface :
      1 interface IDataAccess<T>
      2 {
      3 	List<T> GetAll();
      4 
      5 	List<T> FindAll(Predicate<T> match);
      6 }
      7 
    I removed the method "T Get(Guid uuid)" and "T Get(string uuid)" because that can be easily expressed with a Predicate.
    I made a Generic implementation of my Data Access through a DataAccessor class:
      1 namespace TechHeadBrothers.Portal.DAL
      2 {
      3 	public class DataAccessor<T> : IDataAccess<T> where T : new()
      4 	{
      5 		List<T> list = null;
      6 
      7 		public DataAccessor(string sp)
      8 		{
      9 			readFromDatabase(sp);
     10 		}
     11 
     12 		#region Protected Methods
     13 
     14 		protected void readFromDatabase(string sp)
     15 		{
     16 			// Create Instance of Connection and Command Object
     17 			SqlConnection myConnection =
     18 				new SqlConnection(ConfigurationManager.ConnectionStrings["TechHeadBrothers"].ConnectionString);
     19 
     20 			SqlDataAdapter myCommand = new SqlDataAdapter(sp, myConnection);
     21 
     22 			// Mark the Command as a SPROC
     23 			myCommand.SelectCommand.CommandType = CommandType.StoredProcedure;
     24 
     25 			// Create and Fill the DataSet
     26 			DataSet ds = new DataSet();
     27 			myCommand.Fill(ds);
     28 
     29 			myConnection.Close();
     30 
     31 			this.list = DataAdapterFactory.createAdapter<T>().Adapt(ds.Tables[0]);
     32 		}
     33 
     34 		#endregion
     35 
     36 		#region IDataAccess<T> Members
     37 
     38 		public List<T> GetAll()
     39 		{
     40 			return list;
     41 		}
     42 
     43 		public List<T> FindAll(Predicate<T> match)
     44 		{
     45 			return list.FindAll(match);
     46 		}
     47 
     48 		#endregion
     49 	}
     50 }
    
     
    I had to implement an Adapter to convert the data from the Database representation to the Entity :
     
      1 abstract class DataAdapter<T> 
      2 {
      3 	public List<T> Adapt(DataTable table)
      4 	{
      5 		List<T> list = new List<T>(table.Rows.Count);
      6 
      7 		foreach (DataRow row in table.Rows)
      8 		{
      9 			list.Add(this.Adapt(row));
     10 		}
     11 
     12 		return list;
     13 	}
     14 
     15 	public abstract T Adapt(DataRow row);
     16 }
     
    And a Factory :
     
      1 class DataAdapterFactory
      2 {
      3     public static DataAdapter<T> createAdapter<T>() where T : new()
      4     {
      5         string name = new T().GetType().Name.ToLower();
      6 
      7         if ( name == "article")
      8             return new ArticleAdapter() as DataAdapter<T>;
      9         else if ( name == "author")
     10             return new AuthorAdapter() as DataAdapter<T>;
     11 
     12         return null;
     13     }
     14 }
     
    Here is the concrete implementation for the Article Entity Adapter:
     
      1 class ArticleAdapter : DataAdapter<Article>
      2 {
      3     public override Article Adapt(DataRow row)
      4     {
      5         Article article = new Article((string)row["Title"],
      6                                       (string)row["Description"],
      7                                       (string)row["Author"],
      8                                         (bool)row["isPublished"],
      9                                         (Guid)row["uuid"]);
     10 
     11         if (row["DatePublished"] != DBNull.Value)
     12         {
     13             article.DatePublished = (DateTime)row["DatePublished"];
     14         }
     15 
     16         if (row["DateModified"] != DBNull.Value)
     17         {
     18             article.DateModified = (DateTime)row["DateModified"];
     19         }
     20 
     21         return article;
     22     }
     23 }
     
    I made also a Business Layer generic class, but has it is just for the moment a wrapper around the DataAccessor, I will not show it.
     
    And finally the Interpreter Design Pattern:
     
      1 public abstract class Spec
      2 {
      3 	public abstract bool isSatisfiedBy(Article article);
      4 }
    With the different concrete Specifications:
      1 public class PublishedSpec : Spec
      2 {
      3 	public PublishedSpec()
      4 	{
      5 	}
      6 
      7 	public override bool isSatisfiedBy(Article article)
      8 	{
      9  		return (article.isPublished == true);
     10 	}
     11 }
     12 
     13 public class BeforeDateSpec : Spec
     14 {
     15 	private DateTime date;
     16 
     17 	public DateTime Date
     18 	{
     19 		get { return date; }
     20 		set { date = value; }
     21 	}
     22 
     23 	public BeforeDateSpec(DateTime date)
     24 	{
     25 		this.Date = date;
     26 	}
     27 
     28 	public override bool isSatisfiedBy(Article article)
     29 	{
     30 		return (article.DatePublished < this.Date);
     31 	}
     32 }
     33 
     34 public class AuthorSpec : Spec
     35 {
     36 	private string author;
     37 
     38 	public string Author
     39 	{
     40 	  get { return author;}
     41 	  set { author = value; }
     42 	}
     43 
     44 	public AuthorSpec (string author)
     45 	{
     46 		this.Author = author;
     47 	}
     48 
     49 	public override bool isSatisfiedBy(Article article)
     50 	{
     51  		return (article.Author == this.Author);
     52 	}
     53 }
     54 
     55 public class NotSpec : Spec
     56 {
     57 	private Spec specToNegate;
     58 
     59 	public NotSpec(Spec specToNegate)
     60 	{
     61 		this.specToNegate = specToNegate;
     62 	}
     63 
     64 	public override bool isSatisfiedBy(Article article)
     65 	{
     66 		return !specToNegate.isSatisfiedBy(article);
     67 	}
     68 }
     69 
     70 public class AndSpec : Spec
     71 {
     72 	private Spec augend;
     73 	public Spec Augend
     74 	{
     75 	  get { return augend;}
     76 	}
     77 
     78 	private Spec addend;
     79 	public Spec Addend
     80 	{
     81 	  get { return addend;}
     82 	}
     83 	
     84 	public AndSpec (Spec augend, Spec addend)
     85 	{
     86 		this.augend = augend;
     87 		this.addend = addend;
     88 	}
     89 
     90 	public override bool  isSatisfiedBy(Article article)
     91 	{
     92  		return Augend.isSatisfiedBy(article) && Addend.isSatisfiedBy(article);
     93 	}
     94 }
     95 
     96 public class OrSpec : Spec
     97 {
     98 	private Spec augend;
     99 	public Spec Augend
    100 	{
    101 		get { return augend; }
    102 	}
    103 
    104 	private Spec addend;
    105 	public Spec Addend
    106 	{
    107 		get { return addend; }
    108 	}
    109 
    110 	public OrSpec(Spec augend, Spec addend)
    111 	{
    112 		this.augend = augend;
    113 		this.addend = addend;
    114 	}
    115 
    116 	public override bool isSatisfiedBy(Article article)
    117 	{
    118 		return Augend.isSatisfiedBy(article) || Addend.isSatisfiedBy(article);
    119 	}
    120 }

    About Laurent

    Laurent Kempé

    Laurent Kempé is the editor, founder, and primary contributor of Tech Head Brothers, a French portal about Microsoft .NET technologies.

    He is currently employed by Innoveo Solutions since 10/2007 as a Senior Solution Architect and certified Scrum Master.

    Founder, owner and Managing Partner of Jobping, which provides a unique and efficient platform for connecting Microsoft skilled job seekers with employers using Microsoft technologies.

    Laurent was awarded Most Valuable Professional (MVP) by Microsoft from April 2002 to April 2012.

    JetBrains Academy Member
    Certified ScrumMaster
    My status

    Twitter

    Flickr

    www.flickr.com
    This is a Flickr badge showing public photos and videos from Laurent Kempé. Make your own badge here.

    Month List

    Page List