On 4/25/07, Peterson, Chris <[EMAIL PROTECTED]> wrote:
> So: What is a singleton?
A singleton is a class that will only ever have a single instance
created for it. A business entity (a Person, an Auction, etc.)
clearly will have multiple instances (one for each person/auction/etc.
in the system). Other components (such as service objects) don't need
multiple instances, and will benefit from only ever having a single
instance (usually because they can maintain internal state and know
that it's consistent).
> What does implicit / explicit invocation mean?
Explicit invocation is of the form #myObject.myMethod()#, while
implicit invocation is of the form
#myDispatcher.dispatchEvent("myObject.myMethod")#. In the former, you
have an explicit reference to the object you're calling, and
explicitly invoke the given method on that object. In the latter,
you're telling "something" (the 'myDispatcher' object in this case)
that you'd like a given method on a given object to be invoked, but
you don't do it yourself, you rely on the implicit assumption that
that "something" will do the invocation for you.
This is useful in a number of ways, depending on the environment. In
front controller frameworks (Fusebox, Mach-II, Model-Glue), it's used
to pass all requests through the front controller, which, in turn,
implicitly invokes the desired controller code. In event-driven apps
(like GUI apps), you use this allow unrelated processes to run
concurrently. For example, clicking a button to initiate a
long-running process and then being able to immediately go click
another button without waiting for the first process to finish.
> What attributes does 'procedural' code have over any other code?
Procedural code is organized such that when you need to do X, you
start at the beginning and execute down a long list of commands until
you get to the end. With an OO system, you typically have a
collection of collaborating objects that pass around control of the
processing such that each object only does one narrowly defined task.
It's worth mentioning that procedural programming is necessary in
every application. In an OO system, each method is a procedure (start
at the top, go to the bottom), but at a higher level, the
"proceduralness" disappears.
> What is an implicit event queue?
Not all implicit invocation mechanisms are multi-threaded, and those
that are often have a cap on the total number of concurrent threads.
As such, events that have been dispatched go into a queue until
they're ready to be processed. In a multi-threaded environment, that
queue will hopefully remain empty (or nearly so), but in a
single-threaded environment (like Mach-II or Flash), you need a queue,
because you while you can receive multiple events at a time, you can
only process then singly.
> Will the use of Transfer limit what framework I can operate in?
It will prevent you from using Reactor (another ORM framework). But
you should be able to use it with any non-ORM frameworks you desire
(e.g. any front controller framework).
cheers,
barneyb
--
Barney Boisvert
[EMAIL PROTECTED]
http://www.barneyb.com/
Got Gmail? I have 100 invites.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2.
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276240
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4