Skip to Content
avatar image
Former Member

Simple (maybe) MVC question.

I am wrestling with the application of the MVC concept in Web Dynpro.

Take for example a component that houses a generic CRUD. I might create within the the component 4 windows; one for create, read, update and display each. I also create the respective applications. Assume I want to point Portal iViews to those applications.

Now, here's where I am not clear on the best method. Considering a particular app will only load the appropriate window, lets use create for example, it makes sense to capture all of the logic for create independently of any other (such as update for instance) logic. I'd like to obey the MVC principles but seem to be getting mixed signals from the research I have done.

My question boils down to this: given the above scenerio, would, for instance, the create logic that access back-end services (model) be housed in a custom controller (built just for create functionality) or do I put all that logic into the actual create view controller instead?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 03, 2008 at 01:03 AM

    There is no definitive right or wrong answer here. Following MVC is less than a perfect sceince. The main point is to strive to encapsultate reusable parts of your application.

    That said, I'm not sure that I would break my application down into different windows or components for Change/Create/Display. Each of these different "views" on the same application have far too much in common.

    I would study the Object Instance Floorplan for Web Dynpro ABAP. It is designed for typical CRUD operations. Generally there is an initial screen that lets the user choose between create/change/display as opposed to the old way of having separate transaction codes. Then you break down the business object into separate components logically - one for headers, one for items, etc. If you want I can send you some screen shots of a sample application and of the new Web Dynpro ABAP version of order entry. Contact me - my contact info is listed in my SDN business card.

    Add comment
    10|10000 characters needed characters exceeded

    • >

      > Ok, from your comments I understand that the Floorplan Manager is a new WD tool aiming at helping create and structure this so-common CRUD components in a nice, reusable way, am I right?

      Yes that is the point. There is an Object Instance Floorplan which is good for CRUD and a Guided Activity Floorplan which is more for workflow kind of steps. The floorplans make the applications more consistent and increase the speed at which you can create them because the common parts are all supplied for you yet can be easily configured to meet your needs without additional coding.

      >

      > Unfortunately in my case i'm on SP12, so those packages don't even exist. Maybe i'll try to update my sneak preview (which is also SP12), do you know if this is possible (i know you wrote a weblog on the subject but for earlier SPs).

      > Otherwise I'll have to just wait.

      >

      > Regards

      Yes you would need to update your SP level and yes you can update NSP from SP12 to SP14 or SP15 if you have access to the Service Marketplace to download the update packages.