Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.NET frameworks revisited
Message
From
06/04/2007 12:58:18
 
 
To
06/04/2007 12:51:07
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01208568
Message ID:
01213009
Views:
20
>Hope you're still doing Strataframe stuff. i can see your presence on the forum there would be most useful.

I am not using SF at the moment although I did use it to build a 300+ user, enterprise-wide application over roughly a two year period (pre-release version(s) of SF).

>I'll go for two rounds and throw in some crisps.

The last of the big spenders :)

Cheers (pun intended)

-=Gary



>
>>>I am just wrapping my brain around partial classes, but between your explanations and what I am getting from the Strataframe docs and code I think I'm starting to get it.
>>
>>Partial classes are a kind of "trick" that MS pulls off with the compiler. Imagine that you have a massive class definition in a Fox .prg file. Some parts of the class deal with printing, some deal with compression, some deal with backups. If you have this single .prg in a source control system, when it is checked out, only one dev could work on this class in its single .prg file. In VFP, you cannot break the class definition out into separate .prg files. However, in .NET, you could could break the class out into the following source files:-
>>
>>
>>
>>CharlesHankey.cs
>>CharlesHankey.Printing.cs
>>CharlesHankey.Compression.cs
>>CharlesHankey.Backups.cs
>>
>>
>>
>>Each file could containe something like the following definition:-
>>
>>
>>
>>// For some crazy reason, the CharlesHankey class derives (inherits) from the SF Business object.
>>// Go figure? :)
>>
>>// In CharlesHankey.cs
>>public partial class CharlesHankey : StrataFrameBusinessObject
>>{
>>   public CharlesHankey()
>>   { }
>>}
>>
>>// In CharlesHankey.Printing.cs
>>public partial class CharlesHankey
>>{
>>   public void Print()
>>   {...}
>>}
>>
>>// In CharlesHankey.Compression.cs
>>public partial class CharlesHankey
>>{
>>   public void Compress()
>>   {...}
>>}
>>
>>// In CharlesHankey.Backups.cs
>>public partial class CharlesHankey
>>{
>>   public void Backup()
>>   {...}
>>}
>>
>>
>>
>>When the compiler does its stuff, it essentially sees that the partial class definitions that it finds in these code files all relate to the same class. So, it treats them all as a single class. Not only does this allow you to separate out all of the common functionality into single files, it has the added advantage of allowing multiple devs to work in different parts of the same class and additionally, you can easily extend the class's functionality whenever you want to by simply creating another partial class file.
>>
>>>I think I can get excited about this.
>>
>>Partial classes are really taken for granted and almost overlooked as a feature but you are right, they are brilliant and make things so much easier.
>>
>>>Ivan pointed to Stratatrain - training videos for Strataframe ( done in Amarillo so I assume they are affiliated though surprisingly I don't see them linked on the Strataframe site - maybe I just missed it ) Since I produced the 30 hours of training videos for VFE I am particularly interested in this. Have you seen them? Your reactions appreciated.
>>
>>I haven't actually seen them but I think they are part of a collaboration with one of the local colleges in Amarillo. From what I have heard, they are very good indeed but I have no experience of them myself.
>>
>>>Thanks again. Next time I'm in the ancestral homeland it's my shout.
>>
>>I'll hold you to that ;)
-=Gary
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform