, , etc will all
work.
Or would you like to suggest a new category for this article?
All submitted articles are reviewed by our editorial staff, and we reserve
the right not to post objectionable content."
First, should that say "suggest a new *topic*" instead?
Second, would it make more sense for that to be directly below the pull down
for the topics?
Third, should we instead provide an "Other" option in the menu and a text
field for the suggestion? That could lead to too many suggestions, but it's
an idea. We could still reserve the right to put the article under an
existing topic.
Dave
From roselli at earthlink.net Sun Nov 26 16:27:18 2000
From: roselli at earthlink.net (aardvark)
Date: Sun Nov 26 16:27:18 2000
Subject: [thesite] [html] isaac.css is live
In-Reply-To:
Message-ID: <3A214621.28234.51AE7CD3@localhost>
> From: "David McCreath"
>
> Just in case anybody's wondering, I hooked up the final default css file
> (isaac.css). Rather than overwrite "styles.cfm", I uploaded "isaac.css" and
> changed the link in "home_design.cfm". If it should be done differently for
coolio...
> any reason, let me know. I assume that this will keep the style editor from
> working, but I can already see additional changes that I need to make to
> some pages that I already did.
also coolio...
> I also left in "tab_nav.css" until we get the new tab header onto the site.
sounds good...
you da man... thank god... if i were doing it with my schedule right
now, i'd still be sorting files in an FTP window...
From roselli at earthlink.net Sun Nov 26 16:38:34 2000
From: roselli at earthlink.net (aardvark)
Date: Sun Nov 26 16:38:34 2000
Subject: [thesite] new category suggestion on submission page
In-Reply-To:
Message-ID: <3A2148BC.6142.51B8ABCB@localhost>
> From: "David McCreath"
>
> First, should that say "suggest a new *topic*" instead?
i say yes, since that is the name of the select menu above...
> Second, would it make more sense for that to be directly below the pull down
> for the topics?
yes, it would...
> Third, should we instead provide an "Other" option in the menu and a text
> field for the suggestion? That could lead to too many suggestions, but it's
> an idea. We could still reserve the right to put the article under an
> existing topic.
that's not such a bad idea, but ultimately, we don't want people to
think they can willy-nilly add sections... i'd say hold off on that for
now...
From roselli at earthlink.net Sun Nov 26 16:43:40 2000
From: roselli at earthlink.net (aardvark)
Date: Sun Nov 26 16:43:40 2000
Subject: [thesite] new category suggestion on submission page
In-Reply-To: <3A2148BC.6142.51B8ABCB@localhost>
References:
Message-ID: <3A2149F2.30568.51BD64F9@localhost>
another note... on that 'preview' page, we should not call the
'<
Message-ID:
> another note... on that 'preview' page, we should not call the
> '< button before scrolling down)... we should call it an edit button...
Well, that brings up a point. That '< <3A216F8B.3FE1FE09@oracular.com> <004501c057eb$f23f0000$1700000a@issntdev57>
Message-ID: <3A219D76.CF3B5137@oracular.com>
Sorry, was in a hurry before. try it agian :)
.djc.
Seb wrote:
>
> thanks Dan, but you oughta check your sql syntax...
From dcody at oracular.com Sun Nov 26 17:51:25 2000
From: dcody at oracular.com (Daniel J. Cody)
Date: Sun Nov 26 17:51:25 2000
Subject: [thesite] last 5 query
References: <01c057b4$8dc06560$2d4d149a@default> <3A216EA3.1D87A257@oracular.com> <011201c05805$f8876f00$bfd11518@agusta1.ga.home>
Message-ID: <3A21A154.B486C350@oracular.com>
there is, but i have no clue how to do it. our main oracle DBA has been
on vacation for a couple weeks, and i was going to run stuff by him.
i'll ask him about this too, although i'd wonder if the overhead of the
trigger would negate any other benefits..
i'll get this by him tomorrow though, thanks :)
.djc.
Joshua OIson wrote:
>
> shortening the execution time of the "last 5 query" might be facilitated by
> keeping a separate table that holds the last five messages. The table would
> truly only contain the last five posts on the list. Is there such a thing
> as an insert trigger to automate the process for you?
>
From dcody at oracular.com Sun Nov 26 17:52:20 2000
From: dcody at oracular.com (Daniel J. Cody)
Date: Sun Nov 26 17:52:20 2000
Subject: [thesite] [html] isaac.css is live
References: <3A214621.28234.51AE7CD3@localhost>
Message-ID: <3A21A18B.E4637B35@oracular.com>
+3
aardvark wrote:
>
> > From: "David McCreath"
> >
> > Just in case anybody's wondering, I hooked up the final default css file
> > (isaac.css). Rather than overwrite "styles.cfm", I uploaded "isaac.css" and
> > changed the link in "home_design.cfm". If it should be done differently for
>
> coolio...
>
> > any reason, let me know. I assume that this will keep the style editor from
> > working, but I can already see additional changes that I need to make to
> > some pages that I already did.
>
> also coolio...
>
> > I also left in "tab_nav.css" until we get the new tab header onto the site.
>
> sounds good...
>
> you da man... thank god... if i were doing it with my schedule right
> now, i'd still be sorting files in an FTP window...
From dcody at oracular.com Sun Nov 26 17:53:15 2000
From: dcody at oracular.com (Daniel J. Cody)
Date: Sun Nov 26 17:53:15 2000
Subject: [thesite] new category suggestion on submission page
References: <3A2149F2.30568.51BD64F9@localhost>
Message-ID: <3A21A1C2.8C76F083@oracular.com>
+1
aardvark wrote:
>
> another note... on that 'preview' page, we should not call the
> '< button before scrolling down)... we should call it an edit button...
From mccreath at ak.net Sun Nov 26 17:57:27 2000
From: mccreath at ak.net (David McCreath)
Date: Sun Nov 26 17:57:27 2000
Subject: [thesite] submission problem
Message-ID:
Hmm...
Well, I've tried submitting an article three times today, and I'm getting
the same error each time. It's looking for a parameter called "Article_Name"
and I don't see anything on dsp_submit.cfm called that. There *is* something
called "contentname".
I've been REALLY careful about touching the CF code, so I don't think I
changed it, but I might have done something. Has anybody else submitted an
article to test recently and had it work? Has something changed on another
page?
From mccreath at ak.net Sun Nov 26 18:13:58 2000
From: mccreath at ak.net (David McCreath)
Date: Sun Nov 26 18:13:58 2000
Subject: [thesite] submission problem part 2
Message-ID:
Hokay --
The page causing the problem is actually article/act_process.cfm, I guess.
There's a tag that's supposed to take the value of the "contentname"
from dsp_submit and/or dsp_preview, but it's not finding it. Here's the full
text of the error I get when I click the submit button on the preview page:
xxxxxxxxxxxxxxxxxxxxxx
Error Diagnostic Information
An error occurred while evaluating the expression:
#article_name#
Error near line 245, column 34.
----------------------------------------------------------------------------
----
Error resolving parameter ARTICLE_NAME
ColdFusion was unable to determine the value of the parameter. This problem
is very likely due to the fact that either:
You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE
tag.
The error occurred while processing an element with a general identifier of
(#article_name#), occupying document position (245:33) to (245:46) in the
template file /home/evolttest/public_html/test/article/act_process.cfm.
Date/Time: Sun Nov 26 17:50:07 2000
Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Remote Address: 24.237.79.177
HTTP Referer:
http://test.evolt.org/test/index.cfm?section=article&action=preview&cfid=337
544&cftoken=99383017
Query String: section=article&action=process&cfid=337544&cftoken=99383017
xxxxxxxxxxxxxxxxxxxxxxxxx
Ideas?
Dave
From roselli at earthlink.net Sun Nov 26 18:21:29 2000
From: roselli at earthlink.net (aardvark)
Date: Sun Nov 26 18:21:29 2000
Subject: [thesite] submission problem
In-Reply-To:
Message-ID: <3A2160CC.14323.5216ADCA@localhost>
> From: "David McCreath"
[...]
>
> I've been REALLY careful about touching the CF code, so I don't think I
> changed it, but I might have done something. Has anybody else submitted an
> article to test recently and had it work? Has something changed on another
> page?
yep, happened to me, too...
From jeff at members.evolt.org Sun Nov 26 18:31:29 2000
From: jeff at members.evolt.org (jeff)
Date: Sun Nov 26 18:31:29 2000
Subject: [thesite] submission problem part 2
In-Reply-To:
Message-ID:
david,
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: David McCreath
:
: The page causing the problem is actually article/act_process.cfm,
: I guess. There's a tag that's supposed to take the value
: of the "contentname" from dsp_submit and/or dsp_preview, but it's
: not finding it. Here's the full text of the error I get when I click the
: submit button on the preview page:
:
: [snip of error]
:
: Ideas?
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i think i've got that fixed now. trying to fix an error that happens when
you edit an article now.
thanks,
.jeff
name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff at members.evolt.org
From mccreath at ak.net Sun Nov 26 19:04:44 2000
From: mccreath at ak.net (David McCreath)
Date: Sun Nov 26 19:04:44 2000
Subject: [thesite] submission problem part 2
In-Reply-To:
Message-ID:
> i think i've got that fixed now. trying to fix an error that happens when
> you edit an article now.
Smoove. That took care of it. Thanks, Jeff!
From dsmah at home.com Sun Nov 26 20:59:15 2000
From: dsmah at home.com (Dean Mah)
Date: Sun Nov 26 20:59:15 2000
Subject: [thesite] CSS related bug?
In-Reply-To: <3A216EA3.1D87A257@oracular.com> from "Daniel J. Cody" at Nov 26, 2000 02:12:19 PM
Message-ID: <200011270300.UAA01160@alice.monkeyland.ca>
Dan, when I was working on the last 5 threads, I removed the select
count ... from the query. Didn't think that it was doing anything. I
also had to pull more than the last 5 posts to get the last 5 threads.
Dean
Daniel J. Cody writes:
> blockfactor="75">
> select id, subject, author from posts
> where id >= (select count(*) -5 from posts)
> order by id desc
>
>
> this appeared to me to be the same sort of query(get id where its > X)
> as above, but it runs at right around 5 secs. i then threw a
> cachedwithin attribute in there and its actually pretty quick now.
>
> so it used to take about 15 secs for that 'last 5 msgs on thelist' thing
> to run, now its at about 5. i'm still going to have adam look over it
> and see if theres any other way i can optimize it, but i'm not unhappy
> with what we have now.
From dsmah at home.com Sun Nov 26 21:02:44 2000
From: dsmah at home.com (Dean Mah)
Date: Sun Nov 26 21:02:44 2000
Subject: [thesite] last 5 query
In-Reply-To: <3A21A154.B486C350@oracular.com> from "Daniel J. Cody" at Nov 26, 2000 05:48:36 PM
Message-ID: <200011270304.UAA01171@alice.monkeyland.ca>
I tend to stay away from triggers. I like to try to separate the
business logic, database layer, and the presentation layer. Mixing
them usually makes debugging the application more difficult.
However, if you want to implement something like this, it would be
relatively simple. You could write a PL/SQL or Java stored procedure
to handle it.
Dean
Daniel J. Cody writes:
> there is, but i have no clue how to do it. our main oracle DBA has been
> on vacation for a couple weeks, and i was going to run stuff by him.
> i'll ask him about this too, although i'd wonder if the overhead of the
> trigger would negate any other benefits..
>
> i'll get this by him tomorrow though, thanks :)
From roselli at earthlink.net Sun Nov 26 21:11:24 2000
From: roselli at earthlink.net (aardvark)
Date: Sun Nov 26 21:11:24 2000
Subject: [thesite] last 5 query
In-Reply-To: <200011270304.UAA01171@alice.monkeyland.ca>
References: <3A21A154.B486C350@oracular.com> from "Daniel J. Cody" at Nov 26, 2000 05:48:36 PM
Message-ID: <3A218A94.16482.52B1610E@localhost>
> From: Dean Mah
>
> I tend to stay away from triggers. I like to try to separate the
> business logic, database layer, and the presentation layer. Mixing
> them usually makes debugging the application more difficult.
i completely agree with this... no question it's the right approach...
however...
> However, if you want to implement something like this, it would be
> relatively simple. You could write a PL/SQL or Java stored procedure
> to handle it.
i think a stored procedure in the database, while blurring the n-tier
separation, is probably a good idea... i wish i could justify this
more than the ramblings of an armchair database observer, but i'd
rather see a stored procedure (which sits right in the db, right?)
than a lot of CF (which needs to be parsed and all)...
just a thought... take it or leave it...
From jeff at members.evolt.org Sun Nov 26 21:21:56 2000
From: jeff at members.evolt.org (jeff)
Date: Sun Nov 26 21:21:56 2000
Subject: [thesite] last 5 query
In-Reply-To: <200011270304.UAA01171@alice.monkeyland.ca>
Message-ID:
dean,
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Dean Mah
:
: I tend to stay away from triggers. I like to try to separate
: the business logic, database layer, and the presentation
: layer. Mixing them usually makes debugging the application
: more difficult.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
try to think of triggers as event handlers. you're doing the same thing
when using constraints and foreign keys. you're initiating an action (be it
an update, delete, etc) whenever another action occurs.
the unfortunate side effect of keeping the separation you're talking about
is an increase of code in the business logic side adding to an increase in
potential coding errors as well as more convoluted logic. on top of that,
the business logic is a much bigger hit to the system than a trigger which
resides at the same level as the data it's interacting with.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: However, if you want to implement something like this, it
: would be relatively simple. You could write a PL/SQL or
: Java stored procedure to handle it.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i agree. however, i think there's an even better approach to this issue.
rather than having a "last 5" table, why not just have a "last 5" file
that's altered whenever there's an insert into the database. that way
you're off-loading all the performance hit from the front-end (including the
database hit to get the last 5 from a "last 5" table). all the system has
to do is then include a file - a very minimal hit comparatively.
just my 2c,
.jeff
name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff at members.evolt.org
From dsmah at home.com Sun Nov 26 21:52:10 2000
From: dsmah at home.com (Dean Mah)
Date: Sun Nov 26 21:52:10 2000
Subject: [thesite] last 5 query
In-Reply-To: from "jeff" at Nov 26, 2000 07:21:26 PM
Message-ID: <200011270353.UAA01304@alice.monkeyland.ca>
jeff writes:
> try to think of triggers as event handlers. you're doing the same
> thing when using constraints and foreign keys. you're initiating an
> action (be it an update, delete, etc) whenever another action
> occurs.
I would disagree. Using a trigger means implementing more than
trivial business logic. Primary and foreign keys, and to a lesser
extent, check constraints implement trivial data robustness checking.
That said, I would never rely on database constraints. I'll always
try to catch data inconsistencies within the application.
> the unfortunate side effect of keeping the separation you're talking
> about is an increase of code in the business logic side adding to an
> increase in potential coding errors as well as more convoluted
> logic.
I don't necessarily agree. In my current environment, we've hired a
programmer a week to help with quite a complex system for the last
couple of months. Containing some of the business logic in the
database usually makes it more difficult for them to find bugs and
figure out the system. For example, it is usually more difficult for
them to track down how a table is being changed when it is triggered
by an update to another table. All of the industry (information
technology in general) people that I've talked to, they've never had
good things to say about the maintainability of triggers in a complex
systems.
Whether the additional code sits in the application layer or the
database layer there is still the same potential for coding errors.
And I wouldn't agree that the application code would have more
convoluted logic than the database code. If anything, you need to
know a couple of languages which makes the maintenance effort greater
and requires a higher knowlegde level on the part of the developers.
> i agree. however, i think there's an even better approach to this
> issue. rather than having a "last 5" table, why not just have a
> "last 5" file that's altered whenever there's an insert into the
> database.
I'd still like to see this implemented at the application level.
Dean
From jeff at members.evolt.org Mon Nov 27 00:40:27 2000
From: jeff at members.evolt.org (jeff)
Date: Mon Nov 27 00:40:27 2000
Subject: [thesite] last 5 query
In-Reply-To: <200011270353.UAA01304@alice.monkeyland.ca>
Message-ID:
dean,
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Dean Mah
:
: Using a trigger means implementing more than trivial
: business logic.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
what would you call a trigger that performs a cascading delete to maintain
data integrity in child tables? is this just trivial business logic or does
it do the job (of maintaining relational integrity) at the closest point to
the data? does it make sense to have the programmer have to remember that
he must delete child records whenever he performs a delete on the parent
table (which could conceivably happen in more than one place in the
application)?
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: Primary and foreign keys, and to a lesser extent,
: check constraints implement trivial data robustness
: checking. That said, I would never rely on database
: constraints. I'll always try to catch data inconsistencies
: within the application.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i can agree with constraints. once the application is built, the
constraints don't really play much of a role as the application code must be
written to shield the user from the constraint errors anyway.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: Containing some of the business logic in the database
: usually makes it more difficult for them to find bugs and
: figure out the system. For example, it is usually more
: difficult for them to track down how a table is being changed
: when it is triggered by an update to another table.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
where do you draw the line then? no triggers that affect the data on insert
or update? what about triggers that delete dependent data when parent data
is deleted? if you say that's a foreign key then you're wrong. a true
foreign key can only restrict deletes. it can't perform a cascading delete.
i still say the answer is to use the tools as close to the data as possible.
if the programmer doesn't understand what's happening with the data then you
have at least two problems on your hands. first, they're in over their
head - too little knowledge or experience for what they've been asked to do.
second, whoever is directing the project is doing a poor job of
communicating the details of the project via database schemas, requirements
documents, etc.
now, if you're doing complex architecture changes with triggers like writing
temp tables, adding/removing columns, changing datatypes, etc. then the
problem isn't with triggers. the problem is with the approach to the
problems. the solutions are causing more problems than they're solving.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: All of the industry (information technology in general) people
: that I've talked to, they've never had good things to say about
: the maintainability of triggers in a complex systems.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
what exactly are you saying? how are they difficult to maintain? in my
experience, i dare say that you can't efficiently build a solid database or
application architecture without utilizing triggers in some form. if the
database solution you're using is difficult to maintain and isn't giving you
the flexibility and performance to offset that then it's time to find
another database solution.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: Whether the additional code sits in the application layer or
: the database layer there is still the same potential for coding
: errors.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
don't get me wrong. i completely agree with that. i'm just saying that the
fewer lines of code you have to write, the less likely you are to make an
error. again, in my experience it has always been easier to write code at
the database level to perform the necessary tasks.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: And I wouldn't agree that the application code would have
: more convoluted logic than the database code. If anything,
: you need to know a couple of languages which makes the
: maintenance effort greater and requires a higher knowlegde
: level on the part of the developers.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i think it'd be fair to say that if you're a programmer that's working with
building dynamic web applications you better be solid with more than just
one or two languages. you better know the middleware language (asp, cf,
php, etc.), you better know html, and you better know sql really well.
nothing earth-shaking there. that's just the facts of building a quality
solution. if you're not solid with these (and probably javascript as well)
then you probably don't have any business being employed in that capacity.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: > i agree. however, i think there's an even better approach to
: > this issue. rather than having a "last 5" table, why not just
: > have a "last 5" file that's altered whenever there's an insert
: > into the database.
:
: I'd still like to see this implemented at the application level.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
now we're saying the same thing. i think the performance hit should occur
when a new record is inserted into the database - not whenever a visitor to
the site requests a page.
thanks,
.jeff
name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff at members.evolt.org
From joshua at alphashop.net Mon Nov 27 06:06:10 2000
From: joshua at alphashop.net (Joshua OIson)
Date: Mon Nov 27 06:06:10 2000
Subject: [thesite] last 5 query
References:
Message-ID: <014e01c05884$1d275c20$bfd11518@agusta1.ga.home>
Would there be too much of a hit to store the last five id's in an
application scope variable. Is there a business logic reason (the
multi-tier stuff is really new to me) why storing that information in the
CFSERVER is not a good idea, other than the fact that if the server crashes
or is otherwise shut down the information is lost (though it could be
recalculated on server restart)?
-joshua
From joshua at alphashop.net Mon Nov 27 06:21:40 2000
From: joshua at alphashop.net (Joshua OIson)
Date: Mon Nov 27 06:21:40 2000
Subject: [thesite] last 5 query
References:
Message-ID: <015c01c05886$4aee5850$bfd11518@agusta1.ga.home>
About my last post,
The only reason I would stay away from application scope variables in this
case is because of extensibility. Where does one draw the line of what
should be store in application variables? The "last-5" might be a
candidate, but what about usage information, or whatever is thought of next.
At some point the application scope is going to get cluttered with odds and
ends that are not accounted for as prototypes change. If there was only one
developer, it may make sense, but with multiple developers the scope may
become hard to manage since there is no really easy way to scrutenize what
information is currently in the scope.
The other reason I suggest not using the application scope is also
extensibility. What if you want to change the information to
"last-5-per-forum-or-per-article-category" In a DB you could just add an
category_id field and change the triggers/SQL accordingly, whereas in
application variables you'd have to rework the entire naming convention and
do a whole lot of "evaluates" or some other kludgy method to insert and
extract the information. At some point it becomes not worth it.
Any other thoughts?
-joshua
From joshua at alphashop.net Mon Nov 27 13:17:26 2000
From: joshua at alphashop.net (Joshua OIson)
Date: Mon Nov 27 13:17:26 2000
Subject: [thesite] Changing an "evolt" URL to a proper URL
Message-ID: <021101c058c0$5ef39240$bfd11518@agusta1.ga.home>
If you are looking to convert an evolt URL:
www.evolt.org/foo/bar/articles/1/index.cfm
To a proper url, you can use the following rules:
The first folder after the domain becomes the "section" attrbute.
The second folder after the domain becomes the "subsection" attribute.
The following subfolders become the comma-delimited "params" attribute.
so, the url above becomes
www.evolt.org/index.cfm?section=foo&subsection=bar¶ms=articles,1
That's all there is to it. Hopefully this helps clear up some of the issues with submitting the pages to validators, as were previously noted.
-joshua
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From garrett at polytechnic.co.uk Mon Nov 27 14:35:04 2000
From: garrett at polytechnic.co.uk (Garrett Coakley)
Date: Mon Nov 27 14:35:04 2000
Subject: [thesite] Automatic forwarding after login problem
Message-ID: <3A22C474.24266.1E63C1@localhost>
Hi,
I've been away for a while and so haven't had a chance to help with
the bug crushing effort. Sorry if this has been raised, I'm in the
process of going through the backlog of email.
I was just having a look at http://test.evolt.org, and after logging
in I received the page confirming my login details but the automatic
bounce back to the previous page failed with the error below:
-----8<--------------8<---------------
Error Occurred While Processing Request
Error Diagnostic Information
An error occurred while evaluating the expression:
"caller.attributes.#ListFirst(listElement, '=')#" =
IIF(ListLen(listElement, '=') IS 2, "ListLast(listElement, '=')",
DE(""))
Error near line 63, column 12.
Cannot set dynamic variable with name 'caller.attributes.%22'. The
variable name is illegal. Variable names must start with a letter and
can include only letters, numbers, and underscores.
The error occurred while processing an element with a general
identifier of (CFSET), occupying document position (63:5) to
(63:137).
Date/Time: Mon Nov 27 14:30:36 2000
Browser: Mozilla/3.01Gold (Macintosh; I; 68K)
Remote Address: 212.38.165.87
HTTP Referer: "Why do you want to know where I was before visiting
you?"
------8<-------------8<----------
This was in Opera 4.02 on Windows98 running through a Junkbuster
proxy (hence the odd Referer line above).
HTH
G.
---------------------------------------------------------------------
WORK: http://spiked.co.uk/
PLAY: http://polytechnic.co.uk/
From garrett at polytechnic.co.uk Mon Nov 27 14:41:52 2000
From: garrett at polytechnic.co.uk (Garrett Coakley)
Date: Mon Nov 27 14:41:52 2000
Subject: [thesite] Automatic forwarding after login problem...more
Message-ID: <3A22C606.4706.24888A@localhost>
> I was just having a look at http://test.evolt.org, and after >
> logging in I received the page confirming my login details but the
> automatic bounce back to the previous page failed with the error
> below:
Just looking at the source of the page, this pops out at me:
As it has grabbed the location.href from my Junkbuster setup, would
it be better if whatever mechanism generated the line of javascript
checked if the Referer is valid, if not, put a default (the index
page lets say) entry in there instead?
(I'm probably paranoid, but I prefer to have my HTTP-REFERER set that
way... in case you were curious *:)
G.
---------------------------------------------------------------------
WORK: http://spiked.co.uk/
PLAY: http://polytechnic.co.uk/
From dsmah at home.com Tue Nov 28 12:04:29 2000
From: dsmah at home.com (Dean Mah)
Date: Tue Nov 28 12:04:29 2000
Subject: [thesite] last 5 query
In-Reply-To: from "jeff" at Nov 26, 2000 10:39:58 PM
Message-ID: <200011281806.LAA01089@alice.monkeyland.ca>
jeff writes:
> what would you call a trigger that performs a cascading delete to
> maintain data integrity in child tables? is this just trivial
> business logic or does it do the job (of maintaining relational
> integrity) at the closest point to the data? does it make sense to
> have the programmer have to remember that he must delete child
> records whenever he performs a delete on the parent table (which
> could conceivably happen in more than one place in the application)?
I'd write a library routine. Isolates the business logic and let's
all developers use common code.
> i can agree with constraints. once the application is built, the
> constraints don't really play much of a role as the application code
> must be written to shield the user from the constraint errors
> anyway.
Right. So to me, constraints don't really contain business logic. At
least not business logic that exists elsewhere.
> if the programmer doesn't understand what's happening with the data
> then you have at least two problems on your hands. first, they're
> in over their head - too little knowledge or experience for what
> they've been asked to do. second, whoever is directing the project
> is doing a poor job of communicating the details of the project via
> database schemas, requirements documents, etc.
Ideally, everything is documented. However, jump into a legacy system
with little documentation and try to figure out what is going on and
support it. As an example, what kind of design documents do we have
for the evolt structure? If I wanted to jump in to the backend
programming full time, what's the best way to learn the system as it
exists?
> now, if you're doing complex architecture changes with triggers like
> writing temp tables, adding/removing columns, changing datatypes,
> etc. then the problem isn't with triggers. the problem is with the
> approach to the problems. the solutions are causing more problems
> than they're solving.
Sure but this partially gets back to your question of where do you
draw the line. In my current development environment, we've chosen to
draw the line at no triggers or stored procedures. A couple of the
reasons are:
1) Separate business logic from presentation and database layers.
Make it easier to change models. Make it easier for developers to
see the separation.
2) Do not rely on Oracle as a database. In theory our product can use
any database in the back without having to worry about converting
triggers and stored procedures to the database's specific language
and which features are supported. For example, MySQL doesn't
support triggers at this point.
> :~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> : Whether the additional code sits in the application layer or
> : the database layer there is still the same potential for coding
> : errors.
> :~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> don't get me wrong. i completely agree with that. i'm just saying
> that the fewer lines of code you have to write, the less likely you
> are to make an error.
Sounds like an argument for code re-use. You can get the separation
without having to re-write the same routines over and over again.
> i think it'd be fair to say that if you're a programmer that's
> working with building dynamic web applications you better be solid
> with more than just one or two languages. you better know the
> middleware language (asp, cf, php, etc.), you better know html, and
> you better know sql really well. nothing earth-shaking there.
> that's just the facts of building a quality solution. if you're not
> solid with these (and probably javascript as well) then you probably
> don't have any business being employed in that capacity.
We require people to know those things but we don't expect them to
know them at an expert level. We hire junior as well as intermediate
/ senior developers because of the marketplace and available
resources. We can't expect everyone to be able to jump into a
situation and know all of the required languages and tools. One less
requirement makes it easier to fill positions. We also separate a lot
of our work into teams. We have Java gurus, Perl gurus,
user-interface people, database gods, QA teams, client handlers,
network specialists, etc. We're getting away from the idea of the
'webmaster' where they need to know all of the languages, server
configuration, network layout, operating system tuning, etc.
> now we're saying the same thing. i think the performance hit should
> occur when a new record is inserted into the database - not whenever
> a visitor to the site requests a page.
Sounds good.
Perhaps one thing that we should keep in mind as the deadline gets
closer, program for completeness now and refactor for performance and
other things later. We don't want to miss a deadline by getting
caught up in issues along the way.
Dean
From dsmah at home.com Tue Nov 28 12:06:14 2000
From: dsmah at home.com (Dean Mah)
Date: Tue Nov 28 12:06:14 2000
Subject: [thesite] last 5 query
In-Reply-To: <014e01c05884$1d275c20$bfd11518@agusta1.ga.home> from "Joshua OIson" at Nov 27, 2000 07:10:00 AM
Message-ID: <200011281807.LAA01097@alice.monkeyland.ca>
I don't know enough about Cold Fusion to say if this is robust enough
or provides the performance that is needed so I can't talk to the
technical merits of this solution. From a separation of business
logic standpoint, I don't see anything wrong with it.
Dean
Joshua OIson writes:
> Would there be too much of a hit to store the last five id's in an
> application scope variable. Is there a business logic reason (the
> multi-tier stuff is really new to me) why storing that information
> in the CFSERVER is not a good idea, other than the fact that if the
> server crashes or is otherwise shut down the information is lost
> (though it could be recalculated on server restart)?
From dsmah at home.com Tue Nov 28 12:11:25 2000
From: dsmah at home.com (Dean Mah)
Date: Tue Nov 28 12:11:25 2000
Subject: [thesite] last 5 query
In-Reply-To: <015c01c05886$4aee5850$bfd11518@agusta1.ga.home> from "Joshua OIson" at Nov 27, 2000 07:25:36 AM
Message-ID: <200011281813.LAA01107@alice.monkeyland.ca>
This sounds like something that the Composite design pattern should be
able to handle. This simplifies designs and allows for easy
extensibility. Check out:
http://www.hillside.net/patterns/DPBook/DPBook.html
Dean
Joshua OIson writes:
> The other reason I suggest not using the application scope is also
> extensibility. What if you want to change the information to
> "last-5-per-forum-or-per-article-category" In a DB you could just
> add an category_id field and change the triggers/SQL accordingly,
> whereas in application variables you'd have to rework the entire
> naming convention and do a whole lot of "evaluates" or some other
> kludgy method to insert and extract the information. At some point
> it becomes not worth it.
From walker at sdproductions.com Tue Nov 28 12:30:35 2000
From: walker at sdproductions.com (walker)
Date: Tue Nov 28 12:30:35 2000
Subject: [thesite] dead link checker.
In-Reply-To: <200011281813.LAA01107@alice.monkeyland.ca>
References: <015c01c05886$4aee5850$bfd11518@agusta1.ga.home>
Message-ID: <5.0.2.1.0.20001128114423.02da92c8@popd.sdproductions.com>
I'm about to upload the link checker that updates old links to the new
directory convention. If I break something, please be patient. I will
promptly change it back.
talk to you all soon.
-w
_________________________________________
walker fenton
walker at sdproductions.com
303.722.5473
From seth at sethbienek.com Tue Nov 28 13:18:37 2000
From: seth at sethbienek.com (Seth Bienek)
Date: Tue Nov 28 13:18:37 2000
Subject: [thesite] last 5 query
In-Reply-To: <200011281807.LAA01097@alice.monkeyland.ca>
Message-ID:
Hi All,
Just got back from Vegas... Catching up on 500+ emails in the ol' inbox, and
this thread caught my eye.
> I don't know enough about Cold Fusion to say if this is robust enough..
I DO know enough about ColdFusion to say that storing this information in an
Application scoped variable makes a whole lot of sense, for a couple of
reasons:
1. We are talking about mere bytes of information, to be stored in the app
server's RAM. If the server has any hair on it's ass whatsoever (or even if
it doesn't, I just wanted to use the expression), robustness is not a
problem.
2. As we all know, RAM is fast. Like, really, really fast. :)
3. The overhead of making any database calls from CF that are not necessary
should be avoided. If you have information that is relatively static, and
accessed often by multiple users, then by all means make the Application
scope your bitch. Which brings me to my next point; er, caveat...
The drawback: As far as I know, there is not a way to update an Application
scoped CF variable from a database (unless a trigger can call a .cfm page).
Maybe this can be done as part of the process that actually archives the
mail message? I don't know too much about how this is currently done.. If
someone wants to enlighten me, I may be able to propose a solution.
To address Joshua's Concern:
> The only reason I would stay away from application scope variables in this
> case is because of extensibility. Where does one draw the line of what
> should be store in application variables? The "last-5" might be a
> candidate, but what about usage information, or whatever is
> thought of next.
Application scoped variables should almost always be set in the
Application.cfm. One reason why is for just the reason you mentioned. You
should be able to see at a glance exactly what is being saved in the
server's memory. You could also write a quick little CF app to cycle
through various scopes and tell you the variables and their values in each
scope (I think there may already be a free custom tag in the Developer's
exchange on Allaire's site that does this).
As an example of leveraging the Application scope to enhance the performance
of a site, check out:
http://acep.org
This is a content management/collaboration project I wrapped up a few months
back, and since it was so database intensive, our load times were
unacceptably high.
We were taking our biggest hit overall on the site navigation. By loading
the Pages table (containing page id's, navigation info, and short
descriptions of each page) into a structure in an Application scoped
varible, we reduced connections (and load) on the database server and cut
the page load times in third! Since the web server and database server were
seperate, and the web server had more than enough RAM (512 MB), loading the
~2500 row table (~5 MB) into memory made all the sense in the world.
Check out the site, it's FAF. ;)
Seth
------------------------------
Seth Bienek
Solutions Development Manager
Stonebridge Technologies, Inc.
972.455.7294 tel
972.404.9754 fax
------------------------------
From walker at sdproductions.com Tue Nov 28 13:59:47 2000
From: walker at sdproductions.com (walker)
Date: Tue Nov 28 13:59:47 2000
Subject: [thesite] old link converter...
Message-ID: <5.0.2.1.0.20001128130329.02f34600@popd.sdproductions.com>
OK- here's what's up with the link converter.
I changed index.cfm (in the site root) and added a file called
change_old_links.cfm in the test directory.
index.cfm looks for a url variable called menu. If that variable exists, it
includes the change_old_links.cfm file and aborts everything else.
on change_old_links.cfm: the old url variables are changed to their new
names, and a splash screen is shown that tells the user that their old
bookmark is invalid.
The splash screen has a 4 second meta-redirect on it, so the visitor will
get relocated to the article they were trying to get in the first place. If
the redirect doesn't work, there is a link that they can click on to take
them there.
In the event that the link comes from an article that is already on the
site- like Bob's links in the article he just wrote (he links to other
articles on the site) - then the splash screen will not show- you will go
immediately to that article.
So basically - the converter works in both instances, but since we only
really care about people who have bookmarked the site, they are the only
ones who get the splash screen reminder.
Jeff, let me know if there is a better place to put the redirection (if
there is a better place than index.cfm)
questions? comments?
-w
_________________________________________
walker fenton
walker at sdproductions.com
303.722.5473
From elfur at elfur.is Tue Nov 28 14:01:02 2000
From: elfur at elfur.is (Elfur Logadottir)
Date: Tue Nov 28 14:01:02 2000
Subject: [thesite] Re: [Admin] Article Alert - testing internal links
References: <5.0.2.1.0.20001128130156.02effc08@popd.sdproductions.com>
Message-ID: <027101c05976$9bd4ee50$40aefea9@DWARFS>
So I went to approve it
but got an error on the way
http://test.evolt.org/test/index.cfm?section=article&action=
approve&tid=18&aid=4266
Error Occurred While Processing Request
Error Diagnostic Information
An error occurred while evaluating the expression:
"#Replace(Trim(Replace(Replace(Replace(ReplaceList(form.cont
entname, bad_chars, good_chars), ",", "", "ALL"), " ", " ",
"ALL"), " ", " ", "ALL")), " ", "_", "ALL")#"
Error near line 3, column 40.
------------------------------------------------------------
--------------
Error resolving parameter FORM.CONTENTNAME
The specified form field cannot be found. This problem
is very likely due to the fact that you have misspelled the
form field name.
The error occurred while processing an element with a
general identifier of (CFPARAM), occupying document position
(3:1) to (3:205).
Date/Time: Tue Nov 28 14:01:17 2000
Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows
NT 5.0; DigExt)
Remote Address: 194.144.199.109
HTTP Referer:
http://test.evolt.org/article/testing_internal_links/18/4266
/evolt.borg?cfid=346984&cftoken=4104878
Query String:
section=article&action=approve&tid=18&aid=4266
------------------------------------------------------------
--------------------
[elfur]
----- Original Message -----
From: "walker"
To:
Sent: 28. n?vember 2000 20:02
Subject: Re: [Admin] Article Alert - testing internal links
| f!
|
| I goofed on the link that I wanted to test. Will someone
please approve the
| article (its on test.evolt.org) so that I can edit the
link?
|
| thanks
|
| -w
|
|
| At 01:45 PM 11/28/2000 +0000, you wrote:
|
| >There is a new article on thesite.
| >
| >Title: testing internal links
| >Author: walker
| >Date: 11/28/2000
| >Time: 1:45 PM CST(-0600)
| >Synopsis:
| >
| >this is a test for an internal link.
| >
| >Article:
| >
| >
|
>http://www.evolt.org/index.cfm?menu=8&cid=3618&catid=21
| >
| >if this works, all of the old links that are referenced
internally will go
| >directly to the article, without hitting the splash
screen.
| >
| >if you test, and get a splash screen alerting you that
the link is
| >invalid, please let me know.
| >
| >-w
| >
| >Someone want to approve it?
| >
http://test.evolt.org/article/testing_internal_links/18/4266
/evolt.borg
| >
| >
| >___________________________________________________
| >evolt leads to relevant material cross-pollinating the
popular culture.
|
| _________________________________________
| walker fenton
| walker at sdproductions.com
| 303.722.5473
|
|
| ___________________________________________________
| evolt leads to relevant material cross-pollinating the
popular culture.
From walker at sdproductions.com Tue Nov 28 14:04:48 2000
From: walker at sdproductions.com (walker)
Date: Tue Nov 28 14:04:48 2000
Subject: [thesite] error while updating an article
Message-ID: <5.0.2.1.0.20001128131817.02b6e678@popd.sdproductions.com>
fyi-
I got the following error while trying to update my article (after clicking
on the 'update my article' button).
-w
Error Diagnostic Information
An error occurred while evaluating the expression:
#getcontent.who#
Error near line 40, column 12.
Error resolving parameter GETCONTENT.WHO
ColdFusion was unable to determine the value of the parameter. This problem
is very likely due to the fact that either:
You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE
tag.
The error occurred while processing an element with a general identifier of
(#getcontent.who#), occupying document position (40:11) to (40:26).
Date/Time: Tue Nov 28 14:05:18 2000
Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Remote Address: 207.174.68.114
HTTP Referer:
http://test.evolt.org/article/evolt.borg?action=edit&tid=18&aid=4266
Query String: section=article&action=process
_________________________________________
walker fenton
walker at sdproductions.com
303.722.5473
From jeff at members.evolt.org Tue Nov 28 15:02:59 2000
From: jeff at members.evolt.org (jeff)
Date: Tue Nov 28 15:02:59 2000
Subject: [thesite] old link converter...
In-Reply-To: <5.0.2.1.0.20001128130329.02f34600@popd.sdproductions.com>
Message-ID:
walker,
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: walker
:
: I changed index.cfm (in the site root) and added
: a file called change_old_links.cfm in the test directory.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lookin good so far
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: index.cfm looks for a url variable called menu. If
: that variable exists, it includes the change_old_links.cfm
: file and aborts everything else.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
that's one way of handing it i suppose.
for now that makes for double the work with our design process as there are
now two files with the site design in them. give me a few days to think
about this approach. i'm sure there's a way to do this with a smaller
footprint.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: on change_old_links.cfm: the old url variables are
: changed to their new names, and a splash screen
: is shown that tells the user that their old bookmark
: is invalid.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
except where they don't exist and menu=8 you'll need to query the database
to get the appropriate cat_id. defaulting it to 10 (news) won't work
because the new site uses the tid (cat_id on the old site) as part of the
query. if they don't exactly match - no article.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: The splash screen has a 4 second meta-redirect on
: it, so the visitor will get relocated to the article they
: were trying to get in the first place. If the redirect
: doesn't work, there is a link that they can click on to
: take them there.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sounds fine.
dan & rudy, we'll also need to have a table for recording these hits. it
should have columns for things like url requested, http_referer,
remote_addr, etc. the more details we have about a particular visit the
easier it will be for us to track down these bad links to us and get them
fixed.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: In the event that the link comes from an article that is
: already on the site- like Bob's links in the article he just
: wrote (he links to other articles on the site) - then the
: splash screen will not show- you will go immediately
: to that article.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
this also sounds good. i would encourage every author to edit their
articles to reflect the new url format though.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: So basically - the converter works in both instances, but
: since we only really care about people who have
: bookmarked the site, they are the only ones who get the
: splash screen reminder.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
of course.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: Jeff, let me know if there is a better place to put the
: redirection (if there is a better place than index.cfm)
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i'm thinking that the template that handles the conversion from the old to
the new should set the value of section to something like "not_found" and
then i can just add a case for that in the app_chooser file. that way we
can still wrap the current design around the error message without having to
use a separate file. (i already asked for a couple of days to figure this
out though *grin*)
thanks for all your hard work, walker,
.jeff
name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff at members.evolt.org
From walker at sdproductions.com Tue Nov 28 17:20:45 2000
From: walker at sdproductions.com (walker)
Date: Tue Nov 28 17:20:45 2000
Subject: [thesite] old link converter...
In-Reply-To:
References: <5.0.2.1.0.20001128130329.02f34600@popd.sdproductions.com>
Message-ID: <5.0.2.1.0.20001128162133.00af6020@popd.sdproductions.com>
Jeff,
If you can figure out a way to keep the invalid url variables persistent
after they are washed through the uta and application.cfm - then I think
you should be able to use the app_chooser to wrap a look and feel around
them... I would've liked to do it that way, but for some reason they
wouldn't maintain persistence after going through the application and
uta. I need to learn the system a little more.
In putting together the change_old_links template i used static content for
look and feel- not the includes) because I didn't know all of the variables
that needed to be set before the page would show.
I'll hammer on it a little more also and see if I can't figure something out.
-w
At 01:02 PM 11/28/2000 -0800, you wrote:
>walker,
>
>i'm thinking that the template that handles the conversion from the old to
>the new should set the value of section to something like "not_found" and
>then i can just add a case for that in the app_chooser file. that way we
>can still wrap the current design around the error message without having to
>use a separate file. (i already asked for a couple of days to figure this
>out though *grin*)
From r937 at interlog.com Tue Nov 28 21:12:50 2000
From: r937 at interlog.com (rudy)
Date: Tue Nov 28 21:12:50 2000
Subject: [thesite] relational integrity and the application layer
Message-ID: <01c059b2$4afb2e40$734d149a@default>
i wanted to comment on something that was part of another thread, so i've
changed the subject line...
>> i can agree with constraints. once the application is built, the
>> constraints don't really play much of a role as the application code
>> must be written to shield the user from the constraint errors
>> anyway.
>
>Right. So to me, constraints don't really contain business logic. At
>least not business logic that exists elsewhere.
i know i'm jumping in late here, but with several decades of database
experience, i just want to weigh in on the side that says constraints *are*
part of the application layer
real-life example from the evolt database:
ratingvalue number(1)
constraint checkrating not null
check (ratingvalue between 1 and 5)
another:
alter table rating
add (constraint oneratingperuserperarticle
unique (userid,contentid))
i strongly disagree with the concept that "the application code must be
written to shield the user from the constraint errors anyway"
i think what happens is that in most cases, the application is written in a
manner that is *aware* of the constraints, but does not necessarily attempt
to *enforce* them in application code
for example, the way we take ratings on articles, there's a set of radio
buttons, and they correspond to values 1 through 5
note that the cf template that processes the form doesn't have to actually
check to make sure that the form field has those values (if it doesn't, the
form has been spoofed) -- that's done by the database
this also protects the database from invalid values being entered through
raw sql outside the application -- thus contradicting the idea that "once
the application is built, the constraints don't really play much of a role"
another consideration for letting the database do all the work (and not
repeating it in application code) is that if you name your constraints
well, and have a reasonable database error handling strategy in the
application code, the application will merely inform the user as to why the
action failed, using the database error message
okay, some databases just return a code (like db2, where the most common
error used to be -900, which meant "a database error occurred"), which
makes it a bit more challenging to tell the user
but why would you allow your programmers to reprogram a database error such
as
attempted insert would violate
constraint "oneratingperuserperarticle" --
insert rejected
seems pretty clear to me
> Ideally, everything is documented.
tee hee ;o)
my philosophy on documentation is another (large) thread altogether, but
basically, you should never write documentation that isn't stored inside
the thing it documents
so, if you want to find out what the database constraints are, just print
them ;o)
> As an example, what kind of design documents do we have
> for the evolt structure?
i had a data model at http://r937.com/oracle4.gif
however, this is *not* current and i haven't done the new one yet
oh yeah, you're saying, how come this isn't documented inside the database?
well, it is, sorta -- but you need a $6000 piece of software like ERwin to
reverse-engineer the diagram
aside: sql/server has a diagramming option that is really very good
> 2) Do not rely on Oracle as a database. In theory our product can use
> any database in the back without having to worry about converting
> triggers and stored procedures to the database's specific language
> and which features are supported. For example, MySQL doesn't
> support triggers at this point.
very good point, and an admirable criterion
i like your pragmatism
hey, even foreign key constraints are application layer, if you think about
it
suppose you have a parent table and a child table
most people are familiar with the "on delete" relational constraint -- if
you delete a parent row, you can designate what you want to happen to the
child rows, or whether you want the delete of the parent row to succeed
one option is to delete all child rows whenever the parent is deleted (the
"cascade"), and another option is to allow the delete of the parent *only
if* there are no child rows that refer to it, otherwise the delete is
disallowed (the "restrict")
but now here's another view of relational integrity
suppose you want to insert a child row
if you don't have a the parent for the child row, you can designate the
foreign key as nullable, in effect you allow the insert of the child with a
null foreign key to the parent
hypothetical example: insert an article without designating a
centre/topic, which is added later by an editor
alternatively, suppose you do have a value for the foreign key, but let's
just say that it's for a parent key that is currently not in the parent
table
oh, this wouldn't be allowed to happen, you might think, but that's not
necessarily so -- it depends on the application!
one of the relational constraint options (in theory anyway, i don't see
this implemented in too many databases) is to have a parent row
automatically inserted if the child being inserted has a new value for the
foreign key, i.e. parent's primary key that doesn't exist yet
so the database just goes ahead and creates the parent row first, using the
value of the to-be-inserted child's foreign key, and then proceeds with the
insert of the child row
aside: this strategy requires that all the parent's non-key fields are
either nullable or have a default value, but that's pretty normal
needless to say, you don't see this option in too many commercial
databases, yet it's just as much a part of relational integrity as "on
delete restrict" -- and if you need it, you have to build it
now, would you rather build it using triggers or force the application code
to do so? and what if there are multiple application code modules that
insert child rows? wouldn't they all have to have the same logic? then
wouldn't you want to split that off into a called module or something?
sounds like a perfect place for a stored procedure or trigger to me...
when you consider all the options that relational integrity offers, despite
the fact that you do have to implement some of them in contemporary
databases using triggers or stored procedures, it's pretty clear that these
constraints depend very much on which child and parent tables you are
talking about
in other words, they are application layer
rudy.ca
From r937 at interlog.com Tue Nov 28 21:23:42 2000
From: r937 at interlog.com (rudy)
Date: Tue Nov 28 21:23:42 2000
Subject: [thesite] old link converter...
Message-ID: <01c059b3$c9660ba0$734d149a@default>
> except where they don't exist and menu=8 you'll need to
> query the database to get the appropriate cat_id.
i don't understand how the new sexy urls work, but in the old (current)
site, as far as i can tell the only difference between
http://evolt.org/index.cfm?menu=8&cid=706
and
http://evolt.org/index.cfm?menu=8&cid=706&catid=17
is that when you go to the latter, the "code" centre link is lit up
("lit up" is a technical term, it's still a link, it just indicates that
this article is in the "code" centre -- category 17)
> defaulting it to 10 (news) won't work because the new site
> uses the tid (cat_id on the old site) as part of the
> query. if they don't exactly match - no article.
um, why do it that way? should the cat be optional? or is this too hard
to do in the new sexy url scheme?
seems like we might be losing some functionality here -- i happen to know a
few articles by their content id number (so i can type the url without
first searching for it) -- if i had to know the category id as well, i'd be
foobarred...
> dan & rudy, we'll also need to have a table for recording these hits.
> it should have columns for things like url requested, http_referer,
> remote_addr, etc.
sounds like a web server log
not that i've got any qualms about loading a web server log into a database
table, but in that case, why not grab all the columns that are available?
how do packages like webtrends (i'm not really familiar with any of them)
work?
rudy.ca
From erika at seastorm.com Tue Nov 28 22:53:43 2000
From: erika at seastorm.com (Erika Meyer)
Date: Tue Nov 28 22:53:43 2000
Subject: [thesite] the site
In-Reply-To: <200011281813.LAA01107@alice.monkeyland.ca>
References: <200011281813.LAA01107@alice.monkeyland.ca>
Message-ID:
It seems like I'm always late for everything evolt. I just saw the
request for help dated Nov. 21. My email is really tweaky lately, as
is my home connection.
Anyway, if I can help with anything, I guess you guys know what
skills I have, & I'd like to help if I could. Please email
meyer at up.edu and let me know if I can help with anything.
Erika
erika at seastorm.com
From dcody at oracular.com Wed Nov 29 17:20:37 2000
From: dcody at oracular.com (Daniel J. Cody)
Date: Wed Nov 29 17:20:37 2000
Subject: [thesite] Re: [Admin] lists down?
References:
Message-ID: <3A258EDA.3080408@oracular.com>
i'm still here more or less, not dead and buried yet :)
i'll check it out.
.djc.
rudy wrote:
> hi guys
>
> i see by visiting
> http://lists.evolt.org/adminarchive/Week-of-Mon-20001127/date.html that
> the admin list has sort of been working (light traffic) today, but i've
> received nothing from thelist or thesite for hours...
>
> are they down or am i being blocked somehow?
>
> doesn't this always happen when dan's away, eh?
>
> ;o)
>
>
>
> ___________________________________________________
> evolt leads to relevant material cross-pollinating the popular culture.
From dcody at oracular.com Wed Nov 29 17:40:35 2000
From: dcody at oracular.com (Daniel J. Cody)
Date: Wed Nov 29 17:40:35 2000
Subject: [thesite] Re: [Admin] lists down?
References: <3A258EDA.3080408@oracular.com>
Message-ID: <3A259386.5010206@oracular.com>
rudy -
this went through to thesite with no probs.. and i just saw a couple
posts come through to thelist in the last 30 mins..
slow day i guess..
.djc.
Daniel J. Cody wrote:
> i'm still here more or less, not dead and buried yet :)
>
> i'll check it out.
>
> ..djc.
>
> rudy wrote:
>
>> hi guys
>>
>> i see by visiting
>> http://lists.evolt.org/adminarchive/Week-of-Mon-20001127/date.html
>> that the admin list has sort of been working (light traffic) today,
>> but i've received nothing from thelist or thesite for hours...
>>
>> are they down or am i being blocked somehow?
>> doesn't this always happen when dan's away, eh?
From dsmah at home.com Thu Nov 30 09:53:53 2000
From: dsmah at home.com (Dean Mah)
Date: Thu Nov 30 09:53:53 2000
Subject: [thesite] relational integrity and the application layer
In-Reply-To: <01c059b2$4afb2e40$734d149a@default> from "rudy" at Nov 28, 2000 10:13:06 PM
Message-ID: <200011301555.IAA00885@alice.monkeyland.ca>
rudy writes:
> real-life example from the evolt database:
>
> ratingvalue number(1)
> constraint checkrating not null
> check (ratingvalue between 1 and 5)
These were the type of simple check constraints that I was referring
to before. To me, these contain as much business logic as primary and
foreign key constraints and should be emulated in the application
logic.
> note that the cf template that processes the form doesn't have to
> actually check to make sure that the form field has those values (if
> it doesn't, the form has been spoofed) -- that's done by the
> database
Maybe it's because I come from a CGI with Perl background where you
should be de-tainting and checking every bit of external input for
robustness and security but I still like to do this in the application
layer as well as in the database layer (check constraints) and the
presentation layer (e.g. restricting input to certain values).
> this also protects the database from invalid values being entered
> through raw sql outside the application -- thus contradicting the
> idea that "once the application is built, the constraints don't
> really play much of a role"
I'd agree. And this is why I've argued for check constraints in my
current environment. Although, none of our non-IT users would use
anything like SQL*Plus against the database. We develop internal
tools to let them manipulate restricted sets of data.
> but why would you allow your programmers to reprogram a database error such
> as
>
> attempted insert would violate
> constraint "oneratingperuserperarticle" --
> insert rejected
>
> seems pretty clear to me
Perhaps to you, but some of our users do not even have a high school
education. My guess is that they wouldn't understand this or care.
We have different levels of error messages in our system. For
example, when an error occurs, one message is set to the user and
depending on the severity, messages are sent to the bug-fix team, our
client services teams, network administrator, and/or logged to the
database or log file.
> my philosophy on documentation is another (large) thread altogether,
> but basically, you should never write documentation that isn't
> stored inside the thing it documents
Check out Extreme Programming.
> > As an example, what kind of design documents do we have
> > for the evolt structure?
>
> i had a data model at http://r937.com/oracle4.gif
>
> however, this is *not* current and i haven't done the new one yet
>
> oh yeah, you're saying, how come this isn't documented inside the database?
Actually, I was wondering what the database looks like but also where
all the application code lives and what it does and how it interacts.
For example, where is the static caching of the front page documented?
How is it done? What code actually does it? What is the caching
frequency? Does it cache automatically when new content is submitted?
For a new person coming on, they'll have these questions and I don't
think that they should have to bug the developer to find the answer.
The developer may have since moved on and nobody has the knowledge of
how it works without having to dig into the system. (That's the
problem we face at my current job.)
> so the database just goes ahead and creates the parent row first,
> using the value of the to-be-inserted child's foreign key, and then
> proceeds with the insert of the child row
This kind of scares me. Allowing the database to grow on its own.
Take on a like of its own. Ewww... :) I'd be worried about creating
intelligent defaults in the parent table. If the tables were used for
any kind of reporting before the parent table was filled in
appropriately, it could lead to confusion. Just a gut feel though.
> now, would you rather build it using triggers or force the
> application code to do so? and what if there are multiple
> application code modules that insert child rows? wouldn't they all
> have to have the same logic? then wouldn't you want to split that
> off into a called module or something? sounds like a perfect place
> for a stored procedure or trigger to me...
That's where we differ. Sounds like a library to me. Separation and
common code. I know that you are arguing that triggers and stored
procs can be seen as part of the application layer but I'd like to see
a greater separation. A difference in philosphy. FWIW, I never
though this way in my previous life as an Oracle DBA but now that I am
a developer.... Maybe I'm just a control freak.
Dean
From seb at admin.evolt.org Thu Nov 30 10:30:09 2000
From: seb at admin.evolt.org (Seb)
Date: Thu Nov 30 10:30:09 2000
Subject: Fw: [thesite] relational integrity and the application layer
Message-ID: <006e01c05aea$e407fdf0$dc34a8c0@issntdev57>
Argh. I gotta sort out my freakin' SMTP server. Just sending this again for
larfs.
Seb.
----- Original Message -----
From: "Seb"
To:
Sent: Thursday, November 30, 2000 4:27 PM
Subject: Re: [thesite] relational integrity and the application layer
> > Maybe I'm just a control freak.
>
> Me too. Exerting my freaky control, I say that this conversation could be
> taken to [thelist] where it'll benefit a lot more people. =)
>
> Seb.
>