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.
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.
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.
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.
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.)
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.
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.
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.
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.
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
“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
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”.
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.
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.
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.
“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
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…