The primary issue is that it couples your persistence layer (default datasource and ORM) your business layer (mappings) and your front controller (events) into a very inflexible one-to-one-to-one structure. You can't have multiple frontends for a single ORM persistence layer, for example. You also can't have a single frontend backed by mutliple Hibernate SessionFactories.
Then there are some implementation problems, the biggest one being that you don't have access to the application scope when you're defining the this.XXX variables. That means if you're setting them dynamically you can't rely on an application-scope cache, you have to store your per-application configuration in the server scope. But there isn't any sort of event for that, so you end up jumping through all kinds of hoops to deal with the arcane timing of the Application.cfc psuedoconstructor because that's the ONLY place you can define settings. It's enormously better with the CFAPPLICATION tag, because you can run that anywhere you want. Even better, Railo lets you run the CFAPPLICATION tag multiple times, so you can run it once to get your application scope, and then run it again to set up mappings/default dsn/whatever. That's really powerful. So it's not really Application.cfc itself, it's more that Adobe has piggybacked so much functionality on top of Application.cfc that really doesn't belong there. The "event handler" structure is quite beneficial, don't get me wrong, but they've tried to make Application.cfc the be all/end all place for everything, and it really paints you into a corner with complex applications/deployments. "Application" refers to a lot of different things in the Adobe parlance, and they've squished them all into a single "container". cheers, barneyb On Mon, Apr 12, 2010 at 8:35 AM, Cutter (ColdFusion) <[email protected]> wrote: > > Barney, > > Not to pick a fight, but what problems do you see with using > Application.cfc? I, personally, find it to be a much better solution, so > I am curious about your misgivings... > > Steve "Cutter" Blades -- Barney Boisvert [email protected] http://www.barneyb.com/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332842 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

