Loading ...
Sorry, an error occurred while loading the content.

Interface clean up

Expand Messages
  • pkaluski
    Hi, I believe, we should consider an interface clean up for WGT (Win32::GuiTest). These are the main areas, which IMHO deserve some effort: 1. Some public
    Message 1 of 6 , Feb 14, 2005
    • 0 Attachment
      Hi,
      I believe, we should consider an interface clean up for WGT
      (Win32::GuiTest). These are the main areas, which IMHO deserve some
      effort:
      1. Some public functions (like PushChildButton) do not check too
      strictly what parameters do they get. Instead, they try to be smart
      and find the best workaround.
      This is nice for ad hoc scripts. However, in longer term, may lead to
      unexpected results and less readable code in bigger testing
      frameworks. See
      http://www.piotrkaluski.com/automation/gui/carfl_pushcb.html.

      2. Some functions (like FindWindowLike) have many parameters. They
      would be easier to use (and the code would be more readable) if we
      pass parameters by hash. So instead of writing:

      FindWindowLike( $parent, undef, undef, $ctrl_id, $level );

      we would write

      FindWindowLike( parent => $parent,
      child_id => $ctrl_id,
      depth => $level );

      It would also allow bigger flexibility in future enhancements.

      The sooner we do it, the better. I hope, WGT is not used to the
      extent that if we change it, we will break some big frameworks, which
      reguired severel man-months to create

      What do you think?

      -Piotr
    • Gabor Szabo
      ... I think it would be good to have a cleanup but it is too late. I think you can t do that without breaking code of some people. I d think either doing it
      Message 2 of 6 , Feb 14, 2005
      • 0 Attachment
        On Mon, 14 Feb 2005, pkaluski wrote:

        > The sooner we do it, the better. I hope, WGT is not used to the
        > extent that if we change it, we will break some big frameworks, which
        > reguired severel man-months to create
        >
        > What do you think?

        I think it would be good to have a cleanup but it is too late.
        I think you can't do that without breaking code of some people.

        I'd think either doing it for the next major release and giving people
        enough warning or maybe to have a wrapper around the module with
        this new interface but in another Namespace.

        Actually you can build an OOP interface over the current module
        and namespace with a better interface for the functions.

        This way people can still use the module in a backword compatible way
        importing functions while they can get a - hopefully ;) -
        cleaner interface using OOP.


        Gabor
      • Dennis K. Paulsen
        Hello Everyone, There are many things that can be improved.... An interface change by itself seems to be insufficient to be justified as a mid-scale project,
        Message 3 of 6 , Feb 17, 2005
        • 0 Attachment
          Hello Everyone,
          There are many things that can be improved.... An interface change
          by itself seems to be insufficient to be justified as a mid-scale
          project, without some other major overhalls thrown in.... Hope that
          made sense... A big question is where will the resources
          (personnel) come from? We have enough of these good ideas to fill a
          small book, but insufficient resources to do the work (it seems).
          Thoughts?


          -D

          --- In perlguitest@yahoogroups.com, "pkaluski" <pkaluski@p...> wrote:
          >
          > Hi,
          > I believe, we should consider an interface clean up for WGT
          > (Win32::GuiTest). These are the main areas, which IMHO deserve
          some
          > effort:
          > 1. Some public functions (like PushChildButton) do not check too
          > strictly what parameters do they get. Instead, they try to be
          smart
          > and find the best workaround.
          > This is nice for ad hoc scripts. However, in longer term, may lead
          to
          > unexpected results and less readable code in bigger testing
          > frameworks. See
          > http://www.piotrkaluski.com/automation/gui/carfl_pushcb.html.
          >
          > 2. Some functions (like FindWindowLike) have many parameters. They
          > would be easier to use (and the code would be more readable) if we
          > pass parameters by hash. So instead of writing:
          >
          > FindWindowLike( $parent, undef, undef, $ctrl_id, $level );
          >
          > we would write
          >
          > FindWindowLike( parent => $parent,
          > child_id => $ctrl_id,
          > depth => $level );
          >
          > It would also allow bigger flexibility in future enhancements.
          >
          > The sooner we do it, the better. I hope, WGT is not used to the
          > extent that if we change it, we will break some big frameworks,
          which
          > reguired severel man-months to create
          >
          > What do you think?
          >
          > -Piotr
        • pkaluski
          Hi Dennis, I feel some sarcasm in your post where you comment on many ideas being posted here. Do you think it would be better if we don t share and don t
          Message 4 of 6 , Feb 17, 2005
          • 0 Attachment
            Hi Dennis,
            I feel some sarcasm in your post where you comment on many ideas
            being posted here. Do you think it would be better if we don't share
            and don't discuss our ideas?
            I am personaly not under impression that this forum is full of ideas.
            If you look carefully, most of the posts are "How do I do xxx".
            I do understand your frustration that development of WGT does not get
            much support from people. And we all appreciate your involvement.
            However, every bigger code change (like changing the interface)
            should not take place without a prior discussion. Surely, discussion
            may deviate towards beging purely religious and phylosophical. There
            is a moment when you have to say "OK. Let's stop talking. Show me the
            code". But I don't think our discussions on WGT has reached that
            point.
            Discussion is inevitable in Open Source development. This is one of
            the most important factors, which makes the good code. I don't mind
            being reminded that I should feel guilty for not participating to the
            development (I do feel guilty and will try to change it:)). But I do
            mind discoraging people from sharing their opinions and ideas.

            -Piotr


            --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
            <ctrondlpaulsden@y...> wrote:
            >
            >
            > Hello Everyone,
            > There are many things that can be improved.... An interface change
            > by itself seems to be insufficient to be justified as a mid-scale
            > project, without some other major overhalls thrown in.... Hope
            that
            > made sense... A big question is where will the resources
            > (personnel) come from? We have enough of these good ideas to fill
            a
            > small book, but insufficient resources to do the work (it seems).
            > Thoughts?
            >
            >
            > -D
            >
            > --- In perlguitest@yahoogroups.com, "pkaluski" <pkaluski@p...>
            wrote:
            > >
            > > Hi,
            > > I believe, we should consider an interface clean up for WGT
            > > (Win32::GuiTest). These are the main areas, which IMHO deserve
            > some
            > > effort:
            > > 1. Some public functions (like PushChildButton) do not check too
            > > strictly what parameters do they get. Instead, they try to be
            > smart
            > > and find the best workaround.
            > > This is nice for ad hoc scripts. However, in longer term, may
            lead
            > to
            > > unexpected results and less readable code in bigger testing
            > > frameworks. See
            > > http://www.piotrkaluski.com/automation/gui/carfl_pushcb.html.
            > >
            > > 2. Some functions (like FindWindowLike) have many parameters.
            They
            > > would be easier to use (and the code would be more readable) if
            we
            > > pass parameters by hash. So instead of writing:
            > >
            > > FindWindowLike( $parent, undef, undef, $ctrl_id, $level );
            > >
            > > we would write
            > >
            > > FindWindowLike( parent => $parent,
            > > child_id => $ctrl_id,
            > > depth => $level );
            > >
            > > It would also allow bigger flexibility in future enhancements.
            > >
            > > The sooner we do it, the better. I hope, WGT is not used to the
            > > extent that if we change it, we will break some big frameworks,
            > which
            > > reguired severel man-months to create
            > >
            > > What do you think?
            > >
            > > -Piotr
          • Dennis K. Paulsen
            Keep the ideas coming, we do not want to hinder that kind of development either... :-) However, yes, I may show a little frustration here and there, not
            Message 5 of 6 , Feb 20, 2005
            • 0 Attachment
              Keep the ideas coming, we do not want to hinder that kind of
              development either... :-)

              However, yes, I may show a little frustration here and there, not
              directed at anyone in particular, lack of time all around.


              Regards,
              D

              --- In perlguitest@yahoogroups.com, "pkaluski" <pkaluski@p...> wrote:
              >
              > Hi Dennis,
              > I feel some sarcasm in your post where you comment on many ideas
              > being posted here. Do you think it would be better if we don't
              share
              > and don't discuss our ideas?
              > I am personaly not under impression that this forum is full of
              ideas.
              > If you look carefully, most of the posts are "How do I do xxx".
              > I do understand your frustration that development of WGT does not
              get
              > much support from people. And we all appreciate your involvement.
              > However, every bigger code change (like changing the interface)
              > should not take place without a prior discussion. Surely,
              discussion
              > may deviate towards beging purely religious and phylosophical.
              There
              > is a moment when you have to say "OK. Let's stop talking. Show me
              the
              > code". But I don't think our discussions on WGT has reached that
              > point.
              > Discussion is inevitable in Open Source development. This is one
              of
              > the most important factors, which makes the good code. I don't
              mind
              > being reminded that I should feel guilty for not participating to
              the
              > development (I do feel guilty and will try to change it:)). But I
              do
              > mind discoraging people from sharing their opinions and ideas.
              >
              > -Piotr
              >
              >
              > --- In perlguitest@yahoogroups.com, "Dennis K. Paulsen"
              > <ctrondlpaulsden@y...> wrote:
              > >
              > >
              > > Hello Everyone,
              > > There are many things that can be improved.... An interface
              change
              > > by itself seems to be insufficient to be justified as a mid-
              scale
              > > project, without some other major overhalls thrown in.... Hope
              > that
              > > made sense... A big question is where will the resources
              > > (personnel) come from? We have enough of these good ideas to
              fill
              > a
              > > small book, but insufficient resources to do the work (it
              seems).
              > > Thoughts?
              > >
              > >
              > > -D
              > >
              > > --- In perlguitest@yahoogroups.com, "pkaluski" <pkaluski@p...>
              > wrote:
              > > >
              > > > Hi,
              > > > I believe, we should consider an interface clean up for WGT
              > > > (Win32::GuiTest). These are the main areas, which IMHO deserve
              > > some
              > > > effort:
              > > > 1. Some public functions (like PushChildButton) do not check
              too
              > > > strictly what parameters do they get. Instead, they try to be
              > > smart
              > > > and find the best workaround.
              > > > This is nice for ad hoc scripts. However, in longer term, may
              > lead
              > > to
              > > > unexpected results and less readable code in bigger testing
              > > > frameworks. See
              > > > http://www.piotrkaluski.com/automation/gui/carfl_pushcb.html.
              > > >
              > > > 2. Some functions (like FindWindowLike) have many parameters.
              > They
              > > > would be easier to use (and the code would be more readable)
              if
              > we
              > > > pass parameters by hash. So instead of writing:
              > > >
              > > > FindWindowLike( $parent, undef, undef, $ctrl_id, $level );
              > > >
              > > > we would write
              > > >
              > > > FindWindowLike( parent => $parent,
              > > > child_id => $ctrl_id,
              > > > depth => $level );
              > > >
              > > > It would also allow bigger flexibility in future enhancements.
              > > >
              > > > The sooner we do it, the better. I hope, WGT is not used to
              the
              > > > extent that if we change it, we will break some big
              frameworks,
              > > which
              > > > reguired severel man-months to create
              > > >
              > > > What do you think?
              > > >
              > > > -Piotr
            • peterkayatwork
              ... I myself don t use the code (yet), so I hardly count, but you could always put a wrapper around it, something like Win32::GuiTest::Clean (or ::Simple, or
              Message 6 of 6 , Mar 11, 2005
              • 0 Attachment
                --- In perlguitest@yahoogroups.com, "pkaluski" <pkaluski@p...> wrote:
                >
                > Hi,
                > I believe, we should consider an interface clean up for WGT
                > (Win32::GuiTest).

                I myself don't use the code (yet), so I hardly count, but you could
                always put a wrapper around it, something like Win32::GuiTest::Clean
                (or ::Simple, or ::Complicated depending on how you look at it).

                I do prefer your suggest changes! But as I said, I don't use it yet,
                so I barely count!

                --Peter
              Your message has been successfully submitted and would be delivered to recipients shortly.