Linked by Eugenia Loli on Sun 27th Aug 2006 18:49 UTC
.NET (dotGNU too) Start learning about an important programming concept, namely objects. The more you work with Visual C#, the more you'll hear about objects. Visual C# 2005 is a true object-oriented language. This chapter isn't going to discuss object-oriented programming in any detail—object-oriented programming is a complex subject and well beyond the scope of this book. Instead, you'll learn about objects in a more general sense.
Order by: Score:
quotes
by bytecoder on Sun 27th Aug 2006 19:22 UTC
bytecoder
Member since:
2005-11-27

Shouldn't the subject be in quotes? I was just about to respond about how meaningless calling C# a "true [sic] object-oriented language" is, until I realized this was a quote from the article.

Reply Score: 1

Um...
by memson on Sun 27th Aug 2006 19:39 UTC
memson
Member since:
2006-01-01

The quote from the article is rambling and uses bad terminology. What hope has the article of being any use?

Objects are instances of Classes. You design classes and instantiate them. Objects are the end result of your efforts.

I wonder how one could use VS.NET and C# without using OO. The base component - the Form - in a Winforms application is a class. There are not seperate functions - everything is a method.... the statement in the title above makes no sense to me. You don't need to understand the niner points of Inheritence, polymorphism and such, but you at least need the basics so as not to make a complete hash up.

Reply Score: 1

RE: Um...
by Get a Life on Sun 27th Aug 2006 21:50 UTC in reply to "Um..."
Get a Life Member since:
2006-01-01

Using static methods, sealed classes, and non-virtual methods is pretty un-OO. You cannot escape classes entirely, but they easily become little more than a cumbersome type of namespace.

Reply Score: 3

RE: Um...
by MollyC on Mon 28th Aug 2006 01:37 UTC in reply to "Um..."
MollyC Member since:
2006-07-04

As stated above, you can write a traditional procedural app by using static methods. And depending on what the task is, this can be more appropriate than force-feeding object-orientation where it doesn't really belong.

(BTW, C# classes don't have to use "the Form"; you can make console apps with C#. Even for those that do use "the Form", if the only object is the Form, then it's not really an object-oriented program, as the only methods dealing with the Form as an object, per se, are the event handlers; the rest of the methods are essentially global functions within a "namespace" arising from the Form object. This is not any different than a Win32 app written in C, that has just one main HWND, handles events via that HWND's message proc, and calls a bunch of global functions to do the work.)

Reply Score: 1

a litle off topic..
by ahmetaa on Sun 27th Aug 2006 19:46 UTC
ahmetaa
Member since:
2005-07-06

what is the business relation betwen informit and OSNews and IBM ? all .Net articles (mostly cheesey) are coming from Informit, and Java related articles (mostly boring) are from IBM.

Reply Score: 2

RE: a litle off topic..
by Eugenia on Sun 27th Aug 2006 20:08 UTC in reply to "a litle off topic.."
Eugenia Member since:
2005-06-28

There is no business relation. 80% of our readers are developers and so we link to such material. For further assistance please email osnews-crew instead of posting off topic.

Reply Score: 1

RE[2]: a litle off topic..
by memson on Mon 28th Aug 2006 00:19 UTC in reply to "RE: a litle off topic.."
memson Member since:
2006-01-01

Eugenia, this really is a worthless article. It uses awful terminology - e.g. stating "objects" have "attributes" and "these attributes are properties".. WTF? Its not so much the quantum leap the author made, just the complete lack of explanation of anything really useful. No real insights. Just bad explanation.

Reply Score: 0

RE[3]: a litle off topic..
by Get a Life on Mon 28th Aug 2006 01:22 UTC in reply to "RE[2]: a litle off topic.."
Get a Life Member since:
2006-01-01

It's par for the course when it comes to excerpts from books on informit. They also receive very little discussion here besides people stabbing at them being here with spears, but I have to confess that this one entertained me with its badocity.

Reply Score: 1

RE[2]: a litle off topic..
by BryanFeeney on Mon 28th Aug 2006 10:11 UTC in reply to "RE: a litle off topic.."
BryanFeeney Member since:
2005-07-06

If 80% of your readers are developers, why link to an article aimed at people who are not developers?

After all, a developer will already know most of what is taught in the article, which is just the basic usage of object-orientated languages with the C++ style of syntax. This is an excerpt from the start of a book (and what appears to be quite a poor book at that) aimed at people entirely new to computer programming.

I don't object to articles on advanced or specialised subjects, or to discussions of new or little known areas (such as aspect-orientated programming), but most of the stuff at Informit is of very poor quality, is aimed at people with little or no knowledge of programming, and is more often than not replete with errors and bad advice.

P.S. I can't believe the author used a for-loop with an index instead of using an enumerator or the foreach loop. What ever happened to teaching best-practice?

Edited 2006-08-28 10:16

Reply Score: 3

RE[2]: a litle off topic..
by Soulbender on Mon 28th Aug 2006 12:48 UTC in reply to "a litle off topic.."
Soulbender Member since:
2005-08-18

"all .Net articles (mostly cheesey) are coming from Informit, and Java related articles (mostly boring) are from IBM."

At least the IBM articles arent worthless, as the case with almost every single Informit article is.
If you're going to post developer articles (isn't this site about *operating systems* anyway, not programming in general?) maybe you should run them by someone who actually understand programming and the concepts involved? Or just don't link to Informit articles, it should be obvious by now that Informit isn't in a good standing.
Plus, all these Informit article are usually just a few selected chapters and we all know why that is.

Edited 2006-08-28 12:56

Reply Score: 3

Um...
by Valhalla on Sun 27th Aug 2006 20:56 UTC
Valhalla
Member since:
2006-01-24

well, I thought the article wasn't that bad. however, I think it would have been better to if it had just stuck to the basics of c# objects and collections using the dog metaphor, and not complicated things by involving the .net framework. then again, the article was a continuation of some .net-based picture viewer project so I guess it makes some sense.

now, c# isn't really my cup of tea, and yet I found the article somewhat interesting. chances are that those wanting to learn c# will find it very interesting.

oh, and I'm all for these programming articles, everyone has different taste in what they find interesting, and if I don't want to read them I simply don't click. I would have missed some really good reading if I hadn't stumbled upon them here, personal favourites that comes to mind are the "Everything you ever wanted to know about C types" (I thought I knew them well until I read this) and the "How protothreads really work".

Reply Score: 2

Why prefix C# with 'Visual'
by Harald on Mon 28th Aug 2006 00:27 UTC
Harald
Member since:
2006-03-10

The target audience is pretty clear: those that think C# can only be used from within VS.NET. Not a sophisticated crowd.

Visual C# is really a product, after all.

Reply Score: 1

RE: Why prefix C# with 'Visual'
by Get a Life on Mon 28th Aug 2006 01:28 UTC in reply to "Why prefix C# with 'Visual'"
Get a Life Member since:
2006-01-01

I thought it was interesting that the distinction between the IDE and the programming language was so flimsy. That probably isn't a really terrrible goal as seen with Smalltalk.

Reply Score: 1

Scary
by unthinkableMayhem on Mon 28th Aug 2006 05:47 UTC
unthinkableMayhem
Member since:
2006-01-16

I got as far as "...you've probably heard the term object oriented, and perhaps words such as polymorphism, encapsulation, and inheritance. In truth, these object-oriented features of Visual C# are exciting, but they're far beyond Hour 3 (or Hour 24, for that matter)..."

As someone who writes C# code for a living, I think understanding these concepts is far more useful than knowing how to drag controls and components onto a form designer.

People applying here for developer roles (and likely most other decent dev teams) are immediately at a disadvantage if all they know how to do is let a tool write their code for them. Candidates like that do not even get as far as an interview.

Reply Score: 4

RE: Scary
by Soulbender on Mon 28th Aug 2006 12:53 UTC in reply to "Scary"
Soulbender Member since:
2005-08-18

"People applying here for developer roles (and likely most other decent dev teams) are immediately at a disadvantage if all they know how to do is let a tool write their code for them. Candidates like that do not even get as far as an interview."

Clearly you are not in the bussines of writing "enterprisey" applications for enterprises, if you where you'd hire these schmucks in an instant ;)

Reply Score: 1

They should a learned Java...
by MikeekiM on Tue 29th Aug 2006 03:51 UTC
MikeekiM
Member since:
2005-11-16

I got as far as "...you've probably heard the term object oriented, and perhaps words such as polymorphism, encapsulation, and inheritance. In truth, these object-oriented features of Visual C# are exciting, but they're far beyond Hour 3 (or Hour 24, for that matter)..."

What a SAD state the windows community exists in...

Reply Score: 1