What is the "Data Instance First " design approach and when i should choose this . Not able to understand the exect scenarios ?
@MonikaS9010
In this I want to explain answer with a story :
-
Every time before start of any match first Captains Check the Pitch , If Pitch is not suitable for the Fast bowling then what Mr. Captain Rohit will do . He will go with Spin attack. So, checking the Pitch is necessary before starting a match.
-
It means Creating the case is less important than creating a data instance. Let suppose situation be like In a Registration Form many people get register. If every time we will create case instance, then case data duplicate logic and other also need to take place and case instance will get created unnecessary rather doing this We should not create the case better to create data instance first and validate them if everything looks fine then go with Case instance.
-
It means Mr. Captain is checking the Pitch first before playing the Important match. Match is here our Case instance in Pega and checking the Pitch means creating a Data instance first.
-
The difference between Display a page and create a new case is that with Display a page the decision of whether a case should be created is made on the server after a Data instance is persisted.
-
Why this is so important case design:
- Inherent reusability: This data instance can be shared with across multiple application, interfaces & processes
- Leverage Pega API: You can leverage Pega OOTB API for creating a case. A case can be created after the data from the View data class has been persisted. A Pega API “cases” POST case can be invoked to create the case.
- Industry use cases:
- Registration forms Design: Here we can go with creation of data instances first before creation of the case instances in system.
- Repository Building inside Pega.
@Somil Shukla
I went through the answer and it is so impressive answer.
