Not sure what your questions is,
yes some of my xpages contain computed values and a lot of other stuff.
when bulding an xpage in DDE it is component based, without the components you will have no smooth access to the api and no access to domino data
You can put your code inside the component events or you can use dojo and java to do it.
want less code, check out the extlib on openntf.
hope it helps
Thomas