4 Replies Latest reply: Aug 20, 2010 7:19 PM by jschellSomeoneStoleMyAlias RSS

    "Parameter selection" framework?

    843853
      I am implementing an application that use a gui to make it possible for a user to update parameters (strings) in a file. It basically boils down to the following:


      1) read the current parameters from an already existing file.

      2) read the new parameters from an external file.

      3) compute the "initial" parameters which corresponds to subtracting the new from the current parameters.

      4) present the "initial" parameters to the user in a gui box.

      5) wait for user to select which parameters to add to the file.

      6) based on the user selection add the selected parameters to current parameter (the already existing parameter should still be available) and update the file.


      My current approach is pretty much based on implementing each of the above steps from scratch and using a swing gui to handle the user input which I have also implemented from scratch.

      But I was wondering if there was an already existing "framework" that could be used for this kind of application instead of having to maintain all the above code?

      Further the current approach is hard to extend, I need to do a lot for changes to support eg. deletion of parameters and it could be nice to makes this easier. Any suggestions?
        • 1. Re: "Parameter selection" framework?
          843853
          file 1 contains data
          5
          6

          file 2 contains data
          1
          2

          your current algoritm changes file 1 data to
          4
          4

          Am I correct or is it something else.

          It would be easy if you mention what all operations you are planning to support and how you are expecting it to work.
          When you say deletion, what do you mean it should delete the contents from file 1/ file 2.
          • 2. Re: "Parameter selection" framework?
            843853
            Not quite its more like:

            file 1 contains data
            a,b,c


            file 2 contains data
            a,b,c,x,y

            user selects x and file 1 is updated to:
            a,b,c,x

            Some operations used in this process is: set intersection, union, difference. Regarding deletion its simply removing already existing parameters from the file.

            But I was considering if it was possible to "model" these operations on a higher level using a framework instead of implementing everything from scratch (more prone to errors and higher maintenance). I have looked at the eclipse emf framework but it does not seem like the right direction.

            The closest so far I have found is the command pattern in relation to transactions described in:

            http://www.amazon.com/Software-Development-Principles-Patterns-Practices/dp/0135974445/ref=sr_1_3?ie=UTF8&s=books&qid=1282030370&sr=8-3

            but any input are welcome!
            • 3. Re: "Parameter selection" framework?
              843853
              Not sure if there is any existing framework, but this looks close to strategy pattern to me.
              • 4. Re: "Parameter selection" framework?
                jschellSomeoneStoleMyAlias
                mort.motes wrote:
                But I was wondering if there was an already existing "framework" that could be used for this kind of application instead of having to maintain all the above code?
                I don't see anything in the description that suggests that there is a lot of code to maintain.

                Introducing libraries which are not used elsewhere into a simple projects will increase maintenance costs not lower them.