0

as my username denotes, I am an MVC noob wishing to better understand coding MVC/OOP concepts.

So, using PayPals payment system as an example, I have a PayPalController with three ActionResults: IPN, PDT, and Checkout. [This is all very basic stuff – and almost a carbon copy of RobConn’s Tutorial]. What I've noticed is that a majority of the code will remain static, with only a portion of user specific code being added to in differing website situations. What I would like to achieve, is a way to make the controller more re-usable; as in, a coder would just have to write code for IPN-verified, IPN-unsuccessful etc. Immediately what springs to mind is to just have empty functions called at those points so the coder could just fill them in when required, but this seems a little too simplistic to me. I don't know much about interfaces and abstractions [currently reading up on them], but somehow I feel the answer lies within them?

So basically, what would be the best approach to such a situation and why. Thanking you kindly, MVC Newbie

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy