My recommendation is to use class style get/set instance functions for data
hiding requirements.
Explanation.
Encapsulation means data and functions about an object are defined together
as a class. Data hiding is a programming technique that is an indirect
access to a class's data. Data
On 10/12/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
cfset name = Jason
cfset variables.instance.name =Gerry
cfreturn this.name !--- would return Jason ---
cfreturn variables.instance.name !--- would return Gerry ---
I think there is a typo in the above example:
cfset name = Jason
Joseph Flanigan wrote:
My recommendation is to use class style get/set instance functions for
data hiding requirements.
I respectfully disagree. Points:
1. Class style accessors are too generic unless the object is a
generic object such as a generic transfer object.
Having a defined set of
Very well put Peter and I agree on all points!On 10/13/05, Peter J. Farrell [EMAIL PROTECTED]
wrote:Joseph Flanigan wrote: My recommendation is to use class style get/set instance functions for
data hiding requirements.I respectfully disagree. Points:1. Class style accessors are too generic
Im experimenting with inheritance Ill
try to be concise explaining what Im up to
My app contains Pages, Modules, Categories and Products, all
objects that are quite similar. Each is used to generate a static page to
display in the browser, and each has common attributes (ie
I happen to have something similar but w/o using java... Just incase this could be of any use to anyone out there...Note: I have formated this page to fit the scenario. I've taken these functions from an AES Encryption routine I created in a cfc...
cfm code
--
For the first part, I'd go with an abstract content object that
doesn't define getContent, and which Module, Category, Product, and
Page all extend. That's where you'd house all the common
functionality, leaving just the 'getContent' method up to the
individual implementations.
I didn't quite
at
first glance, it would seem to me that they are all content providers, so rather
than inherit from page, I would make everything inherit from
contentprovider.cfc
-Original Message-From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]On Behalf Of PaulSent: 13
October 2005
Seems to me more like this would be a good use of an interface (which we don't have in Cold Fusion). But you can create a PageInterface CFC that describes the page interface and procedurallyimplement it, that is make sure you have a method for each methodin the interface without a compiler
Would be nice of Macromedia would ad interfaces.
Not for this reason. CF is not a compiled language, and the
typechecking that interfaces do happen at compile time. Bit of a
catch-22, because the checks you want HAVE to happen at a place that
doesn't exist in CF's world.
The real reason for
Barney,
All of your emails are coming through
blank for me. Anyone else?
Roland
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Barney Boisvert
Sent: Thursday, October 13, 2005
2:29 PM
To: CFCDev@cfczone.org
Subject: Re: [CFCDev] inheritance
advice
I havent seen a single Barney email
in a while. Whats up Barney?
- Seth
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roland Collins
Sent: Thursday, October 13, 2005
11:36 AM
To: CFCDev@cfczone.org
Subject: RE: [CFCDev] inheritance
advice
Barney,
All
Title: Message
I can
see them
Heres
the last post he put through...
quote
Would be nice of Macromedia would ad interfaces.
Not for this reason. CF is not a compiled language, and the
typechecking that interfaces do happen at compile time. Bit of a catch-22,
because the checks you
Title: Message
David Harris wrote:
I can see them
Heres the last post he put through...
quote
Would be nice of Macromedia would ad
interfaces.
Not for this reason. CF is not a compiled language,
and the typechecking that interfaces do happen at compile time.
Title: Message
I see them as well. Barney is using plain text format and the encoding is
Unicode (UTF-8) for me.
Montreal
-Original Message-From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]On Behalf Of Peter J.
FarrellSent: Thursday, October 13, 2005 3:12 PMTo:
While I agree that it isn't a compiled language in the same sense that you compile it yourself within your IDE, it is my understanding that cold fusion is itself a cf to java compiler (among other things). So the compile time checking could happen, but not in the same why you would see in java. At
cfQuery
name="getData" datasource="#Application.dsn#" SELECT *
from employee /cfquery
---Querywill returns 100
records
What is the best way to split the
first 50assignedto dataset1
and the last 50assigned
to dataset 2?
ie:
dataset1=getdata[1] to
getdata[50]
dataset1=getdata[51] to
it is my understanding that cold fusion
is itself a cf to java compiler (among other things)
Yes, it is. However, unlike a real compiler, you don't get full
perspective of the app at compile time. When you compile Java, you
have to have all the resources for the whole app available to you so
The type checking is the most important feature, as it enables you to
separate your API from it's implementation(s). Yes, CF could check your
implementation against an interface at compile-time, which means the
first time that CFC is created, but that is less a desire to me as is
runtime type
Darn it, I cannot read this in gmail and I assume this is aimed at me. Can someone translate again?
On 10/13/05, Barney Boisvert [EMAIL PROTECTED] wrote:
--
You are subscribed to cfcdev. To unsubscribe, send an email to cfcdev@cfczone.org
Barney's emails are coming through blank for me also (I'm Using Outlook 2003
retrieving via POP3)
John
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Barney Boisvert
Sent: Thursday, October 13, 2005 12:49 PM
To: CFCDev@cfczone.org
Subject: Re:
cfloop, or query of queries, or select 50 at a time from the database.
-nathan strutz
http://www.dopefly.com/
On 10/13/05, Ung, Seng [EMAIL PROTECTED] wrote:
cfQuery name=getData datasource=#Application.dsn#
SELECT * from employee
/cfquery
--- Query will returns 100 records
What is
On 10/13/05, Chris Stoner [EMAIL PROTECTED] wrote:
I agree that runtime interface validation/method checking would be a hog butthere is no reason that theobject cannot earn the right to claim to implement at compile time.
I meant to follow this up with the the question Is there? as I'mmore
Hopefully this will go through...
The problem is with the way CFML is compiled. You can't make those
compile-time checks work consistently, because changing a one class
doesn't require recompiling other dependant classes. In other words,
CF doesn't recompile a CFC that extends another CFC when
This is why I only rarely ask questions of
this list youre too smart for my own good.
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Stoner
Sent: Thursday, October 13, 2005
2:22 PM
To: CFCDev@cfczone.org
Subject: Re: [CFCDev] inheritance
advice
On
On 10/13/05, Barney Boisvert [EMAIL PROTECTED] wrote:
Hopefully this will go through...The problem is with the way CFML is compiled.You can't make those
compile-time checks work consistently, because changing a one classdoesn't require recompiling other dependant classes.In other words,CF doesn't
Im not stupid, just ignorant. :)
On 10/13/05, Ung, Seng [EMAIL PROTECTED] wrote:
Paul:
I am a stupid person but there are so many good people here that is welling to help
-Original Message-From: Paul [mailto:
[EMAIL PROTECTED]]Sent: Thursday, October 13, 2005 1:29 PMTo:
What is the usage?
Are you trying to do pagination? If so, splitting the dataset is
probably not the best approach.
On 10/13/05, Nathan Strutz [EMAIL PROTECTED] wrote:
cfloop, or query of queries, or select 50 at a time from the database.
-nathan strutz
http://www.dopefly.com/
On 10/13/05,
On 10/13/05, Peter J. Farrell [EMAIL PROTECTED] wrote:
Joseph Flanigan wrote:
My recommendation is to use class style get/set instance functions for
data hiding requirements.
I respectfully disagree. Points:
I disagree as well (and not so respectfully). Using class style
get/set accessors
Assuming you have 100 records.
SELECT TOP 50 *
from employee
Order by EmpoyeeID
SELECT TOP 50 *
from employee
Order by EmpoyeeID DESC
On 10/13/05, Ung, Seng [EMAIL PROTECTED] wrote:
cfQuery name=getData datasource=#Application.dsn#
SELECT * from employee
/cfquery
--- Query will
On 10/13/05, Chris Stoner [EMAIL PROTECTED] wrote:
While I agree that it isn't a compiled language in the same sense that you
compile it yourself within your IDE, it is my understanding that cold fusion
is itself a cf to java compiler (among other things). So the compile time
checking could
That's close, but it ignores the ordering - if you want them both in the
same order, you can use a nested query. MSSQL syntax shown. Also, I've
added the use of the percent keyword, which doesn't place an assumption on
record count. I would do this in the database instead of CF - it'll execute
Switch the encoding for that mail and you should be able to read it.
- Original Message -
From: John Ottenbacher [EMAIL PROTECTED]
To: CFCDev@cfczone.org
Sent: Thursday, October 13, 2005 9:58 PM
Subject: RE: [CFCDev] inheritance advice
Barney's emails are coming through blank for me
The last one came out fine. The encoding is already UTF-8, should it be
something else? I had been receiving those emails fine until earlier today,
so I didn't think it was on my end...
Thanks,
John
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
They came in blank here when encoding is utf-8.
When I switch to West-European (ISO), the text turns up.
regards,
Muzak
- Original Message -
From: John Ottenbacher [EMAIL PROTECTED]
To: CFCDev@cfczone.org
Sent: Friday, October 14, 2005 2:21 AM
Subject: RE: [CFCDev] inheritance advice
my favorite part of Seans replies are always his bluntness. I crack
up everytime I read them. Once again, thanks for not beating around
the bush Sean.
Bill
On 10/13/05, Sean Corfield [EMAIL PROTECTED] wrote:
On 10/13/05, Peter J. Farrell [EMAIL PROTECTED] wrote:
Joseph Flanigan wrote:
On 10/13/05, Bill Rawlinson [EMAIL PROTECTED] wrote:
my favorite part of Seans replies are always his bluntness. I crack
up everytime I read them. Once again, thanks for not beating around
the bush Sean.
Sorry, it's just part of my nature and I don't mean any offense by
(similarly I have
Ditto.
Nobody asks, Sean, what do you *really* think?
- Seth
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Bill Rawlinson
Sent: Thursday, October 13, 2005 5:46 PM
To: CFCDev@cfczone.org
Subject: Re: [CFCDev] Inside the CFC: use Getter/Setter or
38 matches
Mail list logo