Comment On Real Programmers Build Their Own Form

The NIH (Not Invented Here) syndrome is generally too common of a phenomenom to talk about here (although cases of IHBLRIA are usually mentioned). When it comes to HTML forms and Javascript, the normal "NIH" thing to do is reimplement the GET method of the web browser's form in Javascript. But what you don't see too often is a programmer (like Michal Pasternak's predecessor) doing it with inline functions ... for every control within the form ... [expand full text]
« PrevPage 1 | Page 2 | Page 3 | Page 4 | Page 5Next »

Re: Real Programmers Build Their Own Form

2005-08-25 14:34 • by Mung Kee
Who doesn't love String concatenation?  I hope they have  'form1' defined globally somewhere.



P.S.

I loathe when people prefix HTML widget names with "sel" or "txt", as
if the server code has any interest in whether  it's a 
goddamn  text box or select box.  Let's hang him, then we'll
stab him...and then we'll kill him.

Re: Real Programmers Build Their Own Form

2005-08-25 14:35 • by Maurits
as opposed to onchange="this.form.submit();"

Re: Real Programmers Build Their Own Form

2005-08-25 14:35 • by John Bigboote
Astonishing. Really, truly astonishing. But this can't be wrong. After all, it's javascript.





I eagerly await an apologist to tell me why





form1.submit()





would have been a bad thing.



Bonus mini-WTF: the variables in the GET url are not escaped or encoded
in any way. Hey, if you are going to go balls-out with the javascript,
go all the way.

Re: Real Programmers Build Their Own Form

2005-08-25 14:38 • by chb
I guess that's designer code.



I need a beer.



Re: Real Programmers Build Their Own Form

2005-08-25 14:39 • by Maurits
41883 in reply to 41880
Hmm... I've just thought of something.

Perhaps there's a hidden element on the form <input name="doit" value="yes"> - and if the server sees this (a real form submission) then it acts on the information.

So a submit() call would be out of place... the form just needs to reload, preserving the already filled-out information.

This could still be fixed with an
    onchange="this.form.doit.value = ''; this.form.submit();"

Re: Real Programmers Build Their Own Form

2005-08-25 14:43 • by James
Oh, this is nothing at all... I have far to often seen forms where a
"programmer" came up with a quick "solution" that "just works". You
know you've all seen them, forms with onclick, onchange, etc attributes
that contain about 2 pages of javascript embedded in them.



There's this image map on a site the bossman made that has an image map
and the client wanted a box to display the text describing the county
clicked on. Each coord (or whatever) in the image map contains an
onmouseover attribute that has about a page worth of js, all of it
identical, the only thing that changes is the text (which is also
embedded in the attribute).



[edit]

Oh my.. I just noticed that he does the form's job for it by creating the get query string inside. BRILLANT!!

[/edit]

Re: Real Programmers Build Their Own Form

2005-08-25 14:46 • by redtetrahedron
41887 in reply to 41879

Mung Kee:
Who doesn't love String concatenation?  I hope they have  'form1' defined globally somewhere.


Check the first line of code.

Re: Real Programmers Build Their Own Form

2005-08-25 14:48 • by chb
41888 in reply to 41885
Anonymous:


--snip--


Oh my.. I just noticed that he does the form's job for it by creating the get query string inside. BRILLANT!!




http://dictionary.reference.com/search?q=brillant

No entry found for brillant.



Did you mean Brillante?




Re: Real Programmers Build Their Own Form

2005-08-25 14:49 • by Mung Kee
41889 in reply to 41885
Anonymous:
I have far to often seen forms where a
"programmer" came up with a quick "solution" that "just works".




I know we talked about the "bridge to far", but where is "often" and how far is it to there?

Re: Real Programmers Build Their Own Form

2005-08-25 14:52 • by Mung Kee
41890 in reply to 41887
redtetrahedron:

Mung Kee:
Who doesn't love
String concatenation?  I hope they have  'form1' defined
globally somewhere.


Check the first line of code.





That first line does $hit to give you the reference to form1.  You
still need use the object model to get it (document.all or
document.forms['form1']).

Re: Real Programmers Build Their Own Form

2005-08-25 14:52 • by Chris F
This code is truly before its time.  I dub thee AHAX.

Re: Real Programmers Build Their Own Form

2005-08-25 14:56 • by slippyr4
41892 in reply to 41888
Did you mean Brillante?



No, he didn't.

Re: Real Programmers Build Their Own Form

2005-08-25 14:56 • by Chris F
41893 in reply to 41888
chb:
Anonymous:


--snip--


Oh my.. I just noticed that he does the form's job for it by creating the get query string inside. BRILLANT!!




http://dictionary.reference.com/search?q=brillant

No entry found for brillant.



Did you mean Brillante?





Try searching for brillant in that little box at the top.  You'll understand.

Re: Real Programmers Build Their Own Form

2005-08-25 14:56 • by romeogresta
41894 in reply to 41890
No, you don't.

Re: Real Programmers Build Their Own Form

2005-08-25 15:03 • by Just another guy
41895 in reply to 41888
chb:
Anonymous:

--snip--
Oh my.. I just noticed that he does the form's job for it by creating the get query string inside. BRILLANT!!


http://dictionary.reference.com/search?q=brillant

No entry found for brillant.


Did you mean Brillante?




Nope... the Brillant is now the official SI unit of coding excellence.  Sort of like the what Helen is to beauty where a millihelen is the beauty required to launch a single ship.

Re: Real Programmers Build Their Own Form

2005-08-25 15:03 • by WIldpeaks
41896 in reply to 41893

Oh oh, looks like Paula got a job at Form Design.

Re: Real Programmers Build Their Own Form

2005-08-25 15:04 • by Mung Kee
41897 in reply to 41888
chb:
Anonymous:


--snip--


Oh my.. I just noticed that he does the form's job for it by creating the get query string inside. BRILLANT!!




http://dictionary.reference.com/search?q=brillant

No entry found for brillant.



Did you mean Brillante?







I try to add a little gayness and sparkle to every line of code I write.


Brillante

\Bril*lan"te\, adv. [It. See Brilliant, a.] (Mus.) In a gay, showy, and sparkling style.




Re: Real Programmers Build Their Own Form

2005-08-25 15:10 • by AC
41898 in reply to 41879
Mung Kee:
I loathe when people prefix HTML widget names with "sel" or "txt", as
if the server code has any interest in whether  it's a 
goddamn  text box or select box.




hungarian warts are there to help programmers not the code and in
writing the server side portion it'd probably be useful to know what
type of control a value came from, especially if you're recreating the
form and want to set the selected item in a <select> dropdown.

Re: Real Programmers Build Their Own Form

2005-08-25 15:11 • by John Bigboote
41899 in reply to 41896
WIldpeaks:

Oh oh, looks like Paula got a job at Form Design.





No, Paula's code would be tidier, more elegant...submitting the form
would just display an alert box saying "Form sumbitted" with no
post-back.

Re: Real Programmers Build Their Own Form

2005-08-25 15:18 • by Mung Kee
41900 in reply to 41898
Anonymous:
Mung Kee:
I loathe when people prefix HTML widget names with "sel" or "txt", as
if the server code has any interest in whether  it's a 
goddamn  text box or select box.




hungarian warts are there to help programmers not the code and in
writing the server side portion it'd probably be useful to know what
type of control a value came from, especially if you're recreating the
form and want to set the selected item in a select dropdown.





I maintain, why does the server give a damn about what kind of control
it is?  All the server needs to know is the front end needs the
selected value and a list of possible values.  It's the GUI's
burden to compare the selected value with the items in the list, to
determine how to render the widget.

Re: Real Programmers Build Their Own Form

2005-08-25 15:24 • by Jeff S
41901 in reply to 41900
Mung Kee:
Anonymous:
Mung Kee:
I
loathe when people prefix HTML widget names with "sel" or "txt", as
if the server code has any interest in whether  it's a 
goddamn  text box or select box.




hungarian warts are there to help programmers not the code and in
writing the server side portion it'd probably be useful to know what
type of control a value came from, especially if you're recreating the
form and want to set the selected item in a select dropdown.





I maintain, why does the server give a damn about what kind of control
it is?  All the server needs to know is the front end needs the
selected value and a list of possible values.  It's the GUI's
burden to compare the selected value with the items in the list, to
determine how to render the widget.


To repeat:  hungarian notion is used to help the PROGRAMMER (you
know, a person) remember what datatypes different variables are, not
for a "server". 



From your other post: the object form1 is a perfectly valid reference
for the javascript, since the context it is running in is the document.




Re: Real Programmers Build Their Own Form

2005-08-25 15:29 • by CornedBee
41902 in reply to 41890
Mung Kee:


That first line does $hit to give you the reference to form1.  You
still need use the object model to get it (document.all or
document.forms['form1']).




Browsers, especially IE, tend to inject forms and inputs by their name
and all tags by their id into the global JS namespace. It's a "help"
for lazy developers, resulting in unsightly JS code all over the world.

Re: Real Programmers Build Their Own Form

2005-08-25 15:42 • by Mung Kee
41903 in reply to 41901
Jeff S:
Mung Kee:
Anonymous:
Mung Kee:
I
loathe when people prefix HTML widget names with "sel" or "txt", as
if the server code has any interest in whether  it's a 
goddamn  text box or select box.




hungarian warts are there to help programmers not the code and in
writing the server side portion it'd probably be useful to know what
type of control a value came from, especially if you're recreating the
form and want to set the selected item in a select dropdown.





I maintain, why does the server give a damn about what kind of control
it is?  All the server needs to know is the front end needs the
selected value and a list of possible values.  It's the GUI's
burden to compare the selected value with the items in the list, to
determine how to render the widget.


To repeat:  hungarian notion is used to help the PROGRAMMER (you
know, a person) remember what datatypes different variables are, not
for a "server". 



From your other post: the object form1 is a perfectly valid reference
for the javascript, since the context it is running in is the document.







When I said the server, I was implying the server-side code.  When
you use ASP to interact with the database, they are one in the
same.  In the Java world, JSP pages are often considered the front
end, since they usually do very little of the heavy lifting. 
Typically you would adopt or write some MVC architecture (such as
Struts or JSF) in which a controller interacts with business objects
and passes the result of those interactions to a JSP page. 
Someone, far more experienced with M$ technologies than I, can probably
say whether this paradigm exists in that camp.



RE: defining form1, I stand corrected.  'document' is assumed.

Re: Real Programmers Build Their Own Form

2005-08-25 15:54 • by John Smallberries
41904 in reply to 41903
Mung Kee:

Someone, far more experienced with M$ technologies than I, can probably
say whether this paradigm exists in that camp.



Of course it does.

And your use of "M$" says volumes...not good ones.



Re: Real Programmers Build Their Own Form

2005-08-25 16:00 • by Mung Kee
41905 in reply to 41904
John Smallberries:
Mung Kee:

Someone, far more experienced with M$ technologies than I, can probably
say whether this paradigm exists in that camp.



Of course it does.

And your use of "M$" says volumes...not good ones.






It's just shorthand dude.  I'm not a hater.

Re: Real Programmers Build Their Own Form

2005-08-25 16:03 • by x-sol (to lazy to login)
41906 in reply to 41903

Mung Kee:
Jeff S:
Mung Kee:
Anonymous:
Mung Kee:
I loathe when people prefix HTML widget names with "sel" or "txt", as if the server code has any interest in whether  it's a  goddamn  text box or select box.


hungarian warts are there to help programmers not the code and in writing the server side portion it'd probably be useful to know what type of control a value came from, especially if you're recreating the form and want to set the selected item in a select dropdown.


I maintain, why does the server give a damn about what kind of control it is?  All the server needs to know is the front end needs the selected value and a list of possible values.  It's the GUI's burden to compare the selected value with the items in the list, to determine how to render the widget.

To repeat:  hungarian notion is used to help the PROGRAMMER (you know, a person) remember what datatypes different variables are, not for a "server". 

From your other post: the object form1 is a perfectly valid reference for the javascript, since the context it is running in is the document.



When I said the server, I was implying the server-side code.  When you use ASP to interact with the database, they are one in the same.  In the Java world, JSP pages are often considered the front end, since they usually do very little of the heavy lifting.  Typically you would adopt or write some MVC architecture (such as Struts or JSF) in which a controller interacts with business objects and passes the result of those interactions to a JSP page.  Someone, far more experienced with M$ technologies than I, can probably say whether this paradigm exists in that camp.

RE: defining form1, I stand corrected.  'document' is assumed.


What is trying to be said is that as a programmer or prorammers working on a large business application, with a web based front end, it will be exponitally easier to write, update, debug..... if the type of the control is indicated in some way in the the control name. Especially since in most case the server side code for the UI will need to marshal data to and from controls and the database and a humna has to manage the code for this action, the human will 9 times out of 10 be glad for the txt, ddl, lst, btn, rdo and so on.


Where I'm at now we do everything basackwards so we do PasswordTXT or SubmitBTN or WhyTheFUckIsThePrefixBeingPostedDDL 

Re: Real Programmers Build Their Own Form

2005-08-25 16:09 • by Oliver Klozoff
41907 in reply to 41899
John Bigboote:
WIldpeaks:

Oh oh, looks like Paula got a job at Form Design.





No, Paula's code would be tidier, more elegant...submitting the form
would just display an alert box saying "Form sumbitted" with no
post-back.


Wouldn't that be 'Form submtted'? :)

Re: Real Programmers Build Their Own Form

2005-08-25 16:09 • by Ytram
I'm not a big fan of hungarian notation, but I find UI development a great deal easier when using it.



As for anything below the presentation layer, hungarian notation is evil.



Just my opinion of course.  [:#]

Re: Real Programmers Build Their Own Form

2005-08-25 16:10 • by christoofar
41909 in reply to 41905
I love M$!   Their architecture problems have paved the way
for many in India to make a decent liv...  ugh shhhhhhhhh... I'll
go back to my M$ code.

Re: Real Programmers Build Their Own Form

2005-08-25 16:11 • by John Smallberries
41910 in reply to 41906
Anonymous:
Where I'm at now we do everything basackwards
so we do PasswordTXT or SubmitBTN
or WhyTheFUckIsThePrefixBeingPostedDDL 


I'm not sure why, but the only things
I indicate type for are UI elements. When I do that, I do append the
type indicator, not prepend it. The reason is that I usually know the
name of the control I want to reference (but not necessarily its type),
and I want autocomplete to find it that way. Ex: _lastNameTextBox.



This way, all things having to do with last name are grouped (TextBox _lastNameTextBox, String _lastName...)

Re: Real Programmers Build Their Own Form

2005-08-25 16:11 • by christoofar
41911 in reply to 41907


Wouldn't that be 'Form submtted'? :)




Brillant!!!

Re: Real Programmers Build Their Own Form

2005-08-25 16:13 • by John Smallberries
41912 in reply to 41909
christoofar:
I love M$!   Their architecture problems have paved the way
for many in India to make a decent liv...  ugh shhhhhhhhh... I'll
go back to my M$ code.


Ahem, "their" architecture problems, or the architecture problems you've created by improperly using their technology?

Re: Real Programmers Build Their Own Form

2005-08-25 16:13 • by Mung Kee
41913 in reply to 41906
Anonymous:

What is trying to be said is that as a
programmer or prorammers working on a large business application, with
a web based front end, it will be exponitally easier to write, update,
debug..... if the type of the control is indicated in some way in the
the control name. Especially since in most case the server side code
for the UI will need to marshal data to and from controls and the
database and a humna has to manage the code for this action, the human
will 9 times out of 10 be glad for the txt, ddl, lst, btn, rdo and so
on.


Where I'm at now we do everything basackwards so we do PasswordTXT
or SubmitBTN or WhyTheFUckIsThePrefixBeingPostedDDL 





Everyone seems to be preaching for it but no one has given me an
example of when the server code should care what type it is.  When
all is said and done, it's just a hash you're working with on the
server anyway.  Who cares what the visual representation is on the
client but the client itself?

Re: Real Programmers Build Their Own Form

2005-08-25 16:14 • by Gene Wirchenko
41914 in reply to 41885
Anonymous:
Oh, this is nothing at all... I have far to often seen forms where a
"programmer" came up with a quick "solution" that "just works".




Would that be "just" as in "barely"?



Just do it!



Good weekend, folks!  (This is my "Friday".  I am going to a gaming convention in Seattle for a long weekend.)



Sincerely,



Gene Wirchenko



Re: Real Programmers Build Their Own Form

2005-08-25 16:19 • by Jeff S
41915 in reply to 41913
Mung Kee:
Anonymous:

What is trying to be said is that as a
programmer or prorammers working on a large business application, with
a web based front end, it will be exponitally easier to write, update,
debug..... if the type of the control is indicated in some way in the
the control name. Especially since in most case the server side code
for the UI will need to marshal data to and from controls and the
database and a humna has to manage the code for this action, the human
will 9 times out of 10 be glad for the txt, ddl, lst, btn, rdo and so
on.


Where I'm at now we do everything basackwards so we do PasswordTXT
or SubmitBTN or WhyTheFUckIsThePrefixBeingPostedDDL 





Everyone seems to be preaching for it but no one has given me an
example of when the server code should care what type it is.  When
all is said and done, it's just a hash you're working with on the
server anyway.  Who cares what the visual representation is on the
client but the client itself?




You are not listening/understanding .... It is helpful so that you, the
PROGRAMMER, has some idea what UI element these different object
variables represent while you are writing/designing/editing your
pages.   YOu can see that "txtName" is a text box, while
"lstName" is a drop-down, or whatever convention you use.  It has
nothing to do with a server accepting or parsing a GET string and then
somehow using the name of the name/value pair to be able to do
something with it... it is for a person, a programmer, to use an an
aid, a "trick" if you will,  while designing pages to help job
their memory  .... does this make any sense at all?

Re: Real Programmers Build Their Own Form

2005-08-25 16:19 • by christoofar
41916 in reply to 41910
John Smallberries:


I'm not sure why, but the only things
I indicate type for are UI elements.




It's too much work to revamp Visual Studio's default naming of a
control, so most people back out the 1..N it adds to the identifier and
add something significant...



    textBox1 becomes textBoxLastName



A busy window with say, 70 controls (including all the labels, panels,
edits, menu items, etc) it gets hairy very quickly... especially if you
are in a rush.   Since Intellisense can quickly give me the
type of edit I am dealing with, I prefer to just append the word Edit
if its a "field" on a form (radio, text, dropdown, selectbox, slider),
"Label" if it's a label, "Picture" if it is an image, and "Grid" if it
is a MS or DevExpress grid on the screen.  So you would see:



#region

private string    _lastName;

private Label     _lastNameLabel;  /* "Last Name: " , etc */

private TextBox   _lastNameEdit;



private string    _firstName;

private TextBox   _firstNameEdit;



private Image     _paulaImage;

private Label     _paulaLabel;  /* Brillant! */

.

.

.



Re: Real Programmers Build Their Own Form

2005-08-25 16:21 • by Jeff S
41917 in reply to 41915
sorry lots of typos in that last one ...last lines should be:



it is for a person, a programmer, to use as an
aid, a "trick" if you will,  while designing pages to help jog their memory  .... does this make any sense at all?






Re: Real Programmers Build Their Own Form

2005-08-25 16:21 • by Volmarias
41918 in reply to 41914
Wow. Just.... Wow.

I looked at this and quite literally dropped my jaw when I realized just what was being done.

Wow.

Re: Real Programmers Build Their Own Form

2005-08-25 16:23 • by John Smallberries
41919 in reply to 41913
Mung Kee:


Everyone seems to be preaching for it but no one has given me an
example of when the server code should care what type it is.  When
all is said and done, it's just a hash you're working with on the
server anyway.  Who cares what the visual representation is on the
client but the client itself?


Are you proposing that it's appropriate to have a client-side
identifier (Id) be named one thing, but its server-side identifier
(Name) named something different? Like "selWhatever" and "whatever"? If
that's that case, I would rather have them the same, even if the server
doesn't care about the type prefix.

Re: Real Programmers Build Their Own Form

2005-08-25 16:29 • by Chris F
41920 in reply to 41912
John Smallberries:
christoofar:
I love M$!   Their architecture problems have paved the way
for many in India to make a decent liv...  ugh shhhhhhhhh... I'll
go back to my M$ code.


Ahem, "their" architecture problems, or the architecture problems you've created by improperly using their technology?


While I'll certainly admit their architectural ability has gotten
better with .Net, you can not gaze upon the hideousness that is MFC
without having a portion of your life spirited away.

Re: Real Programmers Build Their Own Form

2005-08-25 16:33 • by John Smallberries
41921 in reply to 41920
Chris F:
John Smallberries:
christoofar:
I love M$!   Their architecture problems
have paved the way
for many in India to make a decent liv...  ugh shhhhhhhhh... I'll
go back to my M$ code.


Ahem, "their" architecture problems, or the architecture problems you've created by improperly using their technology?


While I'll certainly admit their architectural ability has gotten
better with .Net, you can not gaze upon the hideousness that is MFC
without having a portion of your life spirited away.


Ok, MFC was/is nasty.

Even so, with some effort, I was able to use to it build reasonably elegent and maintainable applications.



I still feel that too many developers blame the IDE/framework/OS/language instead of themselves for writing shitty code.

Re: Real Programmers Build Their Own Form

2005-08-25 16:34 • by Mung Kee
41922 in reply to 41915
Jeff S:
Mung Kee:
Anonymous:

What is trying to be said is that as a
programmer or prorammers working on a large business application, with
a web based front end, it will be exponitally easier to write, update,
debug..... if the type of the control is indicated in some way in the
the control name. Especially since in most case the server side code
for the UI will need to marshal data to and from controls and the
database and a humna has to manage the code for this action, the human
will 9 times out of 10 be glad for the txt, ddl, lst, btn, rdo and so
on.


Where I'm at now we do everything basackwards so we do PasswordTXT
or SubmitBTN or WhyTheFUckIsThePrefixBeingPostedDDL 





Everyone seems to be preaching for it but no one has given me an
example of when the server code should care what type it is.  When
all is said and done, it's just a hash you're working with on the
server anyway.  Who cares what the visual representation is on the
client but the client itself?




You are not listening/understanding .... It is helpful so that you, the
PROGRAMMER, has some idea what UI element these different object
variables represent while you are writing/designing/editing your
pages.   YOu can see that "txtName" is a text box, while
"lstName" is a drop-down, or whatever convention you use.  It has
nothing to do with a server accepting or parsing a GET string and then
somehow using the name of the name/value pair to be able to do
something with it... it is for a person, a programmer, to use an an
aid, a "trick" if you will,  while designing pages to help job
their memory  .... does this make any sense at all?




I understood that quite clearly the first time you typed it.  Just
please, PLEASE, tell me why you want to know that it was a text
box.  Why is this relevant?  Give me an example of why it
makes it exponentially easier to write/update/debug.

Re: Real Programmers Build Their Own Form

2005-08-25 16:36 • by Mung Kee
41924 in reply to 41921
John Smallberries:



I still feel that too many developers blame the IDE/framework/OS/language instead of themselves for writing shitty code.




You got that right brother Smallberries

Re: Real Programmers Build Their Own Form

2005-08-25 16:37 • by John Smallberries
41925 in reply to 41922
Mung Kee:
Just
please, PLEASE, tell me why you want to know that it was a text
box.  Why is this relevant?  Give me an example of why it
makes it exponentially easier to write/update/debug.



Ok, at the risk of getting flamed for invoking the evil of JS, here goes:



If I have a UI element that I'm manipulating client-side in JavaScript,
It's handy to know what it is so I can use the correct DOM properties
and methods. That's it, no big deal. I also keep the same name
server-side, simply for consistency.

Re: Real Programmers Build Their Own Form

2005-08-25 16:39 • by Ytram
41926 in reply to 41922
Mung Kee:
Jeff S:
Mung Kee:
Anonymous:

What is trying to be said is that as a
programmer or prorammers working on a large business application, with
a web based front end, it will be exponitally easier to write, update,
debug..... if the type of the control is indicated in some way in the
the control name. Especially since in most case the server side code
for the UI will need to marshal data to and from controls and the
database and a humna has to manage the code for this action, the human
will 9 times out of 10 be glad for the txt, ddl, lst, btn, rdo and so
on.


Where I'm at now we do everything basackwards so we do PasswordTXT
or SubmitBTN or WhyTheFUckIsThePrefixBeingPostedDDL 





Everyone seems to be preaching for it but no one has given me an
example of when the server code should care what type it is.  When
all is said and done, it's just a hash you're working with on the
server anyway.  Who cares what the visual representation is on the
client but the client itself?




You are not listening/understanding .... It is helpful so that you, the
PROGRAMMER, has some idea what UI element these different object
variables represent while you are writing/designing/editing your
pages.   YOu can see that "txtName" is a text box, while
"lstName" is a drop-down, or whatever convention you use.  It has
nothing to do with a server accepting or parsing a GET string and then
somehow using the name of the name/value pair to be able to do
something with it... it is for a person, a programmer, to use an an
aid, a "trick" if you will,  while designing pages to help job
their memory  .... does this make any sense at all?




I understood that quite clearly the first time you typed it.  Just
please, PLEASE, tell me why you want to know that it was a text
box.  Why is this relevant?  Give me an example of why it
makes it exponentially easier to write/update/debug.





Personally for me it's because you usually have several controls of
each type that you need to do something with.  As an example, we
localize all of our labels, so I can easily access each label with
intellisense by prefixing them all with "lbl".  When I'm filling
text boxes with data, I just hit this.txt and intellisense will show me
all of the controls prefixed with txt.

Re: Real Programmers Build Their Own Form

2005-08-25 16:41 • by Mung Kee
41927 in reply to 41926
Ytram:


Personally for me it's because you usually have several controls of
each type that you need to do something with.  As an example, we
localize all of our labels, so I can easily access each label with
intellisense by prefixing them all with "lbl".  When I'm filling
text boxes with data, I just hit this.txt and intellisense will show me
all of the controls prefixed with txt.




What is this intellisense you speak of?

Re: Real Programmers Build Their Own Form

2005-08-25 16:43 • by John Smallberries
41928 in reply to 41927
Mung Kee:
Ytram:


Personally for me it's because you usually have several controls of
each type that you need to do something with.  As an example, we
localize all of our labels, so I can easily access each label with
intellisense by prefixing them all with "lbl".  When I'm filling
text boxes with data, I just hit this.txt and intellisense will show me
all of the controls prefixed with txt.




What is this intellisense you speak of?



Must be something from M$, implemeted in MFC.

Re: Real Programmers Build Their Own Form

2005-08-25 16:49 • by Mung Kee
41929 in reply to 41928
John Smallberries:
Mung Kee:
Ytram:


Personally for me it's because you usually have several controls of
each type that you need to do something with.  As an example, we
localize all of our labels, so I can easily access each label with
intellisense by prefixing them all with "lbl".  When I'm filling
text boxes with data, I just hit this.txt and intellisense will show me
all of the controls prefixed with txt.




What is this intellisense you speak of?



Must be something from M$, implemeted in MFC.




When you mention MFC, I completely understand the need.  These
prefixs (txt,lbl,sel) aren't all that uncommon in Swing either.  I
was mentally in web context and not "stand-alone application"
context.  I just don't see the value in web programming.

Re: Real Programmers Build Their Own Form

2005-08-25 16:57 • by Lazy Lurker
41930 in reply to 41927

Mung Kee:
Ytram:

Personally for me it's because you usually have several controls of each type that you need to do something with.  As an example, we localize all of our labels, so I can easily access each label with intellisense by prefixing them all with "lbl".  When I'm filling text boxes with data, I just hit this.txt and intellisense will show me all of the controls prefixed with txt.


What is this intellisense you speak of?


REAL programmers remember EVERY variable name in scope at all times.  You new-school pansies.


 


 


(intellisense: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vcovrAutomaticStatementCompletion.asp)

Re: Real Programmers Build Their Own Form

2005-08-25 17:06 • by NSCoder
41931 in reply to 41881
John Bigboote:
Astonishing. Really, truly astonishing. But this can't be wrong. After all, it's javascript.


Of course it's wrong... it should be constructing XML to send as the query string.

(I'm going to try previewing this post, even though everybody says that previewing is what causes the most common forum WTF, since it always bites me when I don't preview so what do I have to lose? At least I'll get to see it formatted properly, even if you don't.)
« PrevPage 1 | Page 2 | Page 3 | Page 4 | Page 5Next »

Add Comment