[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Marc

7/28/2008 7:52:00 PM

The though of writing tons of Database code for a big project sends me to
sleep. I've used Java's EJB 3 and Hibernate about a year ago, for a very
small test project.

This time I'm considdering using nHibernate. It is however going to be a
very large multi-user system, with a local database cache, clients that
connect to this using remoting.
I am planning to make use of a quite complex table structure. I've read that
nHibernate doesn't scale well.

Has anyone used it for a large, real world system?

Marc


16 Answers

Andrew Faust

7/29/2008 3:09:00 AM

0

I can't answer your question about nHibernate. I just wanted to suggest that
you also look at Linq. Don't know if it will meet your needs either, but
more options is always good.

Andrew Faust

"Marc " <RmEaMrOcVE@imarc.co.uk> wrote in message
news:#uTsrtO8IHA.4864@TK2MSFTNGP06.phx.gbl...
> The though of writing tons of Database code for a big project sends me to
> sleep. I've used Java's EJB 3 and Hibernate about a year ago, for a very
> small test project.
>
> This time I'm considdering using nHibernate. It is however going to be a
> very large multi-user system, with a local database cache, clients that
> connect to this using remoting.
> I am planning to make use of a quite complex table structure. I've read
> that nHibernate doesn't scale well.
>
> Has anyone used it for a large, real world system?
>
> Marc
>

Jon Skeet

7/29/2008 5:49:00 AM

0

Andrew Faust <andrew@andrewfaust.com> wrote:
> I can't answer your question about nHibernate. I just wanted to suggest that
> you also look at Linq. Don't know if it will meet your needs either, but
> more options is always good.

Not that the two are exclusive, of course. NHibernate has some LINQ
support already, and more is coming I believe.

--
Jon Skeet - <skeet@pobox.com>
Web site: http://www.pobox....
Blog: http://www.msmvps.com...
C# in Depth: http://csharpi...

Frans Bouma [C# MVP]

7/29/2008 8:33:00 AM

0

Jon Skeet [C# MVP] wrote:
> Andrew Faust <andrew@andrewfaust.com> wrote:
>> I can't answer your question about nHibernate. I just wanted to suggest that
>> you also look at Linq. Don't know if it will meet your needs either, but
>> more options is always good.
>
> Not that the two are exclusive, of course. NHibernate has some LINQ
> support already, and more is coming I believe.

I wouldn't hold my breath for that.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.l...
My .NET blog: http://weblogs.asp....
Microsoft MVP (C#)
------------------------------------------------------------------------

Pavel Minaev

7/29/2008 2:41:00 PM

0

On Jul 29, 12:32 pm, "Frans Bouma [C# MVP]"
<perseus.usenetNOS...@xs4all.nl> wrote:
> > Not that the two are exclusive, of course. NHibernate has some LINQ
> > support already, and more is coming I believe.
>
>         I wouldn't hold my breath for that.

Can you clarify this, please? Why do you believe that, preferrably
backed by references and such?

Because, otherwise, considering your association with a directly
competing product, your blanket statement doesn't look very
convincing.

Cowboy

7/29/2008 3:48:00 PM

0

Many ORMs break down at scale. In general, it is ease of use versus scale. I
cannot answer to nHibernate.

One thing I would look at, if I were you, is LLBLGen Pro
(http://www.l...). It is at a good price for scale. Plus the author
lurks here, so you could end up getting questions answered by the person
responsible. LLBLGen has a much nicer data access than many of the other
ORMs out there and this is part of the reason it scales. It is the least
expensive (not cheapest) of the bunch. There is a demo version.

Deklarit is another option that scales (http://www.dek...). I have
never played with Deklarit personally, but they do have demos and samples on
their site.

Genome is another option that I have played with that is rather nice
(www.genom-e.com). I have played with genome, but have not deployed it with
a production product yet. I am more in maintenance mode right now, however,
so it may be some time before I do.

All three of these can be configured quite easily and each of them has
advanced features, if you need to go beyond the "out of the box" solution.

You can use any of them with LINQ, as Andrew has suggested. Genome has it
built in now, along with their own query language. I believe it is a plug in
with the other two. Frans will certainly correct me if I have misrepresented
LLBL Gen.

For the record, LINQ is not an ORM.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces...list...

or just read it:
http://gregorybeamer.spaces...

********************************************
| Think outside the box! |
********************************************
"Marc " <RmEaMrOcVE@imarc.co.uk> wrote in message
news:%23uTsrtO8IHA.4864@TK2MSFTNGP06.phx.gbl...
> The though of writing tons of Database code for a big project sends me to
> sleep. I've used Java's EJB 3 and Hibernate about a year ago, for a very
> small test project.
>
> This time I'm considdering using nHibernate. It is however going to be a
> very large multi-user system, with a local database cache, clients that
> connect to this using remoting.
> I am planning to make use of a quite complex table structure. I've read
> that nHibernate doesn't scale well.
>
> Has anyone used it for a large, real world system?
>
> Marc
>

Pavel Minaev

7/29/2008 5:22:00 PM

0

On Jul 29, 7:47 pm, "Cowboy \(Gregory A. Beamer\)"
<NoSpamMgbwo...@comcast.netNoSpamM> wrote:
> For the record, LINQ is not an ORM.

LINQ in general isn't (but then "LINQ in general" is such a broad
thing that I often think it holds no real meaning at all). LINQ to
Entities, aka Entity Framework, most certainly is an ORM - but that
one is not released yet (should be a part of VS2008 SP1).

Jon Skeet

7/29/2008 5:43:00 PM

0

Frans Bouma [C# MVP] <perseus.usenetNOSPAM@xs4all.nl> wrote:
> Jon Skeet [C# MVP] wrote:
> > Andrew Faust <andrew@andrewfaust.com> wrote:
> >> I can't answer your question about nHibernate. I just wanted to suggest that
> >> you also look at Linq. Don't know if it will meet your needs either, but
> >> more options is always good.
> >
> > Not that the two are exclusive, of course. NHibernate has some LINQ
> > support already, and more is coming I believe.
>
> I wouldn't hold my breath for that.

Well, NHibernate 2.0 went beta 1 at the end of June:

http://blog.domaindotnet.com/2008/06/29/nhibernate-20-go...
while-microsoft-linq-to-entities-receives-vote-of-no-confidence-from-
many-leading-net-experts-as-unacceptable/

As Pavel asked, do you have any evidence to suggest that people
shouldn't expect it to be released with LINQ support in a reasonable
timeframe?

--
Jon Skeet - <skeet@pobox.com>
Web site: http://www.pobox....
Blog: http://www.msmvps.com...
C# in Depth: http://csharpi...

Jesse Hand

7/30/2008 5:18:00 AM

0

Hi Marc,

>The though of writing tons of Database code for a big project sends me to
>sleep. I've used Java's EJB 3 and Hibernate about a year ago, for a very
>small test project.
>This time I'm considdering using nHibernate. It is however going to be a
>very large multi-user system, with a local database cache, clients that
>connect to this using remoting.
>I am planning to make use of a quite complex table structure. I've read that
>nHibernate doesn't scale well.
>Has anyone used it for a large, real world system?

You might want to have a look at the "Summer of NHibernate" series of
webcasts that Stephen Bohlen has been putting together. From what I
understand, the company he works for is using NHibernate on some very
real-life, very large projects...

http://www.summerofnhib...

Cheers!
Marc

Frans Bouma [C# MVP]

7/30/2008 7:41:00 AM

0

Pavel Minaev wrote:
> On Jul 29, 12:32 pm, "Frans Bouma [C# MVP]"
> <perseus.usenetNOS...@xs4all.nl> wrote:
>>> Not that the two are exclusive, of course. NHibernate has some LINQ
>>> support already, and more is coming I believe.
>> I wouldn't hold my breath for that.
>
> Can you clarify this, please? Why do you believe that, preferrably
> backed by references and such?
>
> Because, otherwise, considering your association with a directly
> competing product, your blanket statement doesn't look very
> convincing.

Let's just say that I'm one of the few people on the planet who wrote a
fully functional linq provider for an o/r mapper, and looking at the
state of the nhibernate linq provider and the progress they're making,
it will take a long time before they're fully operational and be able to
do a lot of queries properly. that's not to say that the current version
isn't able to run a lot of queries, it's just that you will likely run
into a case where the provider will give up on you because the query
runs into an area that's not covered (yet)

The thing is though: it's unknown to the normal user which areas aren't
covered.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.l...
My .NET blog: http://weblogs.asp....
Microsoft MVP (C#)
------------------------------------------------------------------------

Frans Bouma [C# MVP]

7/30/2008 8:02:00 AM

0

Jon Skeet [C# MVP] wrote:
> Frans Bouma [C# MVP] <perseus.usenetNOSPAM@xs4all.nl> wrote:
>> Jon Skeet [C# MVP] wrote:
>>> Andrew Faust <andrew@andrewfaust.com> wrote:
>>>> I can't answer your question about nHibernate. I just wanted to suggest that
>>>> you also look at Linq. Don't know if it will meet your needs either, but
>>>> more options is always good.
>>> Not that the two are exclusive, of course. NHibernate has some LINQ
>>> support already, and more is coming I believe.
>> I wouldn't hold my breath for that.
>
> Well, NHibernate 2.0 went beta 1 at the end of June:
>
> http://blog.domaindotnet.com/2008/06/29/nhibernate-20-go...
> while-microsoft-linq-to-entities-receives-vote-of-no-confidence-from-
> many-leading-net-experts-as-unacceptable/

2.0 doesn't contain a full linq provider. It's in the contrib lib.

> As Pavel asked, do you have any evidence to suggest that people
> shouldn't expect it to be released with LINQ support in a reasonable
> timeframe?

See my reply to him.

You don't have to take my word for it, but don't be surprised that it
won't work properly either. I mean, it doesn't have support for
GroupJoin for example, which is something a tad more complex than from
where select stuff. Does it do group by's on join stacks? Group by's on
related entity data? etc. there are so many scenario's thinkable where
the expression tree looks a slightly bit different and you have to pull
essential information from another subtree than you'd expect (e.g. which
element in the join stack to target for the group by fields, thus
which alias to use? that's not really determinable from the groupby
method call in cases where the join is between the same entity so you
have to dig deeper)

The thing is that writing a linq provider which can handle *all*
queries you throw at it isn't a small thing. It took me 8 months of full
time development and often the material is very very complex simply
because there's little to no documentation and you practically work in
the dark. Add to that that the VB.NET compiler often creates trees which
look a tiny bit different, and you're in for a heck of a time ;).

As this linq provider moves forward very slowly, they've a lot of work
ahead of them. The downside of writing a linq provider is that you need
to work on it without interceptions, as processing the tree to create a
smaller, better to understand tree which then is reprocessed etc. is
something you can't do on an afternoon, you've to think things out,
design parts, implement them, test them, think through if you've covered
all the scenario's, because handling a given TYPE of subtree in a
general way means that it's handled EVERYWHERE by that routine due to
the visitor nature of the handlers, and you often want different results
for an expression in a projection than when it's in a where clause for
example, which means that the handler has to know the scope it's in,
which is more complex to make maintainable than it looks at first.

I'm sure readers of my previous post will think that I'm just playing
the marketing trumpet, but I just want to make clear what the real state
of reality is regarding linq providers of some o/r mappers, not just
Linq to nhibernate: just because they can consume a from where select
construct doesn't mean it supports linq in full, and that's a problem,
because the last thing you want is when writing a query that you can't
write it the way you want it because it's not supported by the provider.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.l...
My .NET blog: http://weblogs.asp....
Microsoft MVP (C#)
------------------------------------------------------------------------