Skip to Content
author's profile photo Former Member
Former Member

OOP's ABAP

Hi,

I want to know under which scenario Singleton concept has to be implemented?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2007 at 09:12 AM

    Hi Perumal,

    Singleton is a design pattern and u might already be aware of that. singleton pattern is a design pattern that is used to restrict instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. Sometimes it is generalized to systems that operate more efficiently when only one or a few objects exist. It is also considered an anti-pattern since it is often used as a euphemism for global variable.

    Regards,

    Kiran Kumar Somaroutu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2007 at 09:10 AM

    Hi Perumal,

    Singleton is a design pattern and u might already be aware of that. singleton pattern is a design pattern that is used to restrict instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. Sometimes it is generalized to systems that operate more efficiently when only one or a few objects exist. It is also considered an anti-pattern since it is often used as a euphemism for global variable.

    Regards,

    Kiran Kumar Somaroutu

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 11, 2007 at 09:08 AM

    HI,

    You will use SINGLETON when you need to have only once instance of class , For example a SHOPPING CATALOG where everyone should see the same list of objects, in that case you willl store this instance as singleton so that the changes one makes are evident to others as soon as possible.

    IN SAP if you use STATIC To implement singleton then it is SINGLETON for the user for the session, if you want single instance across the application you have to use shared objects.

    Regards,

    Sesh

    Message was edited by:

    Seshatalpasai Madala

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2007 at 09:15 AM

    Hi,

    Go thru the following Blog,

    /people/w.roosendaal/blog/2006/06/09/singleton-classes-in-java-beans

    Regards,

    Padmam.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.