ColdFusion 9 Wish List - Proxy Objects

Jun 04, 2008

Lately I have been looking into lazy loading, especially in Flex and BlazeDS with dpHibernate and it crossed my mind that this would be a nice feature in the next release of ColdFusion.

So let's say you have to pull a very large query. Problem is the data is going to take up a lot of the JVM heap space. It's also going to take time to pull from the datasource and load into memory just to use it.

Instead of loading in the real query, how about we just load in an array or structure of proxy objects. They would be just lightweight place holders for the real information. When you directly ask for an object, then ColdFusion does some backend work to provide the real object record. This is a simple virtual proxy pattern that could come in quite handy.

Mark Mandel has JavaProxy which implements a proxy pattern.

Another idea is to use Hibernate for this.


Write your comment

(it will not be displayed)