Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OOP properganda

 
Gerald Davis
Ranch Hand
Posts: 872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While I was reading some ant-oop material it mentioned about most books on object orientation design being about GUI or various small scale thing , and there not being much on object oriented business modelling.

Don't take me as a madman but object orientated technology is mostly a myth. I used to be a VB hating Object Oriented Purist. I would not listen to those older and wiser them myself ,until experienced developer talked about design patterns.Then it occurred to me that he has been to the land of oop and did not like it.

He went on to tall me that Object Oriented Design is to a functional developer, as EJB is to an Object Oriented developer. I don't know how things have change since I used EJB but I found it hard to set up, very slow and has a high learning carve. Even though I don't stay up to date with IT like I used to, I am almost certain that EJB has not caught on, and Java seem to in much the same situation as George W Bush is in today; most support him but there are plenty of anti's out there.

Check this out http://www.geocities.com/tablizer/meyer1.htm
Do do a google search "oop myths" read it and weap.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, but what does this have to do with Object Relational Mapping?
 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In all my experience, the OOP world is the best way to do things.
Hi Mark. I am only beginning to learn OO design principles, how to decompose a problem into objects and collaborations, and how to recognize and use patterns.

Meanwhile, I accidentally wandered into the world of functional programming and Scheme (a dialect of Lisp). I suspect this paradigm is not inferior to OO. I want to learn enough to know if it is better than OO.
[ November 09, 2004: Message edited by: Marlene Miller ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it is definitely off topic.

I am going to move this to the OOP forum, where it will get the correct attention that it needs.

But as to make a comment, I have been programming for 27 years now. I started at the age of 9. I have developed in Java, Foxpro, Visual Foxpro, Visual Basic. VB.net, Pascal, COBOL, Oracle PL/SQL, Oracle Forms, and other frameworks. In all my experience, the OOP world is the best way to do things. In structural programming, costs of maintenance and readability are, in my mind, at least 10 times more expensive. It is easy to see in the OOP world of this, when I see structural code in Java. The toughest part of OOP is the learning curve, but once you have gotten half way down the curve, you can see the huge tremendous improvement OOP has over structural programming. I have even learned how to make the most of Structural programming, to use some of OOP principles to make the code better, but it still does not come close.

Now the OOP feel in EJB, is different, currently, there are better ways, and the learning curve is too high. However, EJB 3.0 will take care of those issues.

Plus, there are many "patterns" and design approaches that can be made to offset the lower OOP of EJB, like just making them facades into Plain Old Java Objects. That is what we do here, and the architecture is really nice.

I have one motto that I follow. "Keep It Simple" this is true for Structural and Object Oriented programming.

OK, time to move this thread.

Mark
[ November 09, 2004: Message edited by: Mark Spritzler ]
 
Jeff Bosch
Ranch Hand
Posts: 805
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As with any tool, the program paradigm depends on the task at hand. For example, would OOP work on an 8-bit embedded controller with 2K words of program memory? Probably not, unless you're doing something very very simple, because OOP has a lot of overhead when compared to procedural languages. Remember, even Windows is written in C (at least it was until recently; I can't speak for anything after Win95 on that), and the C++ objects most programmers use are built to encapsulate the C code.

So, is there an easy, correct answer to the questions, "Is OOP the best way to go?" Sure, and the answer is, "That depends on the task at hand."
 
Sathya Srinivasan
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm...

The starter question is the same as this thread.

http://www.coderanch.com/t/99209/patterns/OOP-POO-functions-comming

So, I guess this is a repeat. Please post only one question so that the answers do not get divided.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what Jeff said.

If I was writing a simple app, like tracking sales bids that needs a Windows-like Rich GUI, I would go with VB instead. Now I could choose vb.net which would be OO, however, it also lends to many structural procedures too.

There are ways to take OO principles to the structural world, and remain structural. But that would take an entire book.

Mark
 
Gerald Davis
Ranch Hand
Posts: 872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mark Spritzler:
And what Jeff said.

If I was writing a simple app, like tracking sales bids that needs a Windows-like Rich GUI, I would go with VB instead. Now I could choose vb.net which would be OO, however, it also lends to many structural procedures too.

There are ways to take OO principles to the structural world, and remain structural. But that would take an entire book.

Mark


I used to be very racist against VB developers, seeing that you are one , I have now the opportunity to apologise too you. VB is indeed a wonderful language to work with and it's IDE is second to none. I have been such a fool to have been caught up in this Java OO hype. Even though I don't use VB because it costs money. I use Python and wxWindow much the same way that VB uses C++ GUI library.
 
Sathya Srinivasan
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gerald Davis:


VB is indeed a wonderful language to work with and it's IDE is second to none. I have been such a fool to have been caught up in this Java OO hype.


Whoa , let's not start bashing Java just because you like VB! After all, this is 'Java'Ranch
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
VB is a great tool, Java has no such cool UI builder. That doesn't really relate to a discussion of the qualities of procedural and OO at all, though it might be critical to your personal productivity and career choices. VB and PowerBuilder become more OO with every update, recognizing OO is a better way to organize code. When you say "button.enabled = true" (sorry don't really know VB syntax any more) you're dealing with objects whether you like em or not.
 
Gerald Davis
Ranch Hand
Posts: 872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sathya Srinivasan:


Whoa , let's not start bashing Java just because you like VB! After all, this is 'Java'Ranch


Just this once just to get it of me chest

What is it with the Java io package man!, why is it unnecessary complicated. Is it doing the Irish Jig. It seems to me these classes below were once only states. States! you know the 'true' 'false' 'readable' and 'writeable'. Now they have mutated into object themselves bloatware city on steroids . I danna think Bill Gates could have done a better job himself.
Imagine if we was to adopt this style to business modelling.

Employee = new EmployeesFromDepartment19FiredBeforeFebruary()

It doesn't look nice does it. One bad class I can understand, but a whole package full of tripe like this. Java is total pants.

What a mess; composition gone mad, what kind of design pattern is this.
data = new AsciiInputStream(new FileInputStream("data.dat"));

So many classes; make them into functions? why would you do a daft thing like that for!!?
PrintStream FileOutputStream InputStreamReader OutputStream WritableNonBufferedWindowsSocket bla bla bla bla

This is how IO should be in a sane man's language
s = OpenSocket(url, buffered=true, writable=true)

I feel so much better, I said my peace.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, yes, in Java some things are made harder than they need to be (though I'm not sure I fully agree with your analysis of the io package).

That doesn't have anything to do with OO, of course. There are better OO languages out there than Java, in my opinion. It's just hard to get paid working with them...
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The IO package is a great place to compare the philosophy of Sun/Java and Microsoft/VB/C#. The granularitiy of the Java classes can make you nuts at first. Heck, I still rely on code samples (my own) and the doc. But I have a method that takes a reader as input. I normally hook it up to a file. But for unit testing I can hook it up to a StringReader. For reuse I can hook it up to any reader. Flexibility is the goal / benefit. If you have a VB method that expects to read a File you'll have a hard time making it do anything else.

VB is focused on making normal stuff dead simple, which is a great thing. Java makes unusual stuff possible, which is also a great thing. VB can hit a wall trying to do complex things, and Java can frustrate with the learning curve to do simple things. Sigh. Life is like that.
 
Gerald Davis
Ranch Hand
Posts: 872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Stan James:
The IO package is a great place to compare the philosophy of Sun/Java and Microsoft/VB/C#. The granularitiy of the Java classes can make you nuts at first. Heck, I still rely on code samples (my own) and the doc. But I have a method that takes a reader as input. I normally hook it up to a file. But for unit testing I can hook it up to a StringReader. For reuse I can hook it up to any reader. Flexibility is the goal / benefit. If you have a VB method that expects to read a File you'll have a hard time making it do anything else.

VB is focused on making normal stuff dead simple, which is a great thing. Java makes unusual stuff possible, which is also a great thing. VB can hit a wall trying to do complex things, and Java can frustrate with the learning curve to do simple things. Sigh. Life is like that.



Something like s= OpenSocket(url, buffered=true, writable=true) could implement all that java style composition underneath on behalf of the programming.

VB can be quite flexible because it uses the mighty c++ library, VB is used merely as glue to control it. Speed of execution and simplicity. Ok VB is not the best language but so I use python instead it even has access to better gui tookit also. Poor old java AWT and Swing are weak in comparison.
 
Sathya Srinivasan
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gerald Davis:


...but so I use python instead it even has access to better gui tookit also. Poor old java AWT and Swing are weak in comparison.


With recent advances in Java IDEs, I don't think this is true anymore. I have used NetBeans, Eclipse, and Borland JBuilder IDEs to develop Swing applications and am very impressed with their capabilities and ease of use. They let you do everything that you can normally do with a VB GUI builder.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Poor old java AWT and Swing are weak in comparison.

True - Java's GUI implementations are poor when compared to GUI's written native code. But I don't see how an implementation of some functionality in a programming language based on a particular design philosophy really reflects on the soundess of that philosophy. Does the fact that its kind of difficult to get a GUI written in VB to run on Solaris mean procedural programming is crap? Ok I'm quite probably being facetiuos here, but so I supect are you.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know, python is a fully fledged OO language, isn't it?
 
Gerald Davis
Ranch Hand
Posts: 872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sathya Srinivasan:


With recent advances in Java IDEs, I don't think this is true anymore. I have used NetBeans, Eclipse, and Borland JBuilder IDEs to develop Swing applications and am very impressed with their capabilities and ease of use. They let you do everything that you can normally do with a VB GUI builder.


I have to admit some of the Java Ide save Java from a complete disaster, but Java Swing still remains too slow because it isn't implemented natively. The fact that Java doesn't implement wxWindows is complete insanity. wxWindows it is faster, better platform independence more features and more stable.
 
Gerald Davis
Ranch Hand
Posts: 872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ilja Preuss:
As far as I know, python is a fully fledged OO language, isn't it?


Object oriented it is much like perl, but you can use it in a functional way. I first found out about the language when I typed in executable pseudo into google . Jython is a java implementation of it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic