Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VS LightSwitch (KittyHawk) has VFP roots
Message
From
04/08/2010 14:04:08
 
 
To
04/08/2010 13:34:14
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01474984
Message ID:
01475187
Views:
74
I think in my limited experience with the implementation of generated code ( the winform designer file for example or the generated part of the strataframe BO that creates the strongly typed properties ) I don't see any problems with the partial class. I change the names of things with great regularity and as I change metatdata and regenerate my business objects the code I have written remains untouched.

Your preference, as I understand it, is for more directly "data driven" stuff, and I certainly felt comfortable in that world and it was hard to give it up moving to .NET. ( or at least hard to go through the hoops that made it more awkward )

Of course as has been pointed out the generators are only generating what is in metadata someplace. I guess the question is do they generate before compiling (which I'm coming to prefer) or as we are used to in Fox frameworks to the extent that they come into play at run-time. ( I have done some stuff with settings that seem to answer a lot of the simpler immediate needs, so I guess XML stores can come into play )

I haven't used generators like Ironspeed since I've known enough .NET to know what I was really looking at ( and I think that was back in 1.1 or 2.0 anyway ) so I don't know how I'd like that much stuff generated for me. I did look at T4 and wish I had someone paying me a salary to study it ( so true of so much <g> )

But again, I have not thought through the theoretical underpinnings to the degree you have so I'll just follow along and learn what I can.

I did poke around a bit in Boo and was quite taken with the philosophy and what seems to be a very real-world common-sense approach on the part of the developers. I get why you are attracted to it and when I get some time I plan to explore it further, so thanks for the heads up.


>There is the issue of time (maintaining acceleration in a curve), and there is the issue of maintainability. If I were a T4 expert, that might work. But I'm an OOP software developer: creating and modifying objects is a lot of what I do. So, maintaining a class-based system fits right in.
>
>Also, I like my metadata where data belongs: in tables. <s> And I extend my metadata, and then modify the class(es) to use that metadata. Doing it with a class means I write and test that process. With a template, well, you get the idea.
>
>Partial classes seem like a good idea, but change a field name or control name and then what?
>
>Anyway, it's obvious that templates/generators work fine for many, perhaps most folks. I'm just describing what works for me.
>
>Hank
>
>>>Generators are the wrong solution for a problem that should never have existed, as I see it.
>>>
>>>Hank
>>>
>>
>>I defer to your greater knowledge on all this, but don't partial class moot the point about the drawbacks of generated code? Winforms is a good example at the MS level, but in most frameworks I've seen where code is generated, one partial class is regenerated and then untouched while other partial class is for developer code. Seems like the best of both worlds, in that one can still trace, debug ( and in the case of winforms twiddle where, for example, you want to quickly change inheritence of a bunch of controls ) the generated stuff and not worry about breaking it or spending a lot of time writing the tedious plumbing.


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Previous
Reply
Map
View

Click here to load this message in the networking platform