Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-19-2008, 02:20 PM
Member
 
Join Date: Jun 2008
Posts: 11
haiforhussain is on a distinguished road
singleton object ...
can anyone explain about singleton object and its use ....
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-19-2008, 02:25 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,039
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
It's all about a design pattern. I think it's better to find a article and read. Just Google it, you have a large number of such.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-19-2008, 02:56 PM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 524
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
Read this article...
__________________
A specific, detailed, simple, well elaborated, and "tested before asking" question may gather more quick replies. hopefully
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 06-22-2008, 05:10 AM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 255
fishtoprecords is on a distinguished road
Quote:
Originally Posted by haiforhussain View Post
can anyone explain about singleton object and its use ....
Once you've read what it is, please search google for all the reasons you should not use it.
Such as "Singleton Considered Stupid "

And check into the JUnit groups and see how using Singletons makes proper unit testing much harder.

In general, a Singleton is just a wad of global stuff. Good OO design avoids global stuff, as it increases coupling.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 06-23-2008, 06:02 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,039
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Quote:
Originally Posted by fishtoprecords View Post
In general, a Singleton is just a wad of global stuff. Good OO design avoids global stuff, as it increases coupling.
I agreed with you. So all this about encapsulations.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 06-23-2008, 06:14 AM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 255
fishtoprecords is on a distinguished road
Yes, good OO should be about abstractions and isolation. Coupling has been proven to make systems exponentially complex.

Sadly, a lot of Java, even professionally developed Java is not very good OO.
This bad Java will be the Year 2000 Cobol problem of the future, probably in five years or so.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 06-23-2008, 07:29 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,039
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Lots of people working on Java(other languages too) without knowing any about OO. Some people don't want to use it either. I don't know why, but in later they found full wired with further maintainability and expandability of the application.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 06-23-2008, 07:40 AM
fishtoprecords's Avatar
Senior Member
 
Join Date: Jun 2008
Posts: 255
fishtoprecords is on a distinguished road
I think part of it is that Java was cursed with a C-foundation, which greatly helped acceptance at first, but enables bad practices.

I did some professional Smalltalk, and while it wasn't long term useful (Smalltalk is dead) it forced you to think about OO seriously.

For a lot of applications, especially in the business domain, OO hasn't worked well. It works great for GUIs and other user interfaces, but gets hard to do with a payroll record.

Our continued use of Relational DBMS doesn't help.

This is probably moving a bit OT, probably should go into a less specific thread.


Quote:
Originally Posted by Eranga View Post
they found full wired with further maintainability and expandability of the application.
I'm not quite following this, perhaps its an idiom? or maybe typo? What is "fully wired" in this context? Thanks Pat
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 06-23-2008, 07:43 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,039
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Yes, seems now this is going out of the scope of this thread. Lets try is on different place...
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Whether to make Bean Singleton or non Singleton (prototype) Java Tip Java Tips 0 03-29-2008 01:41 PM
Singleton Pattern Java Tip Java Tips 0 01-24-2008 04:21 PM
Whether to make Bean Singleton or non Singleton (prototype) JavaBean Java Tips 0 09-26-2007 09:32 PM
Google Singleton Detector 0.7.2 levent Java Announcements 0 07-26-2007 09:12 PM
singleton pattern Peter Advanced Java 1 07-09-2007 05:45 AM


All times are GMT +3. The time now is 02:06 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org