• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

OO Design help

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have been searching for a good article which describes OO Design with an example. Can anybody help me on this. I have seen the ones with lots of theory. I want one with example explaining step by step.

Thanks in advance
 
Ranch Hand
Posts: 904
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found these links: (from the JavaRanch OODesign links section)

OO Tips
http://www.ootips.org/
Object Mentor Articles
http://www.objectmentor.com/resources/listArticles?key=topic&topic=Object%20Oriented%20Design
UML certification
http://www.whizlabs.com/uml/uml-certification.html

If you wan't to be serious about OOA & D Design, then I would recommend that
you find a good book about a subject (I can't realy recommend anyone since
the basic OO Design books I've read are in danish).
Try to take a look at the Bunkhouse, Amazon or something similar.
 
Ranch Hand
Posts: 872
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ooptips ,very interesting read. Check out this link. I have been trying to say this many times before but my mastery of the English language does not allow for it.

http://www.ootips.org/static-typing.html
[ March 18, 2005: Message edited by: Gerald Davis ]
 
blacksmith
Posts: 1332
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gerald Davis:

http://www.ootips.org/static-typing.html

Heh. The day I see an industrial strength application written in Smalltalk deployed, I'll believe what he says. Experience with the other primary family of languages without static typing - assembly - indicates that static typing saves maybe 50% of development costs.

The fact remains that static typing catches perhaps 90% of the bugs. Even if you have tests with 100% code coverage, they don't catch everything, and some will escape into the wild. With static typing, only 10% as many escape.

In an academic environment, where 10% of the bugs may be a third of a bug on average, and you get maybe 3 bugs without static typing, this may not be a big deal. In a million line application where you are talking about the difference between 50 bugs and 500 bugs, it's a very big deal.

Of course there are also applications where you don't really care if the behavior is a little different than expected, and because you didn't have a detailed specification to start from, you don't call them "bugs". Many academic applications fall into this category. That approach won't fly for most commercial applications, though ("just hit the 'transfer' button - we think it will transfer $100 to the other person's account, but if it doesn't, it will do something kind of similar").
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Warren Dew:
The day I see an industrial strength application written in Smalltalk deployed, I'll believe what he says.



I know a company who has developed/maintained a bunch of Smalltalk apps for banks and the chemical industry. Many of them are now getting replaced by Java apps, but mostly for *political* reasons, not for technical ones, as far as I can tell.

Experience with the other primary family of languages without static typing - assembly - indicates that static typing saves maybe 50% of development costs.



With all due respect, comparing Smalltalk to assembly is really silly.

Every single developer I know who has developed in both Java and Smalltalk swears that he is much more effective in Smalltalk. I didn't yet have the chance to use Smalltalk on a project, but with the little I know, I can easily see where that would be coming from.

The fact remains that static typing catches perhaps 90% of the bugs.



Where does that fact come from? It doesn't sound right to me.

Anyway, even if static typing would catch those bugs, that doesn't mean that those bugs wouldn't be catched by the tests without static typing. After all, a typing error almost always also is a logical error.

And, btw, some typing errors in statical languages aren't logical errors at all, such as trying to call the close method on a socket instead of an input stream.
 
Gerald Davis
Ranch Hand
Posts: 872
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ilja Preuss
Very true, static typed languages don�t catch all types of errors. You can�t depend on static typing alone you need assertion and unit testing. If I want static typing in Python , I use assertions. Assertion are also much more flexible and you can make them check types also.

However, I do see the benefits of replacing dynamically typed languages with statically typed ones. When the application is in a mature state, the benefits of statically typed language are speed and more type checking.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My impression is that with modern testing techniques, the static type checks have much less value. And unfortunately in the mainstream languages (such as Java), static typing also comes with manifest typing, which makes the code much more wordy and less flexible. So at one scale it might improve productivity (by finding some more bugs), but on another it also hampers it (by making the code more rigid). My gut feel says that in many situations the latter effect is more dominant.
 
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

If you wan't to be serious about OOA & D Design, then I would recommend that
you find a good book about a subject (I can't realy recommend anyone since
the basic OO Design books I've read are in danish).


i'm loving this book!
check it also at amazon
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Warren mentioned assembly. I loved IBM mainframe 370 assembler, partly because I could take a letter of a word and use it as an index into an array or any kind of weird thing. But I find I don't really miss doing that in Java.

My other favorite language ever is REXX which has a concept of storing variables both as string and number (if possible) and using whichever is appropriate at the moment.

Also note that a blank is a string concatenation operator. I don't see untyped langauges as bad, but I guess I appreciate the help the compiler and the IDE give me based on types.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic