You see, that's why you're so smart. I did NOT take into consideration at all the performance issues you raise. And in that respect you are right.
I still think the concept has merit though--but not, of course, at the expense of the performance issues you raise. If those issues could be "worked around" then we might have something beneficial. Would there be a way to dynamically create a stylesheet along the lines of what I have proposed (a user inputs preferences from a form to a _db table) Then a custom tag cfoutputs the "stylesheet.cfm" and then uses cffile to write the content to a text file "stylesheet.css" Then we're back to square one, our stylesheet is a static file. The creation/modification of values in the stylesheet is an isolated event. It begins and ends with a user's input from a form--no different really than updating their Account Profile. My proposal/idea really has nothing to do with best-practice rules of CSS (one would have written a correct stylesheet to begin with) but simply with the idea that if the user wanted to have white type on a black background vs. vice versa they could simply change a value in a _db table, click "Save Changes" --and a new/replacement stylesheet.css is generated and life goes on. Respectfully submitted for consideration, Dan Kaufman -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adam Churvis Sent: Friday, May 06, 2005 7:12 PM To: [email protected] Subject: Re: [plum] dynamic variables in Plum stylesheets I would never never ever under any circumstances whatsoever use the approach you're taking, Dan. It's counter to every good design principle for a web-based application at every layer in the architecture: the client, the app server, and the database server. * In the client you lose all client-side caching of the stylesheet on every request, which destroys performance * In the app server you're burdening it unnecessarily on every request, which destroys performance * In the database server you're burdening it unnecessarily on every request, which destroys performance Define your styles according to the CSS box model and the rules of the cascade, put them into the appropriate external cascading stylesheets, and apply them using your editor control. Your compelling reason for having a single stylesheet isn't compelling at all. Don't fear intelligent stylesheets; understand them and use them. Respectfully, Adam Phillip Churvis Member of Team Macromedia http://www.ProductivityEnhancement.com Download Plum and other cool development tools, and get advanced intensive Master-level training: * C# & ASP.NET for ColdFusion Developers * ColdFusion MX Master Class * Advanced Development with CFMX and SQL Server 2000 ----- Original Message ----- From: "Dan" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, May 06, 2005 6:42 PM Subject: RE: [plum] dynamic variables in Plum stylesheets Maybe, but aren't you defending Plum's condition that stylesheets have a file extension of .css This is limiting. One of the most powerful things about "dynamic database-driven" websites/applications is the ability to write one simple piece of code and watch the display of information change infinitely based solely on the stuff in the database. This is obvious when we are talking about content. Write a page that displays bank account transactions and a million different people can use the same page (of code.) But consider the ramifications of bringing dynamic-data to a style sheet: We write ONE style sheet and we have a _db table that holds "display information" such as: What color would you like the page background to be? ( #bodyBG# ) What type-face, font-family, would you like your text to be in? ( #fontFamily# ) And what color would you like that text? ( #textColor# ) And then in your style sheet: body { background-color: ##bodyBG#; font-family: ##fontFamily#; color ##textColor#; } etc. Yes, of course, you can write a dozen different *static* stylesheets and give the user the ability to choose which "site style" they'd like to use. But the point is that by enabling a style sheet with dynamic variables you can conceivably create an infinite number of websites using just one style sheet by letting the user answer a few questions. Respectfully yours, Dan Kaufman -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adam Churvis Sent: Friday, May 06, 2005 5:49 PM To: [email protected] Subject: Re: [plum] dynamic variables in Plum stylesheets But you *would* be picking from a list: a dropdown list of defined styles in the formatting bar of the ActivEdit editor. Respectfully, Adam Phillip Churvis Member of Team Macromedia http://www.ProductivityEnhancement.com Download Plum and other cool development tools, and get advanced intensive Master-level training: * C# & ASP.NET for ColdFusion Developers * ColdFusion MX Master Class * Advanced Development with CFMX and SQL Server 2000 ----- Original Message ----- From: "Dan" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, May 06, 2005 3:52 PM Subject: RE: [plum] dynamic variables in Plum stylesheets The content in question is text + image. The CSS floats the image left or right and the text wraps around the image. I suppose I could define multiple classes, one with float: left; another with float: right; etc. and then give the user the ability to choose. But it seems simpler to just let the user pick form a list box, left, right, middle and then pass that value back as float: #pImgAign#; Dan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adam Churvis Sent: Friday, May 06, 2005 3:40 PM To: [email protected] Subject: Re: [plum] dynamic variables in Plum stylesheets It sounds like an overly-complicated way to accomplish your goal. Why isn't the user just choosing the position by choosing the appropriate class in an editor that enables you to do this, like ActivEdit? Respectfully, Adam Phillip Churvis Member of Team Macromedia http://www.ProductivityEnhancement.com Download Plum and other cool development tools, and get advanced intensive Master-level training: * C# & ASP.NET for ColdFusion Developers * ColdFusion MX Master Class * Advanced Development with CFMX and SQL Server 2000 ----- Original Message ----- From: "Dan" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, May 06, 2005 2:43 PM Subject: [plum] dynamic variables in Plum stylesheets I guess this is a question "how to" to Adam and David, as well as being put out to the Plum Community for thoughts and ideas on. Historically in my work for the Content Management System "backend" for a website I have given the user the ability (for example) when choosing an image for a content page, to choose its placement as left, right, middle. This is a value that is written to the pageContent_db table. THEN my stylesheets have been named "whateverStyle.cfm" and the variable #pImgAlign"# is used in the class definition. Thus the stylesheet takes on a dynamic quality changing what it dishes up by letting the user set values. What I see with Plum is that "Plum stylesheet names always end in styles.css" My first thought to accommodate my desire to enable my users to make simple compositional changes to their content pages is to write the class def as an inline declaration in the display code and either leave out (or cascadingly overwrite) the baseStylesheet.css. But this has a cludgy nature and definitely violates the principle of "one for all" Anyone have any thoughts on this? I may (as usual) be missing the obvious, but I don't think so. I need to define a CSS class in the stylyesheet and I would like to have database driven variables in the stylesheet to give my users this control. Yours truly, Dan Kaufman An Elephant Never Forgets [EMAIL PROTECTED] ********************************************************************** You can subscribe to and unsubscribe from lists, and you can change your subscriptions between normal and digest modes here: http://www.productivityenhancement.com/support/DiscussionListsForm.cfm ********************************************************************** ********************************************************************** You can subscribe to and unsubscribe from lists, and you can change your subscriptions between normal and digest modes here: http://www.productivityenhancement.com/support/DiscussionListsForm.cfm ********************************************************************** ********************************************************************** You can subscribe to and unsubscribe from lists, and you can change your subscriptions between normal and digest modes here: http://www.productivityenhancement.com/support/DiscussionListsForm.cfm ********************************************************************** ********************************************************************** You can subscribe to and unsubscribe from lists, and you can change your subscriptions between normal and digest modes here: http://www.productivityenhancement.com/support/DiscussionListsForm.cfm ********************************************************************** ********************************************************************** You can subscribe to and unsubscribe from lists, and you can change your subscriptions between normal and digest modes here: http://www.productivityenhancement.com/support/DiscussionListsForm.cfm ********************************************************************** ********************************************************************** You can subscribe to and unsubscribe from lists, and you can change your subscriptions between normal and digest modes here: http://www.productivityenhancement.com/support/DiscussionListsForm.cfm **********************************************************************
