The Web Dynpro component is the fundamental unit from which all applications are constructed.The component is works as both your basic fundamental unit of reuse and development.
When we create a Web Dynpro application, a default component is always there created by application which is used for implementation of real-life business scenarios are frequently constructed from a hierarchy of multiple components.A component can be thought of as a bunch of controllers, views, and model usage declarations that have been considered for the specific purpose of reuse.
While creating the Components please follow the below mentioned steps for better functionality in your project:
1. Normally we begin with one component and start adding more views to it. Stage comes when at certain point you’ll have so many views in a component that, it get start getting difficult to add new functionality to your Web Dynpro application. At this point Web Dynpro Components could help us here.
2. While designing a business application in Web Dynpro, the focus of your attention should be on implementing the functionality using reusable units of code. These reusable units correspond to your Web Dynpro components, this means that you should consider a component to represent an atomic unit of business processing.
3. While developing Web Dynpro Components you should always think upon two major questions
A. How much functionality should you put into a single component ?
B. How reusable the resulting component will be?
4. So, following figure could help you to make component Hierarchies.
Business Functionality into Components is explained below:-
As can be seen from the above Figure , component granularity is a balance between two extremes.
4.1 On 1st part of image Parent component (A) has so many Child components(A1,A2,A3 in figure) attached and to those child components more and more child components(A1 has A11 and A12 as child ,A3 has A31 and A32 as child likewise) are attached. Here the principle of reusability is highly stretched .This is the bad practice as the system overhead is going to increase in this case.
4.2 On the 3rd image only single component is used. So this component has more and more work to do.The principle of reusability of component never comes in picture.
4.3 So, I would suggest to use the 2nd part of approach, to follow as it will fulfill all the principles of reusability and will decrease the overhead on server. Also keep in mind that “1 Component =1 Business Task”.This formula will help a lot while creating components.
5. Also keep things in mind that apart from the monolithic component on the 3rd part, all the other components are arranged in a hierarchy. This is the pattern which should be followed by all Web Dynpro application.
5.1 At the top of our hierarchy there is a parent component which is known as the “Root component”(2nd Image). This component will always act as the central point of control for the activity of the other components further down the hierarchy(Child Components).
5.2 Below our root component, a variety of components types can be found. Which ones are needed depends entirely on the specific details of the required business functionality.
According to me it will help you while creating your Web Dynpro Components.
Advantages of using Componentization:
The Web Dynpro component concept offers a number of advantages:
1. Structuring of the programming
2. Creation of easily manageable application blocks
3. Reusability of whole components
4. Decoupling of software projects in both time and space
Have a question on this topic ? Please read more here.
In case you need assistance on SAP Support Services, please contact us. Please send us your questions, comments or assistance request and our team would be glad to assist you.
By Dipak Asawale (on behalf of SAP Consulting Team)
SAP :: Streamlined
We offer variety of services including SAP ECC ,SAP HR,SAP BW,SAP CRM, SAP SCM,SAP BPM, Business Objects, SAP ABAP Development, SAP BASIS and SAP NetWeaver consulting. We have expertise in providing implementation,development, SAP Migration and SAP support services to SAP customers across diverse industries at a global level.
Have a question on SAP? Write to our SAP Architect : AskTheArchitect@Apprisia.com
(We promise a no-obligation consulting reply)