We enhance standard components based on our custom requirement. But, I want to give architectural view of component before proceeding component enhancement.
Component follows MVC architecture i.e. model view controller architecture.
a)Model:- It defines application data and is connected to business functionality or underlying layers.
b)View:- It visualizes application data.
c)Controller:- It handles events,defines control flow and updates model data/attributes.
End User sends requests to controller and then controller flows control to view as well as model. Data flows from controller to model ( if user enters data then data is set in model) as well as from model to view(data is fetched from application layer and displays on view).
Once we will get inside components, we will find views,controller,run time repository.Now, i am going to technical details regarding all these elements.
a)Views contains respective classes for data control. Views have view controllers, which contains implementation class,context class and context node class.
Implementation Class:- It controls request processing methods,all toolbar button related methods,all event handlers,plugs etc.Starts with C but after enhancement it is renamed to starting with Z and ends with _IMPL.
Context Class:- It controls data context i.e. binding etc.It ends with _CTXT.
Context Node Class:-It controls context node related methods.It ends with CN00,CN01..etc.All Context Node attribute have their methods to change properties of field ( i.e. display only or editable,Drop Down,Check Box etc and set/get field values).
b)Controller has major role in Web UI to control data flow from presentation layer to API and vice versa.
There are 5 controllers.
1)View Controller
2)Component Controller
3)Window Controller
4)Custom Controller
5)Interface Controller
View Controller:- It reacts to events that occur in the corresponding view or view set. It also manages view inbound and outbound plugs,which are point of entry into and exit from the view for handling navigational events.
Component Controller:-It controls all instances of the controller-View,application and custom-present in its component.
Window Controller:- Each view is contained in a window. The window provides view with space for displaying its content. Like view controller,the window manages inbound and outbound plugs.Unlike the view controller,the window controller manages inter-component navigation instead cross-navigation between views inside the same window.
Custom Controller:- It acts as central place for sharing data between views.The custom controller makes it convenient for one view to access other view's data without either of the view having to directly expose its internal model to the outside world.
Interface Controller:-It controls the navigation across components. Here,we are specifying the interface view( we have to create interface of the window to make it available for outside world i.e. public). We are including context node also which is used for data flow across components. During navigation,context node of interface controller should be same as of context node of component controller.
c) Run-Time Repository:- Run-Time Repository is important part of component. We are doing assignment of views to the view set or windows in run-time repository only.Model Node layout with respective component set is also placed in run-time repository.Interface Controller,Component Usage are part of run-time repository.Whenever we are making changes in run-time repository.All details are already created in repository.xml. We can get all information related to component in repository.xml.
It was basic architecture view of component. Now, We will see customization of component based on requirement.