From: Andreas A. (Thyrell) <a.a...@th...> - 2001-09-14 15:24:55
|
Hi All, I'm a bit concerned how about handling the resources/ tree in the built system. The following problem occurs: I have a master template that is used in bcp defs in different levels e.g.: www.foo.com/en/manage/news/ www.foo.com/en/manage/users/newsletters/ .. The scripts and the master template there uses resources from our build/en/htdocs/resources directory. One way to accomplish a correct loading of the resources is to use absolute paths in the tags i.e. src=/en/resources/whatever/file.gif. But what if we want run the scripts a level deeper i.e. in www.foo.com/r2/en/manage/news. Problem. The way I sove this currently is running a symlink to build/en/htdocs/resources in every htdocs subdir and using relative paths in the templates i.e src=resources/whatever/file.gif. It works and it's smooth on unix systems but I feel thats a very error prone way. Especially while running on win systems where symlinks are not possible (and creating virtual dirs all over the build tree is a mess). Any ideas, plans how to handle this? I guess that's a good application for ImageRequestBuilder. Andi |
From: Jason H. <jc...@ey...> - 2001-09-14 17:30:10
|
I too have wondered this. I'd vote highly against the use of any absolute paths unless they are preceed by a definable constant. "Andreas Aderhold (Thyrell)" wrote: > I'm a bit concerned how about handling the resources/ tree in the built > system. > > The following problem occurs: > > I have a master template that is used in bcp defs in different levels e.g.: > > www.foo.com/en/manage/news/ > www.foo.com/en/manage/users/newsletters/ > .. > > The scripts and the master template there uses resources from our > build/en/htdocs/resources directory. One way to accomplish a correct loading > of the resources is to use absolute paths in the tags i.e. > src=/en/resources/whatever/file.gif. But what if we want run the scripts a > level deeper i.e. in www.foo.com/r2/en/manage/news. Problem. > > The way I sove this currently is running a symlink to > build/en/htdocs/resources in every htdocs subdir and using relative paths in > the templates i.e src=resources/whatever/file.gif. |
From: Andreas A. (Thyrell) <a.a...@th...> - 2001-09-14 17:57:03
|
Hi Jason, > I too have wondered this. I'd vote highly against the use of any > absolute paths unless they are preceed by a definable constant. The constant may be an option BC_HTDOCS_RESOURCES or someting like that. Hmmm... I think that needs a bit thinking. >> The way I sove this currently is running a symlink to >> build/en/htdocs/resources in every htdocs subdir and using >> relative paths in the templates i.e >> src=resources/whatever/file.gif. Just discovered this does _not_ work when using path vars like: script/var.value/ :( Andi |
From: Alex B. <en...@tu...> - 2001-09-14 18:06:04
|
> Hi Jason, > >> I too have wondered this. I'd vote highly against the use of any >> absolute paths unless they are preceed by a definable constant. > The constant may be an option BC_HTDOCS_RESOURCES or someting like that. > Hmmm... I think that needs a bit thinking. > Yes, the way to solve this is during the make process in combination with a path constant: BC_PATH_RESOURCES so all of your paths _will_ be absolute, but based on a variable :) _a >>> The way I sove this currently is running a symlink to >>> build/en/htdocs/resources in every htdocs subdir and using >>> relative paths in the templates i.e >>> src=resources/whatever/file.gif. > > Just discovered this does _not_ work when using path vars like: > > script/var.value/ > > :( > > Andi |
From: Andreas A. (Thyrell) <a.a...@th...> - 2001-09-15 13:46:02
|
Hi Alex, > Yes, the way to solve this is during the make process in combination > with a path constant: > BC_PATH_RESOURCES > so all of your paths _will_ be absolute, but based on a variable :) Very cool. Another question. Is the build tree layout final or will it change? I mean the language stuff is going to different subdirs: build/en/htdocs ... build/de/htdocs ... Currently i run a symlink to the language builds htdocs dir withing the vhost dir. So in www.foo.com/en/ the "en" is a symlinkg to build/en/htdocs. Andi |
From: alex b. <en...@tu...> - 2001-09-15 15:57:08
|
----- Original Message ----- From: "Andreas Aderhold (Thyrell)" <a.a...@th...> To: <bin...@li...> Sent: Saturday, September 15, 2001 6:45 AM Subject: RE: [binarycloud-dev] Handling of resources/ in htdocs > Hi Alex, > > > Yes, the way to solve this is during the make process in combination > > with a path constant: > > BC_PATH_RESOURCES > > so all of your paths _will_ be absolute, but based on a variable :) > > Very cool. Another question. Is the build tree layout final or will it > change? I mean the language stuff is going to different subdirs: > > build/en/htdocs ... > build/de/htdocs ... > > Currently i run a symlink to the language builds htdocs dir withing the > vhost dir. So in www.foo.com/en/ the "en" is a symlinkg to build/en/htdocs. That's exactly how I do it, and I think that works well... can you think of any other ways people might want to do it? _a |
From: Andreas A. (Thyrell) <a.a...@th...> - 2001-09-15 16:23:03
|
Hey Alex, >> Currently i run a symlink to the language builds htdocs >> dir within the vhost dir. So in www.foo.com/en/ >> the "en" is a symlink to build/en/htdocs. > That's exactly how I do it, and I think that works > well... can you think of > any other ways people might want to do it? I prefer that too. But maybe someone wants to use subdomains. http://en.foo.com/ http://da.foo.com/ or the toplevel variant: http://www.foo.com -> english http://www.foo.da -> dansk http://www.foo.de -> german I think we should support all theese variants. At least from the "commercial-usage" point of view. (You know: they insist of having a subdomain per language and nobody or nothing can change their mind) Andi |
From: Alex B. <en...@tu...> - 2001-09-16 20:21:35
|
agreed, though all those mappings can be done with virtualhosts (aliases) and/or just copying the files over... so I think we implicitly support those right now. -a > Hey Alex, > >>> Currently i run a symlink to the language builds htdocs >>> dir within the vhost dir. So in www.foo.com/en/ >>> the "en" is a symlink to build/en/htdocs. > >> That's exactly how I do it, and I think that works >> well... can you think of >> any other ways people might want to do it? > > I prefer that too. But maybe someone wants to use subdomains. > > http://en.foo.com/ > http://da.foo.com/ > > or the toplevel variant: > > http://www.foo.com -> english > http://www.foo.da -> dansk > http://www.foo.de -> german > > I think we should support all theese variants. At least from the > "commercial-usage" point of view. (You know: they insist of having a > subdomain per language and nobody or nothing can change their mind) > > > Andi > > > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > https://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: Alex B. <en...@tu...> - 2001-09-14 18:04:57
|
> > I too have wondered this. I'd vote highly against the use of any > absolute paths unless they are preceed by a definable constant. Which is exactly what ImageRequestManager will do. _a > > "Andreas Aderhold (Thyrell)" wrote: >> I'm a bit concerned how about handling the resources/ tree in the built >> system. >> >> The following problem occurs: >> >> I have a master template that is used in bcp defs in different levels e.g.: >> >> www.foo.com/en/manage/news/ >> www.foo.com/en/manage/users/newsletters/ >> .. >> >> The scripts and the master template there uses resources from our >> build/en/htdocs/resources directory. One way to accomplish a correct loading >> of the resources is to use absolute paths in the tags i.e. >> src=/en/resources/whatever/file.gif. But what if we want run the scripts a >> level deeper i.e. in www.foo.com/r2/en/manage/news. Problem. >> >> The way I sove this currently is running a symlink to >> build/en/htdocs/resources in every htdocs subdir and using relative paths in >> the templates i.e src=resources/whatever/file.gif. > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > https://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: Jason H. <jc...@ey...> - 2001-09-14 18:27:52
|
To clear any cloudy air, so accessing ANYTHING in resources/ will be a combination of a constant and an absolute path, correct? TMPL EG: <script src="<?=RESOURCE_CONSTANT?>/what/ever/script.js"> <img src="<?=RESOURCE_CONSTANT?>/a/b/c/image.jpg"> <a href="<?=RESOURCE_CONSTANT?>/archive/mp3/any_document.mp3">click to download this MP3</a> Or is this to simplified? jason Alex Black wrote: > > I too have wondered this. I'd vote highly against the use of any > > absolute paths unless they are preceed by a definable constant. > > Which is exactly what ImageRequestManager will do. |
From: Alex B. <en...@tu...> - 2001-09-14 19:18:14
|
> > To clear any cloudy air, so accessing ANYTHING in resources/ will be a > combination of a constant and an absolute path, correct? > > TMPL EG: > <script src="<?=RESOURCE_CONSTANT?>/what/ever/script.js"> > > <img src="<?=RESOURCE_CONSTANT?>/a/b/c/image.jpg"> > > <a href="<?=RESOURCE_CONSTANT?>/archive/mp3/any_document.mp3">click to > download this MP3</a> > > > Or is this to simplified? More like: <bc:img id="abcimg" /> <bc:js id="moo" inline="true" /> <bc:css id="moo" inline="false" /> <bc:href id="href" href="/archive/mp3/any_document.mp3" usedocroot="true" | usersrcroot="true" /> (or something) which will be 'made' into: <img src="/value/of/rsrc/constant/a/b/c/image.jpg" border="0" width="12" height="123"> <script language="JavaScript"> function Moo() { return; } </script> <link rel="stylesheet" href="/value/of/rsrc/constant/css/moo.css" /> <a href="/value/of/rsrc/constant/archive/mp3/any_document.mp3">Click to Download MP3</a> I very much want to avoid the use of "constant echos" that are unnecessary at runtime: if you already have implicit knowledge about your environment, there's no reason to repeat the same logic over and over. What are people's opinions on these 'tags' ? best, _alex > jason > > Alex Black wrote: >>> I too have wondered this. I'd vote highly against the use of any >>> absolute paths unless they are preceed by a definable constant. >> >> Which is exactly what ImageRequestManager will do. > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > https://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: Andreas A. (Thyrell) <a.a...@th...> - 2001-09-15 13:50:10
|
Hi Alex, > <bc:img id="abcimg" /> > <bc:js id="moo" inline="true" /> > <bc:css id="moo" inline="false" /> > <bc:href id="href" href="/archive/mp3/any_document.mp3" > usedocroot="true" | > usersrcroot="true" /> (or something) usedocroot is fine. > which will be 'made' into: > <img src="/value/of/rsrc/constant/a/b/c/image.jpg" border="0" > width="12" height="123"> Groovy. > I very much want to avoid the use of "constant echos" that are > unnecessary at runtime: if you already have implicit > knowledge about your environment, there's no reason to > repeat the same logic over and over. Agreed. > What are people's opinions on these 'tags' ? I like this. Let's do it. Andi |
From: Alex B. <en...@tu...> - 2001-09-14 18:04:34
|
> The following problem occurs: > > I have a master template that is used in bcp defs in different levels e.g.: > > www.foo.com/en/manage/news/ > www.foo.com/en/manage/users/newsletters/ > .. > > The scripts and the master template there uses resources from our > build/en/htdocs/resources directory. One way to accomplish a correct loading > of the resources is to use absolute paths in the tags i.e. > src=/en/resources/whatever/file.gif. But what if we want run the scripts a > level deeper i.e. in www.foo.com/r2/en/manage/news. Problem. > > The way I sove this currently is running a symlink to > build/en/htdocs/resources in every htdocs subdir and using relative paths in > the templates i.e src=resources/whatever/file.gif. > > It works and it's smooth on unix systems but I feel thats a very error prone > way. Especially while running on win systems where symlinks are not possible > (and creating virtual dirs all over the build tree is a mess). > > Any ideas, plans how to handle this? > > I guess that's a good application for ImageRequestBuilder. well, only sort of. The ImageRequestManager is intended to solve all of those problems along with the CSS and JS request managers, by removing any need to define absolute paths in src attributes. You'd set a 'resources location' path constant in Configuration, and ImageRequest would use that during make to properly reference (with an absolute path) all of that stuff. _a |