2009年12月30日星期三

Re: [fw-mvc] BaseUrl and subdomains

> All my references to anything are like
>
> <td background="<?=CDN1?>/styles/images/bg_t0_rightfade.jpg" width="375"
> valign="top">

Sorry, but this is no good. You are using tables for layout purposes,
you are using constants ("superglobals"), you are not sticking to ZF
code conventions (portability of your code?), you are not even using
inline CSS - where do you want to go with this?

> So during development and testing they can go to one place, then in
> production the CDN1, etc get set to our Amazon content delivery domains.
> I do CDN1, CDN2, CDN3 so the browser will do more at once, and in theory
> render the page faster.Some browsers will only start 10 connections to
> a single domain I've read, so this allows us to get 30 going quickly.
> The constant also allows us to be flexible. I suppose you could do them
> based on what resource they were... Heavy stuff moved off site
> perhaps... It also works if your traffic goes way up... you can route
> images from a server that does not do cookies or php, something light
> and fast.

Start with table-less designs, CSS, and then you can think about
tweaking other stuff.

> So we sort of round-robin them when assigning them. If the CDN is blank,
> then it just goes to the root of the site its currently running from.
>
> Like I said, I am somewhat new to this, but a constant in there seems a
> bit less complicated than messing with the controller...

Nope. What about injecting stuff using plugins?


Best regards,

Andreas

没有评论: