Re: What *exactly* does cgi.server_name return.
http://134.139.143.25/stompy/server.cfm or http://cfdev.cota.csulb.edu/stompy/server.cfm both return: CGI.SERVER_NAME: cfdev.cota.csulb.edu It looks like it returns the name registered in the web server (apache, in my case). The above addresses both go to the same server. Mike Ian Skinner wrote: I think I can get the answer faster from this helpful and generous group of people then I can write one line of code and try it out on a wide variety of environments. What exactly is cgi.server_name expected to return? Looking at the following examples what would you expect to be in this variable? http://calpip-devsite/index.cfm http://calpip.cdpr.ca.gov/index.cfm http://calpip-devsite.inisde.cdpr.ca.gov/index.cfm http://10.104.106.113/index.cfm http://134.186.118.90/index.cfm/ TIA Ian ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320461 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: What *exactly* does cgi.server_name return.
I thought I'd add to this: http://134.139.143.25/stompy/server.cfm http://cfdev.cota.csulb.edu/stompy/server.cfm http://servername/stompy/server.cfm http://servername.ad.dns.entry/stompy/server.cfm http://localhost/stompy/server.cfm all return: CGI.SERVER_NAME: cfdev.cota.csulb.edu I do have the servername set to cfdev.cota.csulb.edu in the httpd.conf file. Mike Mike Soultanian wrote: http://134.139.143.25/stompy/server.cfm or http://cfdev.cota.csulb.edu/stompy/server.cfm both return: CGI.SERVER_NAME: cfdev.cota.csulb.edu It looks like it returns the name registered in the web server (apache, in my case). The above addresses both go to the same server. Mike Ian Skinner wrote: I think I can get the answer faster from this helpful and generous group of people then I can write one line of code and try it out on a wide variety of environments. What exactly is cgi.server_name expected to return? Looking at the following examples what would you expect to be in this variable? http://calpip-devsite/index.cfm http://calpip.cdpr.ca.gov/index.cfm http://calpip-devsite.inisde.cdpr.ca.gov/index.cfm http://10.104.106.113/index.cfm http://134.186.118.90/index.cfm/ TIA Ian ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320465 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
question about CF admin
I was curious where all the CF admin settings are stored. Are they stored in the CFIDE folder or are they stored in the Coldfusion8 folder. I could swear I moved my CFIDE folder to a new CF server and it inherited the settings, but when I moved it a second time (rebuild the new CF server), the settings didn't migrate over. It *might* have also been because apache was sending me back over to the original cf server and I didn't know it... Am I missing something? Thanks, Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319819 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: question about CF admin
Cool. Thanks for the info! MIke Mark Kruger wrote: In CF 5 or lower settings were in the registry. As of CFMX (version 6.x and higher) most settings are in /cfusion8/lib/ stored in XML files. Keep in mind that a few things you might need are in the jrun.xml file and the jvm.config file. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319822 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
how to send data from one page to another
I have a page that displays a certain number of songs based on a songs-per-page setting. This could be 50, 100, 1000, etc. That part is all set up. What I would like to do is have a link called mark songs as listened for that particular page of songs. My question is, how do I pass that particular listing of songs to the action page? I was thinking I could just pass the action page URL.displayrows and URL.startrow so that the query on the action page knows how many rows to pull and from what offset to start and perfom a INSERT SELECT. The only thing is that the original song listing query has a sort order (which obviously affects the display page) and that exact sort order would need to be duplicated in the INSERT SELECT otherwise I'm going to be adding the wrong songs to the join table. While this kind of code duplication obviously isn't preferred, this is a dopey little app that for which I don't really mind cut and pasting if I have to. What I'm really more interested in is if there's a better way of doing this. I also thought about setting a session variable, but that seems kinda clunky as well. It does ensure, though, that the correct records make it into the join table. Any other suggestions? Thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319664 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Googlebot got me good last night...Application.cfm question
cfif structKeyExists(cookie, CFID) AND structKeyExists(cookie, CFTOKEN) cfcookie name=CFID value=#cookie.cfid# / cfcookie name=CFTOKEN value=#cookie.cftoken# / /cfif OK, that works, but I don't get exactly what it's doing. It replaces the two standard CF-generated cookies which don't expire with two that will expire immediately the browser closes (the default behaviour of cfcookie). Ahhh... and I had just looked at the CF docs for cfcookie tag and noticed the following: If this tag specifies that a cookie is saved beyond the current browser session, the client browser writes or updates the cookie in its local cookies file. Until the browser is closed, the cookie resides in browser memory. If the expires attribute is not specified, the cookie is not written to the browser cookies file. Now it all makes sense :) Thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319643 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Googlebot got me good last night...Application.cfm question
cfif structKeyExists(cookie, CFID) AND structKeyExists(cookie, CFTOKEN) cfcookie name=CFID value=#cookie.cfid# / cfcookie name=CFTOKEN value=#cookie.cftoken# / /cfif OK, that works, but I don't get exactly what it's doing. It replaces the two standard CF-generated cookies which don't expire with two that will expire immediately the browser closes (the default behaviour of cfcookie). btw, what's the purpose of the if statement? Why not just overwrite them regardless? Or is that to confirm that session management is enabled? Is there no other way to test that session management is enabled or is that the most efficient method? thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319644 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Googlebot got me good last night...Application.cfm question
Dave Watts wrote: cfif structKeyExists(cookie, CFID) AND structKeyExists(cookie, The point of cookies is that they're set once and kept for some duration; there's no need to set them on each subsequent page request (and it'll annoy people who've configured their browsers to prompt before accepting a cookie). I guess the part I was wondering about was the logic for checking for both variables. Is there no other way to check if session management and client cookies are enabled? Don't know if you know the answer to this, but does CF automatically lose its session if one of those cookies are deleted? thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319650 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Question about next/prev browsing
Nathan Strutz wrote: 1) cache it in ColdFusion - just use the cachedWithin attribute of cfquery, it's easy, it works great. Set it to a day or 5 minutes or 1 minute or even 10 seconds if you're concerned about the data being out of date. This is Hey Nathan, The only think that I'm confused about is that if I'm using the caching, does it makes sense to retrieve all of the records? What if the user decides to jump to the end of the list... that would mean that I have to have the entire recordset cached, right? And remember, for server-side paging (next/prev buttons, etc), you should use my CFC - http://paginationcfc.riaforge.org/ Yeah, I've downloaded it, just haven't had a chance to play with it yet. Thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319515 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Googlebot got me good last night...
read the fusebox 4 book from techspedition. While it's not completely up-to-date, I think it would still help on the conceptual level. FB 5.x still maintains backwards compatibility with 4.x applications with some new features added, as documented on the FB site. btw, if you want to make your life easier, check out FuseBuilder. It's definitely the best thing since sliced bread!! Mike Les Mizzell wrote: You have much to learn, young padawan, but you are in the right place. You're telling me. Fusebox 5.x has me tearing my hair out. Maybe somebody will release Dummies Guide to Fusebox at some point. I'm going to need it ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319566 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Question about next/prev browsing
Ehh.. I'd rather do it at the CF level right now, but I appreciate the suggestion.. thanks, Mike Nick Giovanni wrote: I'd do it at the DB level, easy to implement in Oracle not sure about the others. On Wed, Feb 18, 2009 at 11:48 AM, Mike Soultanian msoul...@csulb.eduwrote: If I have a table with 60,000 records - should I use query caching for the next/prev browsing, or should I pull the next/prev page of records every time the user presses the next/prev buttons? I'm leaning towards the latter as it just seems to make more sense memory-wise. Thanks, Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319567 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Question about next/prev browsing
Nick G wrote: Select * From ( Select rownum rnum, p.* From ( SELECT count(1) Over() totalCount, a.columns, b.columns FROM table a, table b WHERE a.id = b.id ORDER BY a.name ) p Where rownum = #Abs((start + Limit) - 1)# ) Where rnum = #start# Yeah, that's kinda similar to what I did using the MySQL-specific LIMIT statement. It seems to work well - I just didn't know if using caching would or wouldn't be the right thing to do, especially when I have 60k records. Obviously there are many ways to skin the cat, just trying to find the best way. Now, when people are dealing with query caching, how many records do you pull out, generally speaking? What if you get to the end of the cached recordset, is it normal practice to have to put logic to run another query and cache those results? The paging is simple enough to implement and even easier using EXT. Obviously if you're not using Oracle this won't work but I'm sure the other db's have a similar way to accomplish this. I'm assuming EXT is Oracle-specific? I'm using MySQL. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319571 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Googlebot got me good last night...Application.cfm question
Matt Quackenbush wrote: cfif structKeyExists(cookie, CFID) AND structKeyExists(cookie, CFTOKEN) cfcookie name=CFID value=#cookie.cfid# / cfcookie name=CFTOKEN value=#cookie.cftoken# / /cfif Hey Matt, I use that same code - how does it actually work? I never quite understood how it accomplished the goal killing the session when you closed the browser. Thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319577 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Question about next/prev browsing
If I have a table with 60,000 records - should I use query caching for the next/prev browsing, or should I pull the next/prev page of records every time the user presses the next/prev buttons? I'm leaning towards the latter as it just seems to make more sense memory-wise. Thanks, Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319500 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: SQL question
Mike Kear wrote: The first two examples are selecting the literal value 'mike' and '1' In the first example, you are telling SQL to give the column containing 'mike' a name of 'name'. aha.. literal was the word I was looking for. I did a search for sql select literal and it led me to the following: http://www.firstsql.com/tutor3.htm#literal which describes that functionality. Thanks for the help!! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319460 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Inserting an array of structs into a database table
Maureen wrote: 1000 sets of values with one insert will run much faster than 1000 inserts. Yup! It was significantly faster! Thanks for the help! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319461 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
SQL question
I was curious if anyone knows how you describe the following SQL functionality: SELECT 'mike' as name returns a single column named name with a single row containing mike I also know you can do stuff like: SELECT 1 Which returns a column named 1 with a single row containing 1, or: SELECT 4/2 which returns a column named 4/2 with a single row containing 2.000 The last one is obvious as it's SQL arithmetic, but what are the first two examples? Are those also examples of SQL arithmetic as well? I can't find this kind of SQL functionality described or documented anywhere on the net. Thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319388 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Inserting an array of structs into a database table
Maureen wrote: The syntax needs to be : INSERT INTO tbl_name (a,b,c) VALUES(1,2,3),(4,5,6),(7,8,9) This should work. More here: http://www.desilva.biz/mysql/insert.html Thanks for the info! This time I'll try the sql straight into mysql instead of going through cf and see if it accepts it. Now the question is whether to have 1000 sets of values (using your method) or running an insert statement 1000 times. I have to insert 6+ records so I was going to do it in batches of 1000 to keep memory usage down. I don't know the limitations on the length of a SQL statement... any thoughts on that one? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319342 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Inserting an array of structs into a database table
Maureen wrote: Either way, you might consider doing an outer loop with a counter that breaks the array into 4 or 5 parts so you don't overflow the buffer size on sql statement. Since I hadn't gotten your suggested method working, I implemented it like you said above with an outer loop breaking things up into batches of 1000 and then ran an inner loop running the query over and over 1000 times, then adjusting the offset and running it another 1000 times, etc. That said, pulling the JSON formatted data from the website is what's taking the most time :) When I get everything running correctly, I'm going to test out your method now that I have the correct syntax. I might bump up the number of JSON records I pull from the website, but I'll definitely test the length so I don't feed too much info to the INSERT statement. thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319346 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: question about cfproperty
Dave Watts wrote: CFPROPERTY is really only useful for web services. For most CFCs, you don't want to document properties because those properties aren't public; the use of public properties breaks the concept of encapsulation. Ahhh... cool. Thanks for the info! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319350 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: question about cfproperty
Brad Wood wrote: On the topic of cfproperty-- don't write them off completely. :) They look like they will play a big part in CF 9's ORM features. Additionally, some frameworks like ColdBox use cfproperty tags' metadata to autowire dependencies into your components. I just found it interesting that code generators like rooibos don't write them in. Wouldn't seem like it would be much more work to put it in there, but it doesn't... was kinda curious why they didn't. Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319359 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Inserting an array of structs into a database table
Hey everyone, I am pulling a song listing from another website that's in JSON format. I already figured out how to bring it into CF with deserializeJSON(), but now I need to put all that data into my database. There are over 60,000 songs in their database so that means I have to insert over 60,000 structs (song title, artist, id, etc) into my database. What is the most efficient way to do this? I am able to pull down chunks of song data (i.e. pull first 1000 songs, then pull then next 1000, etc), and then would I loop through the array and individually insert each struct into the database? It seems like that would be like a slow process but I don't know how else I'd do it. Any suggestions would be much appreciated! thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319326 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
question about cfproperty
Does anyone use cfproperty? I've been doing a lot of reading on CFCs and I've noticed that nobody uses that tag to document their CFCs. Is it just easy enough to look at the init's arguments to figure out the properties for a class? Just curious.. Thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319330 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Inserting an array of structs into a database table
mysql.. I have admin access to my instance... Maureen wrote: Which database? Do you have bulk insert capabilities? On Sat, Feb 14, 2009 at 5:28 PM, Mike Soultanian msoul...@csulb.edu wrote: Hey everyone, I am pulling a song listing from another website that's in JSON format. I already figured out how to bring it into CF with deserializeJSON(), but now I need to put all that data into my database. There are over 60,000 songs in their database so that means I have to insert over 60,000 structs (song title, artist, id, etc) into my database. What is the most efficient way to do this? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319331 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Inserting an array of structs into a database table
I found the following for mysql: http://dev.mysql.com/doc/refman/5.1/en/load-data.html I'm assuming I'd just wrap that with a cfquery statement? Any idea on how to convert an array of structs to a comma-delimited text file? thanks! Mike Mike Soultanian wrote: mysql.. I have admin access to my instance... Maureen wrote: Which database? Do you have bulk insert capabilities? On Sat, Feb 14, 2009 at 5:28 PM, Mike Soultanian msoul...@csulb.edu wrote: Hey everyone, I am pulling a song listing from another website that's in JSON format. I already figured out how to bring it into CF with deserializeJSON(), but now I need to put all that data into my database. There are over 60,000 songs in their database so that means I have to insert over 60,000 structs (song title, artist, id, etc) into my database. What is the most efficient way to do this? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319332 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Inserting an array of structs into a database table
Maureen wrote: Not exactly what I had in mind. Instead of doing a loop over the array of structures and doing an insert each for each structure, you can do cfquery name=blah datasource=dsn insert (field1, field2, field3) values ( cfloop index=x from=1 to=lenarray arrayname[x,value1], arrayname[x,value2], arrayname[x,value3] /cfloop ) /cfquery Neat - I didn't know you could run a loop in a query. I will give that a try! Thanks, Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319339 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Inserting an array of structs into a database table
Maureen wrote: Instead of doing a loop over the array of structures and doing an insert each for each structure, you can do cfquery name=blah datasource=dsn insert (field1, field2, field3) values ( cfloop index=x from=1 to=lenarray arrayname[x,value1], arrayname[x,value2], arrayname[x,value3] /cfloop ) /cfquery Hey Maureen, Are you sure this functionality exists within SQL? It would seem like you'd either end up with INSERT INTO Tracks (ProductID) VALUES ('2343234','223432432','123213') or INSERT INTO Tracks (ProductID) VALUES ('2343234'), ('223432432'), ('123213') depending on where you put the parenthesis and neither version works. Thanks, Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319340 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
tools for creating DAO, Gateway, Bean, etc CFCs
So I've been reading a bunch of stuff about CFCs and I read in a few blog posts where people said something like ...if you're still writing your DAO CFC by hand..., implying that there was a tool to do this for you. Are there tools that help in writing CFCs? Just like how FuseBuilder is a godsend for FuseBox, I'd feel like a fool if I was writing this stuff by hand when there were tools out there to do this. Thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319219 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
cfc/query/cfoutput question
So I'm reading this guide and it's really helpful! http://www.iknowkungfoo.com/blog/index.cfm/2007/8/22/Object-Oriented-Coldfusion--1--Intro-to-Objectcfc In my reading, I came upon an example similar to this: cfset qUsers = object.getallusers() cfoutput query=qUsers ... /cfoutput Would it be possible to do this instead: cfoutput query=object.getallusers() ... /cfoutput It just seems like a neat way to avoid involving an extra variable if you don't need it. Would it work? thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319097 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Question about Discovering CFCs
Hey Everyone, I just purchased Discovering CFCs by Hal Helms and I already know that the book is somewhat out of date (Hal told me so). However, what I really wanted was an introduction to OO and CFCs and this seemed like a descent starting point. I am starting to get further into the book (on page 50 right now) and I'm starting to see more CFC code. What I wanted to find out is what stuff is out of date, if it's possible to generalize. Are there any sites out there that outline the changes since MX? Any suggestions would be much appreciated! Thanks, Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319026 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Question about Discovering CFCs
Brian Kotek wrote: - All function-local variables must be declared with the var keyword Yeah, I've read extensively that it's very important to do this with every variable declared inside a function. Btw, does this also mean that query names need to be var-scoped as well? i.e. cfset var GetParks = 1 cfquery name=GetParks datasource=dsn SELECT name FROM table /cfquery - The VARIABLES scope within a CFC represents private data That I understand. - The VARIABLES scope should be used instead of the THIS scope for object properties to enforce encapsulation Yeah, I noticed that the book uses the this scope. I also noticed that the book outputs data from CFCs which I've read is a nono in regards to best practices. I'm assuming the correct method to retrieve the data stored in the properties is by calling the class' methods, correct? - An init() method is the de-facto constructor method Correct me if I'm wrong, but based on my initial reading of CFCs on the web, it seems like there are three ways of setting up constructor data: putting any cf tags or functions in the constructor area, putting a cfset init() statement in the constructor area that calls the init() method, or calling the init() method during the object instantiation. Is there a preferred method? Maybe I'm not understanding the goal of the init() method and to whom that data is supposed to be made available. Is it for the purpose of providing data to the newly created object or is it to initialize data for the other methods in the class.. or both? If anyone has any pages describing constructors and their uses (even if it's in another language), that would be helpful. - We can now call super.[method] to invoke methods on a superclass. seems simple enough. Don't have any near-future plans to call super methods just yet until I get my head wrapped around this :) If you can keep those rules in your head as you read (which I realize may be difficult), the majority of the concepts are still valid (composition, polymorphism, etc,). I think knowing about the this scope best practices is helpful. Was the variables and var scope not available at the time (Yes, I know the variables scope behaves like protected, not private. Yes, I know some people prefer keeping properties in the THIS scope. I kept the list simple because it's already going to be hard enough for him to keep track of it and there's no need to dive into minutiae at this point.) I like the idea of keeping the properties local to the CFC otherwise you break the benefits of encapsulation (or at least, I see it as a benefit). What's the difference between private and protected? thanks! Mike Regards, Brian On Sat, Feb 7, 2009 at 8:06 PM, Mike Soultanian msoul...@csulb.edu wrote: Hey Everyone, I just purchased Discovering CFCs by Hal Helms and I already know that the book is somewhat out of date (Hal told me so). However, what I really wanted was an introduction to OO and CFCs and this seemed like a descent starting point. I am starting to get further into the book (on page 50 right now) and I'm starting to see more CFC code. What I wanted to find out is what stuff is out of date, if it's possible to generalize. Are there any sites out there that outline the changes since MX? Any suggestions would be much appreciated! Thanks, Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319028 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Learning Fusebox 5.5 -- Seeking guidance / mentor
did you join the fusebox5 yahoogroups mailing list? That's a good resource. Mike Joel Polsky wrote: I've been searching around and there seems to be limited tutorials on FB 5.5 -- there's quite a bit on 4.x -- and the references in the 5.x say that the 4.0 tutorials and code samples for the most part also work with Fusebox 5 - which is scary as I don't know what will and won't work and how to tell, as it's ALL NEW to me! Can someone point me to a site that has GOOD tutorials for a newbie in the Fusebox world. I need basic understanding of the framework, where stuff goes, what it does, and where I put my stuff so it works. (Also how to make the friendly url's!) Thanks in Advance!! Joel ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318823 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Dreamweaver CRASHES!!!
Peter Boughton wrote: WTF? BitTorrent is just a distribution method. Where did this hacked software crap come from? Not all BT users use cracked software, and not all cracked software comes via BT. I guess I'm a bit less tolerant today, but when someone comes yelling and complaining and doesn't want to try something when someone's offering help, it just kinda makes you wonder. That said, I wish her the best in hopes that she can find an IDE that doesn't crash and apologize for my venting. Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318607 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Flat File as a Database?
I'm not sure exactly how it's done, but I know fusebuilder stores all of its data in WDDX format in a text file. Might work for your purposes. http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c20.htm Mike Bob Wright wrote: Thanks all for the replies. It sounds like some of you are in a position to fire clients. But since I get paid by the job, I can't just do that. Maybe someday, but not today. Besides, the client is not an idiot. I'm sorry, I can't go into detail about the reasons why we are limited to a flat file. But the reasons are legitimate, and cannot be circumvented. Absolutely no database can be installed. It is what it is. Yes, I get that if I can find a solution here, the flat file will be effectively a database. But hey, it's all about meeting the criteria. And a flat file absolutely will do just that. As far as what we need to accomplish, it is nothing more than basic CRUD via web forms with data download capabilities. Nothing fancy. No interface to other applications or products. Just simple CRUD on a stand-alone application. Gerald, I had not thought of ODBC text file thing. I have seen it over the years, but never messed with it. I'll look into that, thanks. Nitai, H2 looks interesting, but I can't use it here. Thanks anyway. Peter, I did reply to you earlier (from the house of fusion website). Not sure what happened. Basically, I said that all I had available to me was CF7. bob ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318551 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Dreamweaver CRASHES!!!
Torrent Girl wrote: Not in the mood for jokes. My name has nothing to do with software. Why should I have to I would have thought it did. My guess is that you installed hacked software and that's causing your problems. That, or you've downloaded hacked software and are trying to get a fix for it. People are going to form conclusions like this whether you like it or not. It might do you well to provide your real name or something more legitimate. completely reinstall this software, the crap should work. I am not the only one having these issues, Mr Certified CF guy. we have reinstalled the software and I'm over it. i will never purchase or recommend the purchase of dreamweaver again. I have wasted MANY a nights work on DW. Of course it should work, and of course you shouldn't have to go through the steps outlined previously.. but hey, it's a computer and as much as you complain about it, it's still going to be a computer. So, instead of pissing on the people that are trying to help you, try their advice and then you'll be wasting a lot less bandwidth and getting more work done.. end result: win win :) Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318602 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
spry problem with IE
My friend had a question about spry and I didn't have the answer so I thought I'd query the list: Currently I am testing an application that uses spry to get data from a CFC which queries a database and convert the query to a XML variable. This application works fine with most current browsers, but not with IE 7. I was wondering if anyone knows a fix for IE to show spry:region. Thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318465 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: spry problem with IE
go figure.. right after he sends me the email he figures it out :) Thanks for the reply!! Mike Milburn, Steve wrote: Hi Mike I've used Spry extensively and have never had a problem with IE7. I have had problems with certain versions of IE6 loading XML that I've posted to the Spry forums without any resolution. I'd be happy to look up that thread and post a link here, but the search functionality for the Spry forums on Adobe's web site has been broken for a few weeks. Anyway, you may get more responses if you go into greater detail regarding what IE7 is or is not doing rather than simply saying it does not work. Do you have a link we could check out? Steve From: Mike Soultanian [msoul...@csulb.edu] Sent: Friday, January 23, 2009 7:58 PM To: cf-talk Subject: spry problem with IE My friend had a question about spry and I didn't have the answer so I thought I'd query the list: Currently I am testing an application that uses spry to get data from a CFC which queries a database and convert the query to a XML variable. This application works fine with most current browsers, but not with IE 7. I was wondering if anyone knows a fix for IE to show spry:region. Thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318470 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: need some database advice
Yeah.. I realized that I was the only one that has already listened to the entire song catalog. But like you said, for most people that won't be the case and I will make my mark all listened link only mark the songs listed on the page, not the entire catalog. Thanks! Mike Barney Boisvert wrote: Databases are good at storing data. With proper indexing, a few million rows is nothing. I'd store tracks listened to. Make the model simpler, speed user creation, and odds are most people are going to listen to less than 25K distinct songs so it'll require less rows too. --- Barney Boisvert bboisv...@gmail.com http://www.barneyb.com On Jan 12, 2009, at 11:37 PM, Mike Soultanian msoul...@csulb.edu wrote: Hey Everyone, I have a project and I'm trying to figure out the best way to go about it. What I want to do is keep track of what songs a user has listened to and what songs they haven't. The first thing that comes to mind is a table with song IDs and a table with user IDs and a join table between the two that keeps track of what song a user has listened to. With 50,000 songs, that could be a lot of records in the join table. Is there a more efficient way to tackle this kind of problem? I don't think I'll have that many users, but even if I had ten users, that table could be pretty big. I'm trying to think if there are any tricks such as whether to store if a user has listened to a track or store if they haven't. I plan to have a button called mark all as listened, which could empty the join table of any records pertaining to that user if I was storing the tracks they didn't listen to. So the join table would initially start out very large for a user and then drop down... that's just one thought I had. If anyone has any tricks, I'd appreciate your advise! Thanks, Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317954 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: need some database advice
What do you do when they hit mark all listened? Barney Boisvert wrote: Databases are good at storing data. With proper indexing, a few million rows is nothing. I'd store tracks listened to. Make the model simpler, speed user creation, and odds are most people are going to listen to less than 25K distinct songs so it'll require less rows too. --- Barney Boisvert bboisv...@gmail.com http://www.barneyb.com On Jan 12, 2009, at 11:37 PM, Mike Soultanian msoul...@csulb.edu wrote: Hey Everyone, I have a project and I'm trying to figure out the best way to go about it. What I want to do is keep track of what songs a user has listened to and what songs they haven't. The first thing that comes to mind is a table with song IDs and a table with user IDs and a join table between the two that keeps track of what song a user has listened to. With 50,000 songs, that could be a lot of records in the join table. Is there a more efficient way to tackle this kind of problem? I don't think I'll have that many users, but even if I had ten users, that table could be pretty big. I'm trying to think if there are any tricks such as whether to store if a user has listened to a track or store if they haven't. I plan to have a button called mark all as listened, which could empty the join table of any records pertaining to that user if I was storing the tracks they didn't listen to. So the join table would initially start out very large for a user and then drop down... that's just one thought I had. If anyone has any tricks, I'd appreciate your advise! Thanks, Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317831 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
need some database advice
Hey Everyone, I have a project and I'm trying to figure out the best way to go about it. What I want to do is keep track of what songs a user has listened to and what songs they haven't. The first thing that comes to mind is a table with song IDs and a table with user IDs and a join table between the two that keeps track of what song a user has listened to. With 50,000 songs, that could be a lot of records in the join table. Is there a more efficient way to tackle this kind of problem? I don't think I'll have that many users, but even if I had ten users, that table could be pretty big. I'm trying to think if there are any tricks such as whether to store if a user has listened to a track or store if they haven't. I plan to have a button called mark all as listened, which could empty the join table of any records pertaining to that user if I was storing the tracks they didn't listen to. So the join table would initially start out very large for a user and then drop down... that's just one thought I had. If anyone has any tricks, I'd appreciate your advise! Thanks, Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317829 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: How do I use CFHTTP to click a link on a page using dynamic content?
Hey Dave, I spent hours and hours looking for a specific link but everything was linking to one file - this time I went and looked for the query string instead and got everyhing I needed! Now to parse it, yay :) Thanks!! Mike Dave Watts wrote: Take a look at the page and you'll notice that the href for the next page (right arrow) is href=#. It seems to be handled by onclick=mClick('next'). any idea if there's anything I can do? Somewhere in that page, or one of the JavaScript files it loads, that function resolves to a URL to navigate to another page or fetch data. You will need to identify that URL and fetch it. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317219 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
What's the best way to bring these records into CF?
What would be the most efficient way to bring the records listed below into CF? It seems to be in the format of {field:value,field:value},{field:value,field:value},{field:value,field:value},etc. I'm thinking I'd want to build an array of structures? I figured I post this to the list as you would probably know the best functions to use. Below are two complete records: {0:108265,product_id:108265,1:Kenny Hawkes Joshua Iz,artist:Kenny Hawkes Joshua Iz,2:Amabo (Vox Mix),title:Amabo (Vox Mix),3:Berwick Street,label:Berwick Street,4:moody,style:moody,5:single,type:single,6:1,pg_id:1,7:,ep_id:,8:2008-12-29,r_date:2008-12-29,9:null,pr_date:null,10:2008,reg_year:2008,11:12,reg_month:12,12:29,reg_day:29,13:621000,track_time:621000,14:12\/29\/2008,date:12\/29\/2008,15:108265,image:108265,16:108264,compilation_id:108264,17:0,pr_flag:0,price: $1.49\/ $1.99}, {0:108266,product_id:108266,1:Kenny Hawkes Joshua Iz,artist:Kenny Hawkes Joshua Iz,2:Amabo (Dub Mix),title:Amabo (Dub Mix),3:Berwick Street,label:Berwick Street,4:moody,style:moody,5:single,type:single,6:1,pg_id:1,7:,ep_id:,8:2008-12-29,r_date:2008-12-29,9:null,pr_date:null,10:2008,reg_year:2008,11:12,reg_month:12,12:29,reg_day:29,13:531000,track_time:531000,14:12\/29\/2008,date:12\/29\/2008,15:108266,image:108266,16:108264,compilation_id:108264,17:0,pr_flag:0,price: $1.49\/ $1.99} My goal is to reference it something like this: item[0].productid item[0].artist item[1].productid item[1].artist and so on... any thoughts? Thanks, Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317221 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: What's the best way to bring these records into CF?
Jochem van Dieten wrote: On Mon, Dec 29, 2008 at 6:42 PM, Charlie Griefer wrote: if you're on CF8, deserializeJSON() should work for each of the entities enclosed in the {}, which would give you a struct. i guess the trick is the looping. Don't loop, just make it an array by putting [] around it: cffile action=read file=your_import variable=importData / cfdump var=#deserializeJSON('[#importData#]')# / Jochem Thanks so much for that info! I knew that if you guys took a look at the output it would be something recognizable. Right when you mentioned JSON, I remembered seeing that word used here and there. This makes things MUCH easier to deal with - rock on! Thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317263 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
How do I use CFHTTP to click a link on a page using dynamic content?
Hey Everyone, I am trying to write a script that will hit the next button (right arrow key to the right of jump to) on this page: https://www.stompy.com/index.php?section=ep the problem is that there is no specific link - that tracklisting window is dynamically generated and that button uses javascript calls. Is there anything I can do? I had a previous script that would do the same thing on their site but then they switched over to this dynamic version and it my script doesn't work any more :( My goal is to pull the list of songs, hit next, and then pull the next page of songs, hit next, etc. From that I build a new listing so I can see everything on one page. That way I don't have to do it manually which is sllloww.. Is it possible? btw, I have asked them (even offered money) to update their site, but they're swamped so I wanted to try and do it on my end until they get around to adding the features I'm looking for. Thanks! Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317189 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: How do I use CFHTTP to click a link on a page using dynamic content?
Take a look at the page and you'll notice that the href for the next page (right arrow) is href=#. It seems to be handled by onclick=mClick('next'). any idea if there's anything I can do? Dave Watts wrote: I am trying to write a script that will hit the next button (right arrow key to the right of jump to) on this page: https://www.stompy.com/index.php?section=ep the problem is that there is no specific link - that tracklisting window is dynamically generated and that button uses javascript calls. Is there anything I can do? Use CFHTTP to fetch the first page, then parse the page to find the links, then use CFHTTP to fetch those links in turn. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317195 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Installing CFMX 7
Have you tried netstat to see what's using that port? systernals also has a tcp port monitoring utility you can try out as well... Phill B wrote: Well I'm sad to say that this didn't work. Why would they make a product that is so hard to install? I'm starting to regret the upgrade. On 7/23/06, Mike Soultanian [EMAIL PROTECTED] wrote: I had that exact same problem. I'm not exactly sure what I did, but I know that the silent install helps things out... so... Uninstall your current version and do a silent install as described here: http://tinyurl.com/8g3dr then run the web connector. mike.. Phill B wrote: So I got my upgrade to MX 7 and a new development server. Well I'm trying to install it and Im having some trouble. I'm installing on a Windows 2003 server and IIS. The first issue is the message that it installed but the web server connectors did not install successfully. One possible reason is that port 51011 is blocked Then when I try to use the Web Server Configuration Tool I get the error Could not connect to and jrun/coldfusion servers on host localhost. Great. So, I found this on the adobe site http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19575 Does this look like the right thing to do to fix the problem? I would hate to go through all of that to find out it was the wrong path. Any advice will be appreciated. Thanks guys ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:247728 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Installing CFMX 7
Hey Phil, Just an FYI, using tcpview ( http://www.sysinternals.com/utilities/tcpview.html ), the ports being used by jrun on my laptop are: 1046 2522 2920 7999 8500 8999 51011 orrr after typing that out, I did a quick search on google and found this: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_18336 good luck, Mike Dave Watts wrote: I didn't get any response from the silent install portion of course but the Web Server Configuration Tool gave me the same error I got before Could not connect to and jrun/coldfusion servers on host localhost. Did you check to see if the ports used by JRun are available? ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:247795 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Installing CFMX 7
it's not so much about what ports are blocked, it's more about what ports are currently in use. i.e. you can have a web server on port 80, a firewall installed, and you still won't be able to install another web server on the same port of that machine. That's why you use a program such as tcpview to make sure the ports in question are not *already* in use by another program. mike Phill B wrote: Well so much for disabling the McAfee. Still got the same errors. ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:247803 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Installing CFMX 7
I do all my installs silently and it works great. Here is the contents of my batch file (installcf.bat): coldfusion-702-win.exe -f silent.properties and then here is the contents of silent.properties (make sure its named exactly that!): # Install is silent INSTALLER_UI=SILENT # # License information - full | trial | developer SILENT_LICENSE_MODE=developer # # Configuration - standalone | jrun | ear | war SILENT_INSTALLER_TYPE=standalone # # Components to install SILENT_INSTALL_ODBC=true SILENT_INSTALL_VERITY=false SILENT_INSTALL_SAMPLES=false # (UNIX only) whether to start CFMX7 when booting SILENT_CONFIGURE_SYSTEM_INIT=false # # Directories SILENT_INSTALL_FOLDER=C:/CFUSIONMX7 # EAR/WAR only SILENT_VERITY_INSTALL_FOLDER= # # Context root SILENT_CONTEXT_ROOT= # # Runtime user for UNIX SILENT_RUNTIME_USER= # # ColdFusion administrator password SILENT_ADMIN_PASSWORD=password # # Flash forms - EAR/WAR only SILENT_FLEX_ENABLED=true # # Enable RDS and password SILENT_ENABLE_RDS=false SILENT_RDS_PASSWORD= You might need to tweak a few of the parameters depending on OS, license mode, etc. Make sure the mx installer, bat file, and silent.properties file are all in the same folder when you run it. You will not see much happening so you might want to watch your task manager to watch when cpu processing drops meaning the install is done (~5mins depending on cpu speed). After that, run the web connector. If you are trying to use the latest version of apache w/ cfmx, you'll need to download the upgraded version of wsconfig from adobe's site. good luck! Mike Phill B wrote: I'll give that a try. I hope it works, I'm tired of dealing with this. I just want to start using the new features in MX 7. On 7/23/06, Mike Soultanian [EMAIL PROTECTED] wrote: I had that exact same problem. I'm not exactly sure what I did, but I know that the silent install helps things out... so... Uninstall your current version and do a silent install as described here: http://tinyurl.com/8g3dr then run the web connector. mike.. Phill B wrote: So I got my upgrade to MX 7 and a new development server. Well I'm trying to install it and Im having some trouble. I'm installing on a Windows 2003 server and IIS. The first issue is the message that it installed but the web server connectors did not install successfully. One possible reason is that port 51011 is blocked Then when I try to use the Web Server Configuration Tool I get the error Could not connect to and jrun/coldfusion servers on host localhost. Great. So, I found this on the adobe site http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19575 Does this look like the right thing to do to fix the problem? I would hate to go through all of that to find out it was the wrong path. Any advice will be appreciated. Thanks guys ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:247525 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
jrun eating up all cpu resources
We have a ColdFusion development server (standard edition) running and jrun is running at 100% cpu and we're getting a major slowdown for page requests. The administrator isn't sure how to debug the problem so I thought I'd pose the question to list to see if any of you had any suggestions. I guess what he's really looking for is some way to debug which application has gone whacky even though it's not Enterprise... any ideas? Thanks! Mike ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239470 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Need Help Coding Database Interactions
Aaron Roberson wrote: Mike, I will look into that. I thought as long as I wrapped the insert user query and the select user query (with the max() function) in a cftransaction tag that I would eliminate race conditions and therefore would return the correct userID. Is that incorrect? I believe that cftransaction ensures that both queries will happen within that page call, but I don't think it ensures that other queries can't be made against the database. Mike ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232034 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Need Help Coding Database Interactions
If you're sure about that, go with it. However, from a previous conversation, it didn't seem that was the consensus... but I could very well be wrong... Mike Aaron Rouse wrote: It does a transaction in the database itself, assuming the database being used supports transactions. This would ensure that you get back the ID that you just inserted. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232044 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Need Help Coding Database Interactions
remember, max may not give you what you want, especially if another user inserts a record just in between the time when you insert your record and then poll for the max id. I'm not sure if mysql supports nextval (like oracle), but you might want to do something like this instead: http://jamesthornton.com/software/coldfusion/nextval.html enjoy, Mike Aaron Roberson wrote: Thanks for the link! Actually, I do know how to get the unique ID with the MAX() function in SQL. I guess my real question is how do I pass the unique ID from one method in the users component into another method in the newsletter component? Can anyone help with that? -Aaron On 2/10/06, C. Hatton Humphrey [EMAIL PROTECTED] wrote: I am running MySQL 4.0.25 remotely on my production server and 4.1.12 on my local box. I can't help you with the CFC's but you mihgt look into this page for some help http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html Hatton ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231968 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: OT: Issue with CSS and doctype
You might want to try the css-discuss list: http://www.css-discuss.org They are *very* good at everything css... mike Robert Everland III wrote: Can anyone help me out. When i change the doctype it completely changes how it looks. I have no idea why. Can anyone explain. Raw css is first. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231291 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Reload Fusebox circuts
The others mentioned the fusebox.load command, but also make sure that your fusebox.xml file has the correct circuit definitions or it'll never find the fuses. Mike Ryan Guill wrote: I have a circuit, that has the appropriate fuses in it, but the application is saying that the fuse doesnt exist. I can see the fuse in the circuit.xml in code and in the browser. Is there a way to force fusebox to reload the circuit(s) ? I am using fb 4.1 if it makes a difference. -- Ryan Guill BlueEyesDevelopment [EMAIL PROTECTED] www.ryanguill.com (270) 217.2399 got google talk? Chat me at [EMAIL PROTECTED] The Coldfusion Open Application Library - COAL - http://coal.ryanguill.com Use CF and SQL? Try qBrowser - http://www.ryanguill.com/docs/ www.ryanguill.com/ The Roman Empire: www.ryanguill.com/blog/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229818 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
learning CFCs - was The best CFC book is...
Yeah, I literally spent hours studying your bookstore app. I think I'll also get that design patterns book by the gang of four to learn more about the principles behind the various designs. Before learning fusebox, I hadn't even thought about CFCs. Now I plan to code entirely in CFCs from now on. I am even going to try and model some of my new projects after how you structured things in your app so yeah, if you've got any future suggestions, I'm all ears. I haven't really gotten the DAO and Gateway concepts totally down, but after staring at everything a little bit longer I'll have it down to where I can recreate it on my own. I know I *really* understand something when I can recreate it without having to look it up... because at that point it just makes sense. Kinda like fusebox ;) But yeah, it's a great simple, but still complex, example of CFC usage which I found very educational. Mike Brian Kotek wrote: Glad you found it useful Mike. I should note though that even that code was written a year or two ago and I would do a a couple of things differently if I wrote it today. Nothing too major though. One of these days I'll take some time to update it. Maybe knowing that folks are still looking at it will make me find that time. On 1/15/06, Michael Soultanian [EMAIL PROTECTED] wrote: Hey Casey, Here's a good example: http://tinyurl.com/3mrec I learned quite a bit from the way that he set up his CFCs in his sample bookstore app. Yeah, it's fusebox, but the concepts would carry over to script based programming as well. Mike On Sun, 15 Jan 2006 20:22:52 -0500 ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229820 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SOT: Oracle Temp Table
I'm not sure if this is remotely what you want, but have you checked out querysim? It just seemed vaguely like what you're looking for even though I've missed this entire conversation. http://www.cflib.org/udf.cfm?ID=255 Mike Ian Skinner wrote: select 'red', 'green', 'blue' from dual I'm wondering if that will work for you, just as a subquery for your join.. Won't that create three columns named red, green and blue? What I need is a single column Color with three rows each with a value of one of the list items so that I can outer join that record set against the other record set. PS. I came up with a way to due it in CF. I loop over the list doing a query of a query against a query of the second table. I then dynamically build a query object combining the list and query of query results. It works, but I would still be interested in an Oracle Internal solution if one exists. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229708 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: The best CFC book is...
From what I've read, it can obviously be done, but it's just bad form. MVC doesn't have to be adhered to either, but it does make your life easier in code reusability and maintainability. mike Ian Skinner wrote: Well, the generally accepted best practice is that CFCs should *not* output anything... WHY??? I understand why one would not want to mix display functionality with other layers of logic, and I am trying to learn how to separate my coding along these lines. But nobody has explained to me why it is inherently bad to do display in a CFC as long as that is the purpose of that CFC. Is there something wrong with creating a display CFC for ones view layer? -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229722 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: The best CFC book is...
Hey Ian, Good point.. you got me there. I'm guessing it probably has something to do with OO practices and that objects are for data and logic and then something else displays the information. On the flip side, they do provide a mechanism for passing variables in that could be displayed... yeah, I'm not sure about why not. A quick search on google came up with this: http://mkruger.cfwebtools.com/index.cfm/2005/12/20/cfc.debug I'm trying to find the CFDJ article they mentioned.. Mike Ian Skinner wrote: From what I've read, it can obviously be done, but it's just bad form. MVC doesn't have to be adhered to either, but it does make your life easier in code reusability and maintainability. Mike So, why is it bad form? Assuming you are not mixing your layers, why is it bad to create a view CFC that does nothing but display? What is it about using a CFC for the display that would break a MVC model? -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229724 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: The best CFC book is...
found it: http://coldfusion.sys-con.com/read/154231.htm i'm gonna read it now and see what it says.. Mike Soultanian wrote: Hey Ian, Good point.. you got me there. I'm guessing it probably has something to do with OO practices and that objects are for data and logic and then something else displays the information. On the flip side, they do provide a mechanism for passing variables in that could be displayed... yeah, I'm not sure about why not. A quick search on google came up with this: http://mkruger.cfwebtools.com/index.cfm/2005/12/20/cfc.debug I'm trying to find the CFDJ article they mentioned.. Mike Ian Skinner wrote: From what I've read, it can obviously be done, but it's just bad form. MVC doesn't have to be adhered to either, but it does make your life easier in code reusability and maintainability. Mike So, why is it bad form? Assuming you are not mixing your layers, why is it bad to create a view CFC that does nothing but display? What is it about using a CFC for the display that would break a MVC model? -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229728 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: The best CFC book is...
After some more thought, I could see them coming in handy if I were building a script-based, traditional setup. However, I am a recent fusebox addict (which is amazing, btw) and therefore there isn't much need for me to make an additional CFC to handle output. The concept of fuses is that they're simple and easily editable so adding unnecessary complexity wouldn't really help me out much. Plus, then I'm worrying about relative paths to other files and what-not. I kinda like how things are broken up into individual items as it helps me see the overall picture of what I'm working on and certain display fuses are grouped together and keep things organized and manageable (which can be done with multiple CFCs I suppose). To that end, there's no reason for *me* to use a CFC, but I'm sure someone could find a valid reason to use them for display purposes. But I think if I were using a script-based setup, I might consider using CFCs for display purposes to help compartmentalize everything. Ultimately, I'm not a cf pro by any means, but I always like these kinds of conversations because it kinda forces you to think outside the box and challenge ideas where people say you do it just because. Sometimes it's good to go by those standards just because someone else found the pitfalls that you haven't hit yet, but sometimes many people just fall into line because they didn't want to rethink the whole process, which is just as valid of a reason as well... Mike Ian Skinner wrote: Well, the generally accepted best practice is that CFCs should *not* output anything... WHY??? I understand why one would not want to mix display functionality with other layers of logic, and I am trying to learn how to separate my coding along these lines. But nobody has explained to me why it is inherently bad to do display in a CFC as long as that is the purpose of that CFC. Is there something wrong with creating a display CFC for ones view layer? -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229732 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: The best CFC book is...
I was actually curious about that book as well. My goal from this point forward was to write all of my code in CFCs only. I haven't written a CF function yet as I haven't been ready for the transition, but it doesn't look like it's going to be that tough. You might also want to check out Hal's occasional newsletter that also has info about CFCs. Another book I'm debating getting is Design Patterns: Elements of Reusable Object-Oriented Software from the Gang of Four: http://tinyurl.com/dmjwt I've heard it's good and it's gotten great reviews. Mike Michel Deloux wrote: Hi all I'm an intermediate CF developer looking for(late 'cause CF 5 version) CFC books to learn how to work with components. Hal Helms wrote Discovering CFCs: ColdFusion MX Components. Do you recommend? Cheers MD ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229612 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: The best CFC book is...
really? How come you didn't like it? I've heard it's pretty conceptual, but I don't mind that kinda stuff, especially if it'll help me design my overall cfc structure better.. Aaron Rouse wrote: Pretty sure that is one I bought awhile, if so then I would avoid it. I did not care for it at all but to each their own. On 1/15/06, Michel Deloux [EMAIL PROTECTED] wrote: Hi all I'm an intermediate CF developer looking for(late 'cause CF 5 version) CFC books to learn how to work with components. Hal Helms wrote Discovering CFCs: ColdFusion MX Components. Do you recommend? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229614 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: The best CFC book is...
Oh.. are you talking about hal helms book or the gang of four book? I thought you were talking about the gof book.. I haven't read hal's book.. my bad ;) Mike Aaron Rouse wrote: I did not like how it was written, did not like how several of the examples were flawed, and did not like the general layout of the book felt like it was done in a manner to just fill up more pages. I think a lot more could be learned about CFCs through online tutorials and mailing lists. Another flaw with the book is it is written for 6.0 CFCs, if I am remembering the right book. On 1/15/06, Mike Soultanian [EMAIL PROTECTED] wrote: really? How come you didn't like it? I've heard it's pretty conceptual, but I don't mind that kinda stuff, especially if it'll help me design my overall cfc structure better.. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229617 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
please stop! Re: CF Debugging CSS Layout
Could you guys please take this offlist? And yes, I know about filters, the delete button, and what-not, but this discussion has wandered far off topic regardless. There's a great css list at css-discuss.org. Thanks! Mike dave wrote: Will you need to put a hat on your balding head cause because the chill must be doing more damage. Yes there was an issue but since in your old age and receding hair line and memory seem to forget that the problem was a z-index bug in mac ff which isn't a fault of css. Crying? Will should I post your 28,459 yahoo im's a day i get from you where your stolen code don't work and you can't understand why Yanno why? Because they just aren't quite THERE yet. Umm ok Mr Expert who when asked didn't even know how to make a css comment a few days ago so how are you qualified to make this assuming? The fact is css is fine and the part that's not in the building yet is you. After I hit community mx? Ok Will, I seem to recall you freaking out like you won the lottery (again) about how your css menu WORKED OMG YOU CANT BELIEVE IT WORKED FIRST TIME OMG OMG and it was you who copied and pasted their menu into your page, you couldn't even change the colors lol, Bobby and I got a good laugh at that and all your OMG OMG OMG IT WORKED FIRST TIMES, which is the only clue we need to know you didn't write it . but I'd rather avoid that and drop in a few tables that WORK IN ALL MY BROWSERS with no hassle Ok Will, even when you do that they don't work till you spend 3 weeks making each row color and this is how you are and half-ass everything, maybe if you took the time to learn some of this stuff (instead of working on i_will_never_be_done_with_this_friggin_cart.cfc) instead of half assin everything then you'd have more than one (1) client and some of your own knowledge. Oh and I like how you say all my browsers lol, now there is something to look for in a web developer, well hell it looks good in all HIS browsers!!! Well they don't look good in MY browsers and I'm the visitor, do you get the difference? If you don't understand it that's fine but don't blame it on css blame it on yourself, you can look at the csszengardens.com and they look better and more consistent than any of your table based layouts so they must be using that ulta-secret magiccss tag with no hassle Do you tell potential clients this? Maybe that's why they don't call you back Again this is you half-assing it, I can see you telling your clients that you will only do the minimum to get by but it will look good on YOUR browser This isn't a job to half-ass it, sometimes you need to actually spend sometime doing what's needs to give them a quality site. And so when you make these sites, well ok your one site, and the day comes that they want visitors to be able to view it on their Ipod (since i bet the next ipod will have Internet on it) and now they are going to have to remake their site and since you half-assed it the first time do you think they are going to come back to you again? And since you try to mock what I do then how come everything you do I can look at source and see my(yes mine but poorly hacked) code? ~Dave the disruptor~ google will pay you money to getting rid of ie :) http://explorerdestroyer.com/ http://www.killbillsbrowser.com/ From: Will Tomlinson [EMAIL PROTECTED] Sent: Saturday, January 14, 2006 7:27 AM To: CF-Talk cf-talk@houseoffusion.com Subject: Re: CF Debugging CSS Layout heck the last 2 sites i did looked perfect in mac ie without any tweaks at all, I don't know how you'd know since you don't have a mac. No, I don't remember you whining like a little baby cause your css wouldn't work right. You said oh I got it! Still broke! Menus, layout, everything. Don't be lyin' either, like you never cried about it. Bottom line is css layouts tortured you disruptor! Admit it! They made you pull your hair out quite a few times. Gave you a headache. Yanno why? Because they just aren't quite THERE yet. Almost but not yet. yeah you got yours workin finally after bobby held yer hand, and after you hit communitymx all night long readin' tutorials, but I'd rather avoid that and drop in a few tables that WORK IN ALL MY BROWSERS with no hassle. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229587 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Get last inserted ID
What if someone were to insert another city just before the SELECT statement executed? Mike Baz wrote: James, in which cases is it not 100% reliable? Are the CF-Talk archives searchable? On 1/9/06, Baz [EMAIL PROTECTED] wrote: Is this the best way to do this: cftransaction cfquery name=InsertAddress datasource=#DSN# INSERT INTO Address (City) VALUES (cfqueryparam value=#City# cfsqltype=cf_sql_integer /) /cfquery cfquery name=getInsertedID datasource=#DSN# SELECT MAX(AddressID) as MaxID FROM Address /cfquery /cftransaction I'm using MySQL. -- CFAJAX docs and other useful articles: http://jr-holmes.coldfusionjournal.com/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228791 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Get last inserted ID
I'm going to be using SQL Server and I wanted something like Oracle's sequences. I found this: http://jamesthornton.com/software/coldfusion/nextval.html Mike James Holmes wrote: (This is based on Oracle defaults; ymmv with MySql). It's essentially what Mike said, but only if the other insert is committed first. It's like this: 1) My transaction is started 2) My INSERT is done 3) Someone else's transaction starts 4) Their INSERT is done 5) Their SELECT is done 6) Their transaction ends and is committed 7) My SELECT is done (and I get the wrong ID). 8) My transaction ends and is committed. It's unlikely, since both transactions are doing the same thing and if I start first I should finish first, but it can happen. Make this serializable and it can't happen (but then you risk transaction can't be serialized errors and performance decreases). The best way is to select the ID first, from a sequence or some other thing that guarantees a unique value (this is why a UUID is so good for this) and use that in the insert. It can be done in a Stored Proc to keep it all within the DB if you like. You can google the CF-Talk archives from the site. On 1/9/06, Mike Soultanian [EMAIL PROTECTED] wrote: What if someone were to insert another city just before the SELECT statement executed? Mike Baz wrote: James, in which cases is it not 100% reliable? Are the CF-Talk archives searchable? On 1/9/06, Baz [EMAIL PROTECTED] wrote: Is this the best way to do this: cftransaction cfquery name=InsertAddress datasource=#DSN# INSERT INTO Address (City) VALUES (cfqueryparam value=#City# cfsqltype=cf_sql_integer /) /cfquery cfquery name=getInsertedID datasource=#DSN# SELECT MAX(AddressID) as MaxID FROM Address /cfquery /cftransaction I'm using MySQL. -- CFAJAX docs and other useful articles: http://jr-holmes.coldfusionjournal.com/ ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228795 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
question about insert select statement
I have a user interface and it has multiple checkboxes to select what members of a group a user is in. I have a table to store user information (USERS), a table to store the groups (GROUPS), and a join table to keep track of what group a user is a member of (GROUPMEMBERS). I set the NAME field of all the checkboxes to ffGroups and the VALUE for each of those checkboxes is populated with a different GROUP_ID. URL.USER_ID is the current user I'm editing. I have the following query to insert the users and groups into the join table: INSERT INTO GROUPMEMBERS(USER_ID, GROUP_ID) SELECT '#Val(URL.USER_ID)#', GROUP_ID FROM GROUPS WHERE GROUP_ID IN (#ffGroups#) I don't get why it's not generating an error, though. '#Val(URL.USER_ID)#' does not exist in the GROUPS table. I tried making the following test query: cfquery name=miketest SELECT '1', GROUP_ID FROM GROUPS /cfquery and it threw an error, so I'm guessing because that SELECT statement replaces the VALUES portion of the INSERT statement, it lets it fly for some reason. Is this true? I was just curious... Thanks! Mike ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228733 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: question about insert select statement
Andrew Tyrone wrote: INSERT INTO GROUPMEMBERS(USER_ID, GROUP_ID) SELECT '#Val(URL.USER_ID)#', GROUP_ID FROM GROUPS WHERE GROUP_ID IN (#ffGroups#) I don't get why it's not generating an error, though. '#Val(URL.USER_ID)#' does not exist in the GROUPS table. I tried making the following test query: cfquery name=miketest SELECT '1', GROUP_ID FROM GROUPS /cfquery and it threw an error, so I'm guessing because that SELECT statement replaces the VALUES portion of the INSERT statement, it lets it fly for some reason. Is this true? I was just curious... In the first query, you're creating the values in the first column dynamically, so it doesn't matter that the user_id is not in the groups table. In the test query the only problem I can see is you don't have a datasource defined. Both queries should work, even if your user_id is an integer, although you shouldn't put single quotes around it if it is. Whatever database you're using (I am assuming SQL Server), an implicit conversion from char/varchar to int for the user_id column is happening behind the scenes. Andy Hey Andy, Sorry, yeah, I left off the DSN and when I put that in, it worked. So, I guess it's valid to just do: SELECT '1', '3', 'A', GROUP_ID FROM GROUPS even though the first three arguments of the select statement aren't even fields in the GROUPS table. I'm guessing if I were to dump the recordset of that select statement I would see 1, 3, and A repeated for every GROUP_ID that is returned, huh? It's almost like I'm building my own fields for the recordset instead of actually pulling the data from the table, except for the GROUP_ID? As far as the single quotes, I think I remember that I needed to use single quotes when using Oracle. I'm guessing double quotes are used for SQL? I will try dumping the output of the above select statement and see what it does. This is pretty interesting. Thanks! Mike ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228748 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Problems installing MX 7.01 on Windows 2003 Server Standard
A quick search on google with the following phrase: JNDI port 2920 coldfusion came up with: http://www.macromedia.com/go/228c3aaa I had the same problem. Uninstall SP1, install CF, then reapply SP1. It's a pain in the ass but there's not much else you can do about it (that I know of). Good luck, Mike Pete Ruckelshaus wrote: OK, here are the errors from the install log: ANT Script Error: Status: ERROR Additional Notes: ERROR - standalone.xmljava.io.FileNotFoundException: C:\CFusionMX7\tmpmove.bat (Access is denied) ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228086 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Wireframing Recommendations?
I'd second that. I've been working with Fusebuilder for the past few months and it's a great product. Every time I think of something that could be helpful, I let Mike (FB author) know and it turns out that he's already implemented. It's a very thought-out product and has helped us greatly with its wireframing features. Plus, now he's implemented AJAX which speeds things up. Mike Damien McKenna wrote: Fusebuilder.net It's a great product and there are some Flash-based tutorials showing how to do some of the basics. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228015 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Wireframing Recommendations?
You know, for presentation it would still work nicely. Plus, Mike's implementing features so that you can customize the output to look like your site's design. I used it for the first time w/ a client and she was really happy to be able to see the site coming together in real-time - a very powerful too. Heck, it might even convert you to using FuseBox (which I think is a good thing). But having said that, it would help to have some knowledge of FuseBox because the constructs all follow FB syntax and what-not. Go to the Fusebuilder site and give it a try and see if you like it - http://www.fusebuilder.net Mike Eric J. Hoffman wrote: How is it for systems that are non-fusebox oriented? Seems to output fusebox...couldn't care if its just for demonstration I guess. :) Eric J. Hoffman Managing Partner 2081 Industrial Blvd StillwaterMN55082 mail: [EMAIL PROTECTED] www: www.ejhassociates.com tel: 651.207.1526 fax: 651.207.1536 mob: 952.210.9060 This message contains confidential information and is intended only for [EMAIL PROTECTED] If you are not cf-talk@houseoffusion.com you should not disseminate, distribute or copy this e-mail. Please notify [EMAIL PROTECTED] immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Eric J. Hoffman therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -Original Message- From: Mike Soultanian [mailto:[EMAIL PROTECTED] Sent: Friday, December 30, 2005 1:19 PM To: CF-Talk Subject: Re: Wireframing Recommendations? I'd second that. I've been working with Fusebuilder for the past few months and it's a great product. Every time I think of something that could be helpful, I let Mike (FB author) know and it turns out that he's already implemented. It's a very thought-out product and has helped us greatly with its wireframing features. Plus, now he's implemented AJAX which speeds things up. Mike Damien McKenna wrote: Fusebuilder.net It's a great product and there are some Flash-based tutorials showing how to do some of the basics. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228055 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
fusebox: Question about fuseactions and sidebar menu
The fusebox forum isn't that active and I've seen some fusebox posts here so hopefully someone can give me a little advice... I'm trying to figure out the best way to design my menu system Fuseactions. I have a sidebar menu that changes for given main menu nav items. So, let's say the top main nav bar has ABOUT, NEWS, etc.. the ABOUT page sidebar links will be different from the NEWS sidebar links. Now, to handle this, I created separate ciruits/FAs: about.abouthome about.aboutnews about.maps and news.newshome news.newswhatsnew news.newsrandomstuff and so on... The way I have it designed now is if you call up about.abouthome, there is a preFA that calls up sidebarnav.navabout which has all of the XFAs for the various links from the ABOUT pages. sidebarnav.navabout in turns calls up the sidebar fuse which is stored in a CCV and then assembled later. Does this seem like a good setup? I'm not particularly happy with the the disconnect between the ABOUT FAs and the associated XFAs stored with the sidebar FA, but I thought it made more sense to put the XFAs with the sidebar FAs than it did in the main ABOUT FAs, especially because those XFAs need to be built in the sidebar fuses, not the ABOUT fuses. Does that make sense? I'd appreciate any feedback. Thanks, Mike ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228057 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: fusebox: Question about fuseactions and sidebar menu
Dustin Tinney wrote: First: about.abouthome you should have it be just about.home or better yet, about.index... the about should be implied by the circuit. Yeah, I was going through all my circuits changing them probably at the same time you were typing it ;) In my design model I would have a action on the about news and anything else that would change up your navigation.. It would some how set/return a navigation object that would be able to draw it's self, aka, a list or something like that. Use CSS to do the formatting... Within each section/circuit (news,about,etc.) the menu stays the same for all FAs within that section/circuit. It just changes from section to section. That's why I used the preFA within that circuit to include a fuse w/ the menu for that section. I figured that way, regardless which FA is called within that circuit, they're all going to get the same menu. Then the CSS takes care of the menu like you suggest. Sound similar to what you were thinking? thanks, Mike ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228060 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFC - separate or all in one?
Hey Andy, I think it's a similar question compared to using a framework or not using a framework. Not using a framework isn't fundamentally wrong, but it does make code-reuse, maintenance, and scaling a little more tedious. I think the goal here is abstraction. Do as much as you can so that you don't care about where you're getting the data - you're just getting it. From the other direction, the query method is pulling data for what, it doesn't know, nor does it care. Then, with CFC instances, you can make objects unique to an initialized set of data which is pretty neat instead of hard-coded methods that aren't very portable. I am still learning this as well. You might want to study the bookstore app written by Brian Kotek. Take a look at how he's instantiating all of his objects: http://www.briankotek.com/index.cfm?fuseaction=coldfusion.main take a look at the fusebox.init file. It's comparable to the application.cfm file in non-fusebox apps. Also, take a look in the COM directory for all the CFCs. I learned a lot from reading through all his code (and reading the fusebox book). Mike Andy McShane wrote: This thread caught my eye and I would like to add a question of my own if I may. I am relatively new to CFC's and am still getting my head around them. I have written CFC's that only contain database calls in individual functions that are all relative to specific areas of my site, so I have a CFC called matchreport.cfc that handles all select, insert, update delete database calls, this is all that the CFC does, is there anything fundamentally wrong with doing this or is there a better way to handle this? ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:221829 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
don't understand CFC package notation
Ok, I'm at a loss as to why people use this notation, or moreso, the directory structure. From the examples in books I've read, it's suggested that you take the domain name and use that. So, let's say I have example.com, I'd put my cfcs in webroot/com and then let's say I instantiated my object and am doing a return this in my init(), my return type would be example.com.objectname. What if I was using mikeisawesome.tv. Am I going to stick all my CFCs in the folder webroot/tv and use mikeisawesome.tv.objectname as the return type? What's the logic behind this? I'd really like to know! Thanks, Mike ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:221833 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFC Lifecycle
I am no pro with CFCs as I'm just learning them myself, but I believe the answer is yes, it will die after the page request is over. In the reading I've done, people will instantiate their CFCs into persistant variables such as server, session, or application scopes so that the instance of that CFC will be available to all page requests. So, let's say for example, I have some CFC that I invoke methods on quite often. Instead of invoking it repeatedly in various pages, I might as will just invoke it once and save that instance in the application scope so it is accessible to every page. You still have to be cautious of locking, just like any other variable, though. hth, Mike Andy Mcshane wrote: Just a quick question to help clear, hopefully, the last of the muddy waters with regards to how CFC's work. A CFC that is initialized and stored within the application/session scope is then available to use everywhere as required. Now I just want clarification on CFC's created at page level. If I create an instance of a CFC on my page, carry out some processing and then do cflocate to another page am I correct in assuming that my CFC instance is now gone and if I wish to re-use it I must create another instance of it? I am just a little confused on the whole lifecycle bit of CFC's, can anyone provide some clarity? ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220880 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: flash forms and a bad directory structure?
Yeah.. I dunno.. that is weird. For kicks try putting it in the coldfusion webroot with the same file structure and see if it works. That might help narrow things down. Arturo Fuentes wrote: i did attempt that.. still no go. cfusionmx7\wwwroot and inetpub\wwwroot are two different directories.. but i don't use the cfmx one.. On 10/12/05, Mike Soultanian [EMAIL PROTECTED] wrote: Try setting up a mapping in CF server. is your web server root the same as your cf web root? mike Arturo Fuentes wrote: i'm not sure what is happening here. my directory structure is : /projects/Pets/assets/com/petlog.cfc my code references this as: myService = connection.getService(projects.Pets.assets.com.petlog, responseHandler ); I do not get a cfc location error.. i get a null back for my values. BUT... if i move my cfc into the webroot /petlog.cfc and call it as: myService = connection.getService(petlog, responseHandler ); it works fine.. for obvious reasons i do not want to chuck my cfc's into the root of my server... but i am not sure wtf is going on here.. if anyone has any ideas or suggestions. i am open... ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220835 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: flash forms and a bad directory structure?
Try setting up a mapping in CF server. is your web server root the same as your cf web root? mike Arturo Fuentes wrote: i'm not sure what is happening here. my directory structure is : /projects/Pets/assets/com/petlog.cfc my code references this as: myService = connection.getService(projects.Pets.assets.com.petlog, responseHandler ); I do not get a cfc location error.. i get a null back for my values. BUT... if i move my cfc into the webroot /petlog.cfc and call it as: myService = connection.getService(petlog, responseHandler ); it works fine.. for obvious reasons i do not want to chuck my cfc's into the root of my server... but i am not sure wtf is going on here.. if anyone has any ideas or suggestions. i am open... ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220790 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
question about structures
I am a little bit confused about declaring a structure. Take a look at the following: cfset name.first = mike / cfset name.last = soultanian / Assuming that I never explicitly declared name as a struct, is the preceding code segment valid? If I then do a cfdump var=#name# / it will say that it's a struct, even though I didn't actually declare it using structnew(). The reason I ask is because I have noticed, especially in CFCs, that coders will use variables.instance.variable names without ever declaring variables.instance as a structure. Any thoughts? Thanks, Mike ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220071 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: question about structures
Ok, nevermind. A quick look into my programming cf mx book after I sent this email mentioned that creating a variable with the period notation will automatically create a structure. thanks, Mike Mike Soultanian wrote: I am a little bit confused about declaring a structure. Take a look at the following: cfset name.first = mike / cfset name.last = soultanian / Assuming that I never explicitly declared name as a struct, is the preceding code segment valid? If I then do a cfdump var=#name# / it will say that it's a struct, even though I didn't actually declare it using structnew(). The reason I ask is because I have noticed, especially in CFCs, that coders will use variables.instance.variable names without ever declaring variables.instance as a structure. Any thoughts? Thanks, Mike ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220072 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: form validation utilizing database field types/sizes/etc
Do you look at the db type and then query it accordingly? Actually not, this is the beauty of ODBC: it is (well almost) DB independant. The only things that are DB dependent are a couple of things (flaws) not supported by some ODBC drivers. This is what I was curious about. I am trying to pull the metadata out of the database but it seems that Oracle and SQL don't support the same methods for querying that metadata. For Oracle, it looks like I will be querying ALL_TAB_COLUMNS and for SQL Server it's a query to INFORMATION_SCHEMA. I guess I could make a config that sets the DB type and do my queries accordingly, but I was curious if anyone knew other ways to query the database systems to get the data out. Thanks, Mike ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218432 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: form validation utilizing database field types/sizes/etc
Yeah, I read through it once already, but I'm not a big on java (just because I don't know it). But let me go read through it again. Mike S. Isaac Dealey wrote: Do you look at the db type and then query it accordingly? Actually not, this is the beauty of ODBC: it is (well almost) DB independant. The only things that are DB dependent are a couple of things (flaws) not supported by some ODBC drivers. This is what I was curious about. I am trying to pull the metadata out of the database but it seems that Oracle and SQL don't support the same methods for querying that metadata. For Oracle, it looks like I will be querying ALL_TAB_COLUMNS and for SQL Server it's a query to INFORMATION_SCHEMA. I guess I could make a config that sets the DB type and do my queries accordingly, but I was curious if anyone knew other ways to query the database systems to get the data out. Yep, that's why I use JDBC... Here's the article: http://coldfusion.sys-con.com/read/45569.htm s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218440 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: cfx_image or cfximage
Well, let's see. Right now, here's what I use the tag for. I have a user upload a picture. Then, I rename the picture to a random filename. Next, I use cfximage to resize that image to 4 different sizes and store the output of each of those sizes to an appropriate name: filenameT, filenameS, filenameM, filenameL. I figured I would do the image processing ahead of time instead of on the fly because then it's only a web request for those images later on. I don't *think* I'm going to get any more advanced than that. As far as formats, I will allow uploads of jpg or gif. Any thoughts? Thanks, Mike Bryan Stevenson wrote: Hey Mike, Perhaps knowing what you are planning on doing with these image tags will help us guide you ;-) There are other options to those tagsJava comes to mind...faster and free...all depends on what you're trying to do. For example if you simply want to re-size imagesuse Java...I'll give you the code!! HTH Cheers Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218234 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
form validation utilizing database field types/sizes/etc
I was wondering if there is a way to pull column information from oracle to help with form validation. It would be really nice if I could set up my database and then have coldfusion read the setup of my tables and perform its form validation based on that. I did some research on this and it seems like SQL server supports a standard format using INFORMATION_SCHEMA to return the column types and sizes and what not. Is there some way to pull similar information from oracle so I can use that for form validation purposes? Thanks, Mike ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218238 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: form validation utilizing database field types/sizes/etc
So, I did some more digging on google and I found the following: select column_name, data_type, data_length, data_precision, data_scale from ALL_TAB_COLUMNS where table_name = 'USERS' and column_name = 'USER_ID' And with CFDUMP, it returned something like this (kinda wrapped): COLUMN_NAME DATA_LENGTH DATA_PRECISION DATA_SCALE DATA_TYPE 1 USER_ID 22 10 0 NUMBER that's pretty good! I think I'll see what I can do with this. If someone does have code to manipulate this in some kinda form validation, that would be handy. Otherwise, I figure that I'll just match my form field names to the database names (i.e. ffUSER_ID), strip off the ff and then pull the column specs out of the database and do the validation. Ultimately, I'd like to make a custom tag that handles this as I hate building in form validation. Thanks, Mike Mike Soultanian wrote: I was wondering if there is a way to pull column information from oracle to help with form validation. It would be really nice if I could set up my database and then have coldfusion read the setup of my tables and perform its form validation based on that. I did some research on this and it seems like SQL server supports a standard format using INFORMATION_SCHEMA to return the column types and sizes and what not. Is there some way to pull similar information from oracle so I can use that for form validation purposes? Thanks, Mike ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218255 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: form validation utilizing database field types/sizes/etc
Hey Claude, So how are you pulling your info? I'm guessing you're doing it all via odbc instead of java. Do you look at the db type and then query it accordingly? Thanks, Mike Claude Schneegans wrote: I'm working on a db tool based on CFX_ODBCinfo (see http://www.contentbox.com/claude/customtags/ODBCInfo/E/TestODBCInfo.cfm?p=hf ) It is able to generate source code for FORMs with many parameters set according to information about table, fields, etc. For example, MAXLENGTH are set automatically in INPUT fields, VALUEs are initialized from columns names, etc. A query to get the values is also generated. From there, adding some code for data validation wouldn't be too difficult. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218308 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: cfx_image or cfximage
Hmm.. I started doing some research on it and found that Jukka's didn't have very good image quality when resizing images. Do you know the licensing for these products? Is there any at all or are people free to use them in their apps. I also found another one called cfximagecr. That one looks pretty neat, but it costs 180 per server. However, they claim to have really good image conversion quality. thanks, Mike Barney Boisvert wrote: They're totally separate. If I recall correctly, Jukka's a very indepth image processing tag that utilizes it's own command language, while the other one is very simple. I might have that backwards, but I'm pretty sure it's right. I preferred Jukka's because the simple stuff wasn't much harder, but you could do some pretty cool stuff with it if you got down and dirty. cheers, barneyb On 9/12/05, Mike Soultanian [EMAIL PROTECTED] wrote: Does anyone know if the two are related? There is cfximage from gafware.com, and then there's cfx_image from http://www.kolumbus.fi/jukka.manner/ Does anyone know if one is based on the other, or if one is better, etc? Thanks! Mike ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218126 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
cfx_image or cfximage
Does anyone know if the two are related? There is cfximage from gafware.com, and then there's cfx_image from http://www.kolumbus.fi/jukka.manner/ Does anyone know if one is based on the other, or if one is better, etc? Thanks! Mike ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217997 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Can CSS and Layers Take the Place of Tables for Displaying Dynamic Data?
Yeah, CSS is by far the most superior method to giving yourself the biggest headache ever imaginable. I've been doing A LOT of css research and I am still going to use a large table for general layout and then divs within that. Don't get me wrong, css for styling is great, it just sucks for positioning. I am still very hesitant about using css for positioning as it just doesn't work right in all browsers. I look at big sites like mail.yahoo.com. Those guys are doing some of the most advanced CSS I've seen out there, yet they still use tables for general layout because they don't want to deal with CSS positioning nightmares. Want to further that headache, visit: http://www.css-discuss.org/ enjoy! Mike Rick Faircloth wrote: Yes, tables do make sense for tabular data display...it's intuitive for me to think in terms of query rows and table rows...I just wondered if the CSS and Layers approach had some superior way of working with not just general design, but, especially in displaying dynamic data... Rick -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Friday, September 09, 2005 12:29 PM To: CF-Talk Subject: Re: Can CSS and Layers Take the Place of Tables for Displaying Dynamic Data? one thing to bear in mind is that tables are NOT inherently evil. even in a CSS world, they serve a purpose (to display tabular data). prior shortcomings in browsers meant that they were used for layout, which is what you want to move away from when you move towards CSS. Since you mention displaying column headers and then the query data, it does sound like you want to output your data in a tabular fashion, which would be a appropriate use for tables. On 9/9/05, Rick Faircloth [EMAIL PROTECTED] wrote: Hi, all... I've always used tables to display my data from queries. Now, I've begun to be interested more in using CSS and Layers. The first question I have is how would one display data from queries if not by using the top row of a table as the column headers and then looping through the query, displaying the data for each query row in each table row? That approach makes perfect sense to me, but I don't know enough about CSS and Layers to know if you have to (or if it's preferable) to use a table for data display even when using CSS and Layers? Also..a table will expand vertically to accomodate more data...will a div? Anyone have any input to offer on the approach to presentation? If the answer to these questions and the overall approach is positive to using CSS and Layers for display, then I'll continue to study the tutorials, etc., that I find to learn CSS and Layers... Rick ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217821 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Can CSS and Layers Take the Place of Tables for Displaying Dynamic Data?
You just gotta be very careful if you're ever planning on building a site that is ADA compliant (which you should try to do anyways). Tweaked table layouts are very difficult for screen readers to handle so that's a big push for CSS websites. However, you still can build sites that are ADA compliant that still use tables.. you just have to use them correctly. again, http://www.css-discuss.org is your friend Mike Rick Faircloth wrote: That's what I'm wondering...I've got a system, while not flawless, works very well...and I've learned a lot of tricks and tweaks to working with tables. I work with tables primarily for design, but apply styles to the tables and cells... Rick -Original Message- From: Matthew Small [mailto:[EMAIL PROTECTED] Sent: Friday, September 09, 2005 12:26 PM To: CF-Talk Subject: RE: Can CSS and Layers Take the Place of Tables for Displaying Dynamic Data? Don't try it... you have a perfectly good system, no reason to throw it away. Matthew Small -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: Friday, September 09, 2005 12:20 PM To: CF-Talk Subject: Can CSS and Layers Take the Place of Tables for Displaying Dynamic Data? Hi, all... I've always used tables to display my data from queries. Now, I've begun to be interested more in using CSS and Layers. The first question I have is how would one display data from queries if not by using the top row of a table as the column headers and then looping through the query, displaying the data for each query row in each table row? That approach makes perfect sense to me, but I don't know enough about CSS and Layers to know if you have to (or if it's preferable) to use a table for data display even when using CSS and Layers? Also..a table will expand vertically to accomodate more data...will a div? Anyone have any input to offer on the approach to presentation? If the answer to these questions and the overall approach is positive to using CSS and Layers for display, then I'll continue to study the tutorials, etc., that I find to learn CSS and Layers... Rick ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217823 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Question about my security system
Ok Jim, I think I found the last area where we're getting mixed up. However, I think I understand where you're coming from (and see some of the advantages that you have suggested). My proposed idea below is still storing the file information, but I'm using your filename-permission idea. Check this out: Blank initialized system - Permission database is currently empty (no permissions registered). Some random user logs in and hits two templates (user.cfm and message.cfm) which have the following: USER.CFM cf_security perms=read,edit,delete MESSAGE.CFM cf_security perms=read,edit,delete,post Since neither of these files have been registered with the security system yet, cf_security registers the filenames and permissions in the database (assuming filenames are the unique identifier for simplicity) and tells the user to wait until permissions have been set. The permission table would look like this: PERMID FILENAMEPERMGROUP 1 MESSAGE READ 2 MESSAGE EDIT 3 MESSAGE DELETE 4 MESSAGE POST 5 USERREAD 6 USEREDIT 7 USERDELETE Now, I log into my super-duper permission editor and assign groups to those permissions so the table will now look like this: PERMID FILENAMEPERMGROUP 1 MESSAGE READUSERS 2 MESSAGE EDITMODS 3 MESSAGE DELETE ADMINS 4 MESSAGE POSTUSERS 5 USERREADUSERMODS 6 USEREDITUSERMODS 7 USERDELETE ADMINS Now, here is the user/group membership table: USERS GROUPS joe USERMODS, USERS mikeADMINS, MODS dan USERS Let's say user Joe logs in and he's obviously a member of the USERMODS and USERS groups. Upon login, the system performs a lookup to see what permissions are assigned to those groups (IDs 1, 4, 5 and 6). Those permissions are then loaded into memory like this: session.permissions = messageread, messagepost, userread, useredit Now, let's say Joe hits the USER.CFM template. The cf_security tag is the following: USERS.CFM cf_security perms=read,edit,delete so the cf_security tag can do a compare between the permissions loaded in memory (session.permissions) and what permissions are stored in the file and set any permission to TRUE that match up (remember, cf_security assembles the permission by taking the filename and the permission). The nice thing about this is within the code, you just use standard words like: if edit do this end if Instead of: if messageedit do that end if which makes the code nice and portable if you decide to reuse it somewhere else (not specific to that file). What I really like about this is that there are no database hits while the user is browsing the site. Keeps things nice and fast. The only thing I don't like about this setup is that I'm loading up all those permissions into memory - seems kinda wasteful. Let's say I had 100 files with each of them having a few permissions, that list could be huge, multiply that by lots of users, that could be a lot of memory. I could instead load the PERMID list into memory, but then I'd obviously have to do a lookup to pull the actual permission out of the database every time someone hits a template so cf_security could make the match. The other option is loading up the group memberships into the session variable at login and then doing a group/permission lookup for every template, but that would have a similar performance hit (if not slightly higher) than the PERMID list, but the session variable stays small. Now, I understand that I'm repeating permissions, i.e. there is a permission EDIT in USER.CFM and also another permission EDIT in MESSAGE.CFM, but those permissions are still template specific. I can't give some group generic EDIT permissions because EDIT on one template doesn't mean the same thing on another template. i.e. You have an file in NTFS that has modify permission. You also have an OU in Active Directory that can be assigned the modify permission. However, that doesn't mean that I should have generic modify access to both of those objects just because their permission titles are the same. So whatcha think? Mike ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217658 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Question about my security system
I see the point but I'm not sure if I agree with the implementation. What you talking about here is metadata: information about the file. By putting all of this in the data base you're adding a level of complexity that I just wouldn't be comfortable with. Well, it adds flexibility at the price of complexity. It's not *that* hard to implement it. My first implementation was actually quite easy to code. And yes, while it is a database lookup, it's a very small lookup at that so I don't think it should take that much time. I'll have to research how bad the performance degredation will really be... The cf_Security tag has to be used (it doesn't have to be used in every file, by the way, just a common include that's run for every request). So you already have a requirement to put something in every file (or in some common place) but let's say it's included on every page. Well, yes, it does need to be included on any template that needs to be secured (every template in my case). At the time of coding a template, I will identify what actions are to be performed in that template. I will then update the cf_security tag to read like this: cf_security permissions=read,write,delete What happens is when the cf_security tag runs, it will update the database with those permissions (if it hasn't already been done) and then I can go into the GUI and find that file and assign groups to each of those permissions. Then, when a user requests the template, cf_security runs and spits out a structure or some variables set to TRUE for whatever permissions that the user's group has access to. This is how I am abstracting any group/user references from the template. The cf_security tag does the lookup and spits out variables that the calling template can use for its processing. But you're also inheriting a need to make every file uniquely named (or else moving files would be a nightmare) and this doesn't mesh with most web sites (which use the same root for every directory). Ahh, yes, I've thought this out. Obviously it's a problem if every file on my site is called index.cfm ;) So, instead, the cf_security tag will include a unique file security identifier that is automatically placed in every file that the cf_security tag is place: cf_security permissinos=read,write,delete FileSID=jasjdj32j42kj3 The way that the SID is inserted is also handled by the cf_security tag. If the tag notices that it wasn't called with a FileSID, it will generate a unique ID, register that ID in the database, then rewrite the calling template with that ID. This will obviously only be performed once. As of now, I know of no other way to uniquely identify other than giving it a unique identifier. You're also using a database which has no real connection to the file to store important information about the file. New files must be added the filesystem and then registered in the security system. All changes will require a trip to this UI (and when you're talking about doing this on the file level I'm not sure if that's any easier than just changing something in the file). Again, this is handled by cf_security automatically. I just didn't include that in my previous post because it was somewhat unrelated to the overall concept.. and to keep the discussion simple. The parallel of the Windows permission system (well... at least NTFS) is a good one: the file permissions are maintained in the file or directory. Move a file and it still has the same permissions. Yeah, that was exactly what I was going for. The problem is that there is no GUI for editing a file and dropping in the correct name. For example, you edit a file in NTFS and add a group or user to that file. It looks that up the group's name in a database and then stores that SID in the file or wherever it stores it. If I were to completely parallel that concept, I'd open up dreamweaver and I'd (me, mike) be the database lookup mechanism as I open up my app and look what groups I've created. So, I kinda have to shift the storage of file-level permissions into the database so that association can happen automatically. There is no centralized database of file-level permissions. In a, let's say average system, you might put your security groups in the file: isEntitled(User, admin,member) Which returns true if the user is an admin or a member. This isn't a bad thing in and of itself, I think. The security information is where I think it should be: in the file. You know, no, it's not that bad. Where it gets annoying is if you rename a group. Now you've got a big uh oh. Suppose Admin is now called Support Staff and I've added a new group called System Administrators. Now I'd have to edit every file that makes a reference to each of those groups and could possibly compromise my security by a stupid editing mistake. While I think I could try really hard to plan out my application pretty well in the beginning to avoid any
Re: Question about my security system
Dave Watts wrote: As of now, I know of no other way to uniquely identify other than giving it a unique identifier. The file name and path is, by definition, unique within a filesystem. Why not just use that? CF itself uses this mechanism to track which files have been compiled, for example. Unfortunately, that's making the assumption that either the filename won't be renamed (which yes, is unlikely) or the file will not move (this could happen easily within the life of the app). It's not that big of a deal for CF because it just recompiles. It would suck if it lost it's permissions because then you'd have to go reassign them again. Mike ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217603 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: ColdFusion Installation - more FREAKING JNDI problems
do you have SP1 installed already? If so, uninstall CF and uninstall SP1 and run the installer again. Then reapply SP1. There's a known installer error w/ SP1 on 2k3 later, Mike S. Isaac Dealey wrote: Why is it that the JNDI listen port is ALWAYS the problem that prevents CF from installing? ... I've got a new Win2003 server I'm trying to install my CF server on and I can't get the webserver connector to find the listen port... I've checked to make sure there isn't a firewall, proxy or anti-virus affecting it, and there isn't... I've manually configured the JNDI listen port and executed the connector from the command line and still nothing. So in lieu of that, I've tried to manually connect it by manually adding the .cfm and .cfc mappings in IIS to (C:\CFusionMX7\runtime\lib\wsconfig\jrunwin32.dll). I'm able to get an index.htm file in web root via a browser, but trying to get a .cfm file in the same directory produces a 404 error... I'm at my wit's end. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217360 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: ColdFusion Installation - more FREAKING JNDI problems
you can try what's in the technote as well, but it didn't work for me: http://www.macromedia.com/go/228c3aaa I had to uninstall CF and sp1 then reinstall mike S. Isaac Dealey wrote: Why is it that the JNDI listen port is ALWAYS the problem that prevents CF from installing? ... I've got a new Win2003 server I'm trying to install my CF server on and I can't get the webserver connector to find the listen port... I've checked to make sure there isn't a firewall, proxy or anti-virus affecting it, and there isn't... I've manually configured the JNDI listen port and executed the connector from the command line and still nothing. So in lieu of that, I've tried to manually connect it by manually adding the .cfm and .cfc mappings in IIS to (C:\CFusionMX7\runtime\lib\wsconfig\jrunwin32.dll). I'm able to get an index.htm file in web root via a browser, but trying to get a .cfm file in the same directory produces a 404 error... I'm at my wit's end. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217361 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: ColdFusion Installation - more FREAKING JNDI problems
not sure if this is the exact answer to your question, but when you look at the install log, you may see any of the following errors: Ryan Guill wrote: This may be the same problem ive been having, how did you know that it was a jndi problem? On 9/5/05, S. Isaac Dealey [EMAIL PROTECTED] wrote: Why is it that the JNDI listen port is ALWAYS the problem that prevents CF from installing? ... I've got a new Win2003 server I'm trying to install my CF server on and I can't get the webserver connector to find the listen port... I've checked to make sure there isn't a firewall, proxy or anti-virus affecting it, and there isn't... I've manually configured the JNDI listen port and executed the connector from the command line and still nothing. So in lieu of that, I've tried to manually connect it by manually adding the .cfm and .cfc mappings in IIS to (C:\CFusionMX7\runtime\lib\wsconfig\jrunwin32.dll). I'm able to get an index.htm file in web root via a browser, but trying to get a .cfm file in the same directory produces a 404 error... I'm at my wit's end. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217365 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
[Fwd: Re: ColdFusion Installation - more FREAKING JNDI problems]
oops, hit ctrl-enter instead of ctrl-v... Let's try this again: not sure if this is the exact answer to your question, but when you look at the install log, you may see any of the following errors: ANT Script Error: Status: ERROR Additional Notes: ERROR - standalone.xmljava.io.FileNotFoundException: D:\CFusionMX7\tmpmove.bat (Access is denied) ANT Script Error: Status: ERROR Additional Notes: ERROR - standalone.xmlD:\CFusionMX7\lib not found. ANT Script Error: Status: ERROR Additional Notes: ERROR - configure-rds.xmlcan not disable RDS: D:\CFusionMX7/wwwroot/WEB-INF/web.xml not foundANT Script Error: Status: ERROR Additional Notes: ERROR - standalone.xmljava.io.FileNotFoundException: D:\CFusionMX7\tmpmove.bat (Access is denied) ANT Script Error: Status: ERROR Additional Notes: ERROR - standalone.xmlD:\CFusionMX7\lib not found. ANT Script Error: Status: ERROR Additional Notes: ERROR - configure-rds.xmlcan not disable RDS: D:\CFusionMX7/wwwroot/WEB-INF/web.xml not found Web Server Connector Configuration Error Status: ERROR Additional Notes: ERROR - JNDI port 2920 for server coldfusion is not active Ryan Guill wrote: This may be the same problem ive been having, how did you know that it was a jndi problem? ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217366 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Question about my security system
template and then let the template know whether or not it can go ahead and perform the requested entitlement. I think this is where I'm losing you. I see no difference between groups and tasks in this. Ok, I think I figured out where we're getting mixed up. I come from windows administration land, so I am thinking about the setup a bit differently. When I say groups, I mean that I am creating real groups w/ group IDs in a database table and assigning users to those groups. I am not talking about logical groupings of users and calling those groupings roles or entitlements - those are two different things and I think that's where we're getting mixed up. I have specifically created tables that keep track of what users are part of what groups. So, here are some of my groups: Administrators Message Mods Organization Mods Users Public Users are then assigned into each of those groups utilizing a many-to-many relationship. I can then assign groups to resources instead of assigning individual users to resources. This is standard windows administration practice because it makes for easier user admin. Now whether this is the best strategy for web app security, that's another thing, but I'm giving it a try anyways. Now, my basic system currently works like this. I have a table that stores all the files on my site (they are uniquely named) and what groups are allowed to access each of those files. When a user requests a file, my cf_security tag (which is inserted at the beginning of every template) does a lookup to see what groups are allowed to access that file and then if the user is a member of one of those groups, it allows the user to access the file. If not, it will halt execution and go to an access denied template. Now, the only real permission (using windows lingo) that any user has with my basic system is execute. They either have permission to execute the file or not. Taking this a step further, I wanted to allow myself to assign other permissions (read, write, display, concatenate, jump, fly, whatever) to templates based on the actions that those templates might perform. So, in the user template, I need to edit/modify/delete users, and in the message template, I need to edit/post/delete messages. I wanted to take those permissions and bring control of each of them into the security system and allow myself to assign groups to *each* of those permissions on a per-template basis to really granularize the system. So, when a template is built, permissions need for that template are registered in the database and access is controlled by assigned groups to each of those permissions for that template. Is it overkill, maybe, maybe not. It's obviuosly not overkill for windows because people use file-level permissions all the time. I'm building a big application that is going to need a lot of different security contexts so making it very flexible and robust is key. Now, In my other emails I've gone over the nitty gritty of how I've programmed my current system and how I plan to program my newer concept, but the description above is the overall idea of how it will work. The ultimate goal here is to have a central security system where every permission in every template can be manged from a GUI. There will be no references to users or groups within the templates that are doing the actual processing. All the template cares about is whether it has permission to do something or not, and it's the cf_security tag (inserted at the top of every template) that tells the template what it's allowed to do (based on the pre-registered permissions for that template). Mike ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217385 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Question about my security system
Sorry, I don't think I did the best job explaining it. My approach is definately not the standard setup. The key here is abstraction; abstracting any group membership checks from templates. I'll try and lay it out a bit more simply: Now, let's say you have one single template called message.cfm, and it can perform 4 actions: read, post, edit, delete. How that template knows what action to perform is based on the URL attribute passed (i.e. message.cfm?action=edit) - nothing special here. Now, the standard setup that I've seen goes as following: Most applications might have 3 user levels, admin, moderator, user. So, there will be a check in the processing portion of the message.cfm template that checks to see if the user has access to perform that action. So you have something like the following somewhere in the template: retrieve userlevel if userlevel=admin allowedtodelete=true allowedtoedit=true allowedtopost=true allowedtoread=true if userlevel=moderator allowedtodelete=false allowedtoedit=true allowedtopost=true allowedtoread=true if userlevel=user allowedtodelete=false allowedtoedit=false allowedtopost=true allowedtoread=true endif if URL.action=delete allowedtodelete delete message end if Obviously this might not be the best example, but I think it should illustrate my point. So, based on whatever group the user is a member of, they'll be able to perform certain actions in the template message.cfm. What I don't like about the example above is that I had to hard-code those checks in the template - in other words, I am explicitly coding admin, moderator, and user into the file. What happens if I decide I want to add a super-moderator level to the whole application? Now I need to go into every file and update the processing section to include super-moderator; that could be very time-intensive. Now here's my solution. I want to abstract any group checking processing from the templates. The template shouldn't care about group names or users or what not, it just needs to know if it's allowed to do something. So, take the same example as above but rewrite it: cf_securitycheck actions=delete,edit,post,read if url.action=delete caller.actiondelete delete message end if Here's what happens: A user calls message.cfm?action=delete. The cf_securitycheck tag checks to see if the user is logged in. If the user is logged in, it then looks up the actions stored in the database for message.cfm (lets assume the file has previously been registered in the database and permissions have already been set). The simplified relational tables may look like this: FILEACTIONS GROUPS message.cfm readusers, admins, mods message.cfm postusers, admins, mods message.cfm delete admins message.cfm editadmins, mods It looks in the database to see if the groups that the user is a member of have access to any of those actions. Then, any of the actions that the user is entitled to, it sets a variable to TRUE that the message.cfm template can see using the caller scope (i.e. cfset caller.deleteaction=true). So, let's say the user is a member of mods, it will return three variables set to TRUE to message.cfm: caller.actionread, caller.actionpost, and caller.actionedit. Now all you need to do in message.cfm is do a check to see if any of those variables were set to true and perform processing accordingly. Obviously it's somewhat complicated, and probably really database intensive, but it nicely abstracts any user processing from the end template (message.cfm in my example). This idea is purely theoretical right now as I haven't figured out all of the nitty gritty details. I might end up scrapping the idea because it is so database intensive, but I will still give it a try. For my application I may be adding and removing groups throughout the life of the application and I don't want to be adding group checks into the processing sections of the templates. So does that make any sense at all? Mike ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217320 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54