Re: advice on structure and cfcs (petmarket related)
I would suggest that you look at the code that drives the MachII framework. It might give you some ideas on how CFCs can be used and what they are capable of doing. On that note (beware: shameless plug), you could also check out cfcUnit at SourceForge (http://sourceforge.com/projects/openxcf). It is another framework that is driven 100% with CFCs. stylo stylo wrote: >I'm not interested in Fusebox, and MachII is a bit much to begin with, maybe later. I am worried, however, about the speed of MachII. I thought FB3 apps ran slowly, and MachII is apparently slower, no? > >I do have Ray's BlogCFC and need to look at it more, but, to be honest, at first glance I find the structure of it a bit confusing, what with all the folders and ini file, though I will certainly study it, especially the cfcs and flow of it. Thanks, Ray! > > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: advice on structure and cfcs (petmarket related)
Thanks for the advice. I was looking at this chart: Avg. TTFB (ms) Framework20 threads 150 threads MachII 1393 12473 OnTap2939 12243 Fusebox 31270 9423 Fusebox 41144 8863 Does that chart not mean that under medium load MachII is 1/4 sec slower than FB4, and, under heavy load, MachII is about 4 seconds slower than FB4 (at least on this app)? Would have been nice to compare to some inline code as a base so as to know what the framework was adding. I understand the maintainibility trade-off, just trying to get a handle on how much trade-off. I actually prefer the MachII approach to FB, though I have a general dislike of how frameworks route everything through index.cfm and have nasty urls. I imagine there are workarounds for that, though. Thanks again. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: advice on structure and cfcs (petmarket related)
Not to mention most custom made solutions for small shortterm projects are not fast, because they aren't finetuned, evolved in any way, or the developers did not have the time to write a decent TO for the project. On such occasions you'd better take a machii framework, and use code which has all of the above. Micha Schopman Software Engineer Modern Media, Databankweg 12 M, 3821 AL Amersfoort Tel 033-4535377, Fax 033-4535388 KvK Amersfoort 39081679, Rabo 39.48.05.380 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: advice on structure and cfcs (petmarket related)
> I figured if I could code something nice and clean somewhat along the lines of the petmarket it would be faster loading. > Is that not the case? Yes, you can nearly always write something that's architected completely towards your specific app that runs a smidgeon faster than something like FB or Mach-II, but in my experience: - overhead of the FB3 framework is usually of the order of a couple of milliseconds at most. Mach-II tends to be a little more, but usually no more than 10ms or so in production mode. If you set it into production mode and you're still getting overheads of 1s or more, then there's something wrong with your code, or DB, or server setup, or something similar - Sean's example of MM using Mach-II being a case in point. - Squeezing a few extra milliseconds out of a page execution time has to be balanced against the gains in maintainability, extensibility, development/debug times, and learning curve for new team members that you get from using a standard methodology - If your app is poorly thought out, rushed, or sloppily implemented, it'll probably run like a two-legged-dog on mogadon whether you're using FB3, FB4, Mach-II, XFB, Struts, CF-Objects or your own entirely custom architecture. Ditto for its maintainability, extensibility, bug-fixing, etc etc etc. Just my two pennorth. ( If this ends up as yet another "my framework is better than your framework" flame war, I'm off to the pub! ;) ) Cheers, Alistair Alistair Davidson Senior Technical Developer Headshift.com -- HEADSHIFT >> www.headshift.com T: 020 7357 7358 -- smarter > simpler > social > Personal techie blog : http://instantbadger.blogspot.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: advice on structure and cfcs (petmarket related)
>> I wouldn't get too hung up on 'performance'... Sadly, I'd actually get more hung up on the coding, until I have more practice at it, but was thinking next app anyway. I was just going by the times shown in the comparison of fb3/fb4/machii/ontap floating around. And that some fb3 apps I've tried were quite slow. I figured if I could code something nice and clean somewhat along the lines of the petmarket it would be faster loading. Is that not the case? Thanks. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: advice on structure and cfcs (petmarket related)
On Tue, 10 Aug 2004 13:45:11 -0700, Spike <[EMAIL PROTECTED]> wrote: > That's not been my experience. > ... > With execution times turned on, the page execution time took about 30% > longer, but the debugging information took up to a minute to render. > > IMO 10-12 seconds is too slow. I agree. I was merely repeating what I'd heard other says on lists and blogs without testing it myself. Mea culpa. I don't use CF's debugging for anything so I've never had a problem with execution times... > The same page with debugging turned off takes around 4 seconds when MachII > config mode is set to reload on every request. > > With debugging completely turned off and the MachII config mode set to not > automatically reload, the page execution time is around 200 ms. Not sure what machine you're running on but I see 30-50ms for a simple Mach II app on my PowerBook G4. YMMV. The twenty-fold increase you see when reloading the config and CFCs on every request sounds not unreasonable, depending on application complexity (I see a jump from 30-50ms to about a second when I reload on every request - for a simple app). We have complex apps where execution times are several seconds when using reload-every-time mode. FWIW, we normally develop with 'dynamic' mode (only reload when mach-ii.xml changes) although, as indicated in the Mach II Development Guide, we have a force reload URL parameter available in non-production environments if we need it. -- Sean A Corfield -- http://www.corfield.org/blog/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: advice on structure and cfcs (petmarket related)
That's not been my experience. I just tested one of my apps with debug mode turned on and execution times turned off. First page hit was 40 seconds presumably because CFMX was compiling the CFML. Subsequent pages took between 10 and 12 seconds. With execution times turned on, the page execution time took about 30% longer, but the debugging information took up to a minute to render. IMO 10-12 seconds is too slow. The same page with debugging turned off takes around 4 seconds when MachII config mode is set to reload on every request. With debugging completely turned off and the MachII config mode set to not automatically reload, the page execution time is around 200 ms. All of the above execution times are based on a request timer using getTickCount() rather than the ColdFusion debug output times. The app I ran these tests on is not particularly complex or large. Spike Stephen Milligan Code poet for hire http://www.spike.org.uk Do you cfeclipse? http://cfeclipse.tigris.org >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Sean Corfield >Sent: Tuesday, August 10, 2004 12:21 PM >To: CF-Talk >Subject: Re: advice on structure and cfcs (petmarket related) > >On Tue, 10 Aug 2004 13:01:03 -0700, Spike <[EMAIL PROTECTED]> wrote: >> I think it's worth noting that for development purposes MachII can be >> brutally slow if you've got debugging turned on. > >Only if you have CF reporting execution times. If you turn execution >times off, debugging isn't too bad. >-- >Sean A Corfield -- http://www.corfield.org/blog/ > >"If you're not annoying somebody, you're not really alive." >-- Margaret Atwood > > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: advice on structure and cfcs (petmarket related)
On Tue, 10 Aug 2004 13:01:03 -0700, Spike <[EMAIL PROTECTED]> wrote: > I think it's worth noting that for development purposes MachII can be > brutally slow if you've got debugging turned on. Only if you have CF reporting execution times. If you turn execution times off, debugging isn't too bad. -- Sean A Corfield -- http://www.corfield.org/blog/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: advice on structure and cfcs (petmarket related)
I think it's worth noting that for development purposes MachII can be brutally slow if you've got debugging turned on. I found it a total pain in the butt that I had to wait upwards of 20 seconds in some cases for CFMX to get the page off the server when trying to debug a relatively large MachII app. Especially when the only change to any of the files was to make a single line modification in a file that was cached in application scope. ColdFusion provides a bunch of very handy things in the debug output and it's a real shame that MachII performance suffers so badly when it's turned on. Regards Spike Stephen Milligan Code poet for hire http://www.spike.org.uk Do you cfeclipse? http://cfeclipse.tigris.org >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Sean Corfield >Sent: Tuesday, August 10, 2004 11:54 AM >To: CF-Talk >Subject: Re: advice on structure and cfcs (petmarket related) > >On Tue, 10 Aug 2004 12:37:04 -0400, stylo stylo ><[EMAIL PROTECTED]> wrote: >> I'm not interested in Fusebox, and MachII is a bit much to >begin with, maybe later. I am worried, however, about the >speed of MachII. I thought FB3 apps ran slowly, and MachII is >apparently slower, no? > >Macromedia has about a dozen Mach II applications on macromedia.com >handling thousands of concurrent users with no problem so I wouldn't >get too hung up on 'performance'... >-- >Sean A Corfield -- http://www.corfield.org/blog/ > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: advice on structure and cfcs (petmarket related)
On Tue, 10 Aug 2004 12:37:04 -0400, stylo stylo <[EMAIL PROTECTED]> wrote: > I'm not interested in Fusebox, and MachII is a bit much to begin with, maybe later. I am worried, however, about the speed of MachII. I thought FB3 apps ran slowly, and MachII is apparently slower, no? Macromedia has about a dozen Mach II applications on macromedia.com handling thousands of concurrent users with no problem so I wouldn't get too hung up on 'performance'... -- Sean A Corfield -- http://www.corfield.org/blog/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: advice on structure and cfcs (petmarket related)
I'm not interested in Fusebox, and MachII is a bit much to begin with, maybe later. I am worried, however, about the speed of MachII. I thought FB3 apps ran slowly, and MachII is apparently slower, no? I do have Ray's BlogCFC and need to look at it more, but, to be honest, at first glance I find the structure of it a bit confusing, what with all the folders and ini file, though I will certainly study it, especially the cfcs and flow of it. Thanks, Ray! [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: advice on structure and cfcs (petmarket related)
I haven't seen the petmarket example, so I can't comment on that particular case, but I can say that - Yes, in general, that's "a very bad thing". I'm not going to go into detail about WHY it's a bad thing, because I'll be rabbiting on for hours, but in practical it harms the flexibility, re-usability and maintainability of your code. The idea is to separate your "backend" from your "frontend" - or your Model from your Views, in MVC speak. This is achieved by an intermediary layer called the Controller. So your back-end CFCs are all self-contained - they don't know ANYTHING about the front-end display templates that actually define the interface. Fusebox ( www.fusebox.org ) was an attempt to achieve this degree of separation long before the advent of CFCs, Mach-II ( www.mach-ii.com ) is probably the way to go if you want a standard way of doing it that harnesses the power of the CFC model. Hope that helps Al _ From: stylo stylo [mailto:[EMAIL PROTECTED] Sent: 10 August 2004 06:37 To: CF-Talk Subject: advice on structure and cfcs (petmarket related) I'm looking how to best structure an application and build it with cfcs. I'm looking at the petmarket example right now (cfml only, not the flash front end version). What do people feel in general about the way that application is structured? In particular, I'm wondering about the detailview.cfm which is called by the product.cfc detailview function and used to output the page. Isn't that a "bad thing"? I would have thought you would call from a page template a cfc to return query info on a product and output that. Anything else about this application in particular I should be aware of or wary of duplicating, as maybe there is a better method or better performance to be had another way? _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
Re: advice on structure and cfcs (petmarket related)
My CFC knowledge is limited at the moment, but if you want some good starting points to building an app with CFC's then downloand and check out Ray Camdens BlogCFC (http://www.camdenfamily.com/morpheus/blog/). If you're looking for a good way to structure your code then have you looked at frameworks like Mach-ii (www.mach-ii.com) or Fusebox 4 (www.fusebox.org) Hope this helps Andy > I'm looking how to best structure an application and build it with > cfcs. I'm looking at the petmarket example right now (cfml only, not > the flash front end version). > > What do people feel in general about the way that application is > structured? > > In particular, I'm wondering about the detailview.cfm which is called > by the product.cfc detailview function and used to output the page. > Isn't that a "bad thing"? I would have thought you would call from a > page template a cfc to return query info on a product and output that. > > > Anything else about this application in particular I should be aware > of or wary of duplicating, as maybe there is a better method or better > performance to be had another way? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
advice on structure and cfcs (petmarket related)
I'm looking how to best structure an application and build it with cfcs. I'm looking at the petmarket example right now (cfml only, not the flash front end version). What do people feel in general about the way that application is structured? In particular, I'm wondering about the detailview.cfm which is called by the product.cfc detailview function and used to output the page. Isn't that a "bad thing"? I would have thought you would call from a page template a cfc to return query info on a product and output that. Anything else about this application in particular I should be aware of or wary of duplicating, as maybe there is a better method or better performance to be had another way? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]