|
Bob Stanneveld wrote: Should support transaction management to some degree and things like a Registry, etc.
Registry??
Norman Fung
|
|
|
|
|
A registry makes sure that a domain object is loaded only once from the database. For example when thread A request a domain object with ID 1, the registry loads it from the database. Now a second thread also requests a domain object with ID 1, the registry returns the already loaded domain object instead of loading another copy from the database. Offcoarse you have to have some transaction management and the like.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
|
|
MyGeneration has a great Gentle.NET Template written by Angelo
|
|
|
|
|
While not very useful in event-driven or SOA architectures, this tool has saved me a lot of work. The tool makes it possible to map standard .NET classes to tables in a wide variety of database systems. It takes about 5 minutes to write the mapping files and you don't even need to create the database, just let NHibernate do that for you.
I can recommend this one to people who dont have the time to create their own data-tier model and want to work object-oriented http://www.hibernate.org/[^]
WM.
What about weapons of mass-construction?
-- modified at 12:40 Monday 24th April, 2006
|
|
|
|
|
Willem,
GenWise Studio generates all the POCO + Factories + XML for NHiberate.
So, you can have a working ASP.NET 2.0 + NHibernate in minutes.
Sebastian Talamoni
|
|
|
|
|
Is this Genwise studio free? Or is it a commercial product?
WM.
What about weapons of mass-construction?
|
|
|
|
|
After seeing the price I think I'll stay with the current method, it works just fine is a lot cheaper and I doubt that I will get much more productive.
WM.
What about weapons of mass-construction?
|
|
|
|
|
MyGeneration can generate NHibernate objects. Just fire up MyGeneration, open the template browser (folder with a + next to it), click the globe and you should see an NHibernate 'folder' in the list. It contains several templates which you can use (and change for your own purposes).
|
|
|
|
|
I love Hibernate. But how do you handle lookup fields?
class Order {
...
...
Invoice _invoice; //Will this result in database round trip when loading Order?
...
}
Versus:
class Order {
...
...
int _invoiceID;
...
}
Lazy load also has her own problems:
class Order {
...
Hashtable _orderItems;
}
class OrderItem {
...
Order _parent;
...
}
Will this causes recursive loading when lazyload=false? Not to mention... error messages from NHibernate seems to be ... could have been more developer friendly.
Norman Fung
|
|
|
|
|
Indeed, Hibernate has its own problems ,you have to review your design carefully when using this problem. but IMHO all products have their own problems and strategies.
Will take a look at MyGeneration too...
WM.
What about weapons of mass-construction?
|
|
|
|
|
The tools are available and the code is simple especially since .NET now supports metadata from databases. Of course I have not used any of the tools (budget constraints in places I work usually prohibit random purchases) so I cannot judge my method over the others.
"Until the day of his death, no man can be sure of his courage" -- Jean Anouilh
|
|
|
|
|
Another one reinventing the wheel...
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: The tools are available and the code is simple
Not if you want to properly support design time databinding it isn't. There's a lot of undocumented magic going on in the dataset classes. Simple binding scenarios are easy enough to support, but when you get into hierarchical stuff its a world of pain.
Ryan
"Michael Moore and Mel Gibson are the same person, except for a few sit-ups. Moore thought his cheesy political blooper reel was going to tell people how to vote. Mel thought that his little gay SM movie about his imaginary friend was going to help him get to heaven."
- Penn Jillette
|
|
|
|
|
That is probably the reason that I do not use datasets or databinding. Some magic is for people that don't want to understand the science. Personally, I feel that using a tool that "does everything" will eventually lead to hacks in the maintenance phase of the project so unless I have a very compelling reason using MS magic is a non-answer :p
"Until the day of his death, no man can be sure of his courage" -- Jean Anouilh
|
|
|
|
|
I really should as I'm a big exponent of code-generation and other techniques that speed up development time.
I've just never come across a tool that I like.
So of the work I did with MyXaml was promising but I've since moved to working with ASP.NET and not had time to relook at the problem.
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
This one is really easy to use and you can get a feeling of what an ORM is. I haven't really used it in a project, but it seems to do a good job.
You need CodeSmith[^], since NetTiers[^] are simply templates for CodeSmith.
Freeware version of CodeSmith[^], so you can try it out (You'll need Framework 1.1 for this one)
daniero
|
|
|
|
|
I tried it on a sample I regulary use to test things out and it does a terrific job at generating the right code for the job.
WM.
What about weapons of mass-construction?
|
|
|
|
|
Superb tool, can't recommend it high enough. It must have saved me months of effort.
There's a good overview video here[^], shame he didn't use a screen capture codec though.
Ryan
"Michael Moore and Mel Gibson are the same person, except for a few sit-ups. Moore thought his cheesy political blooper reel was going to tell people how to vote. Mel thought that his little gay SM movie about his imaginary friend was going to help him get to heaven."
- Penn Jillette
-- modified at 7:56 Monday 24th April, 2006
|
|
|
|
|
LLBLGen is without a doubt the best tool in my arsenal! From pricing to support, you just can't beat it! It'll save you gobs and GOBS of time on your projects!
I'm not a player, I just code a lot!
Alex Dresko
|
|
|
|
|
Ryan Roberts wrote: There's a good overview video here[^]
Thanks. It's quite impressive.
Alvaro
The bible was written when people were even more stupid than they are today. Can you imagine that? - David Cross
|
|
|
|
|
Choice is missing. Or maybe a Whaaaa? choice.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
And what's .NET?
|
|
|
|
|
BINGO!
Software Zen: delete this;
|
|
|
|