none
automatic email help RRS feed

  • Question

  • I have an email that I created that is triggered when the user connects to a third party api to pull records using a button control.  If the pull is successful, the email gets sent out along with some on the fly calculations that come from the third party.  My guestion is where should i put this method?  the app is based on MVP architecture.  I feel it would be fine to put this in the presenter file.  This file is where the methods for the button are and where it checks for any errors that may have happened in the integration web service.   It was suggested to me to put the method within the web service itself.   i feel the web service integration is not meant for this type of functionallity.   i understand it is a matter of preference but ....need some opinions from the pros.

     

    Much thanks

    Amy


    Amy Maestas
    Friday, January 27, 2012 3:53 PM

All replies

  • Personally, I would probably put it in the web service. The presenter should include all of the logic required to make the UI function, but other business logic which is not related to the UI should go in another layer.
    Check out My Blog. Now updated to actually work!
    Friday, January 27, 2012 4:20 PM
  • I would say, it depends on the need of using your email functionality. It doesn't matter which architecture you are using  (for your scenario). We can also add the common functionalities under the common class under common folder.

    We can create a project called "Bussines", under that will create a folder called Model, Presenter and Common. If your feel that your functionality is going to change frequently or going to access by other party, then we can go with webservice, if not simply create a class file inside the common folder in Business and make use of it.
    Thursday, February 2, 2012 9:07 AM