Archive for July, 2008

30
Jul
08

ORMs

Yesterday I was thinking about how complicated and painfull is accessing databases in .NET, and thus in WPF. It is absolute mess. Really. Much more messy that it was in good old ADO (anyone remembers those times?), and not even remotely close to data access nirvana of FoxPro and Visual FoxPro.

LINQ is very nice, but it is just a query language completely missing insert, update, and delete concepts. Then there is a weird thing called LINQ to SQL – it really sucks if you are changing database schemas (and you normally do that in the beginning of the progect frequently). Sheer amount of the code and “infrastructure” generated for you is mindboggling. Things get even worse if you want to use SQL Server CE – then you are stuck with something called SqlMetal. Brrrrrrr! Then, add plain old ADO.NET with LINQ to ADO, and EF to the “package” and you are completely and thoroughly lost. Bad… very bad… total mess… Does it have to be like that? And why Microsoft cannot decide on one thing and do it right?

That’s why I decided to spend some time and to see if there are any alternative ORMs available.

Everyone knows NHibernate (little brother of Hibernate), and DevExpress’ eXpress Persistent Objects (as one friend of mine said, “When I hear word DevExpress I am reaching for my gun!” :). These two ORM frameworks are suffering from the same problems as EF, LINQ to SQL and other things offered in this domain by Microsoft: too general, too complex, too steep learning curve, too many demands and expectations toward the code developed. They might be good for big and complex systems, but if you develop an application where database is just one small part of functionality they quickly become too big of a burden.

Clearly, there is a need for something more lightweight. And seems that I found something that looks rather promising: one thing is called Mindscape’s LightSpeed, and the other one has intriguing name LLBLGen Pro. Both frameworks look really easy – I got pretty much of the LightSpeed’s idea in about 20 minutes, although have not checked LLBLGen Pro yet. Both are offering most essential features – as Mindscape says, “Solve the 95% case, i.e. more like Ruby on Rails than NHibernate”. Both provide Visual Studio integration. LLBLGen Pro supports more databases than LightSpeed, but both seem to be OK for our needs. Probably they are not as flexible and not as all-encompassing as their “older brothers”, but it is obvious that not everyone needs this flexibility anyway – I think “less is more” is very frequently true. Both frameworks fully support LINQ as well as INotify* interfaces, so they can work in WPF.

Personally I liked LightSpeed’s web-site and documentation more, but probably LLBLGen Pro has appropriate content as well. Cost wise they are not that bad, and LightSpeed exists in free version as well (with limit of 8 tables).

29
Jul
08

WPF Application Localization

WPF Runtime Localization article on CodeProject describes one way to do it. Interesting approach is to use WPF Localization Extension available freely on CodePlex. And then there is an article that goes in the same direction: WPF Localization – On-the-fly Language Selection.

29
Jul
08

googletest: Another C++ Testing Framework

Just few days ago I found WinUnit, and voilaz – here is googletest, Google’s xUnit-based multiplatform framework for writing C++ tests. Supports automatic test discovery, a rich set of assertions, user-defined assertions, death tests, fatal and non-fatal failures, various options for running the tests, and XML test report generation.

29
Jul
08

Software Testing and Related Things

By accident found Google Testing Blog. Not bad.

One of the articles is called How to Write 3v1L, Untestable Code – a must-read for newbie (and not newbie too!) programmers. Not on this blog, but nevertheless related article is How To Write Unmaintainable Code by Roedy Green – very serious collection of bad things despite it is very funny to read.

29
Jul
08

Hardware Breakpoints

Toggle hardware data/read/execute breakpoints programmatically and Hardware breakpoints articles show how to use hardware breakpoints. Source code is available from both places.

27
Jul
08

Unit Test Boundaries

Unit Test Boundaries by Phil Haack [MSFT] – very interesting article about unit testing and related concepts like code orthogonality (by Jeremy Miller). When I was reading these posts, I “bumped” into CodeBetter.Com – a collection of blogs related to, well, coding better.

27
Jul
08

Wintellect’s John Robbins’ Blog

Related to my previous Wintellect post: Wintellect’s John Robbins has an excellent blog filled with… well, a bit of everything, including Debugger Settings Visual Studio Add In, Visual Studio tips, info about interesting tools, etc.

26
Jul
08

Wintellect Power Threading and Power Collections Libraries

Wintellect’s Jeffrey Richter created the Power Threading Library containing many classes to help with threading and asynchronous programming. More information about the library’s classes can be found via Jeffrey Richter’s Concurrent Affairs column in MSDN magazine. Then there is the Yahoo! Group established to support the use of this library

On top of that, Wintellect has the Power Collections Library that extends the Base Class Library with an algorithms class and a series of new containers. Now the library has moved to CodePlex and is available with the source code. Wintellect’s Peter Golde has excellent blog going into deeper details about the library.

26
Jul
08

Framewave (ex AMD Performance Library)

Freewave is a free and open-source collection of popular image and signal processing routines designed to accelerate application development, debugging, and optimization on x86-class processor platforms. API is compatible with the Intel Integrated Performance Primitives (see SourceForge and AMD pages for more information).

26
Jul
08

Informikon

Informikon provides technical information and resources related to programming multimedia applications on Windows. There are quite many tutorials, blog, and forums and topics inlcude DirectShow, DirectX (also in managed environment), FFMpeg, etc.

26
Jul
08

.NET Mass Downloader

.NET Mass Downloader allows to download .NET Framework source code in batch mode enabling offline debugging of .NET Framework in VisualStudio (both 2005 and 2008). Usage is explained in the article on CodeProject.

26
Jul
08

WinUnit: Simplified Unit Testing for Native C++ Applications

WinUnit: Simplified Unit Testing for Native C++ Applications article at the MSDN Magazine introduces WinUnit. It is possibile to browse or download the code.

22
Jul
08

Pex: Automated Exploratory Testing for .NET

Just found Pex – a freshly released tool by Microsoft Research. It is able to automatically produce a traditional unit test suite with high code coverage from a parameterized unit test, and, in addition, Microsoft guys claim that it can suggest to the programmer how to fix the bugs! Has to be cool! More info is available at Nikolai Tillmann’s Blog [MSFT] (leads the Pex project) and Peli’s Farm (by Peli de Halleux’s [MSFT]).

Support for NUnit, MbUnit or xUnit.net is provided through the Pex Extensions project at CodePlex.

In addition to not yet finished Reference Manual (see single page version) there is pretty extensive tutorial (more than 70 pages at the moment of writing).

21
Jul
08

Microsoft-related Info

Mary-Jo Foley’s All About Microsoft and Ed Bott’s Microsoft Report have excellent “insiders’” information about Microsoft – its plans, problems, technologies, people.

17
Jul
08

Today’s Sites/Blogs

17
Jul
08

How to find whether a GUI application is not responding?

How to find whether a GUI application is freezed or is not responding? – does exactly that… Everything is around the SendMessageTimeout function and SMTO_ABORTIFHUNG flag.

15
Jul
08

Debuggers and Disassemblers

SmidgeonSoft provides free Windows programming utilities, e.g. PEBrowse Professional Interactive (native and managed code debugger), PEBrowse Professional (PE file viewer/disassembler), PEBrowse Crash-Dump Analyzer, TopToBottomNT (component manager/system explorer), NTDevices (driver/device object explorer), NTObjects (kernel/executive object explorer).

OllyDbg – free (shareware, but can be used for free) 32-bit assembler level analysing debugger for Windows. List of features is really impressive.

12
Jul
08

Today’s Sites/Blogs

  • The Wayward WebLog – a lot of LINQ info (e.g. “LINQ: Building an IQueryable Provider” series)
  • …Removing All Doubt by Chuck Jazdzewski (already had it in my blog) – advanced C# topics, functional programming, generics, etc.
11
Jul
08

Today’s Sites/Blogs

10
Jul
08

Today’s Sites/Blogs

10
Jul
08

WPF Blogs

WPF blogs from Microsoft and ex-Microsoft guys/gals primarily (as well as guys that know their way around the Microsoft):

And here are blogs by ex-Microsoft people (sad, that they are not at MS anymore):

  • notstatic.com by Robby Ingebretsen – nice things. Has not been updated recently, but now it is picking up again. Check his Kaxaml replacement of XamlPad.
  • fortes.com by Filipe Fortes – few demos and screencasts, mostly mix06-related
  • jfo’s coding by Jessica Fosler – many samples, snippets, tips, etc.

Channel 9

Other blogs:

  • 2008.07.10 WPFopoly by Matt Duffin: guy is creating a game similar but unrelated to Monopoly – from scratch. A lot of panels-related things.
  • 2008.07.10 Pixel in Gene by Pavan Podila (?) – mostly related to 3D
  • 2008.07.10 sachabarber.net by Sacha Barber – I guess no need to introduce this guy :)
  • 2008.07.10 Andrew Smith
  • 2008.07.10 Alan Le’s Vertigo Blog – a lot of info about resources and WPF/Silverlight
  • 2008.07.10 Karl on WPF by Karl Shifflett
  • 2007.08.26 Nick Thuesen has few interesting articles about panels and other WPF and non-WPF things
  • 2007.08.26 the WPF way… – Pavan Podila’s blog has interesting stuff, but very little code (its title says “‘the Approach, rather than the Solution”)
  • Josh Smith on WPF (and the old blog) – great blog about all kinds of things like “smart” ResourceDictionaries, controls’ customization, etc.
  • theWPFblog by Lee Brimelow – a lot of samples and nice ideas
  • Sheva’s TechSpace’s Blog by Yong Zhou (aka Sheva, footballism on MSDN forums). His blog is great and guy knows a lot.
  • On .Net Client Stuff by [?] – not a bad blog with lots of goodies about Vista gandets, WPF/ActiveX interoperability, tips, etc.
  • Jan-Cornelius Molnar – quite cool blog with some nice tips about Dispatcher.Invoke (obvious, but still), customizing WPF window border (like in Max), etc.
  • dotnet mania by Eric Burke – PanelLayoutAnimator, some XAML snippets
  • Chaz by [?] – a bit outdated, but a lot of nice ideas and samples (skinning, SkewTransform, Elliptic Control, etc.)
  • Ruurd Boeke: Enterprise development and techno babble by Ruurd Boeke – some interesting posts about databinding
  • XamlXaml.com by Michael Emmons – nice snippets and bits…
  • Douglas Stockwell’s WebLog – interesting things about WPF, generics, DWM Thumbnails in WPF, dynamic method generation, Impossible WPF, …
  • DeveloperZen.com by Eran Kampf – tons of interesting resources about WPF and not only
  • Laurent Bugnion (GalaSoft) - nice blog about WPF, .NET, Web Services, etc.
10
Jul
08

Dime Casts .NET

Dime Casts .NET video podcast helps .NET developers learn about various aspects of .NET development in short, focused segments – no longer than 10 minutes each.

08
Jul
08

Beginners Guide To Threading In .NET

CodeProject features Sacha Barber’s multipart article Beginners Guide To Threading In .NET (links to other parts are inside) – it has to be good :)

05
Jul
08

Disk Defragmenting Tool with DLL

JkDefrag is a disk defragmenter and optimizer for Windows released under GPL/LGPL. Has both UI, command line, and DLL, so that it can be integrated in own software.

05
Jul
08

Composite Application Guidance for WPF

Recently Microsoft released Composite Application Guidance for WPF (for VS2008 and .NET 3.5).

Quote: “The Composite Application Guidance for WPF is designed to help you more easily build enterprise-level Windows Presentation Foundation (WPF) client applications. This guidance will help you design and build flexible composite WPF client applications—composite applications use loosely coupled, independently evolvable pieces that work together in the overall application.

The Composite Application Guidance for WPF can help you split the development of your WPF client application across multiple development teams. In this type of application, each team is responsible for the development of different pieces of the application, which are seamlessly composed together. The guidance includes a reference implementation, reusable library code (named the Composite Application Library), documentation, QuickStart tutorials, and hands-on labs.”