Nhibernate and ObservableLists

Discussions on various DOL development features

Moderator: Support Team

Nhibernate and ObservableLists

Postby Dunnerholl » Sat Mar 02, 2013 4:41 pm

Hi, I hope some people are still reading this.

Is there any elegant solution to use Observable anythings with Nhibernate?

Or put to other words, what is a common practice of binding Lists retrieved from Nhibernate to the UI?

I dont want to make any kind of wrapper classes, just to get this working. Its cumbersome work.

Cheers

Dunner
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm

Re: Nhibernate and ObservableLists

Postby Ephemeral » Sun Mar 03, 2013 2:44 am

Are we talking about something for DOL's core? Or something that you can write with any toolkit to observe changes as they happen, cause I thought most of the ORM stuff does it for you (ADO I think does, but not sure?), either way it'll probably end up cumbersome for you.
"The swarm is always smarter, faster and more adept than any actor which seeks to thwart it."
C++, Java, C#, VB.NET, ASM.
Current Project:
Engine Developer for The Red Solstice
User avatar
Ephemeral
DOL Freak
 
Posts: 554
Joined: Wed Mar 30, 2011 12:23 am

Re: Nhibernate and ObservableLists

Postby Dunnerholl » Sun Mar 03, 2013 11:39 am

No a Dol core but a WPF editor tool for the database.
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm

Re: Nhibernate and ObservableLists

Postby Dunnerholl » Sun Mar 03, 2013 2:57 pm

Found a way, it's called uNhAddIns.WPF.dll which has persistent lists that fire those stupid changed events.
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm

Re: Nhibernate and ObservableLists

Postby Graveen » Sun Mar 03, 2013 9:56 pm

Good to know ! I never worked with NHibernate. Best i did with mainstream ORM was EF4, but, it was not leading to something serious.

The latest jewels i find were Dapper and his friend PetaPoco. Just don't have any projects to work on that would benefits one of them.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Nhibernate and ObservableLists

Postby Ephemeral » Sun Mar 03, 2013 10:25 pm

Good now graveen, move DOL to EF or Nhibernate so we can have other DB's besides mysql :p
"The swarm is always smarter, faster and more adept than any actor which seeks to thwart it."
C++, Java, C#, VB.NET, ASM.
Current Project:
Engine Developer for The Red Solstice
User avatar
Ephemeral
DOL Freak
 
Posts: 554
Joined: Wed Mar 30, 2011 12:23 am

Re: Nhibernate and ObservableLists

Postby Aredhel » Wed May 29, 2013 5:13 pm

Good now graveen, move DOL to EF or Nhibernate so we can have other DB's besides mysql :p
My project at work (application server) is actually based on EF and speaking from experience, multiple DB provider support isn't as easy as it may seem. Yes, there are different EF providers, but the typical scenario is to target a single DB provider, which might be SQL, MySQL, Oracle etc. To target all of them with the exact same model is not a straightforward task (for example, you need a different SSDL to target Oracle, coming from SQL). But it can be done with some T4 scripting.
User avatar
Aredhel
Inactive Staff Member
 
Posts: 1024
Joined: Sat Apr 14, 2007 1:49 pm
Location: Germany

Re: Nhibernate and ObservableLists

Postby Graveen » Wed May 29, 2013 8:34 pm

Yop Aredhel !

I got hard time with T4. The generated layouts where crappy, but i had not written the scripts (and really don't want to). I had finally the occasion to work with Petapoco. Not LINQ compliant, but finally, very efficient.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Nhibernate and ObservableLists

Postby Aredhel » Wed May 29, 2013 8:47 pm

Yop Aredhel !

I got hard time with T4. The generated layouts where crappy, but i had not written the scripts (and really don't want to). I had finally the occasion to work with Petapoco. Not LINQ compliant, but finally, very efficient.
Hiho Grav :)

Well, the idea is to have one master EDMX (MS SQL in my case) and then have T4 scripts perform some XSLT transformations (for example, Oracle requires all table/column names to be upper case). You'd then switch to alternate providers by referring to a different SSDL in the connection string.

First time I've heard of Petapoco, by the looks of it you're still tied to a single DB provider with that one (explicit SQL, no E-SQL layer).
User avatar
Aredhel
Inactive Staff Member
 
Posts: 1024
Joined: Sat Apr 14, 2007 1:49 pm
Location: Germany

Re: Nhibernate and ObservableLists

Postby Dinberg » Mon Jun 03, 2013 10:35 pm

Nice to see both Dunner and Aredhel still kicking about ;)
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: Nhibernate and ObservableLists

Postby Aredhel » Tue Jun 04, 2013 4:16 am

Nice to see both Dunner and Aredhel still kicking about ;)
And Din too - hiya :D
User avatar
Aredhel
Inactive Staff Member
 
Posts: 1024
Joined: Sat Apr 14, 2007 1:49 pm
Location: Germany

Re: Nhibernate and ObservableLists

Postby Dinberg » Tue Jun 04, 2013 10:45 pm

Pah! As if I ever leave :D
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: Nhibernate and ObservableLists

Postby Dunnerholl » Tue Sep 03, 2013 4:57 pm

is this thread really from this year?
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm


Return to “%s” DOL Development Discussion

Who is online

Users browsing this forum: No registered users and 1 guest