Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2006
    Posts
    57

    Unanswered: Putting CSS and web settings in the DataBase expensive?

    I had an idea to put all my web design settings, css text and web content in the database..This way it would be easy for others to edit remotely. Do you guys think this would have an impact on performance if I do this?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    no .
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Its not an uncommon approach. Many web content management tools store their pages in databases.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    I wouldn't store your CSS in the database. You most definately will incur a performance hit if you do this. In order to pull this off, you would have to handle calls to http://yoursite.com/yourCss.css open a connection to the database and dynamically provide the valid CSS to each and every client that views your webpage. Storing page content dynamically suffers similar performance hits.

    That said, dynamic CMS's such as DNN, Wordpress and Drupal take a similar strategy for the content of the pages. The construction of the pages themselves is handled through a set of business classes which have been optimized to construct pages from a given set of parameters as opposed to storing the entire page itself in a database.

    If you are working on anything marginally complex, you will also have the issue of developers being able to view the entire project, or at least the relevant peices they are working on in real-time.

    Moral: I wouldn't do this unless you have a REALLY good reason. Use Visual Source Safe or CVS or something else that is designed explicitly for this purpose.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Well, you certainly sound like you know what you are talking about more than I sound like I know what I am talking about.

    Good enough for me.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by blindman
    Well, you certainly sound like you know what you are talking about more than I sound like I know what I am talking about.
    Welcome to my world
    Testimonial:
    pootle flump
    ur codings are working excelent.

  7. #7
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    storing css in a database is a fabulous idea, and not a new one

    let's say you go to a site, and, amongst other things that you can customize, you are allowed to set various display properties like colours, font choice and size, display of various sidebars or not, and so on...

    when you press the "save these settings" option, the backend will save these as your custom css parameters, but not just in the database, the backend will also (re)save them to a static .css file so that your browsing experience can take advantage of browser caching

    i didn't really mean to bore you with details of web development in a database-driven environment, but the key point is, the database is used as a repository for all kinds of stuff

    hence the name Content Management System
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  8. #8
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Quote Originally Posted by r937
    when you press the "save these settings" option, the backend will save these as your custom css parameters, but not just in the database, the backend will also (re)save them to a static .css file so that your browsing experience can take advantage of browser caching
    That's subtly different from serving up CSS from the database, which is the point I was attempting to make (albiet poorly).

    CMS's also are not generally going to store the raw source for an entire page in the database.

    We're arguing from the same side of the fence.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •