.Net


8 July 2006 in .Net & Code | Comments (1)

Component Factory Logo

From time to time I enjoy doing WinForms development and quite often I find myself frustrated with some of the controls that come “out of the box”. Normally I end up overriding controls or, worse yet, writing them from scratch. Because of this I often keep an eye out of control libraries. There are some fantastic libraries out there but I thought I’d share the Component Factory suite which is free for both personal and corporate use.

Check out the Component Factory homepage for more details.

– JD

Average Rating: 4.6 out of 5 based on 226 user reviews.


10 June 2006 in .Net & Windows | Comments (0)

Spotted on Nic’s blog that Microsoft are renaming of WinFX to .Net 3.0.

Checking out MSBlog (great site for tacking techo Microsoft stuff at btw :) ) they appear to answer one of Nic’s questions about if the name change will mean a new version of the framework with LINQ and other goodies – the answer appears to be no. It will be built on the .Net 2.0 framework and looks to just add the pillars of WinFX.

- JD

Average Rating: 5 out of 5 based on 203 user reviews.


9 June 2006 in .Net & Code | Comments (22)

Ruby On Rails

This post is intended as a discussion piece, if you have any thoughts about anything mentioned here then please add a comment. Don’t be afraid, it’s just some friendly open debate :) If your post on your own blog about this discussion let me know and I’ll update this post with links to your posts.

Recently I’d been hearing a lot about Ruby-On-Rails (RoR) and decided, like any diligent tech person, that I had better investigate it to make sure I’m not missing the boat on something new in the marketplace. I brought the books and did the tutorials. I also built a couple of basic sites on my own with RoR and they were fun to build. However, having come this far I’m finding it difficult to come up with a compelling reason why I would want to jump ship completely.

I thought I’d sum up with my top 5 concerns at the moment:

Issue one
The Rails framework has some compelling features like scaffolding however while that initially “hooks” you in and makes you think it’s fantastic you soon find that scaffolding up a solution is almost pointless because you nearly always have to write something considerably different to just CRUD pages. This initial development speed enhancement doesn’t actually end up helping you out that much. It harms people more than it helps them by having the misconception that scaffolding is actually a very useful feature of rails (it has its place, but it’s just not that important).
Issue two
Ruby’s performance just doesn’t seem to compare well with most other languages. admittedly you take a hit with any scripting language but the performance hits seem quite severe. Comparing Ruby’s performance to something like Java (I couldn’t find any .Net comparisons at the time of writing this) it seems apparent that Ruby is abysmal in the speed arena. You could argue that there are ways to optimise the code to run better or that you can just scale up your hardware but I just want a fast language. There seems to be so much code churn in the Rails framework that optimising for performance may be difficult to do until it has a stabalised feature set. Why is Ruby so slow? I think enough things on computers are slow enough these days without opting for something at the back of the pack. Can anybody provide evidence that Ruby isn’t so slow?

Issue three
IDE’s are lacking. I’ve used RadRails and I’ve a friend who uses TextMate and neither seem to provide anywhere near the functionality that I’d expect from a modern IDE. I’m always happy working with light weight IDEs but when I need to get a large application off the ground I’m always thankful when I have an industrial strength IDE to help me manage it.

Issue four
RoR seems to have new versions released often. Too often. Now, the geek in me loves the idea of having new features to play with every couple of weeks however from a business point of view it just increases the risk considerably. I remember the fallout from RoR being upgraded to a new version and all of the blogs based on Typo. You could freeze the version that an application worked against but it seemed like everything just fell apart for a lot of people when that version was rushed out. I’m all for the cool little team pumping out new features all the time but sparing a thought for the web hosts who have to test the framework before deployment, the people who deploy solutions on it and the developers who have to upgrade the version that their application supports constantly would be nice.

Issue five
All of the other issues are only really issues because of this point – I just cannot see how RoR scales up to develop truly large solutions. Perhaps it’s not really intended for more than basic websites? Some of the generators designed to save you time would simply hinder your ability to actually maintain large solutions nicely in my opinion.

These are some issues that have me feeling that RoR might not be as ready for the primetime as many would have you believe. Perhaps I’m wrong. Perhaps you know reasons why these points are not issues. If so, then please leave a comment about why you think so. Comparing these issues to my current web framework of choice – ASP.Net – I don’t think RoR stacks up well enough in my mind. I realise there are areas that it lacks that RoR does well however other vendors such as Microsoft are working hard to cover these areas as well (ATLAS, DLINQ etc).

Disclaimer: I do spent a significant amount of my time developing solutions using the Microsoft .Net Framework. I’ve not always been a .Net developer, I also have spent considerable amount of time developing in various other languages such as Java, PHP, C/C++, Delphi to name a few and of course dabbling with RoR :)

- JD

Links:

  • Andrew Peters makes his first ever post and pulls no punches :)
  • Tim Haines thinks I’m stirring and has some links to the WellRailed convo
  • John Lewis doesn’t take part in the discussion but brings his own perspective to RoR in general

Average Rating: 4.5 out of 5 based on 243 user reviews.


1 May 2006 in .Net | Comments (2)

Finally getting around to my code camp post :)

All in all I really enjoyed code camp – there were some really good speakers, good topics and the environment was quite comfortable. Prizes were also more substantial than I had anticipated (which is why I didn’t win any!).

It was also fantastic to be able to meet, albeit briefly, some of the people who blog regularly in the .net space. Finally met Tim Haines (I have no idea why but I’d always imagined you as having a pony tail – blame it on being from the south island!) – very friendly and easy to talk to.

Also met Alex of Base4 fame. He was also quite approachable and friendly – still not seeing a blog up yet but he is posting articles on the Base4 Solutions website :) I had to leave before seeing his session which was unfortunate as I’m quite interested in data storage in general.

Caught up with Mauricio from GeekZone.co.nz. He was part of the fantastic after lunch panel on developing a software business. I really enjoyed this session – Rod, Chris and Mauricio all had slightly different views on various topics which kept things interesting. I haven’t spoken to anybody who didn’t find this session fantastic. The after lunch panel the previous day was also great – more sessions like this next year would be cool :)

So would I go again? You betcha.

– JD

Average Rating: 4.7 out of 5 based on 192 user reviews.


23 April 2006 in .Net | Comments (0)

Visual Studio 2005

One of the questions that was raised at Code Camp was “what is the version of Visual Studio after Orcas called?”

Around the middle of 2005 it was announced that the version after Orcas would be called “Hawaii”. I wouldn’t be at all surprised if this turns out to be wrong or it gets changed but there seems to be considerably discussion about that name floating around.

EWeek Article: “Hawaii”: A visual studio paradise for developers?

- JD

P.S. Microsoft really have got us all hanging out for the leading edge haven’t they? It seems people don’t care about the next best thing – but the next next best thing :)

Average Rating: 4.4 out of 5 based on 204 user reviews.


10 April 2006 in .Net & Code & Intergen | Comments (2)

This is more for my own reminder but somebody else might find it useful. This code allows you to update the value of a config key in your .net 2.0 application. It also updates the section so subsequent reads from the .config will reflect that change. Really useful when you just need to store a single peice of information.

In this example I’m setting a last run date.

// Open the app.config
System.Configuration.Configuration config = ConfigurationManager
.OpenExeConfiguration(ConfigurationUserLevel.None);

// Update the last run time 
config.AppSettings.Settings["LastRunDate"].Value
= lastRunTime.ToString();

// Save the configuration file
config.Save(ConfigurationSaveMode.Modified);

// Force a reload of a changed section.
ConfigurationManager.RefreshSection("appSettings");

- JD

Average Rating: 4.7 out of 5 based on 282 user reviews.


21 March 2006 in .Net & Code | Comments (0)

Part of a current project I’m working on involves creating an RSS feed. After developing an XSLT and the xml to be parsed it looked like everything was going to work out just fine. Loading it up in FireFox was OK however then I loaded it in IE 6.0… Error.

IE complained bitterly about trying to open the XML however everything else seemed to work. On closer inspection there was an issue with the XML declaration tag:

<?xml version="1.0" encoding="utf-16"?>

It should have been UTF-8, not UTF-16. At it turns out the StringWriter in .NET can only create UTF-16 (StringWriter has an encoding property on it however this is read-only). This was also despite changing the encoding in the XSLT:

<xsl:output omit-xml-declaration="no" method="xml" encoding="utf-8"/>

Of course it seems somewhat short sighted that Microsoft would develop .NET to default to encodings that their own products can’t even support. So after some hunting I’ve changed it to do this:

XmlWriter xtw = new XmlTextWriter(Response.OutputStream, Encoding.UTF8);

_xslTransform.Load(Server.MapPath("rss.xslt"));
_xslTransform.Transform(doc, _argumentList, xtw, new XmlUrlResolver());

Now the encoding is correct and everyone is happy :) Not the most clever feature of .NET.

- JD

Average Rating: 5 out of 5 based on 256 user reviews.


15 December 2005 in .Net & Tools | Comments (3)

I was reading about nHibernate generation over on David’s blog and added a comment which I thought could be posted here as well.

Possible nHibernate Logo

In the last few months a friend and I have been playing around with nHibernate a bit in various ways. I personally found that initially there was a bit of a high learning curve, mostly because I wasn’t aware of how like nHibernate Hibernate was. This meant that I initially disregarded all the Hibernate related content (first mistake :-) ). There isn’t much out there in the way of documentation for nHibernate unfortunately.

So initially we wrote a basic generator to take care of the generation for us. This all went well except when it came to generating the collections (one-to-many, many-to-many etc). That was until I found this site: http://www.xylax.net/hibernate/. After finding that my only problem was not correctly referencing the assembly and fully qualifying the classes used in the collections.

I’m about halfway through reading Hibernate In Action. So far it’s been quite good, it’s pretty easy to disregard any content that is too Java specific. I would strongly recommend it to anybody who is serious about getting their nHibernate/Hibernate data-layer working well. The book focuses on version 2.2 of Hibernate which is great as nHibernate is only functionally equal to this version (mostly ;) ).

Now I’m just looking forward to the next version of nHibernate which will hopefully include some .Net 2.0 features (Generic collections, nullable types). There are currently third party add-ins to enable this functionality but I’m not a huge fan of relying on third party components – it just makes upgrades more difficult.

- JD

P.S. The logo isn’t the official nHibernate logo, but one potential one.

Average Rating: 4.9 out of 5 based on 184 user reviews.