Re: CFC and datasource
Could this be used in a bind? a normal bind would look like this for a grid bind="cfc:data.getContacts({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})" > > > > > >You can then get an instance of your object that holds your dsn info using >cfinvoke like so: > >returnVariable="myComponentInstance"> > >Then, when you want to call the methods you want you simply do this (instead >of cfinvoke): > > ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291303 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
CFC and datasource
How do you handle datasources inside CFCâs. until now I have just been using the variable application.dsn. But I have been told that I should include the database name in the parameter call to the cfc. But I donât want to call the cfc with the database name every single time the cfc is called like: Is it possible to invoke the whole component with the database information and then call that instance without the dns?? ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291179 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Splitting UI and Data
I got a little interested in this one How is the application.productService.getProductBy(IDattributes.productID )# defined? I think that the productService is setup omehow. ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291178 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Splitting UI and Data
Yes, I'm glad that all of you convinced me to carry on with Fusebox. I have just seen the light. it was a hard start. Maybe because I had install Fusebox 5.1 and the tutorial was written for Fusebox4. But when I got it to work it was very nice. I very much like the way that the fuse action is setup and the exit parameter is defined. Top nice. Iâm about to run a tutorial about database and later on the MVC. ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290874 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Splitting UI and Data
Ok, I will take a look at fusebox. Thank's for all you input. ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290811 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Splitting UI and Data
I do think that I will program it by myself. I like to be in controle. This Best practice from Benorama looks very good. http://www.benorama.com/coldfusion/index.htm Therfore I think that I will try this first. If everything fails with that I will use Fusebox. But I do not like it. Maby if I get more into it I will. Any one that have any expirence? ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290750 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Splitting UI and Data
I think I would like to use some kind og MVC (Model-View-Controler). But I don't want to use a standard framework like fusebox. I think that it is too complex for my porpose. Instead I will have a controler that calls the data and apply it to the View. But I don't know how this should be programmed. Just like you mentioned > > To make this basic though you would call the method of your data > retrieval as part of your controller, then use the return (a query I > assume?) to populate your view. But how to program this? Any one that can schetch this for me? Controller.cfm <--- Get the data ---> Any Ideas? ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290735 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Splitting UI and Data
Iâm about to construct a new Coldfusion application and I want do use an object orientated approach. But I donât know how I should do this. I have read the article written by David Friedel. Building an object oriented user interface with Coldfusion MX http://www.adobe.com/devnet/coldfusion/articles/oo_interface.html He tells about the principles but not the actual development I have created a cfc library containing data retrievers. These cfcâs should provide my UI with the necessary data. Now Iâm about to construct the User interface (UI) but I donât know how I should combine the user interface with the data. I plan to split the UI in small function (Widget) just like in the article. Maybe I will have a grid showing some employees The UI part I would then insert into either a cfm or cfc. If I put it into a cfm and use CFINCLUDE to use it I canât pass the data query to it. But then if I put into a cfc and use CFINVOKE I can pass the data to it. But then the cfc will fail because it uses the CFGRID and I donât intent to insert a CFFORM into each cfc. How do you do this? ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290715 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4