Extension of core components need's to be simplified
Feature Request
Real-life example:
- Recently I had a case where we decided to reuse a quick search component, with 2 simple additions:
- add additional sorting of the results (in our case by page template type - need's to be done on BE side)
- show some informative message in case there are no results
Sounds super simple and straightforward right!?
Try and failures:
- Let's extend the SearchResultServlet - nope, it's an internal, not exported class
- Let's say it is exported - still you can't override methods (they are private or protected)
- Let's include the servlet
- again you need to include a lot of other internal classes
- you get a messy codebase
- You gave up in the end, and you write your own solution.
- I believe that was not the intention and the goal of core components.
This was not the first time that happened. It's all great if the feature fits 100% to the project needs, but sooner or later when you need to put some change on top of that, you have a real challenge.
I really appreciate the work that you guys are doing, and believe there were a few time discussions about that, but this need's to be somehow improved.
FWIW this is an unfortunate fundamental limitation of using WCM Core components that's been raised a few times for many years. I find that code bases built initially to extend WCM Core components over time evolve to overwrite more and more of it to accommodate client needs.
Thankfully the code is open source, so if you do need to write it on your own, you can start from the code here.