I'm confused on what your asking. If your class is meant to tie in / overwrite functionality, it always extends XFCP_yourclassname. And XenForo sets the correct class. The structure depends on what you want to do. What ARE you trying to accomplish that you aren't grasping how to set up our file?
It you want examples go and download any of my add one as they all (except shorten URL) make use of this. SFS extends the register controller, overwrites a function to perform validation, then sends it back to XenForo. BB Code Manager extends a function to define a variable for a template.
They are also used to "include" own vars into classes (for example navbar, visotor setup,..)
I'm also using a own code event, for a interface for 3rd party developers, to be able to include own classes in the forumconnector
Steve, can you tell us what exactly you are trying to do?
From what I can understand, you want to fetch the latest threads (globally, or on a per-node basis) and display them in a separate "portal" page. If that's it, you don't need to use the "front_controller_pre_view" event listener. A model, a view, a controller and a registered route prefix is all you need.
Shadab, I want to fetch the latest threads of all forums and by node id that I specify. Exactly how can I do that and avoid the event listener? The thread list will display in a block on my portal page.