[Feature Suggestion] FileLibrary that serves from disk (A mix of WAFileMetadataFileLibrary and WAExternalFileLibrary)

Jupiter Jones <[email protected]> Sun, 5 May 2024 15:10:25 +1000
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <[email protected]>
--===============5978531382897002335==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_02864DF5-62EC-421C-B5D7-3C3E058D7A72"


--Apple-Mail=_02864DF5-62EC-421C-B5D7-3C3E058D7A72
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

My project repo has a directory structure that includes...

<MyProjectRepo>/web_root/files/MyFileLibrary
=20
=E2=80=A6 that stores all the files (images / scripts / etc) that are =
used in my Seaside app.

In production, the web server serves files from the web_root directory =
so all the WAFileMetadataLibrary urls (ie. /files/MyFileLibrary/*) work =
as expected.

In development, my subclasses of WAFileMetadataLibrary serve files from =
the seaside file library handler...

/files/MyFileLibrary

This all works perfectly, since the developers don=E2=80=99t have a web =
server so need to get all files via the image, and both development and =
production urls are the same. It=E2=80=99s an ideal solution for web =
apps without a lot of assets.

The biggest issue is that as our applications grow, all the files are on =
disk, are also in the image, and also end up in the source directory in =
a single text document MyFileLibrary.class.st =
<http://myfilelibrary.class.st/> which ends up huge, slow, and should be =
unnecessary.

Ideally, in development, it would be nice to have a FileLibrary that =
works identically to a WAFileMetadataLibrary (ie. stores meta data and =
generates url's), except it doesn=E2=80=99t store the file contents in =
the image. Rather it streams them from disk via zinc when requested.

I know there=E2=80=99s a WAExternalFileLibrary, however, AFAIK it =
can=E2=80=99t be served via /files/MyExternalFileLibrary, and doesn=E2=80=99=
t take advantage of the close integration of an application and its file =
libraries. Ie. myApplication addLibrary: MyFileLibrary.

So the question=E2=80=A6 does anyone have anything like this? Or is =
there anyone else with growing applications that would rather not have =
multiple copies of all your web application assets, including a copy =
inside the image?

Any thoughts?

Cheers,

Jupiter=

--Apple-Mail=_02864DF5-62EC-421C-B5D7-3C3E058D7A72
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;"><div>My =
project repo has a directory structure that =
includes...</div><div><br></div><div>&lt;MyProjectRepo&gt;/web_root/files/=
MyFileLibrary</div><div>&nbsp;</div><div>=E2=80=A6 that stores all the =
files (images / scripts / etc) that are used in my Seaside =
app.</div><div><br></div><div>In production, the web server serves files =
from the web_root directory so all the&nbsp;<span style=3D"caret-color: =
rgb(0, 0, 0); color: rgb(0, 0, =
0);">WAFileMetadataLibrary</span>&nbsp;urls (ie. /files/MyFileLibrary/*) =
work as expected.</div><div><br></div>In development, my subclasses of =
WAFileMetadataLibrary serve files from the seaside file library =
handler...<div><br></div><div>/files/MyFileLibrary</div><div><br></div><di=
v>This all works perfectly, since the developers don=E2=80=99t have a =
web server so need to get all files via the image, and both development =
and production urls are the same. It=E2=80=99s an ideal solution for web =
apps without a lot of assets.</div><div><br></div><div>The biggest issue =
is that as our applications grow, all the files are on disk, are also in =
the image, and also end up in the source directory in a single text =
document <a =
href=3D"http://MyFileLibrary.class.st">MyFileLibrary.class.st</a>&nbsp;whi=
ch ends up huge, slow, and should be =
unnecessary.</div><div><br></div><div>Ideally, in development, it would =
be nice to have a FileLibrary that works identically to a =
WAFileMetadataLibrary (ie. stores meta data and generates url's), except =
it doesn=E2=80=99t store the file contents in the image. Rather it =
streams them from disk via zinc when =
requested.</div><div><br></div><div>I know there=E2=80=99s a =
WAExternalFileLibrary, however, AFAIK it can=E2=80=99t be served via =
/files/MyExternalFileLibrary, and doesn=E2=80=99t take advantage of the =
close integration of an application and its file libraries. Ie. =
myApplication addLibrary: MyFileLibrary.</div><div><br></div><div>So the =
question=E2=80=A6 does anyone have anything like this? Or is there =
anyone else with growing applications that would rather not have =
multiple copies of all your web application assets, including a copy =
inside the image?</div><div><br></div><div>Any =
thoughts?</div><div><br></div><div>Cheers,</div><div><br></div><div>Jupite=
r</div></body></html>=

--Apple-Mail=_02864DF5-62EC-421C-B5D7-3C3E058D7A72--

--===============5978531382897002335==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
seaside mailing list -- [email protected]
To unsubscribe send an email to [email protected]

--===============5978531382897002335==--