tracker issue : CF-4126378

select a category, or use search below
(searches all categories and all time range)
Title:

OnBeforeExecution, OnAfterExecution method decorators

| View in Tracker

Status/Resolution/Reason: To Fix//Investigate

Reporter/Name(from Bugbase): Sathish Kumar / Sathish Kumar (Sathish Kumar)

Created: 03/09/2016

Components: Language, CF Component

Versions: 2016

Failure Type: Unspecified

Found In Build/Fixed In Build: RC1_v12 /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Win All

Vote Count: 0

Hi,

I would like to submit a request for ColdFusion12 to have additional attributes for CFCOMPONENT and also for CFFUNCTION tags when it is used inside CFCOMPONENT to declare methods of the components. Basically, it would be good to have 2 additional methods namely OnBeforeExecution, OnAfterExecution that could be given a valid coldfusion expression including a closure expression, function call, cfinclude etc. Basically, given the new age architecture of MVC where most apps are build around either webservices or controllers, the facility to specify a piece of code to run before and after every method in a component or specific methods in a component will come hand to format output, verify some connections to external resources, do method level execution time logging/ tracking, etc. This method will probably simplify develop CF apps even without a MVC framework etc or even make life easeier for frameworks to provide plugin architecture with ease and without having to write their own parsing/discovery mechanisms to invoke plugin code etc before or after various service calls and so forth. I can possibly have a CFC that returns data for a view and based on the client device which my OnBeforeExecution will establish, I can wrap the whole output of each method in my CFC with a header and footer which my OnAfterExecution expression will be able to handle. All local variables , arguments passed to the methods will be available in both these OnBeforeExecution, OnAfterExecution code expressions. I think this will be a game changer for ColdFusion much similar to CFSAVECONTENT which does not have an equivalent yet in ASP.net, PHP etc easily.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4126378

External Customer Info:
External Company:  
External Customer Name: Sathish Kumar
External Customer Email: sathish@carboncubes.biz
External Test Config: Friendly Name: CC-LAPTOP004
System Type: Laptop
Brand: Dell
Model: XPS15
Processor Type: Intel Core i5
Processor Speed: 2GHz to 3GHz
Memory: 2GB to 4GB
Hard Drive Storage: 500GB-1TB
Peripherals: 
Connectivity: Wireless 802.11 N
Interfaces: Parallel
Interfaces: USB 1.x
Interfaces: USB 2.x
Media: DVD+R
Primary Operating System: Windows 7 64
Secondary Operating System: 
System Location: Office
Time Owned: 1 to 2 Years

Attachments:

Comments:

Adding BUG AUDIT TRAIL ********action: updated fieldName: Fix By Milestone newValue: Alpha oldValue: Blank oprid: suchsing recordName: RQ_DEFECT timpestamp: 2016-03-01 06:20:35.0 action: updated fieldName: Status newValue: ToFix oldValue: Unverified oprid: suchsing recordName: RQ_DEFECT timpestamp: 2016-03-01 06:20:35.0 action: updated fieldName: Owner newValue: himar oldValue: suchsing oprid: suchsing recordName: RQ_DEFECT timpestamp: 2016-03-01 06:20:35.0 action: updated fieldName: Fix By Product Milestone newValue: Alpha oldValue: Blank oprid: suchsing recordName: RQ_DEFECT timpestamp: 2016-03-01 06:20:35.0 action: updated fieldName: Reason newValue: Investigate oldValue: Blank oprid: suchsing recordName: RQ_DEFECT timpestamp: 2016-03-01 06:20:35.0
Comment by CFwatson U.
4344 | March 09, 2016 01:50:11 AM GMT
Added By: PreRelease User User Name:Sathish Kumar Note Added: Entered Feature. Date Added :2016-02-26 06:06:38.0
Comment by CFwatson U.
4345 | March 09, 2016 01:50:12 AM GMT