Hi Ronan,

Personally, assuming the application was non trivial, needed ongoing
enhancements and therefore maintainability was important, I'd just write the
code without particular regard for performance (you can skip the silly stuff
like re-initializing every object on every page view or having n+1 queries
where you run 21 queries to return 20 objects and the like).

I'd set up the code on a dev server and run some load testing software. If
load was a problem, I'd run some profiling to see where the bottlenecks were
and I'd eliminate one bottleneck at a time through techniques such as
caching until I had acceptable performance.

The other approach would be to trade off maintainability for performance,
writing less maintainable code and accepting the fact that you'd have to
take longer adding and testing new features and would probably have to
re-write the app from scratch more frequently in return for any time savings
you may get on the object creation and the method calls.

In the general case, you're better off writing more maintainable code and
fixing performance after the fact, but it is never black and white and you
need to look at your use case. Usually general numbers like those below
don't tell the whole story - you really need to have a code base and load
and instrument it to see how it will perform.

I love ColdFusion, but bear in mind it is not a language optimized for
performance. Personally if performance considerations forced me not to write
OO CF, I'd drop down into Java before I'd be willing to write a procedural
app again in CF (again, assuming non-trivial functionality, relatively long
lifetime and ongoing maintenance requirements).

Best Wishes,
Peter


On 3/31/08 10:03 AM, "Ronan Lucio" <[EMAIL PROTECTED]> wrote:

> 
> Hello,
> 
> A have doubt that has hitting my mind:
> 
> Supposing I have a web page that gets about 50 informations between
> header, body and footer.
> Supposing such web page has about  200,000 page views per day, and 70%
> of this access occurs in business hours.
> 140,000 access in 8 hours = 17,500 per hour.
> Not so much, but a considerable number.
> 
> If I use a Data Transfer Objects, ColdFusion would get the information
> directly from the pointer, right?
> But it would have to execute few news CreateObject().
> 
> If I use a Factory I could get these objects from it, but ColdFusion
> would get the informations from the Beans,
> but this option would cause ColdFusion execute 50 get() methods plus,
> per page view.
> 
> 50 get() methods may not be considerable a big number, but it can be
> when we multiple it per 200,000 page views, especially knowing that each
> get could have some datatype controls (get("name")).
> 
> How do you see this situation?
> I know this can easily solved  with a cluster, but in Brazil ColdFusion
> Enterprise insn't so accessible and maintain a big cluster some times is
> inviable, especially with the constantly software upgrades, that should
> be a good thing.
> 
> BlueDragon perhaps can became a good option, soon.
> 
> Ronan
> 
> > 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to