IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New C# 2.0
I just ran into a road block with C# 1.1. We need to load domain objects from the database which means we need the ability to set number types to null. Just found there's no way to do that in C# currently.

I hear C# 2.0 will introduce nullable types ([link|http://msdn.microsoft.com/vcsharp/team/language/default.aspx|http://msdn.microsof...uage/default.aspx]). Is it save to use the 2.0 framework beta for a project that has to ship at the end of this year? Anyone have any experience with 2.0?
Thanks,
John
New Strong typing bites itself in the gonads once again
Are there software-Darwin awards?
New Any production quality dynamic languages for .NET yet
The closest I've found is IronPython, but it's still alpha with no release schedule.
New Not that I've seen.
IronPython is probably the strongest contender, now that Jim Hugunin is working for MS. You can chat him up about release schedule at PyCon in DC this Easter. ;)
New Objects to the rescue
We don't want to risk developing with Microsoft beta software and we are stuck with .Net because all the developers here want a quick, easy GUI builder.

So...I'm going follow the pattern from NakedObjects, all the properties of our domain objects will be a custom value type. The value type will have a Null property. This also means I can move the code to determine if the property has changed and what it's original value is to the value object. Plus, it will force our developers to use objects for things like Money and different unit types instead of just using double.

Oh, and I just learned you have to put [Serializable] on EVERY object you want serialized. In Java, I could just place it on a single base class or interface. <sigh>
New Sounds reasonable
Looks like C# has [link|http://www.ondotnet.com/pub/a/dotnet/2003/03/10/collections.html|type-safe collections]...maybe you can put all of your Domain Object properties into a private HashTable*, and then write public getters/setters which are Null-aware? Just a thought.


Re: the dirty logic:

If you are making an [link|http://www.martinfowler.com/eaaCatalog/activeRecord.html|Active Record] system, you might as well stick as much logic into the objects themselves.

If, on the other hand, you're making a [link|http://www.martinfowler.com/eaaCatalog/dataMapper.html|Data Mapper], you probably want to keep the "dirty logic" (whether an object has changed or not) outside your custom "value type" objects. It will make it easier for your mapper to instantiate existing objects without having them become dirty unwittingly, especially if you start adding update triggers.



* Yes, I'm forever tainted by Python ;)
New Wibble, wibble...
Brewski Bob blithers:
Looks like C# has [link|http://www.ondotnet.com/pub/a/dotnet/2003/03/10/collections.html|type-safe collections]...maybe you can put all of your Domain Object properties into a private HashTable*, and then write public getters/setters which are Null-aware? Just a thought.
If that's all there's to it, then those aren't "properties". They're just private values that happen to have public getters and setters; a mere (stupid, Java-ish) *convention* -- not *actual implemented as such* properties at all. (Oh well; then again, I know of only one language that actually *does* implement a proper property mechanism...)


If you are making an [link|http://www.martinfowler.com/eaaCatalog/activeRecord.html|Active Record] system, you might as well stick as much logic into the objects themselves.
As much as what?


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
New Semantics
Call them whatever you want if they get the job done.



I meant "as you like", by the way.
New A) Almost everything is, when you get down to it; and B)...
...everybody seems to be leaving off "as possible", nowadays.

Well, not *everybody* -- it seems to be Amer\ufffdcans, mostly. (I could say something about attention spans, here... But I'll leave you to come up with that for yourselves.)


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
New English is simply too flexible to be used well.
I think the problem comes up when typing such a phrase because English freely allows two different, yet equal, arrangements:

"stick as much logic [as possible] into the objects themselves"

and

"stick as much logic into the objects themselves [as possible]"

While typing, it's easy to *intend* to place the "as possible" at the end of the sentence, and then forget to do so, because your brain tricks you into thinking you already inserted "as possible" into the first slot.

Not that English is the only such language, but I think that's why I elided the words.
New Yeah, I know - but it makes for a funny contrast...
...with German, where the grammar dictates that such spans are much more frequent, and much longer -- and you hardly ever see Germans leave off such a possibly tiny, but nonetheless vital, part.

(Then again, this could be because in German, such a fragment almost always *has* to go on the end of the sentence; which means there is a much smaller risk of thinking one has already added it.)


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
New Re: Sounds reasonable
If, on the other hand, you're making a Data Mapper [*], you probably want to keep the "dirty logic" (whether an object has changed or not) outside your custom "value type" objects. It will make it easier for your mapper to instantiate existing objects without having them become dirty unwittingly, especially if you start adding update triggers.

I am using a Data Mapper, but my mapper uses reflection and puts the data directly into the private fields, bypassing the "dirty logic". It's currently designed so my domain objects keep a map of original values and that is populated when property change events are fired. I think using the value objects will simplify this.
New Same old bullshit.
John U. laments:
We don't want to risk developing with Microsoft beta software and we are stuck with .Net because all the developers here want a quick, easy GUI builder.
Still pretending you've never heard of Delphi, eh?


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
New I second that
Matthew Greet


But we must kill them. We must incinerate them. Pig after pig, cow after cow, village after village, army after army. And they call me an assassin. What do you call it when the assassins accuse the assassin? They lie. They lie and we must be merciful to those who lie.
- Colonol Kurtz, Apocalypse Now.
New Re: Same old bullshit.
Still pretending you've never heard of Delphi, eh?

If I had my choice, I'd do it in Smalltalk...
New And WTF does that have to do with anything?
John U gibbers:
If I had my choice, I'd do it in Smalltalk...
So what? Apparently you don't have a free choice, but are constrained in that you need, as you put it earlier:
We don't want to risk developing with Microsoft beta software
Dunno if youy knew this, but Delphi actually is neither Microsoft nor beta software.

and we are stuck with .Net because all the developers here want a quick, easy GUI builder.
Which is exactly what Delphi is.

Well, except that you aren't stuck with em-ess-dot-net if you use Delphi; it's a quick, easy GUI builder for both .Net and regular Win-32 apps.

So what exactly was your excuse, again, for pretending that it doesn't exist?

Just wondering, you know...


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
New Re: And WTF does that have to do with anything?
Before I came here, they tried to build a Windows version of the old COBOL software using Delphi and failed. The second try in PowerBuilder succeeded. Somehow, I don't think introducing Delphi will elicit a positive response.
New OK, so what you originally said was only half the story.
Left out the bit about how they inexplicably screwed up something that to anyone sane just shouldn't be screwuppable... (Did they try to write a COBOL app in Delphi, or WTF?)

Oh well, never mind.


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
     The joys of .Net - (johnu) - (53)
         Ick. - (admin) - (18)
             It warn't me - (jb4)
             Here != IWETHEY in this case. -NT - (admin)
             So what's a good java IDE to use? - (drewk) - (15)
                 Intellij IDEA - (admin) - (14)
                     While learning, free is good - (drewk) - (10)
                         Checkout Eclipse - (johnu) - (9)
                             I despise that program - (tuberculosis) - (6)
                                 I'm no psychic... - (pwhysall) - (3)
                                     You ought to work in the circus -NT - (tuberculosis) - (1)
                                         I come here. Next best thing. -NT - (pwhysall)
                                     I think IDEA is good - I use it when I do Java - (tuberculosis)
                                 ICLRPD (new thread) - (ben_tilly)
                                 It's all relative - (johnu)
                             I am such a lUser - (drewk) - (1)
                                 Look at the pretty COLORS! -NT - (jb4)
                     Concur - (jb4) - (2)
                         As a rabid, frothing Emacs user - (admin)
                         Another vote for Intellij - (bluke)
         Listeners - (warmachine) - (1)
             Re: Listeners - (johnu)
         Crap and Double Crap -NT - (tuberculosis) - (10)
             Interesting thing is... - (johnu) - (9)
                 Umm... Squeak? -NT - (folkert) - (1)
                     Re: Umm... "up to date Windows UIs" -NT - (altmann)
                 Looked at Dolphin? - (tuberculosis)
                 Going farther afield - (ben_tilly) - (5)
                     You lose a lot of power though - (tuberculosis) - (4)
                         Re: You lose a lot of power though - (JimWeirich) - (3)
                             Is the parser written in Ruby? - (tuberculosis) - (2)
                                 Just like C# and .Net - (mmoffitt)
                                 Re: Is the parser written in Ruby? - (JimWeirich)
         #3 will be possible in C# 2.0 - (altmann) - (1)
             But it's gonna be great! -NT - (mmoffitt)
         C# 2.0 - (johnu) - (17)
             Strong typing bites itself in the gonads once again - (FuManChu) - (2)
                 Any production quality dynamic languages for .NET yet - (johnu) - (1)
                     Not that I've seen. - (FuManChu)
             Objects to the rescue - (johnu) - (13)
                 Sounds reasonable - (FuManChu) - (6)
                     Wibble, wibble... - (CRConrad) - (4)
                         Semantics - (FuManChu) - (3)
                             A) Almost everything is, when you get down to it; and B)... - (CRConrad) - (2)
                                 English is simply too flexible to be used well. - (FuManChu) - (1)
                                     Yeah, I know - but it makes for a funny contrast... - (CRConrad)
                     Re: Sounds reasonable - (johnu)
                 Same old bullshit. - (CRConrad) - (5)
                     I second that -NT - (warmachine)
                     Re: Same old bullshit. - (johnu) - (3)
                         And WTF does that have to do with anything? - (CRConrad) - (2)
                             Re: And WTF does that have to do with anything? - (johnu) - (1)
                                 OK, so what you originally said was only half the story. - (CRConrad)
         OT: Inner/outer classes. (new thread) - (pwhysall)

Pretty soon you will only have enough parts between you for a single person.
201 ms