We are building a Service Request management application for one of our customers. There are approx 200 service request categories. Each service request category has a unique form with 2-3 fields. So for all service requests there will be approximately 200 forms. If we configure each as a different screen, this will consume 200 AOs. So instead, can we configure each form (as each of them is very light weight with 2-3 fields) as a Web Block and enable the single web block based on the service request category that is sent to the screen as the input? If we create 200 web blocks in a single screen, would it impact the loading of the screen significantly? The fields are text boxes, text labels or drop downs and no images/videos.
Also, can we lazy load the web blocks conditionally into a blank screen, based on some server side logic? I am not talking about conditional rendering (where all 200 web blocks are loaded and one is enabled based on some condition). Based on server side logic, only one of the available 200 web blocks should be loaded on the client side.
Please help me with this.
Thanks.
Hi Nihaal, I think we have something similar called dynamic forums in the forge and if we look under the hood , it has something similar that binds blocks / widgets based on condition. Although this might seem as a possible solution, 200 web blocks can also lead to a potential performance bottle neck as Web blocks have their own lifecycle and it also depends on the inputs to them and how the design will be.Thanks,
Praveen
Why build a service management system? they are probably more feature rich and cheaper of the shelf available then if you custom build it.
And if you want to avoid the webblock met category, consider to make a webblock pet input type, and a list (entity) of input types per form. That should result in way less webblocks that you need.
Hi Daniel,
Thank you for responding
For suppose we are having 3 blocks in a screen and we want to render each one based on an if condition. Now when the page loads at first, will it fetch all the blocks dynamically from server at first or will it fetch only selected block of if condition ?
Actually my doubt is when we are using multiple blocks in a screen (around 200) based on if condition, will it decrease the performance or not.
Hi, why not try it out, just create one webblock and add it 100 or 200 times to your screen with different conditions, should not take to much time to test it out, with the speed one can develop this in OutSystems
Hello,
What kind of application are you building? Reactive or Traditional Web?
Reactive: Having a block for each service request category and then displaying only the correct one in the screen with an IF sounds like a good solution. Only the block inside the True branch of the IF will be sent to the client and rendered in the page. Your server side logic to determine what is displayed can be in a Data Action, and the IF in the UI can be connected to the Data Action's output. Similarly, if the blocks are fetching data with aggregates/data actions, only those in the displayed block will actually run.
Traditional Web: You should probably consider a different approach. Even if a single block out of the 200 is displayed using an IF, every single one of them will add data to the page's viewstate, which will considerably slow down your page. One possible alternative would be to use this Forge component that allows you to create dynamic forms.