Results 1 to 3 of 3

Thread: Is it a good practice or good idea to have a stock of actions?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2015
    Location
    Barquisimeto, Venezuela
    Posts
    24
    Thanks
    2
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Android

    Question Is it a good practice or good idea to have a stock of actions?

    Hi my friends, today I come with the following questions.

    I am trying to create a basic structure type RCP but extensible by means of plugins for my applications and thus not having to copy and paste and modify some other things before starting a new project.

    The doubts are the following:

    1-. Is it a good practice or good idea to have a stock of actions for the application? (so there are actions that are needed in different contexts, but the exact same thing must be performed)
    2-. On the other hand and in the same order of ideas, it would be a good practice or good idea to work with a factory of actions (factory pattern)?

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Is it a good practice or good idea to have a stock of actions?

    1-. Is it a good practice or good idea to have a stock of actions for the application? (so there are actions that are needed in different contexts, but the exact same thing must be performed)
    2-. On the other hand and in the same order of ideas, it would be a good practice or good idea to work with a factory of actions (factory pattern)?
    I personally could not understand quite what you mean (especially with your first point).
    Never the less, using specific patterns is not on its own a good or bad practice - such things are case specific - in one case it might be better to use a factory in another maybe not.
    The use case is important, and you didn't say much about it, so its hard to say.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. The following user says thank you to high_flyer for this useful post:

    remizero (6th May 2018)

  4. #3
    Join Date
    Jan 2015
    Location
    Barquisimeto, Venezuela
    Posts
    24
    Thanks
    2
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Android

    Wink Re: Is it a good practice or good idea to have a stock of actions?

    Hello high_flyer

    Thank you for responding and sorry for my tardiness.

    What I am looking for is to have a list of actions to be reused for menus and toolbars, as well as to subclassify the QActions to add customized data or characteristics so that the contexts receive mixed types of QActions, since some complements require actions "global" of the application.

    On the other hand, I have resolved to apply the QAction list in a convenient way to do what was proposed in my initial post

Similar Threads

  1. Replies: 1
    Last Post: 22nd April 2013, 18:50
  2. Replies: 10
    Last Post: 2nd April 2013, 17:39
  3. Is creating yet another IDE a good idea?
    By piotr.dobrogost in forum Qt Tools
    Replies: 20
    Last Post: 31st July 2009, 08:38
  4. Replies: 4
    Last Post: 13th May 2009, 18:50

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.