Menu

#2 calling other methods than perform

open
nobody
Suggestion (3)
5
2002-07-11
2002-07-11
Anonymous
No

I am not sure if this breaks the integrity of the maverick
MVC, but I like the flexiblity to call different methods
from a command, other than perform. What is your
opinion on this. I altered the code to allow for
method="" in the maverick.xml for controllers to specify
a method to call, otherwise default to the perfom
method. I accomplished this by altering the following
files

CommandControlled
CommandSingleView
CommandManyViews
ConfigLoader

basically using reflection to instantiate the class and
method that was specified. Everything seems to be
working the same so I suppose that I didnt cause any
problems with this. Once again if you are interested in
this and it doesnt violate the integrity of maverick I can
send the code changes. For our application we wanted
these two features but now that I have made the
alterations it makes it difficult to upgrade to new
versions of maverick without having to realter the code
again.

Thanks

Discussion

  • jim moore

    jim moore - 2002-07-19

    Logged In: YES
    user_id=559559

    You should be able to do this without modifying maverick. In
    the perform method, just check for the method param and call
    the appropriate method yourself based on this value. The
    mthod to call could be decided by a series of if conditions or
    you could just use reflection to try and directly call whatever
    was passed in. Either way I think you will get the result you
    need without branching maverick.

     
  • Nobody/Anonymous

    Logged In: NO

    Yes but who wants a series of if staments in there code
    unless they have to have them. It makes more since to
    handle this at a higher level, and ultimately gives more
    flexibility to the developer.

     
  • jim moore

    jim moore - 2002-07-19

    Logged In: YES
    user_id=559559

    moving this discussion to the mail list.

     

Log in to post a comment.

MongoDB Logo MongoDB