> Hallo nore...@z505.com,
>
> Du schriebst am Mon, 12 Dec 2011 12:41:44 -0600:
>
>> That's what I was saying, in delphi you can bypass the dumb looking
>> event
>> names they give you.  However for quick prototypes where I just want to
>> try something with a button, I use Button1OnClick because I'm just
>
> If it's _just_ a button, maybe two, and if the thing gets deleted
> afterwards, just having shown a concept can work, it may be o.k.
> If there's any chance it might survive as part of some method or
> component,
> it really should be put together more thoughtfully - one might have to
> work
> on it some more a couple years later.
>
>> throwing something together quickly. As the application progresses and
>> is
>> more longer term, it makes more sense to use more meaningful names and
>> possibly shorter names like Btn1Save Btn1Load etc.
>
> Well, and that's a very good example of mking a bad start worse. What's
> the
> use of that "Btn1.." part, after all? Do your buttons bear captions "1",
> "2" and do forth? No? Then use what they say, what they _do_ as their
> name.
> Use "SaveTable" or "SaveList" or whatever they invoke, there may be
> several
> different save actions implemented - name them accordingly.
>

In prototyping sometimes I will have 2 save buttons, one to try saving it
this way to see if that works, and another save button to try it another
way to see if that works best. In the final product you would not need two
buttons. It depends on the situation.

I actually know all about bad programming practices in delphi.. lots of
people put methods inside Form1 that have nothing to do with form1, and it
should be in some other class. I like to reuse the procedures elsewhere in
non-GUI programs, so coupling things directly to the GUI is not good. With
a SaveTable method coupled in form1, it means I can't call SaveTable
unless I am using the GUI program. So savetable might do better off in a
non gui class or a non gui procedure. Depends on the situation. If the
application is never going to be used in console mode or cgi, then
coupling the GUI to the algorithms isn't as big of a deal.

------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and 
improve service delivery. Take 5 minutes to use this Systems Optimization 
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to