cancel
Showing results for 
Search instead for 
Did you mean: 

Simple (maybe) MVC question.

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

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.

alejandro_bindi
Active Contributor
0 Kudos

This same thoughts about how to best create CRUD components reusing views and functionality invaded me a while ago.

Thomas, where this Object Instance Floorplan can be studied from? I ran a google search and found nothing but patents and a couple of SAP presentations which didn't really help to clarify the subject.

Thank you!

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> This same thoughts about how to best create CRUD components reusing views and functionality invaded me a while ago.

>

> Thomas, where this Object Instance Floorplan can be studied from? I ran a google search and found nothing but patents and a couple of SAP presentations which didn't really help to clarify the subject.

>

> Thank you!

Admittedly the floor plan manager for Web Dynpro ABAP is quite new. It was first delivered with 7.0 SPS 14 - just a few short months ago. It will see significant enhancements in the upcomming releases of 7.0 - mostly in the areas of the configuration tool. I also know that it is difficult to come by learning materials on the subject. Personally I am working on an eLearning for floorplan manager right now. We also plan to have a workshop on the tool at SDN Community Day Las Vegas and I am working it into the updated version of the Update Your ABAP Development Skills to NetWeaver 7.0 - 4 hour hands-on TechEd session. So learning materials are on their way.

In the mean time I would suggest that if you are at a high enough support package level that you can learn by studying some of the example applications. Check out the Web Dynpro Components in the package APB_FPM_DEMO and APB_FPM_TEST.

I also didn't mean to imply that Robert had to use the Floorplan Manager. It is a nice tool, but obviously lacking in documentation. However just looking at how some of SAP's applications are built using the Floorplan Manager might help clarify the design pattern.

alejandro_bindi
Active Contributor
0 Kudos

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?

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.

Thanks again!

Robert, my apologies for taking over your thread

Regards

Former Member
0 Kudos

No apologies necessary, this was an informative thread.

Thanks Thomas for your response in e-mail; it has helped quite a bit.

Closing the thread.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> 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.

Answers (0)