Disclaimer: I'm no MS/.Net evangelist. I'm just a computer software developer that wants to share his experience working on a weekend project (actually 3 weekends...)
As a bet between me and my wife, I took the challenge of developing grid computing software over the weekend. The aim is to basically solve a very challenging billion of billions of possibilities puzzle with a 2 million dollar prize.
The functional requirements were:
- A user friendly GUI (and an easy to use gui designer)
- Webclient Capabilities
- Email sending capabilities
- Installation and Setup
- Software Updates Engine
- Process Execution Priority
- Registry Management
- MySql DB Connection Adapter
And there were a few non functional requirements:
- Multi-Threaded Execution
- Code Access Security
- High Performance
- Small Memory Foot Print
- Source Code Obfuscation
So I've set up and started to work. By taking a look at the list of functional and non functional requirements I've decided that going for .Net is probably the best call. While I might get a slight impact with the high performance requirement, I would still earn a lot of good stuff as a tradeoff.
Developing with VS2005 was a real treat, and when I've concluded my work , I took a step back and was wondering whether I could have achieved this with another programming language and a different development environment at the same or shorter time. Sure, unmanaged C++ would have probably give more cpu juice, but developing all of the stuff that was in the list, would have taken me a lot more effort with C++. There were other possibilities that I had considered like Java, Perl and Python but all of them had drawbacks compared to .Net. Perl and Python are somewhat Gui challenged, sure there are some Perl and Python Gui Toolkits, but they are not always supported by a proper designer and would probably require a more complicated installation scheme. And as for Java , well I couldn't find any study or survey that does an apples to apples compare of Java penetration rate versus the .Net runtime penetration rate on Win machines, but an internal hunch told me that .Net is more widely spread. Moreover having a simplified .Net installation capability versus none for java had made me remove Java as a software language candidate. I could however be criticized for not taking into consideration Java's cross platform advantage, but .Net has its renegade unix/Linux brother known as Mono (a .NET linux run time engine) . The only difficulties with Mono would be to introduce a new setup flow , because ClickOnce would probably not work on a linux machine and I also had to Tweak the Windows.Win32 to work with linux as well. But having these two relatively easy tasks would have put me in a position where I could use my code on a Linux or MacOS box as well. In case you are wondering whether the winforms might have an issue running on a Linux box, stop wondering, they work great!
So here is a list of all of the good stuff that I used and probably saved me a lot of time by selecting .Net as my programming language.
I used VS2005 UI designer to design my application forms.
I used System.Net.WebClient for reporting the distributed clients progress.
System.Diagnostics was used to control the process` priority.
System.Net.Mail was used for sending emails
System.Security.Cryptography was used for symmetric encryption and decryption
Microsoft.Win32.RegistryKey was used for user properties persistency.
MySql.Data for connecting to a MySQL db.
ClickOnce publishing tool was used for Setup and Version upgrades
Dotfuscator's community edition was used to obfuscate the compiled code
And there are probably a lot more C#/VS2005 features that I subconsciously used that saved me a lot of time.
And I have a small confession to make, my client progress reporting backend server is in (god forbid..) php. But that's because I was too lazy to convert my hosting account to windows. If it was in windows I would have gone with ASP.Net for sure.
To conclude this post, I would just say that today, in my opinion, C# and VS2005 is the most productive programming language and development environment for producing main stream, non niche, solutions. But that's just me. Be gentle with the comments ;-)
Discovered this hidden gem, thought of sharing this for the sake of User Interface Humanity.
We all know of the excellent design patterns (by GoF ) for solving code design problems.
Well, Yahoo took the concept a little further by presenting design patterns for us UIs challenged code developers.
It's going to be my first stop from now on when thinking on a UI layout for my apps.
Comes in handy if you want to implement an automatic application upgrade component.While dubugging , the CurrentDeloyment object is not available so make sure you wrap the above call with
You'll get in return which current version is running and can alert the user that there is a new version available.
(The version can be set in a publish wizard or on a setup project in visual studio)
if (System.Diagnostics.Debugger.IsAttached == false)