MVC Architecture for Webdynpro
for ABAP
August 21, 2017
To understand the Webdynpro for ABAP let us use the same methodology
which we used during our school days, splitting the word “Webdynpro for
ABAP”.
Web + dynpro + ABAP.
” A Web application which can be accessed via internet which has a
capability of dynamic UI and build using ABAP is we called Webdynpro for
ABAP Application.”
Now you will look puzzled if you already know about ITS.
Why we need it if we already have ITS?
ITS-> internet transaction server.
What ITS does is, it converts all the sap gui screen into HTML pages. This
can be viewed from the browser. So it was SAP’s baby steps towards the
web application. But if you Google it you will find many disadvantages.
You can refer the —————————-Article to know about how it works and
can be used.
After ITS it was time for BSP (Business Server Pages)
If you are a JAVA Guy you will be surprised by name as we already have
something called JSP (Java server pages).
BSP is also used to develop the web application it has its own tags which
makes the UI element on the browser. You can code in Object oriented
programming at technology end to implement the business logic.
If you compare BSP and Webdynpro for abap.
Of course winner will be Webdynpro for abap.
Webdynpro for ABAP is based on the MVC architecture. To explain it in
simple way let’s start with
Traditional application
Browser directly accesses the required page.
Let’s say if user types www.sapignite.com
And the server will return the page to the user as response.
MVC application
Browser directly accesses Controller
So now Mr. Controller comes in between which help us to segregate the
business logic and View part.
What is MVC
MVC is an Architectural Design pattern
MVC separates the web application into three different modules
To better understand MVC architecture let take a simple example
Let’s say tomorrow is Your brother or sister’s birthday. So you decided to buy a cake and visit a
Bakery Shop. You request the baker to make a wonderful cake and the Baker collects all the
ingredients to make the cake. After collecting all the ingredients the baker decides on how the cake
should look like and selects the appropriate pan(it may be square, circle etc.).When the cake is ready
the Baker responds i.e. gives you back the cake to celebrate your sisters or brothers birthday. I hope
this example makes you clear view on how MVC architecture works.
MVC is a collection of Model/View/Controller
Benefits of MVC
It keeps your business logic separate from your (HTML-based) views
Keeps your code clean and neat in one place
Model
Represents the information and the data from the database
Validation of the data
View
Data presentation and user data
Rendering models into one or more formats, such as HTML,XHTML, XML, or even Javascript
Controller
Dispatches requests and control flows
connects the model with the view
Process the data that comes from the model.
I think you would have got a clear idea about MVC which is the base of the WebDynpro For ABAP.