I'm wondering, in which cases to use a static method or when to use a Command in PureMVC?
Static methods have their place, but usually within a class for its own use. I never use static methods if there is a way to avoid it. It is the sort of tight-coupling that MVC is intended to provide an alternative to. If I'm integrating with a third party library that implements them, I'll still mediate the offending class and only allow my application to communicate with it via the Mediator.
there is no reasonable Exception-Handling possible and Commands have no return value.
Certainly you can handle exceptions inside commands, Try/catch works as well in a command as anywhere else. You can send notes off to trigger other commands based on the trapping of errors or the sucessful completion of the command.
A case in point, I just implemented this in a client's application. I handling all fatal errors that can occur during a very complex startup by triggering a command that sends a Mediator a note creates the error display component (not just an Alert), with the error, and the mediator displays the error in its view component (a viewstack) by injecting this error component and displaying it. The Mediator had to be registered up front before the rest of the view was complete, but otherwise this was a straightforward thing to deal with.
there will be a function which will be called repeatedly from many Commands.
Then why not make an abstract command subclass that has this method and have all your concrete commands that need this method subclass your abstract command?
-=Cliff>