In my previous post I explained the use of remote proxies to access Singletons in Application scope. I thought that I would elaborate what a Singleton is for those who might be late to the design pattern party (better late than never!). A Singleton is a design pattern where an object is instantiated … wait for it … a single time. That’s right the object is created only once and is stored in a scope where it can be globally accessed.
Read more ...Entries for month: March 2009
In many of today’s popular ColdFusion frameworks, a common practice being utilized is storing instantiated objects in the Application scope as singletons. This becomes problematic when we need to access an object stored in the Application scope but the request comes from outside of the application (such as remote calls through AJAX). So what do we do when we want to access these objects remotely? Well, you can’t -- at least not directly.
The solution to this accessibility problem is to instead interface with a remote proxy in place the original inaccessible object. Some of you may be wondering, “What is a remote proxy?” Some of you may be wondering the same thing while simultaneously scratching your head. Some of you may be wondering how I know what you’re thinking and doing as you're reading this blog post (but I digress).
A remote proxy is a specific type of Proxy Pattern. To help illustrate what a proxy is, here is a great analogy from JavaWorld:
A friend of mine -- a medical doctor, no less -- once told me that he convinced a friend to take a college exam for him. Someone who takes the place of someone else is known as a proxy. Unfortunately for my friend, his proxy drank a bit too much the night before and failed the test.
So for our case a remote proxy is an accessible object that takes the place of the inaccessible object. Think of it as a substitute object. Got it? Great.
Read more ...Broadcasting live from my little grass shack in the middle of the Pacific Ocean the City of Angels in sunny Southern California, I proudly present the new and improved randolphlinmark.com 2.0! *waits for the cheering to subside*
After having packed up all my things, moving from Hawaii to Los Angeles, and starting a new job while getting acclimated to a new city, I finally find myself comfortably settled into my new surroundings. Unfortunately, one of the byproducts of the hectic past few months was that I neglected blogging or updating my site.
So after months of neglect I felt it was time for this site to start a new – a rebirth if you will. All previous blog entries were purged and is now a distant memory dancing around aimlessly in the cyberspace abyss. The total extreme makeover included switching blogging engines and skinning it with a newer more-edgy design. So with renewed vigor and enthusiasm I will start by writing the obligatory "introductory" blog post to summarize this blog in a nut shell.
Read more ...