Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why would you do that?

Status
Not open for further replies.

spizotfl

MIS
Aug 17, 2005
345
US
It is usually easy to find things that show you "how" to do something, but there is much less that indicates "why" you would want to do something. I am wondering if someone in their wanderings has come across a site, a book, a blog, a podcast, whatever the format, that discusses different language features with an eye towards why you would use them. Something to help beginners transition and understand things, as opposed to copying and pasting code.

Just as an example: Custom Controls. I think I get the idea, but I don't know for sure.

Just curious.
Thanks

"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
besides your example do you have a concrete example. The current question is so abstract and open-ended there really is no answer.

You mention languages differences in the first paragraph, but then talk about Custom Controls in the example. Both are separate topics and one does not influence the other.

as for these 2 quetions:
1. Language: this is purely subjective, whether you use VB, C#, IronRuby, IronPython, etc. it all compiles to ILM (i think that's the TAL) code which the computer understands.

I prefer c#. I find it's easier to migrate between languages. Most OSS projects are C# so it makes it easier to understand the code. C# has some features that VB does not (at least in previous versions) the 3 main ones that come to mind are:
1. deferred execution with IEnumerable
2. multi-line lamda expressions
3. strict typing

2. creating a custom control allows for:
1. encapsulation: all the functionality (of whatever your widget does) is accessed via the control. a public API for a GUI control if you will. Look at 3rd party GUI controls, all of them are simply custom controls.
2. reusability. If the control is generic enough (say a date picker for a web interface) the control can be reused across multiple screens and/or applications.


Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top