|
When I face something new, I prefer to hand code to learn how the actual thing works. This helps me a lot (and it helped me a lot with ATL) when I have a problem of some sort. I know how to tackle the problem. Later when I feel comfortable with my knowledge I jump into drag and drop coding, and again from time to time I go through hand coding - just to stay in shape
"You can get more with a kind word and a gun, than with a kind word alone" -- Al Capone
|
|
|
|
|
I always drop controls then edit the produced code. Its too much hassle to do it all by hand. Datacaonnection etc should always be done by hand.
|
|
|
|
|
LeeDaviesVBSource wrote:
Datacaonnection etc should always be done by hand.
I disagree. When I create a new SqlConnection object I use the wizard to specify its details. Then when I need another similar SqlConnection on a new form I just copy/paste the first one on the second form. The same goes with other data related components.
Best regards,
Alexandru Savescu
P.S. Interested in art? Visit this!
|
|
|
|
|
I will use drag & drop form design for any controls which are static, and be very happy to set individual properties based on database access etc.
Of course, some controls are purely generated at runtime (eg based on details from a database).
Why hand write a lot of code if you can easily drag & drop controls on to a form?
However -- I would NEVER EVER drag and drop database connections onto a form. These should be at very least centralised, and at best made in another tier of your application
Seeya
James
|
|
|
|
|
I hate them with a passion. I hate people who drag a DataConnection object onto forms especially. Drag and drop coding encourages poor code design. It encourages poor and sloppy coding styles.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
Arrrhh an implicit VB hater
|
|
|
|
|
Normski wrote:
an implicit VB hater
Right. He needs to turn on Option Explicit
(You don't sink much lower than making jokes that only VB script kiddies will get.)
cheers,
Chris Maunder
|
|
|
|
|
I don't know what is more scary, you telling the joke or me for getting it.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
Not necessarily, i'm a VB coder but insist on hand coding everything, especially DB code. The only thing I don't hand code is form designs unless i'm building the form programatically from outside sources.
The things I hate about drag and drop coding:
1. It's a pain to email someone a snippet of code demonstrating a concept.
2. If you write the code yourself you know what it does, how it does it, and most importantly for DB connection management, when it does it.
3. It doesn't really save you that much time, Intellisense makes coding this stuff very rapid, if you find yourself writing too much code then make a function, make a class, that's what they're there for!
My 2 cents, now 2.2 cents inc GST.
|
|
|
|
|
I agree.. You just can'y drag-n-drop everything.. Sooner or later you need to get down in the code. Also if you drag & drop.. It's global to the form
|
|
|
|
|
With all that said.... You haven't lived until you have to deal with the cross browser issues caused by d-n-d, especially when the person has no concept of HTML. I don't even pretend to know HTML that well; but I wrote better mark-up back in 1995.
I am currently in the process of converting a VB Web App created in Visual Studio to C# frameworks. There are times I want to cry because the code is so magical.
Speaking of Databases, the automagical connections they wrote completely broke my ability to DTS between my live server and my dev and staging servers to refresh my test data.
Before anyone says it YES I am a VB Bigot, cut my teeth on Ansi C a long time ago and proud of it.
Pamela Reinskou
VersusLaw Inc.
|
|
|
|
|
Hmmm, hand coding complex windows forms just doesn't make any sense. A main menu is something different, but playing around with 100 different positions for a button is unnessessary work.
greets,
daniel
--
SharpPrivacy - An OpenPGP implementation in C#
http://www.sharpprivacy.net
http://www.codeproject.com/csharp/sharpprivacy.asp
|
|
|
|
|
gek_at wrote:
Hmmm, hand coding complex windows forms just doesn't make any sense. A main menu is something different, but playing around with 100 different positions for a button is unnessessary work
Definitely. But I don't think that's what he's talking about. Notice that he mentioned a DataConnection object. It seems to me he means using a designer for components that really ought to be coded by hand (because of complexity or whatever), and have no position/size.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
.. and afterwards fine-tuning manually.
Regards
Thomas
Disclaimer: Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you.
|
|
|
|
|
Thomas Freudenberg wrote:
.. and afterwards fine-tuning manually.
Exactly what I do
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
isn't everybody doing this?!?!
Bye,
Orbital^
...the night is long ... but not long enought to do some real coding ...
|
|
|
|
|
With web-dev I used the VS.NET HTmL Designer for about 5 minutes and then spent a good while looking for a registry key that would permanently disable it.
With win-dev I normally layout the form in the designer and then go and re-write much of the auto-generated code. I find the auto-generated code, especially the constructor bits and property settings, are coded differently to how I think best.
Paul Watson Bluegrass Cape Town, South Africa
Robert Edward Caldecott wrote:
My father-in-law calls yer man bits "weasels"
|
|
|
|
|
I agree. I don't know why Microsoft believes absolute positioning in web development is a good thing. I always thought table-based layout is better since you can't predict (even on an intranet)
what the user's resolution is going to be. Whereas with Win-Dev, absolute positioning makes a lot of sense.
|
|
|
|
|
Zequel wrote:
I don't know why Microsoft believes absolute positioning in web development is a good thing
At least they back-tracked on that one.
cheers,
Chris Maunder
|
|
|
|
|
I disaggree. Table based layouts suck eggs... Putting data in tables is fine, its what they're ment to do, but for page layout, divs and spans rule. And absolute positioning rocks... You guy are just too old school, get with the times baby! It's divs, spans and ccs now-a-days....
-Alan
|
|
|
|
|
I, of course, always use forms designers. However, I never use SQL designers, because it's much faster and more concise to just type in a line of SQL than it is to try to use the designer. Sometimes I use an HTML designer, but I mostly just hand-code. For a while there, I used a CSS designer sometimes so that I could learn the allowed style attributes, but now I do all hand-coding.
Positioning/placement always benefits from a designer.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
I often use the SQL designer to rough-out the query then go in by hand and deal with the mopping up (or add stuff the designer can't deal with). Saves typing. Just wish the SQL edit window used the same key strokes as normal edit windows.
With VS.NET and intellisense I always hand code CSS becaase I can't stand the CSS designer. Not sure why - it's a great piece of work - but gimme hand crafted any day.
I've not yet met a HTML designer that does what I tell it - though ASP.NET work is definitely helped when working with visual comnponents (like charts) that have lots of properties and sub properties that you have no hope of remembering. Then again - form designer experience depends totally on the support that the components you are working with offer.
cheers,
Chris Maunder
|
|
|
|
|
I aggree. Using a DB wizard to rough something out is my preferred method of beginning data access. I think it does encourage poor programming for the folks who strictly drag and drop, though... I also perfer to access data through a business object class, rather than dropping a connection and dataset onto a form. It makes binding to controls a little more complex, but worth it to seperate UI from business logic...
-Alan
|
|
|
|
|
drag and drop to the recycle bin...
ORACLE One Real A$#h%le Called Lary Ellison
|
|
|
|
|
That's exactly the situation I got here today, I dragged some controls from other assemblies, and for some reasons VS.NET couldn't copy them to the run directory when the application was being complied, and yes, everything was dropped to the non-recycle bin ( 'cuz there's no way to recycle)
<font color="green">
<font color="blue">foreach</font> (System.Hours hour <font color="blue">in</font> EveryDay.Hours)
{
WorkingWithMyComputer();
}
|
|
|
|