CSharpFeeds - All your C# feeds in one place.

Sponsors

Feed: Frans Bouma's blog

Site: http://weblogs.asp.net/fbouma/default.aspx Link: http://weblogs.asp.net/fbouma/rss.aspx

Thursday, July 28, 2011

Entity Framework v4.1 update 1, the Kill-The-Tool-Eco-system version

by FransBouma via Frans Bouma's blog on 7/28/2011 10:49:08 AM

Updated with fix of Microsoft's code so Microsoft can get this fixed quickly. See below As you might know, we've been busy with our own data-access profiler for a while now. The profiler, which can profile any DbProviderFactory using data-access layer / ORM, works by overwriting the DbProviderFactories table for the app-domain the profiler is used in. This is a common technique: it replaces the type name of the DbProviderFactory of an ADO.NET provider with the type name of a wrapper factory, wh ...

[ read more ]

Thursday, April 21, 2011

LLBLGen Pro QuerySpec: the basics

by FransBouma via Frans Bouma's blog on 4/21/2011 10:40:05 AM

Last time I introduced LLBLGen Pro QuerySpec, a new fluent API for specifying queries for LLBLGen Pro. As promised I'll write a couple of blogposts about certain aspects of the new API and how it works. Today I'll kick off with the basics. Two types of queries: EntityQuery<T> and DynamicQuery There are two types of queries in QuerySpec: entity queries (specified with objects of type EntityQuery<T>, where T is the type of the entity to return) and dynamic queries, which are queries ...

[ read more ]

Friday, April 08, 2011

Introducing LLBLGen Pro QuerySpec: a new fluent query API

by FransBouma via Frans Bouma's blog on 4/8/2011 12:04:21 PM

In the past two months I've been busy creating a new query specification API for LLBLGen Pro. Our native query API is modeled after SQL statement fragments (like a 'predicate', a 'relationship', a 'field'), but specifying a query with it can be a little verbose, and above all: the code doesn't look like a query. Especially with complex queries and projections it can sometimes be tedious to grasp what the SQL will look like and what the query is doing. With LLBLGen Pro QuerySpec this changes: a f ...

[ read more ]

Tuesday, February 08, 2011

LLBLGen Pro v3.1 released!

by FransBouma via Frans Bouma's blog on 2/8/2011 11:28:16 AM

Yesterday we released LLBLGen Pro v3.1! Version 3.1 comes with new features and enhancements, which I'll describe briefly below. v3.1 is a free upgrade for v3.x licensees. What's new / changed? Designer Extensible Import system. An extensible import system has been added to the designer to import project data from external sources. Importers are plug-ins which import project meta-data (like entity definitions, mappings and relational model data) from an external source into the loaded pro ...

[ read more ]

Friday, January 21, 2011

Unknown breaking change in .NET 4?

by FransBouma via Frans Bouma's blog on 1/21/2011 9:07:37 AM

Today I ran into a breaking change in .NET 4 which I couldn't find in the documentation. It's about binding a linq to objects query to a BindingSource's DataSource in winforms. The code works properly in .NET 3.5, but crashes in .NET 4: _firstRelationshipsBindingSource.DataSource = from relationship in GuiStateSingleton.GetInstance().CurrentProject. GetAllRelationshipsForEntity(selectedEntity, true) where ((relationship.Relati ...

[ read more ]

Wednesday, December 08, 2010

Algorithmia Source Code released on CodePlex

by FransBouma via Frans Bouma's blog on 12/8/2010 1:08:23 PM

Following the release of our BCL Extensions Library on CodePlex, we have now released the source-code of Algorithmia on CodePlex! Algorithmia is an algorithm and data-structures library for .NET 3.5 or higher and is one of the pillars LLBLGen Pro v3's designer is built on. The library contains many data-structures and algorithms, and the source-code is well documented and commented, often with links to official descriptions and papers of the algorithms and data-structures implemented. The sour ...

[ read more ]

Friday, December 11, 2009

This is why algorithms rule

by FransBouma via Frans Bouma's blog on 12/11/2009 3:13:15 PM

For the people who know me a little it's no surprise, but in case you didn't know: I love algorithms. I think they're the cornerstone of good software and they should be your first source of wisdom for every piece of software you're creating. This post will show an example of what I mean by that and how easy it is if you have a set of algorithms at your disposal which are solid, proven and correct. The nice thing about algorithms is that you can reason over them without writing a single line o ...

[ read more ]

Wednesday, December 02, 2009

Very odd OutOfMemoryException issue with GetHashCode(string)

by FransBouma via Frans Bouma's blog on 12/2/2009 10:12:33 AM

In .NET there's a class called StringComparer. It has some handy helpers, like the InvariantCultureIgnoreCase StringComparer. These classes also implement a method called GetHashCode(string), which produces the hashcode in the scope of the comparer, so if you're calling that method on the InvariantCultureIgnoreCase variant, you get the hashcode for that scope. This is handy as hashcodes are important, for example to find duplicates. We recently ran into an issue with this, as passing a large s ...

[ read more ]

Thursday, June 25, 2009

Linq: Beware of the 'Access to modified closure' demon

by FransBouma via Frans Bouma's blog on 6/25/2009 8:32:21 AM

If you're using Linq and Resharper, you've probably seen the warning Resharper shows when you use a foreach loop in which you use the loop variable in a Linq extension method (be it on IQueryable<T> or IEnumerable<T>). In case you don't know what it is or what damage it can do if you ignore the issue, I'll give you a database oriented query (so on IQueryable<T>, using LLBLGen Pro's Linq provider) which creates a dynamic Where clause based on input, the typical scenario you shou ...

[ read more ]

Monday, May 18, 2009

Multi-value Dictionary C# source code (.NET 3.5)

by FransBouma via Frans Bouma's blog on 5/18/2009 8:52:00 AM

By popular demand, I've published the C# source code of my Multi-value Dictionary class, which can also merge dictionaries into itself and which implements ILookup<T, V> as well. It's part of Algorithmia, our upcoming data-structure and algorithm library which will ship with LLBLGen Pro v3.0 later this year. The code is released under the BSD2 license, see the enclosed readme.txt. The class comes with its own general purpose Grouping<T, V> class as well and of course its own ToMultiV ...

[ read more ]

Wednesday, March 04, 2009

Choose .Concat() over .Union() if possible

by FransBouma via Frans Bouma's blog on 3/4/2009 10:25:28 AM

Update: I've reworded a sentence as it was too vague. Sorry for that. Here's a simple performance tip which can benefit you without doing any effort. Linq to Objects has two methods to combine two sequences together, both with different characteristics: Union() and Concat(). The difference in characteristics makes it possible to gain performance without doing anything difficult. Let's look at a simple example first: Say we have two lists of integers: A: {1, 2, 3, 4} and B: {1, 2, 5, 6}. When u ...

[ read more ]

Friday, February 27, 2009

Winforms Gotcha: Form.Close() doesn't always call Dispose()

by FransBouma via Frans Bouma's blog on 2/27/2009 5:06:18 PM

I just ran into a weird issue. During profiling I saw that controls on a form which was already closed were still reacting to events. I checked whether the Dispose() routine of the particular Form was called, but it wasn't. However, the Dispose() routine of other forms was called after it was closed, as in: immediately. The difference between the two situations was that if I used Form.ShowDialog(parentForm), a call to Close() on the particular form didn't call Dispose. Checking the Form.Close( ...

[ read more ]

Wednesday, November 14, 2007

Correctness provability should be the goal, not testability

by FransBouma via Frans Bouma's blog on 11/14/2007 10:30:00 AM

(edited. s/proof/prove/gc and some sentences which were 'out of wack' have been corrected as well) Phil Haack today posted an article about Writing Testable Code Is About Managing Complexity. He says: Of course, when I'm done un-bunching my knickers, I realize that despite all the benefits of unit testable code, the real benefit of testable code is how it helps handle the software development's biggest problem since time immemorial, managing complexity. There are two ways that testable code hel ...

[ read more ]

Wednesday, September 12, 2007

Developing Linq to LLBLGen Pro, Day 1

by FransBouma via Frans Bouma's blog on 9/12/2007 5:20:39 PM

(This is part of an on-going series of articles, started here) I didn't have that much time today to work on our Linq to LLBLGen Pro layer, but nevertheless there are a couple of interesting things to mention. . It's all about the Source, Luke Let's look at a skeleton of a very simple Linq query: // C# var q = from c in source         select c; There are a couple of fuzzy things to see in the query above: a) what the **** is 'q' and b) why is 'sourc ...

[ read more ]

Thursday, June 07, 2007

Don't use foreach over MatchCollection, use for. UPDATED

by FransBouma via Frans Bouma's blog on 6/7/2007 2:45:24 PM

UPDATE. Apparently they both call GetMatch(). So my advice isn't correct. Thanks 'Reflector' for the comment. What surprises me though is that first my routine (checked with Ants profiler) was slow because of the foreach, and now it's not. Simple performance tip. Consider this code: MatchCollection matches = myRegExp.Matches(someString); foreach(Match m in matches) { // your code which uses the match This will perform awful. The reason is that the enumerator in MatchCollection execut ...

[ read more ]

Wednesday, May 23, 2007

Gavin King slams Object Databases

by FransBouma via Frans Bouma's blog on 5/23/2007 7:37:10 PM

In a great article, Gavin King (of Hibernate fame) whipes the floor with what we used to call 'Object Databases'. Excellent reading material and full of information why these RDBMS's still stick around after all those many claims of object database vendors that their product is so incredibly more efficient. ...

[ read more ]

Monday, April 16, 2007

More on Lazy Loading vs. Pre-loading in O/R mapping scenarios

by FransBouma via Frans Bouma's blog on 4/16/2007 8:07:47 AM

Recently I replied to a post on Ayende's blog which I'll quote below: In general lazy loading is more of a burden than a blessing. The reason for this is that it leaks persistent storage access to different tiers via the lazy loadable associations. If you want to prevent your UI developers to utilize lazy loading, or are sending entities across the wire to a service, how are you preventing that lazy loading is called under the hood? We support 2 models, one has lazy loading, the other one doesn ...

[ read more ]

Sunday, January 21, 2007

Software Architecture Workshop in Arosa: back to reality

by FransBouma via Frans Bouma's blog on 1/21/2007 5:19:25 PM

Last week I had the privilege to spend 5 days in Arosa, Switzerland, among a group of people who were way more smarter than I am, for the annual Software Architecture Workshop (SAW). The SAW in Europe is an initiative of Jimmy Nilsson, and uses the Open Spaces methodology to let the participants discuss all kinds of topics during a set of parallel tracks. This year, the organization was done by Beat Schwegler of Microsoft. From the Netherlands, Paul Gielens, Arjen Poutsma (of Spring framework f ...

[ read more ]

Thursday, August 31, 2006

Why a cache in an O/R mapper doesn't make it fetch data faster.

by FransBouma via Frans Bouma's blog on 8/31/2006 8:11:05 PM

Preface One of the biggest myths in O/R mapper land is about 'caching'. It's often believed that using a cache inside an O/R mapper makes queries much faster and thus makes the O/R mapper more efficient. With that conclusion in hand, every O/R mapper which doesn't use a cache is therefore less efficient than the ones who do, right? Well... not exactly. In this article I hope to explain that caching in O/R mappers is not there for making queries more efficient, but is there for uniquing. But m ...

[ read more ]

Sunday, July 02, 2006

LLBLGen Pro v2.0 released!

by FransBouma via Frans Bouma's blog on 7/2/2006 6:25:31 PM

Whoa time flies! . After 9 months of hard work, LLBLGen Pro v2.0 has been released! LLBLGen Pro V2.0 comes with a new licensing scheme: it's now licensed per seat, instead of per-department. Current customers of v1.0.200x.y can upgrade for EUR 49.- per developer. (Designer using developers need a license, the rest don't). Of course, every new release brings new features and enhancements, and this version isn't an exception to that ! Below is a summary of the long list of big and small enhance ...

[ read more ]

Tuesday, June 27, 2006

Applying Domain-Driven Design and Patterns by Jimmy Nilsson

by FransBouma via Frans Bouma's blog on 6/27/2006 1:23:44 AM

Several days ago it finally arrived: Applying Domain-Driven Design and Patterns by Jimmy Nilsson! It's Jimmy's latest book and it's great. Well, 'great' is not really the word, it's more a matter of Must Have, it's that good. It's perhaps a bit strange, to hear from me that a DDD/TDD book, which this is, is a Must Have, but let me explain: Applying Domain-Driven Design and Patterns, is not a book which is written by someone who writes books for a living. It's a book written by someone who writ ...

[ read more ]

Friday, June 23, 2006

Jeroen vd Bos on Why Visual Studio should be part of Windows

by FransBouma via Frans Bouma's blog on 6/23/2006 7:23:28 PM

My best friend Jeroen van den Bos has just posted a great article about why Visual Studio should be part of Windows. Jeroen and I share a long history together and as we're both ex-demosceners, I fully understand his reasoning and I wholeheartly agree with his point: make Visual Studio.NET Express part of Windows Vista. I too started programming a long time ago, on a Toshiba HX-10 MSX-1 computer. And as Jeroen described, I too had the same experience: you start up the computer, within a few ...

[ read more ]

Thursday, June 15, 2006

Microsoft ProductFeedback... why bother?

by FransBouma via Frans Bouma's blog on 6/15/2006 3:27:52 PM

Sorry for the second rant posting today, but I'm so fed up with this. Microsoft started with a product feedback site when VS.NET 2005 was in beta, and it was received with great enthousiasm, me included. However, I currently have the feeling it's been abandoned, or has been 'evolved' into a site where people can log bugs but they'll almost never result in a bugfix. Take for example this bug I filed back in december 2005: DataGridView doesn't refresh the columns correctly when changing DataMe ...

[ read more ]

What!? .NET 2.0 SP1 in 2007? Unacceptable!

by FransBouma via Frans Bouma's blog on 6/15/2006 2:36:34 PM

Brad Abrams blogs: George asks about SP1 of the .NET Framework 2.0... Again the details have not been 100% worked out, so don’t take this as an official statement, but I expect SP1 of the .NET Framework 2.0 to be at the same time as Orcas .NET Framework ships. Well, I don't know about you, but I personally heard from mr. Somasegar that .NET 2.0 would get a service pack in 2006 and not at the end of 2006, if I might add. Orcas is slated for release in 2007, and not early 2007. This mean ...

[ read more ]

Sunday, June 11, 2006

Jon Skeet on the 7 deadly sins of Software Development

by FransBouma via Frans Bouma's blog on 6/11/2006 4:50:06 PM

Jon Skeet, a C# MVP I greatly respect, has written a great article about The 7 Deadly Sins of Software Development. I personally think every software engineer should simply read it and better: should use the knowledge inside the article in their work next week and beyond! Share this post: Email it! | bookmark it! | digg it! | reddit! ...

[ read more ]

Friday, June 09, 2006

LLBLGen Pro v2.0 with ASP.NET 2.0

by FransBouma via Frans Bouma's blog on 6/9/2006 7:19:00 PM

Recently, Scott Guthrie blogged about using DLinq with ASP.NET. I read the interesting article and thought... that must be possible today, with code using normal .NET 2.0! So, I started LLBLGen Pro v2.0 (V2 is currently in beta) and yes, I was able to do everything Scott showed in his article, with very little effort. The steps I took are described below. I've to add, LLBLGen Pro v2.0 is currently in beta, so similar to DLinq, it's not yet available in final form, though we hope to releas ...

[ read more ]

Tuesday, May 02, 2006

(.NET 2.) Dictionary(Of Key, Value) performance trick

by FransBouma via Frans Bouma's blog on 5/2/2006 2:52:00 PM

(I used the VB.NET notation in the title so it won't nag about illegal characters like < and >) In .NET 2.0 you'll have this new generic Hashtable variant called Dictionary<TKey, TValue>. It can be used as a Hashtable but now strongly typed and it doesn't use boxing anymore with value types. That's great and all, though there's one thing that's different from the hashtable: retrieving a value with a key that's not there. If the key value isn't present in the Dictionary, you'll get a ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us