Skip to Content
author's profile photo
Former Member

what are the advantages..

Hi friends,

can you please tell me <b>what are the advantages of using MVC?</b> because <b>i can use ABAP Objects without using MVC.</b>

Thanks in advance,

Regards,

Kannan.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    author's profile photo
    Former Member
    Oct 07, 2005 at 06:12 AM

    Hi Kannan,

    MVC is just a design pattern which is object oriented. You can carry out object oriented developement using Application classes also.

    The MVC design pattern contains a clear seperation between the processflow, application logic, and presentation logic. This is the main advantage offered by MVC.

    For usage of controllers, Views you can refer to SAP help for clear understanding.

    Hope this helps,

    Regards,

    Ravikiran.

    PS: Do assign points for helpful replies.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 07, 2005 at 03:23 AM

    All BSP applications that you created with SAP Web AS 6.10 can also be executed without MVC. In general, you do not need to change anything.

    The MVC design pattern provides you with various advantages,

    If your pages are dynamically composed of several parts (components)

    A controller can assemble a page from several views. As a result, the layout is componentized.

    If input processing is so complex that it should be subdivided into different methods

    A controller offers great flexibility, especially during input processing, since you can create and call new methods.

    If the system cannot decide which page comes next until input processing, we recommend that you let the controller branch to different views.

    If redirects using navigation can lead to performance problems (such as slow diversion)

    If visualization logic is fairly important, since you can use MVC to separate the logic from the layout

    If the layout from a different person is being processed as the visualization logic

    If parts of the layout should be created by the program, such as by a generating program or an XSLT processor

    Regards,

    J

    Do Award Points for helpful ans .

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Thanks for your quick responce. in your answer u said,

      <b>If your pages are dynamically composed of several parts (components)

      A controller can assemble a page from several views. As a result, the layout is componentized.</b>

      can you please give me how can we create dynamically composed of several parts.

  • author's profile photo
    Former Member
    Oct 07, 2005 at 04:37 AM

    Hi Kanna,

    For Dynamically componentised you need to use controller.In the main page you partition for what you want to present dynamically and then call controller as a response to the user.What the action you have take in case of Page flow logic(Event Handler) need to be placed in controller.

    Using the MVC design pattern has the following advantages:

    · Structuring BSP applications is simplified, since the view is cleanly separated from the controller and the model. This not only facilitates changing BSP applications, but also considerably improves their maintenance.

    · You have the option of generating program-driven layout. The HTML/XML output is therefore created by program code instead of a page with scripting.

    · Navigation using the <bsp:goto> element and call using the <bsp:call> element. The advantage of using <bsp:goto> navigation over redirect is that there is no additional network traffic. Furthermore, you remain in the same work process, which can have advantages for creating objects and memory space. The call using <bsp:call> element is more variable than adding them using INCLUDEdirective, since it is triggered at runtime.

    With the call option using <bsp:call>, you can also distribute the user interface into components.

    · Optimized performance due to fewer redirects.

    · Intuitive and east-to-use interface for application development.

    Main advantage of MVC is that you can keep these(Model View ,Controller) separately.If you need to change in logic you do not have to worry about presentation(View).

    Regards,

    Albert

    Add comment
    10|10000 characters needed characters exceeded