Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > apple.com, hardcoded?

apple.com, hardcoded?
Thread Tools
Senior User
Join Date: Oct 2004
Location: Portugal
Status: Offline
Reply With Quote
Dec 13, 2004, 12:13 PM
 
hello all,

Just out of curiosity, what kind of database/content manager does the apple site use?
or is most of it hardcoded? (hard to believe, but you never know...)
     
Mac Enthusiast
Join Date: Nov 2001
Location: Finland
Status: Offline
Reply With Quote
Dec 13, 2004, 12:16 PM
 
Originally posted by Madrag:
hello all,

Just out of curiosity, what kind of database/content manager does the apple site use?
or is most of it hardcoded? (hard to believe, but you never know...)
Apple Store is using Apple own webobjects enviroment. I guess they are using something simular but in "content management style" for their other pages!
     
Forum Regular
Join Date: Sep 2004
Location: Earth
Status: Offline
Reply With Quote
Dec 14, 2004, 05:09 PM
 
The Apple Discussions are implemented in Web Crossing, as are Adobe's.
(Last edited by Dr. Smoke; Dec 15, 2004 at 01:21 AM. )
Good Luck!

Dr. Smoke
Author: Troubleshooting Mac OS X
     
Madrag  (op)
Senior User
Join Date: Oct 2004
Location: Portugal
Status: Offline
Reply With Quote
Dec 15, 2004, 10:04 AM
 
ok, but the rest of the site?
(startpage, etc...)

this because their site seems hardcoded, and I would like to be impressed by the fact that they are dynamic...
     
Posting Junkie
Join Date: Feb 2000
Location: Washington, DC
Status: Offline
Reply With Quote
Dec 15, 2004, 10:19 AM
 
Originally posted by Madrag:
ok, but the rest of the site?
(startpage, etc...)

this because their site seems hardcoded, and I would like to be impressed by the fact that they are dynamic...
I'm with you... I just don't know how they wouldn't hand code their main pages...

But on the flip side, how could they possibly NOT use a CMS?
     
Addicted to MacNN
Join Date: Mar 2002
Location: Winnipeg
Status: Offline
Reply With Quote
Dec 15, 2004, 10:47 AM
 
My guess is that they have it all hard coded since the files are generally .html. Apple normally doesn't update their site that often so it makes sense that they'd be hard coded.
     
Mac Elite
Join Date: Jul 2001
Location: Switzerland
Status: Offline
Reply With Quote
Dec 15, 2004, 10:53 AM
 
Originally posted by mitchell_pgh:
But on the flip side, how could they possibly NOT use a CMS?
What would stop them from using a CMS that allows for export to static pages?
MBP 15" 2.33GHz C2D 3GB 2*23" ACD
     
Mac Elite
Join Date: Aug 2001
Location: Capitol City
Status: Offline
Reply With Quote
Dec 15, 2004, 11:15 AM
 
Originally posted by Superchicken:
My guess is that they have it all hard coded since the files are generally .html. Apple normally doesn't update their site that often so it makes sense that they'd be hard coded.
HTML files can be served by perl scripts. They can have PHP, ASP, JSP or whatever else you want to use. It doesn't matter. You can tell your webserver to use the PHP interpreter on files ending .asp if you want.

I would think they have some type of content management system. Apple's site might not seem that large, but it is big enough that it would be seriously inefficient to manage it all page by page, not to mention prone to mistakes being published live. Its possible that it is, but I think they at least have some kind of versioning and a test environment that they can push live through some type of software. (as opposed to making a tarball of the site, and copying some files over ftp.

One of the great things about webservers is that you can pretty much do anything with it, as long as you're willing to get your hands dirty. You can make a fully dynamic, data driven site look just like a hand-coded hard written html site. Its great!
     
Posting Junkie
Join Date: Feb 2000
Location: Washington, DC
Status: Offline
Reply With Quote
Dec 15, 2004, 12:43 PM
 
It's official, they use Adobe GoLive and Transmit.
     
Madrag  (op)
Senior User
Join Date: Oct 2004
Location: Portugal
Status: Offline
Reply With Quote
Dec 17, 2004, 10:46 AM
 
Nicelly put DeathMan, but if indeed that's true (the webserver providing such pages), than I want one (which?, that's the question)

We'll see when they update it to the new startpage ...
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Dec 17, 2004, 11:40 AM
 
Originally posted by workerbee:
What would stop them from using a CMS that allows for export to static pages?
A dynamic-caching CMS, you mean? The only thing that would prevent this would be if each page had to be different for every user. I don't think Apple has anything like that on its main site, though the store is another matter entirely.

Dynamic caching is popular on Weblogs and extremely high-traffic environments. The idea is that when a user requests a page, the server looks in the filesystem for the static files. If it doesn't find them, then it builds the page CMS-style, serves it to the user, and then saves the files to disk. The next time a user visits that page, the static files are already there, so the page doesn't have to rebuilt. If any of the content in the page gets changed in the backend, the static files are deleted so that they'll be rebuilt the next time someone visits that page.

It's a neat system, and if you have a lot of traffic then it can cut your CPU resource requirements big time. I don't know whether or not Apple does this, but it's certainly possible.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Mac Elite
Join Date: Aug 2001
Location: Capitol City
Status: Offline
Reply With Quote
Dec 18, 2004, 03:46 PM
 
Originally posted by Madrag:
Nicelly put DeathMan, but if indeed that's true (the webserver providing such pages), than I want one (which?, that's the question)

We'll see when they update it to the new startpage ...
You already have one! Assuming you have Mac OS X.

Install the newest available PHP from here: http://www.entropy.ch/software/macosx/php/

Then find this line to your /etc/httpd/httpd.conf file: PM me if you need help)

Code:
AddType application/x-httpd-php .php
and change it to:
Code:
AddType application/x-httpd-php .php .html .css
(the .css will let you put php in your .css files if you want. Then you can name your files .html and .css and still put php in them if you want.

And while you're at it add this line as well:
Code:
AddType text/css .css
That will make sure Firefox renders XHTML strict pages right when using css, otherwise it'll throw an exception telling you .css type isn't defined and it will read it as text/html (or something like that, what a pain). I don't know why this isn't included in the default apache config.
     
Madrag  (op)
Senior User
Join Date: Oct 2004
Location: Portugal
Status: Offline
Reply With Quote
Dec 20, 2004, 07:05 AM
 
Thnaks for the tip!
I'll give it a try!
     
Mac Elite
Join Date: May 2001
Location: ~/
Status: Offline
Reply With Quote
Dec 21, 2004, 10:21 PM
 
Adding .html and .css to PHP handler line will generate a bit of extra overhead on all HTML and CSS files downloaded off the server. All HTML and CSS files will be run through the PHP module in Apache after doing this. Apache determines with handler definitions what modules to load into a forked process. With all HTML and CSS files needing the PHP module loaded all Apache forks will need more memory than if those files weren't handled by the PHP module. Just a warning if you've got a high volume site you want to try this on.

A safer way to do this is to use mod_rewrite which will let you rewrite any type of file as another as far as the user agent is concerned. You can mask the fact you're using Perl CGIs with something like:

Code:
RewriteRule ^(*).pl $1.html RewriteRule ^(*).cgi $1.html
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:19 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2