473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

a question about this book

I'm thinking about reading Beginning C# Objects: From Concepts to Code
because I still don't have a great grasp of objects, but I wonder if C#
2.0 will change things enough that a lot of what's in the book will no
longer be relevant or applicable? I know generics are the big change,
but since I don't have much of a concept of what they are yet, I don't
know how much they (and other changes) will effect any of the content of
books released before 2005.

Thanks.
Nov 17 '05 #1
11 1208
What dont you understand about objects?
Nov 17 '05 #2
Josh wrote:
What dont you understand about objects?


Hard to say. I understand what they are basically, but I can't help but
try to read programs from top to bottom (procedurally, I guess), and I
know that objects don't quite work that way. It seems like in order to
understand an OO program, you have to jump around in the code to see
everything. That can be a little confusing, and also I guess I just
wanted a better explanation of how they work. Maybe there's a website I
can read that explains it well?
Nov 17 '05 #3
In message <Kq********************@rcn.net>, John Salerno
<jo******@NOSPAMgmail.com> writes
Josh wrote:
What dont you understand about objects?


Hard to say. I understand what they are basically, but I can't help but
try to read programs from top to bottom (procedurally, I guess), and I
know that objects don't quite work that way. It seems like in order to
understand an OO program, you have to jump around in the code to see
everything.


Ah, now, that's just the point. If your classes are well designed, in
the context of inspecting code that uses them, you shouldn't need to
look at their source to see how they work.

--
Steve Walker
Nov 17 '05 #4
> It seems like in order to understand an OO program, you have to jump
around in the code to see everything.


If the code is written OO you dont have to step into all of that code. For
instance, heres some code.

String a = "some text"'
DataTable myTable = UserBusinessObject.GetBlankTable();
int b = 23;
Now when reading through this code you wouldn't have to follow the flow into
"UserBusinessObject.GetBlankTable()" because it's self explanatory, and
provided there is no error when you make the call you dont have to go look
in there.

OO code should be broken down into compact self contained units so that
reading the code is simpler than reading procedureal code. Effectively OO
can simply be considered an enhanced GOSUB technology.

Nov 17 '05 #5
Hello Josh,

No, you don't need to step into that code. That is the whole idea behind
Encapsulation which basically abstrats some chunk of functionality into a
box with well defined inputs/outputs (an interface contract). That beiong
said, it's going to be really hard without some basic understanding of OO
concepts since the .NET Framework is completly OO oriented. So, I have already
suggested Petzold's Programmin In The Key of C# in another thread that teaches
programming from the ground up and Part IV teaches OO from the ground up.

This intro is in C++ but some of intro may help http://www.zib.de/Visual/people/muel.../tutorial.html

Also:
http://www.softwaredesign.com/objects.html
http://www.firststep.com.au/educatio...ground/oo.html

Sam Gentile
Chief .NET Architect
Adesso Systems, Inc
INETA Speaker, Microsoft MVP - .NET/C#
Blog: http://samgentile.com/blog/

It seems like in order to understand an OO program, you have to jump
around in the code to see everything.

J> If the code is written OO you dont have to step into all of that
J> code. For instance, heres some code.
J>
J> String a = "some text"'
J> DataTable myTable = UserBusinessObject.GetBlankTable();
J> int b = 23;
J> Now when reading through this code you wouldn't have to follow the
J> flow into "UserBusinessObject.GetBlankTable()" because it's self
J> explanatory, and provided there is no error when you make the call
J> you dont have to go look in there.
J>
J> OO code should be broken down into compact self contained units so
J> that reading the code is simpler than reading procedureal code.
J> Effectively OO can simply be considered an enhanced GOSUB
J> technology.
J>

Nov 17 '05 #6
Sam sgentile wrote:
Hello Josh,

No, you don't need to step into that code. That is the whole idea behind
Encapsulation which basically abstrats some chunk of functionality into a
box with well defined inputs/outputs (an interface contract). That beiong
said, it's going to be really hard without some basic understanding of OO
concepts since the .NET Framework is completly OO oriented. So, I have already
suggested Petzold's Programmin In The Key of C# in another thread that teaches
programming from the ground up and Part IV teaches OO from the ground up.

This intro is in C++ but some of intro may help http://www.zib.de/Visual/people/muel.../tutorial.html


I just finished reading that book, but I think I could understand it better.
Nov 17 '05 #7
Steve Walker wrote:
In message <Kq********************@rcn.net>, John Salerno
<jo******@NOSPAMgmail.com> writes
Josh wrote:
What dont you understand about objects?


Hard to say. I understand what they are basically, but I can't help but
try to read programs from top to bottom (procedurally, I guess), and I
know that objects don't quite work that way. It seems like in order to
understand an OO program, you have to jump around in the code to see
everything.

Ah, now, that's just the point. If your classes are well designed, in
the context of inspecting code that uses them, you shouldn't need to
look at their source to see how they work.


Well see, the fact that I'm seeing a problem where there shouldn't be
shows that I don't fully understand it. :)
Nov 17 '05 #8
"John Salerno" <jo******@NOSPAMgmail.com> wrote in message
news:md********************@rcn.net...
I'm thinking about reading Beginning C# Objects: From Concepts to Code
because I still don't have a great grasp of objects, but I wonder if C#
2.0 will change things enough that a lot of what's in the book will no
longer be relevant or applicable? I know generics are the big change, but
since I don't have much of a concept of what they are yet, I don't know
how much they (and other changes) will effect any of the content of books
released before 2005.
The OO concepts that I assume that book contains will be fundamental for a
long time to come. The .NET framework is entirely objects, and the new
features of 2.0 do not change that at all. Generics allows you to created
slightly different types of classes, iterators construct enumerator classes
for you, and anonymous methods create delegates for you. In all these areas
a strong understanding of OO is still required. My suggestion would be to
read what you can on OO and make sure you understand it before worrying too
much about the 2.0 features.

Also, play around with samples from the books. I'm sure they've got examples
and stuff, so develop them. Also, try writing them procedurally and then
make a major design change to both the procedural and the OO code. You
should quickly see the advantages of OO in such a case. My conversion to the
"OO Way" was not a sudden epiphany but a gradual accretion of understanding.
Thanks.

Nov 17 '05 #9
On Sat, 7 May 2005 09:45:34 +0200, "Sean Hederman"
<em*******@codingsanity.blogspot.com> wrote:
"John Salerno" <jo******@NOSPAMgmail.com> wrote in message
news:md********************@rcn.net...
I'm thinking about reading Beginning C# Objects: From Concepts to Code
because I still don't have a great grasp of objects, but I wonder if C#
2.0 will change things enough that a lot of what's in the book will no
longer be relevant or applicable? I know generics are the big change, but
since I don't have much of a concept of what they are yet, I don't know
how much they (and other changes) will effect any of the content of books
released before 2005.


The OO concepts that I assume that book contains will be fundamental for a
long time to come. The .NET framework is entirely objects, and the new
features of 2.0 do not change that at all. Generics allows you to created
slightly different types of classes, iterators construct enumerator classes
for you, and anonymous methods create delegates for you. In all these areas
a strong understanding of OO is still required. My suggestion would be to
read what you can on OO and make sure you understand it before worrying too
much about the 2.0 features.

Also, play around with samples from the books. I'm sure they've got examples
and stuff, so develop them. Also, try writing them procedurally and then
make a major design change to both the procedural and the OO code. You
should quickly see the advantages of OO in such a case. My conversion to the
"OO Way" was not a sudden epiphany but a gradual accretion of understanding.
Thanks.


Sean,

It might be worse as we will discover if c#2.0 goes live. Templates or
generics as c# wants to call them are notorious for abuse and defeat
of good OO design. The parameters break the encapsulation.

Rick

Nov 17 '05 #10
Rick Elbers <ri*********@chello.nl> wrote:
It might be worse as we will discover if c#2.0 goes live. Templates or
generics as c# wants to call them are notorious for abuse and defeat
of good OO design. The parameters break the encapsulation.


Fortunately generics are a bit more restricted than C++ templates, in
an attempt to reduce the abuse. I'm not hugely familiar with all the
ins and outs of C++ templates so don't know all of the kinds of abuse,
but hopefully it'll be a bit better with C#. (Sound familiar from the
operator overloading discussion? ;)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #11
Jon,
On Sun, 8 May 2005 15:33:55 +0100, Jon Skeet [C# MVP]
<sk***@pobox.com> wrote:
Rick Elbers <ri*********@chello.nl> wrote:
It might be worse as we will discover if c#2.0 goes live. Templates or
generics as c# wants to call them are notorious for abuse and defeat
of good OO design. The parameters break the encapsulation.


Fortunately generics are a bit more restricted than C++ templates, in
an attempt to reduce the abuse. I'm not hugely familiar with all the
ins and outs of C++ templates so don't know all of the kinds of abuse,
but hopefully it'll be a bit better with C#. (Sound familiar from the
operator overloading discussion? ;)


Sure. I see a pattern too. One other problem not solved in c++
templates was polymorphism inside stl containers. Therefore a lot of
people implemented polymorphy with pointer containers in which case
you can create polymorphic containers. Then the ownership problem
emerged, which was not present in the original beautiful stl design,
cause stl container is not going to delete your pointers. Both
problems are probably not generic for c# lol.

Regards,
Rick
Nov 17 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Aljo_ | last post by:
Hello! I got a free evaluation copy of Borland's JBuilder9. I also got a book about JAVA, and I am trying to type, compile and run some examples from the book. The following - very simple -...
1
by: William Ryan | last post by:
Well, that depends. http://www.amazon.com/exec/obidos/tg/detail/- /0672320681/qid=1056861878/sr=1-1/ref=sr_1_1/002-7953039- 7491213?v=glance&s=books Is a must read IMHO for any ASP.NET...
8
by: noid droid | last post by:
Hi. I posted yesterday asking if C# lived up to the hype. Thus far the feedback has been all positive. (Thanks.) Can anyone suggest GOOD books for learning C# and the Visual Studio .NET IDE? ...
7
by: Lior Bobrov | last post by:
Hi . I have experience in VB6 . Recently , I started learning (independently) VB.NET , under the Beta 1 version of VS2005 . However , there are not many books about VB2005 : VB2005 isn't...
9
by: me | last post by:
Hi All, I am new to Classes and learniing the ropes with VB.NET express Here's my question - say I have a want to manage a list of books. Each book has an Author, Title and ISBN Now, I am...
36
by: utab | last post by:
Dear, I have experince in C( numerical projects, like engineering problems, scientific applications) I have the basic notion of C++ also, I have read Accelerated C++ until Chapter 7, however it...
0
by: happy | last post by:
you can take a look for this web sites http://www.imanway.com/vb/forumdisplay.php?f=90 http://www.geocities.com/islamone_l/index.htm or read this ...
11
by: Diego Martins | last post by:
for me, these items are in the 'tricky zone' of C++ does anyone know good material with that? (dealing with subtle details, pitfalls, good practices...) anything like the Effective series from...
56
by: nembo kid | last post by:
What do you think about the following book: C How to Program, 5/E (Harvey & Paul) Deitel & Associates, Inc. <http://www.pearsonhighered.com/educator/academic/product/0,3110,0132404168,00.html>...
8
by: wangdaixing | last post by:
I am reading "Programming .NET Components" 2nd Edition by Juval Lowy, O'Reilly. In Appendix E, there is a chapter "Coding Practices" which I agree and practice mostly. However, there are a few...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.