|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Xmpp Gateway and Components
Author: Tom Chiverton
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:58061#315695
> I had the idea of breaking each command into a separate component and then
> instantiating it when someone ran the command. I am wondering what would be
> considered best practice.
Create them all once as singletons at start up, and just invoke them as
needed.
I'd be tempeted to store them in the application scope.
> not sure the components will be faster then the cfswitch but the one cfc is
> getting unweildly.
I'd break it up just because of the ease of maintaince and addition of new
commands.
--
Tom Chiverton
Helping to administratively market advanced customized intuitive real-time
infomediaries
****************************************************
This email is sent for and on behalf of Halliwells LLP.
Halliwells LLP is a limited liability partnership registered in England and Wales
under registered number OC307980 whose registered office address is at Halliwells
LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is
available for inspection at the registered office. Any reference to a partner in
relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The
Solicitors Regulation Authority.
CONFIDENTIALITY
This email is intended only for the use of the addressee named above and may be
confidential or legally privileged. If you are not the addressee you must not
read it and must not use any information contained in nor copy it nor inform any
person other than Halliwells LLP or the addressee of its existence or contents.
If you have received this email in error please delete it and notify Halliwells
LLP IT Department on 0870 365 2500.
For more information about Halliwells LLP visit
www.halliwells.com.
Author: Matthew Aires
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:58061#315202
I have a question for the list concerning components. I have been using the XMPP
gateway to write a bot that responds to various commands and helps with debugging
by reporting the last line of log files... restarting coldfusion services (after
asking everyone working on said server) running sql jobs etc... all from a chat
window. Its been working great.
Currently I parse the incoming message for the command which should be the first
word in an incoming message. I then do a cfswitch on the command for further
processing. This all happens within the specified CFC for my xmpp event gateway
and all inside the onIncomingMessage() function.
I had the idea of breaking each command into a separate component and then
instantiating it when someone ran the command. I am wondering what would be
considered best practice. How should I instantiate the components? or in what
scope? Should I be creating an instance of a command component at the
application, session, var level? Any other tips would be great or even a pointer
to a resource or perhaps a pattern that I should try to implement.
I am not sure the components will be faster then the cfswitch but the one cfc is
getting unweildly.
~Matt
|
May 24, 2012
|
Latest Fusion Authority Articles
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||