Via MattBerther, who also gives a great example of need and usage.
The Specification pattern seems like a very good idea.
Matt's example is for in memory, but it's easily adapted to file / database, etc.
Via MattBerther, who also gives a great example of need and usage.
The Specification pattern seems like a very good idea.
Matt's example is for in memory, but it's easily adapted to file / database, etc.
For now, at least. I'm not so sure that I can really pronounce them fully fixed, but I can get it to work properly now.
I load NHibernate from a seperate AppDomain and can run queries there. The issue was about AssemblyResolve. I had a problem with one of my string argh!!! that caused all that trouble.
Well, I found out exactly how useful the AssemblyResolve approach is.
I can load the assemblies that I need (although I didn't test it for assemblies that references more assemblies, where I think it will fail).
But
NHibernate will not load it. The reasoning being that NHibernate load
types using the Type.GetType() method, and assemblies that has been
loaded with Assembly.LoadFrom() don't get to participate in this. WTF! Can anyone explain why?
Currently I don't have a solution.
I've been battling with the way the CLR handle AppDomains and loading assemblies for the last two days, and no success seems immanent. I need to load assemblies from two locations, my own ApplicationBase, and another directory, but I keep getting only one of them.
The issue is complicated because I'm trying to make NQA a multi AppDomain application, the reasoning is very simple, you can't unload a single assembly, only AppDomains, and the whole point of NQA is that you can load and unload assemblies and test them.
What I want to achieve is to load my own assembly and NHibernate to the dynamic AppDomain, and then load the user's assemblies. Then I can just call from the UI to the AppDomain and back. When the user recompile his assemblies, I can re-load the assemblies easily.
But I can't make it work!
I can either get the AppDomain to load my assembly and Nhibernate, or I can get it to load the user's assemblies (at least I think that I can, I can't test this until I can get the code to run!)
I've tried toying with ApplicationBase, PrivateBinPath, PrivateBinPathProbe, etc, with no success.
The scenario is really simple, I've the following directory structure:
C:\Directory One\main.exe, C:\Directory One\loader.dll, C:\Directory One\NHibernate.dll
C:\Directory Two\library.dll
What I want to do is, from main.exe, to create a new AppDomain, load loader.dll to it (which references NHibernate.dll) and then load library.dll from Directory Two.
I can't find a way to do this! If I set the ApplicationBase property of the AppDomain to Directory One, then the library.dll fails to load, if otherwise, then the loader.dll fails to load. If I try to use LoadFrom(), it fails because it can't find the referenced assemblies.
I can't assume that I've write access to either of those two directories, so just copying them there wouldn't work.
I'm going to experiment with AssemblyResolver and see if that can help me, but I'm not very optimistic.
I've updated the blog software from dasBlog's CVS Repository, so now I've a blog statistics on the page. I'm very impressed by this work. It was my own request that caused this to happen, and I'm very glad of that.
So, 249 (including this one) in 1 years, 3 months, and 6 days that I've been blogging.
I also reduced the size of the Google ads, they were too intrusive.
Here is a quote from Mike, the main developer behind NHibernate, regarding creating a site and a forum dedicated for NHibernate.
"...I would have to pay [for hosting] to answer questions for free for software that costs nothing..."
I read the next couple of books, and they are really good:
Open Source .NET Development : Programming with NAnt, NUnit, NDoc, and More
In Search of Stupidity: Over 20 Years of High-Tech Marketing Disasters
Those two I didn't read yet, but they become more relavant after the recent events.
Cross-Platform .NET Development: Using Mono, Portable.NET,and Microsoft .NET
Mono : A Developer's Notebook (Developer's Notebook)
The issue has been debated by people far more experienced than I am (see here, here, here and here for good arguments both pro and against).
My own thoughts? JetBrains (the creators of ReSharper, which I've been poetic about before :-D) intend (bottom of the page) to create an IDE for .Net, and that most probably mean that I will be leaving VS.Net behind. I've spoken before about moving to VS 2005, but as long as that means leaving ReSharper behind, that ain't gonna happen. I'd recently had been forced to work on VC# Express 2005, which doesn't have ReSharper, but has refactoring tools that does much the same. The experience has been so far beneath what I can do today with VS 2003 + ReShaprer that I came to a near complete halt. (Somewhat aided by some bugs in VC# Express, but that wasn't the main thing.) The amount of manual work that I had to do which ReSharper handled for me was astounding. About the only thing that ReSharper can't do is to reference a dll.
What do you mean I've to compile to see the errors1? And the refactoring support that ReSharper has is far more mature than what VC# Express Beta 1 shows. And code browsing, and variable name suggestions, etc. All of those makes working with VS.Net 2003 a pleasure, and working with VS.Net 2005 a chore.
How does this relate to Team System? Well, Frans was the first to catch on, but when JetBrains release their IDE, it's going to have:
With all of those features, I can't really see much attraction for VS Team System for the ISV or consultant. The only thing that is missing there is a bug tracking that is built in the IDE, and that can be solved as a plug-in or enhancement.
Assuming that the price tag would be similar to IntelliJ IDEA, that would be 499$, compare that to the multi thousands of dollars that you would get the same functionality from VS Team System. On the other hand, VS usually ship with a multitude of helper wizards that make common tasks much easier (database work is one such example). Personally, I don't use this functionality in VS, and don't ever intend to. That is a personal opinion of mine and probably many other developers disagree.
I intended to register to the Empower program, based on Joel's advise, which meant that I could quite a heck of a deal on this. I'll still probably go this route, to save money for the OS and servers. But I'm considering more and more to avoid all this complications and use an IDE that is willing to help me be lazy, and the tools that I'm already familiar with and use daily. And if I get the same tool set that I can get today, with a tighter integration, than it's really no brainer.
Alex Lowe seems to think that most developers don't know JetBrain. He is probably right, but they would search for alternatives when they would find out that they need to pay so much more for everything that Microsoft sell2. And the other ISVs that are familiar with this would make sure that they do know about it. The blogging community isn't that big, if you compare it to the size of the developers community, but they are well connected, usually.
I can't conceive developers moving from tried-and-true tools that they know and love (price tag: $0, limitations: none, source-code: included) to a far more complex beast that may or may not be available in version 2. And I think that this would be a big lose for Microsoft. This is not meant to convince Microsoft to change it's opinion, by the way. As a matter of fact, I don't care much personally. I don't foresee a change in circumstances that make me want to use Team System features. They want to target the Enterprise market, but they are very weak in this regard right now. And I think that a company with thousands of developers (just the kind that Microsoft is targeting) would want to use something that come from Microsoft and holds their entire future in its innards. Not without solid proof and developers clamouring to get it.. And I can't see people getting excited about it when the price is so high that they can't use it at home or for their own projects.
1Yes VB-ers, you can laugh now, you'd it circa 1995 or so, I know.
2As a matter of fact, I agree with Erik here, most people buy MSDN Universal to get exactly that feeling.
Today is Taanit Ester, (Ester's Fast is the literal translation) and tomorrow is Purim.
Purim is a Jewish holiday which is like Halloween in which everyone wear customs, but there are no tricks except on the Evil Haman.
I'm going crazy, I lost VS.Net 2003, and I reverted to using VS.Net 2005 (yes, I reverted. VS.Net 2005 doesn't have ReSharper, and that is a big minus in itself.).
Then I started getting problems With TestDriven on VS.Net 2005, and couldn't debug or test with debugging. That totally take me down because I refuse to do all the hard work myself. There are tools for that, and I've found out that I'm not nearly as productive as I can be without two of my favorite tools.
I don't have access to the DVDs that I need in order to fix that, and it has been driving me crazy! I'm writing documentation now, so at least something good may happen because of this.
[Update, I just got an email from JetBrains, and they say that there should be an Early Access Program for ReSharper on VS.Net 2005 starting in may! Final release is scheduled to one month after VS.Net 2005 hit the shelves.]
No future posts left, oh my!