PJ
Member since Apr 7, 2009
- Profile: /members/3242-pj.htm
- Comments: 12
Recent Blog Comments By PJ
-
CFHTTPSession.cfc Gets Request / Response Logging
Posted on Apr 22, 2009 at 2:57 AM
Thanks again for your work on this, I have found this component to be wonderfully useful for something CF doesn't handle very well out of the box. It's also taught me quite a bit about how browsers interact with servers as well.... read more »
-
ColdFusion Components As Data Types - Help Or Hindrance?
Posted on Apr 11, 2009 at 1:08 AM
@ben I arrived at the same conclusion in my own CF OOP quest. I went the route of using CFC's as data types and found that at least for me, the drawbacks at the time outweighed the benefits. I'm glad I've found some support in this camp, especially somebody who's put so much though on the subject... read more »
-
Form Helpers And Domain Objects As Data Types In Object Oriented Programming
Posted on Apr 8, 2009 at 1:21 AM
You may have seen this already but here's the link: http://livedocs.adobe.com/wtg/public/machiidevguide/ BTW, I'm not evangelizing this particular framework, just wanted to provide additional material on the OOP/CF subject.... read more »
-
Form Helpers And Domain Objects As Data Types In Object Oriented Programming
Posted on Apr 8, 2009 at 1:05 AM
I wish I had gone to one of those OOP sessions you guys had (on the other side of the world right now) so I could better understand your terminology. I'm having trouble deducing what you guys define as the object model, domain object, etc., even after following along your posts. Still find it all ... read more »
-
Form Helpers And Domain Objects As Data Types In Object Oriented Programming
Posted on Apr 7, 2009 at 2:57 PM
Ok, so say it turns out your date's sister is hotter so you need to edit your Date. On the edit date page, since the controller just passes the variables/form/url data to the DatePages.edit() method, the "date_id" would arrive as well since it's in the form scope. If we were giong OO all the way, ... read more »
-
Form Helpers And Domain Objects As Data Types In Object Oriented Programming
Posted on Apr 7, 2009 at 12:12 PM
Last example was a bit rushed so here's another attempt to illustrate the concept. You should be able to see how validateDateForm might be able to be reused... <!--- Controller: Juts a cfml page for this example. ---> <cfscript> application.DatePages.create(variables, form, successPag... read more »
-
Form Helpers And Domain Objects As Data Types In Object Oriented Programming
Posted on Apr 7, 2009 at 11:09 AM
@ben: It's not really a form helper object per/say, it's a service method for the page itself that handles the form. Again, this might just be part of the controller in you view.... read more »
-
Form Helpers And Domain Objects As Data Types In Object Oriented Programming
Posted on Apr 7, 2009 at 10:57 AM
Lets use your example: From controller or view: <cfscript> appliation.DatePages.create(form); </cfscript> Service method in DatePages component: <cffunction name="create".... <cfargument name="form" ... <cfscript> var local = structNew(); local.errorStruct validateF... read more »
-
Form Helpers And Domain Objects As Data Types In Object Oriented Programming
Posted on Apr 7, 2009 at 10:45 AM
It can be in a singleton since the service method for the page will not persist any data. <cfscript> appliation.ContactPages.create(variables); </cfscript> So the method is persisted, not the values you pass to it. In your example, you would have to pass in a form struct reference as ... read more »
-
Form Helpers And Domain Objects As Data Types In Object Oriented Programming
Posted on Apr 7, 2009 at 9:40 AM
Question: Since we're talking practical OOP now... My biggest hurdle when it comes to OOP and CF is when deciding when it makes sense to use a real object like your Date object, where you use getters and setters to set it's values. I've tried in the past and ran into performance issues, but maybe... read more »
-
Form Helpers And Domain Objects As Data Types In Object Oriented Programming
Posted on Apr 7, 2009 at 9:20 AM
That's just it, the "site section/page" service layer I'm talking about is just called once by each page. Basically a method is created specifically for that page and I pass in a reference to the variables structure so I can actually manipulate values for the page directly. It's really not so dif... read more »
-
Form Helpers And Domain Objects As Data Types In Object Oriented Programming
Posted on Apr 7, 2009 at 12:52 AM
We might have to be careful defining what the "controller" is in practice. Often times, a framework coupled with configuration xml files are defined as the controller. It simply maps the model and the view together. In cases like that I've found that pushing the logic into a separate object, a se... read more »