House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Xmpp Gateway and Components

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Matthew Aires
11/13/2008 10:14 AM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Tom Chiverton
11/20/2008 11:39 AM

> 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.


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

March 21, 2010

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31