Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

. What are the main uses of Command design pattern?

Pragya Keshap answered on February 10, 2023 Popularity 2/10 Helpfulness 1/10

Contents


More Related Answers

  • Command pattern
  • command design pattern
  • command design pattern
  • How can you describe a design pattern?
  • What are the examples of Command design pattern in JDK?
  • 18. What is the Command design pattern and how is it used in Java?
  • command pattern design pattern

  • . What are the main uses of Command design pattern?

    0

    Command design pattern is a behavioral design pattern. We use it to

    encapsulate all the information required to trigger an event. Some of

    the main uses of Command pattern are:

    1. Graphic User Interface (GUI): In GUI and menu items, we

    use command pattern. By clicking a button we can read the

    current information of GUI and take an action.

    2. Macro Recording: If each of user action is implemented as

    a separate Command, we can record all the user actions in

    a Macro as a series of Commands. We can use this series

    to implement the “Playback” feature. In this way, Macro

    can keep on doing same set of actions with each replay.

    3. Multi-step Undo: When each step is recorded as a

    Command, we can use it to implement Undo feature in

    which each step can by undo. It is used in text editors like

    MS-Word.

    4. Networking: We can also send a complete Command over

    the network to a remote machine where all the actions

    encapsulated within a Command are executed.

    5. Progress Bar: We can implement an installation routine as

    a series of Commands. Each Command provides the

    estimate time. When we execute the installation routine,

    with each command we can display the progress bar.

    6. Wizard: In a wizard flow we can implement steps as

    Commands. Each step may have complex task that is just

    implemented within one command.

    https://learning.oreilly.com/library/view/learning-python-design/9781785888038/ch07s04.html

    Popularity 2/10 Helpfulness 1/10 Language java
    Source: Grepper
    Tags: command java uses
    Link to this answer
    Share Copy Link
    Contributed on Feb 10 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.