Skip to Content
avatar image
Former Member

Webdynpro MVC Architecture

Hi,

I have this q in mind for a long time and even after surfing a lot, am unable to get the proper answer.

According to MVC model we need to have the business logic seperately in a model.

can anyone pls explain me why the performance will be affected if I put a select query in view hook methods or some where directly without a model ( FM or class methos) .

Thanks

Nags.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 08, 2010 at 11:59 PM

    >can anyone pls explain me why the performance will be affected

    the performance that will be impacted is your support team's performance. And potentially your future development team's if they ever try to get some reuse out of your development.

    MVC is about building/designing in a easier to understand/reuse manner. Never assume to support your development yourself.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 15, 2010 at 09:32 AM

    Thanks Thomas Jung & Chris Paine .

    One more thing, as a best practice I was asked to create all the nodes globally in component controller and then I shd use that in my local view controller.

    Is it a best practice.

    Thanks.

    Add comment
    10|10000 characters needed characters exceeded

    • The other advantage is that you can remove non-view specific functionality from the view. By having your context in the controller you can abstract control logic from display logic, but still use the same data. Then in the future you can easily implement another view for your component to display/manipulate the same information in a different way - whilst still using the common controller functionality -> the separation of the C and the V in MVC.

  • Sep 07, 2010 at 12:28 PM

    >can anyone pls explain me why the performance will be affected

    Who said that MVC has anything to do with runtime performance? If you think that is the point of MVC, then you are mistaken. It doesn't have anything to do with runtime performance. MVC and the rules in WDA about not putting SQL direclty into the controller methods is about enforcing better organiation of your code. This improves long term maintainability of the application.

    Add comment
    10|10000 characters needed characters exceeded