Keith Hodges wrote:
> I don't think that everyone is interested in being an expert at > configuring wierdo linux technologies. I myself have no intention of > ever having to write apache rewrite rules. If I ever have to then I > figure something is wrong. Of course. I'm sure your rant isn't directed at me but I'd like to point out that often times these weirdo technologies are the best solutions for the problem. You're right that not /everyone/ is interested in them. Anyway, my reasoning was kind of linear...you should store static content on the file system because ultimately you'll be using apache to serve it anyway. Yours was different...you should store static content on the file system because the tools you use to manage this content are file-based. In either case we agree on result. What we need is a solution that makes it easy for beginners to serve static content through Squeak (from the image and/or file system, doesn't matter) and to switch to a front-end web server if/when the need presents itself. FWIW I also tried to get a solution to this problem into the base distro. WAKom class>>startOn:servingFilesFrom: configured Comanche, not Seaside, to serve files from your selected directory but it was dropped...twice. Based on discussions with Lukas I believe that he is determined to see the in-image file library concept adopted by beginners but I think it has many pitfalls (of which you cited a few). Maybe this will be the beginning of a larger discussion on this topic?...now that several of us are clearly interested in improving the situation. BTW, serving static content is my #1 FAQ in personal e-mails from new Seaside developers. URL mapping is #2. David _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by keith1y
I share your sentiments. While the "purity" of Seaside is a noble objective,
it should be more a guideline than a strict edict. Seaside should be more flexible in meeting the diverse needs of web development, because we all know that the *real* world of the web is not neat and tidy. It is messy and terribly makeshift. And it is NOT the job of Seaside to bring order to the world of web development. So, yes, let's have *easy* and *convenient* support for file serving. If you don't make allowance for developer convenience, you will unfairly limit Seaside's appeal. Note that this isn't the same thing as "dumbing down" Seaside. I'm saying we have to recognize the pragmatic realities of the web environment and infrastructure, and not cocoon ourselves within an artificially pure, enclosed world. Richard On 7/18/07 5:13 PM, "Keith Hodges" <[hidden email]> wrote: > I don't think that everyone is interested in being an expert at > configuring wierdo linux technologies. I myself have no intention of > ever having to write apache rewrite rules. If I ever have to then I > figure something is wrong. > > Why do I think this way you might ask. It is simple, I am a mac user! > > Not that I cant do the "hard" stuff, I used to program my PC's in C back > in '85 and mc code before that. > > The fact is that I don't want to. > > I don't know why everything is so hard. When you collect your images > together, when you edit your images where are they? On disk, so where > should you be able to serve them from by default. Yes thats right ON DISK. > > If you are fine tuning your site, editing you images what don't you want > the browser to do? Thats right you don't want it to cache the images! > Can seaside do this out of the box no it can't! Never mind accessing > databases, seaside cant even serve files. > > Moving the file in-image is an optimization, and its quite nice for > distributing a pre-configured image without lots of supporting files, > but its not the simplest thing to configure or use. Throwing your files > into a directory or a directory hierarchy is. And seaside cant handle > that, despite, as I was told recently trying to embody the 80-20 rule, > that is supporting the majority of what users want to achieve. > > So in terms of lowering the bar for newbies some things are basically > obvious, but seaside has acquired an "elitist" approach. It appears that > some things (like serving files) are beneath it, and "best left to > apache". So it turns out that due to this elitism, seaside cant even do > the basics out of the box. The purist mentality doesnt allow for the > "seaside does what it does, and does it well" to be poluted by > compromise positions which would make things more flexible and therefore > perhaps more broadly usable. Serving files is but one example, using > cookies for day to day site things is another, this facility almost > disappeared from 2.8a unnoticed. > > Now I would like to be able to rectify this situation, but I have a > distinct disadvantage, I don't write perfect code, I throw something > together which does the job, I need others with different skills to > refine and hone the result to perfection. > > So as it happens I have on numerous occasions attempted to submit code > which addresses some of these (imho) shortfalls. And time and time again > the purists reject much of what I have offered out of hand. For various > reasons, some of them good reasons. Nevertheless I got tired of the > continuous negative attitude that comes out in this "protecting the > purity" of seaside. > > This has resulted in me making a complete ass of myself by loosing my > rag (fortunately in private) at the maintainers. I have apologized, and > if you have noticed that the seaside repository is now read only, thats > probably all my fault that I pissed off the maintainers and I apologize > to them and also to the community for that. > > But lets examine this a little bit, one example. > > Seaside configuration attributes are organized into groups. So the > function "tell me if this application has the configuration group named > x" (so I can add a dispatcher plugin to it). This function is an > accessor into private information encapsulated within the seaside kernel > so to speak. So in order to make this useful as a feature, whose > responsibility would it be to provide an accessor? I would say the > package that implements the feature should expose enough of that feature > in a public api so as to be useful to users who want to use it. So I > suggest #hasGroupNamed: accessor to match its existing counterpart > #hasAttributeNamed: > > The objection I am given is: "This is dangerous". Why? Because it has no > users within the seaside core package, and having no users it is fragile > and might break or be removed without anyone noticing. Well hang on, > isnt that obvious! It isnt in the base package 'yet' so of course it > hasn't got any users, its whole purpose is to be a public API so that > clients and extensions to the base package can use it. Its reason for > being that is to support users external to the core, not internal to the > core, the internals probably dont need it since they can access the > value directly etc. So somehow we have this statement of law which says > "No public api shall be exposed which is not used inside the grey-box of > the core, which incidentally doesnt need a public api anyway". > > So what if it does break? Well if it doesnt have any users inside the > core seaside package, then who cares. Its not dangerous at all, if it > breaks its not going to ruin anyones day. Ok so I, with three users of > this api might miss it and flag if it becomes broken. But dangerous it > is NOT. > > This really got my goat I am afraid, I attempted to put this accessor > into the seaside repository 6 times or more. And it still hasnt made it > past the idealistic police. Now I am not writing code or uploading to > monticello for my health. Can you wonder why I got a little peeved. > > So if you are wondering why seaside doesnt make progress in attracting > broader appeal, one possible answer is that the maintainers have a very > narrow and purist perspective. Which is worthwhile, and serves a purpose > to make seaside better in a certain focussed way, just not in the way > that will broaden seaside's appeal (imnsho). > > So lets turn to the question at hand, serving files. What would it take > to add this to seaside. > > 1 Method thats all! Where is it? Not there? Why not? because I guess > serving files must be in the 20 of the 80/20 mentioned earlier. Who > decides this? Well someone who likes configuring apache I guess. > > So in a three method varient a) subclass FileLibrary add an instVar > fileNames and load it up with any resources you want to serve in-image > as defaults which the files can then override. > > the methods: > > WAFileBasedLibrary-initialize > > fileNames := self libraryDirectory fileNames > > WAFileBasedLibrary-libraryDirectory > > ^FileDirectory default directoryNamed: 'resources' > > WAFileBasedLibrary-documentAt: aFilename ifAbsent: aBlock > > | doc | > > (fileNames includes: aFilename) > ifFalse: [ ^ super documentAt: aFilename ifAbsent: aBlock ]. > > doc := (WACachedDocument > fileName: (self libraryDirectory pathName, FileDirectory > slash , aFilename)) asMIMEDocument. > > ^ WAResponse > document: doc > mimeType: doc mimeType > > Bingo, now that wasn't hard was it, throw any files you want to serve > into 'resources' directory and you are away. > > best regards > > Keith > > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by cdavidshaffer
2007/7/19, David Shaffer <[hidden email]>:
> Keith Hodges wrote: > > I don't think that everyone is interested in being an expert at > > configuring wierdo linux technologies. I myself have no intention of > > ever having to write apache rewrite rules. If I ever have to then I > > figure something is wrong. > Of course. I'm sure your rant isn't directed at me but I'd like to > point out that often times these weirdo technologies are the best > solutions for the problem. You're right that not /everyone/ is > interested in them. > > Anyway, my reasoning was kind of linear...you should store static > content on the file system because ultimately you'll be using apache to > serve it anyway. Yours was different...you should store static content > on the file system because the tools you use to manage this content are > file-based. In either case we agree on result. > > What we need is a solution that makes it easy for beginners to serve > static content through Squeak (from the image and/or file system, > doesn't matter) and to switch to a front-end web server if/when the need > presents itself. FWIW I also tried to get a solution to this problem > into the base distro. WAKom class>>startOn:servingFilesFrom: configured > Comanche, not Seaside, to serve files from your selected directory but > it was dropped...twice. Because you code had several issues including not working after saving the image. Philippe > Based on discussions with Lukas I believe that > he is determined to see the in-image file library concept adopted by > beginners but I think it has many pitfalls (of which you cited a few). > Maybe this will be the beginning of a larger discussion on this > topic?...now that several of us are clearly interested in improving the > situation. > > BTW, serving static content is my #1 FAQ in personal e-mails from new > Seaside developers. URL mapping is #2. > > David > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
As people says: don't put all of eggs in one basket.
Serving all content from single image is nice, but its not always achievable. As web server, Seaside must serve as front-end for delivering content on the web, but not dictate, the original source of content. Is there something wrong with this concept? _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2007/7/19, sig <[hidden email]>:
> As people says: don't put all of eggs in one basket. > > Serving all content from single image is nice, but its not always achievable. > > As web server, Seaside must serve as front-end for delivering content > on the web, but not dictate, the original source of content. Seaside is not a webserver and not a database layer. It is a web application development framework. Webservers live Apache for lighttpd are preferable for serving static files because this is the job they are really good at and optimized for. They are written in C they use epoll/sendfile and multiple processors and caching and what not. It is a simple one time investment that takes off load of your Squeak/Seaside image and gives it more time and resources to do what it is good and optimized for: dynamic content. That doesn't mean there is no place for a simple solution for simple problems. But at the end of the day for any serious application you will need a standalone webserver. Philippe > Is there something wrong with this concept? > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> Seaside is not a webserver and not a database layer. It is a web
> application development framework. Webservers live Apache for lighttpd > are preferable for serving static files because this is the job they > are really good at and optimized for. They are written in C they use And here I think we see the difference of approach quite clearly. For the most part out there 90% of people doing stuff use the wrong technology for doing their stuff. Other threads are discussing the difficulty others have in jumping to the smalltalk/seaside ship because they want to use the wrong technology for the job. Take zope for example. Medusa was/is a single threaded web server written in python. ZODB provided the db back end. Is anything in python optimal? Put it all together and it was fairly successful. Point of information, the code quality in zope itself was appalling. One might argue that in order to be successful you have to be prepared to be the wrong technology for someones project. ST/X can do a pretty good job of web serving. So as a thought I wonder, how much use of continuations does 2.8 actually still do? If seaside can be ported to ST/X that would be awesome. Keith _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Philippe Marschall
On 19/07/07, Philippe Marschall <[hidden email]> wrote:
> 2007/7/19, sig <[hidden email]>: > > As people says: don't put all of eggs in one basket. > > > > Serving all content from single image is nice, but its not always achievable. > > > > As web server, Seaside must serve as front-end for delivering content > > on the web, but not dictate, the original source of content. > > Seaside is not a webserver and not a database layer. It is a web > application development framework. Webservers live Apache for lighttpd > are preferable for serving static files because this is the job they > are really good at and optimized for. They are written in C they use > epoll/sendfile and multiple processors and caching and what not. It is > a simple one time investment that takes off load of your > Squeak/Seaside image and gives it more time and resources to do what > it is good and optimized for: dynamic content. That doesn't mean there > is no place for a simple solution for simple problems. But at the end > of the day for any serious application you will need a standalone > webserver. > Hey, lets look to the roots: Seaside serving http requests. And i can assure you, that for 99% of the users in the world, thing which serving http requests called web-server. You may call it web application development framework or anything you want, but this will not makes any difference unless you stop handling http requests. Its a layer, which delivers content to browsers using standard protocol and from this point of view, it must be flexible enough to be able to deliver any content which developer wants to. And you saying 'standalone web server'.. It looks like you insist that seaside in 90% cases in not complete solution for _BASIC_ web solutions? Why it must force developer to use third party tools to be complete? Its better to be slow, as hog but be COMPLETE rather than flexible, complex, but incomplete... > Philippe > > > Is there something wrong with this concept? > > _______________________________________________ > > Seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Philippe Marschall
...
and maybe, if you deny from serving static content which looks like too foreign for seaside, better to develop apache module with seaside (like PHP) and drop http protocol support at all? Then dev's will be happy knowing that anything except dynamic content will be served by apache as default.. _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Igor Stasenko
Dear Seasiders,
Let me remind you that there is a web server in Smalltalk named Swazoo (http://www.swazoo.org) and that it was recently ported to Squeak too. All you need is to connect it to a Seaside. This can be done easily because it is already done by Michel Bany on VW Seaside. That way you get a nicely packed web app server, with easy, out of the box installation. And from experience so far I can say that Swazoo is capable to serve small to medium sized public web sites and all intranets. So, only for really big websites you need to start thinking to go Apache or lighthttp way ... Best regards Janko Maintainer of Swazoo sig wrote: > On 19/07/07, Philippe Marschall <[hidden email]> wrote: >> 2007/7/19, sig <[hidden email]>: >> > As people says: don't put all of eggs in one basket. >> > >> > Serving all content from single image is nice, but its not always >> achievable. >> > >> > As web server, Seaside must serve as front-end for delivering content >> > on the web, but not dictate, the original source of content. >> >> Seaside is not a webserver and not a database layer. It is a web >> application development framework. Webservers live Apache for lighttpd >> are preferable for serving static files because this is the job they >> are really good at and optimized for. They are written in C they use >> epoll/sendfile and multiple processors and caching and what not. It is >> a simple one time investment that takes off load of your >> Squeak/Seaside image and gives it more time and resources to do what >> it is good and optimized for: dynamic content. That doesn't mean there >> is no place for a simple solution for simple problems. But at the end >> of the day for any serious application you will need a standalone >> webserver. >> > > Hey, lets look to the roots: Seaside serving http requests. And i can > assure you, that for 99% of the users in the world, thing which > serving http requests called web-server. > You may call it web application development framework or anything you > want, but this will not makes any difference unless you stop handling > http requests. > Its a layer, which delivers content to browsers using standard > protocol and from this point of view, it must be flexible enough to be > able to deliver any content which developer wants to. > > And you saying 'standalone web server'.. It looks like you insist that > seaside in 90% cases in not complete solution for _BASIC_ web > solutions? > Why it must force developer to use third party tools to be complete? > Its better to be slow, as hog but be COMPLETE rather than flexible, > complex, but incomplete... > > >> Philippe >> >> > Is there something wrong with this concept? -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Janko, I happened to load the Seaside Swazoo parcels this moring but hm....not so easy to start off. (some more parcel comment maybe) If Swazoo Seaside is the preferred configuration would it not be more cool that VW Seaside loads with Swazoo from the start and adds some Tool extension to get configured ? If I can rent like any dedicated server, upload a VW image and start business that would be really Cool . (Oké James I agree I' have to get a Licence in the mean time). Notice that now having some real Seaside tests in VW is really boosting understanding how things work excellent ! @+Maarten, > Message du 19/07/07 11:16 |
Hi Marteen,
Maarten MOSTERT wrote: > I happened to load the Seaside Swazoo parcels this moring but hm....not > so easy to start off. (some more parcel comment maybe) For Swazoo 1.0 there is a one page tutorial on a website, while for forthcoming Swazoo 2.0 (currently in beta) there is already a bit more comments on most important classes. And here you can help me a bit: what was your questions when you loaded that parcel in the morning? What was your intentions on the start? What did you want to achieve? Just look at it or maybe serve some static web pages, make another virtual web site? By answering you will direct me to prepare a bit more docs on a web site... > If Swazoo Seaside is the preferred configuration would it not be more > cool that VW Seaside loads with Swazoo from the start and adds some Tool > extension to get configured ? If I can rent like any dedicated server, > upload a VW image and start business that would be really Cool . (Oké > James I agree I' have to get a Licence in the mean time). Don't forget that Swazoo supports virtual websites, which enables web hosting very easily... Best regards Janko > Notice that now having some real Seaside tests in VW is really boosting > understanding how things work excellent ! > > @+Maarten, > > > > Message du 19/07/07 11:16 > > De : "Janko Mivšek" > > A : "Seaside - general discussion" > > Copie à : > > Objet : [Seaside] Swazoo web server (was updateRoot: Weirdness) > > > > Dear Seasiders, > > > > Let me remind you that there is a web server in Smalltalk named > Swazoo > > (http://www.swazoo.org) and that it was recently ported to Squeak > too. > > All you need is to connect it to a Seaside. This can be done easily > > because it is already done by Michel Bany on VW Seaside. > > > > That way you get a nicely packed web app server, with easy, out > of the > > box installation. And from experience so far I can say that > Swazoo is > > capable to serve small to medium sized public web sites and all > > intranets. So, only for really big websites you need to start > thinking > > to go Apache or lighthttp way ... > > > > Best regards > > Janko > > Maintainer of Swazoo > > > > > > sig wrote: > > > On 19/07/07, Philippe Marschall wrote: > > >> 2007/7/19, sig : > > >> > As people says: don't put all of eggs in one basket. > > >> > > > >> > Serving all content from single image is nice, but its not > always > > >> achievable. > > >> > > > >> > As web server, Seaside must serve as front-end for > delivering content > > >> > on the web, but not dictate, the original source of content. > > >> > > >> Seaside is not a webserver and not a database layer. It is a web > > >> application development framework. Webservers live Apache for > lighttpd > > >> are preferable for serving static files because this is the > job they > > >> are really good at and optimized for. They are written in C > they use > > >> epoll/sendfile and multiple processors and caching and what > not. It is > > >> a simple one time investment that takes off load of your > > >> Squeak/Seaside image and gives it more time and resources to > do what > > >> it is good and optimized for: dynamic content. That doesn't > mean there > > >> is no place for a simple solution for simple problems. But at > the end > > >> of the day for any serious application you will need a standalone > > >> webserver. > > >> > > > > > > Hey, lets look to the roots: Seaside serving http requests. And > i can > > > assure you, that for 99% of the users in the world, thing which > > > serving http requests called web-server. > > > You may call it web application development framework or > anything you > > > want, but this will not makes any difference unless you stop > handling > > > http requests. > > > Its a layer, which delivers content to browsers using standard > > > protocol and from this point of view, it must be flexible > enough to be > > > able to deliver any content which developer wants to. > > > > > > And you saying 'standalone web server'.. It looks like you > insist that > > > seaside in 90% cases in not complete solution for _BASIC_ web > > > solutions? > > > Why it must force developer to use third party tools to be > complete? > > > Its better to be slow, as hog but be COMPLETE rather than flexible, > > > complex, but incomplete... > > > > > > > > >> Philippe > > >> > > >> > Is there something wrong with this concept? -- Janko Mivšek AIDA/Web Smalltalk Web Application Server http://www.aidaweb.si _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Philippe Marschall
> That doesn't mean there is no place for a simple solution for simple problems.
Exactly! Richard On 7/19/07 3:28 AM, "Philippe Marschall" <[hidden email]> wrote: > 2007/7/19, sig <[hidden email]>: >> As people says: don't put all of eggs in one basket. >> >> Serving all content from single image is nice, but its not always achievable. >> >> As web server, Seaside must serve as front-end for delivering content >> on the web, but not dictate, the original source of content. > > Seaside is not a webserver and not a database layer. It is a web > application development framework. Webservers live Apache for lighttpd > are preferable for serving static files because this is the job they > are really good at and optimized for. They are written in C they use > epoll/sendfile and multiple processors and caching and what not. It is > a simple one time investment that takes off load of your > Squeak/Seaside image and gives it more time and resources to do what > it is good and optimized for: dynamic content. That doesn't mean there > is no place for a simple solution for simple problems. But at the end > of the day for any serious application you will need a standalone > webserver. > > Philippe > >> Is there something wrong with this concept? >> _______________________________________________ >> Seaside mailing list >> [hidden email] >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Philippe Marschall
Philippe Marschall wrote:
> > Because you code had several issues including not working after saving > the image. > > Philippe > Possibly although it works fine for me. This was never brought up in any discussions of this method (or I would have fixed it). The rationale given to me by Lukas is attached below just to prove my point. Also note that Lukas agreed to keep the method. If I really wanted to push this point I would have back when you removed it. To be frank my position is simple: I make money writing Seaside applications and you guys do a good job moving Seaside forward. I have my own distribution with my own extensions so your whims are of no consequence to me. Still, the larger community has spoken about their needs in terms of serving static contents (mostly from the file system, it seems). It might be that we simply need to support an effort like Sandcastle and/or Jetsam, from what I've read about them, and make them more visible to the Seaside beginner community. What Keith pointed out, though, is that it is a shame to have to go this route for such a simple bit of functionality. David -----(this e-mail was to Stef Ducasse and CC-ed to me regarding my addition of WAKom class>>startOn:servingFilesFrom:)----- > Hi Stef, > >> I think that the audience of david is different than yours and >> serving large flash or photoshop image by newbie that do not >> know well apache is something that we cannot push on them. We are >> writing a book for beginners and we should take that >> into account. Not everybody is an apache expert. I'm not for example. >> Still it may make sense to me to be able to serve large files that >> are not in the image. > > certainly it makes sense, but Seaside is not about serving static > files. Kom itself doesn't do that any better. So why using a > complicated solution (that has no use in practice) when a simple one > (that has no use either, but is simple and works well for prototyping) > would do as well? > >> So did I understand correctly that we will have to create our own >> distribution because you will not add the method I asked >> david to do to hide some ugly parts of his setup to serve file? > > I don't mind to add a single method, but we try to keep Seaside as > clean and independent of the underlying architecture as possible. The > code used to serve files does not follow the idea of Seaside (and > Smalltalk in general) and does not work together with anything else > than WAKom on Squeak (there are two other ones available in Squeak, > VisualWorks/Dolphin uses a different Web server). > > Cheers, > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Philippe Marschall
Philippe Marschall wrote:
> > Because you code had several issues including not working after saving > the image. > > Philippe > Possibly although it works fine for me. This was never brought up in any discussions of this method (or I would have fixed it). The rationale given to me by Lukas is attached below just to prove my point. Also note that Lukas agreed to keep the method. If I really wanted to push this point I would have back when you removed it. To be frank my position is simple: I make money writing Seaside applications and you guys do a good job moving Seaside forward. I have my own distribution with my own extensions so your whims are of no consequence to me. Still, the larger community has spoken about their needs in terms of serving static contents (mostly from the file system, it seems). It might be that we simply need to support an effort like Sandcastle and/or Jetsam, from what I've read about them, and make them more visible to the Seaside beginner community. What Keith pointed out, though, is that it is a shame to have to go this route for such a simple bit of functionality. David -----(this e-mail was to Stef Ducasse and CC-ed to me regarding my addition of WAKom class>>startOn:servingFilesFrom:)----- > Hi Stef, > >> I think that the audience of david is different than yours and >> serving large flash or photoshop image by newbie that do not >> know well apache is something that we cannot push on them. We are >> writing a book for beginners and we should take that >> into account. Not everybody is an apache expert. I'm not for example. >> Still it may make sense to me to be able to serve large files that >> are not in the image. > > certainly it makes sense, but Seaside is not about serving static > files. Kom itself doesn't do that any better. So why using a > complicated solution (that has no use in practice) when a simple one > (that has no use either, but is simple and works well for prototyping) > would do as well? > >> So did I understand correctly that we will have to create our own >> distribution because you will not add the method I asked >> david to do to hide some ugly parts of his setup to serve file? > > I don't mind to add a single method, but we try to keep Seaside as > clean and independent of the underlying architecture as possible. The > code used to serve files does not follow the idea of Seaside (and > Smalltalk in general) and does not work together with anything else > than WAKom on Squeak (there are two other ones available in Squeak, > VisualWorks/Dolphin uses a different Web server). > > Cheers, > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Richard Eng
Richard Eng wrote:
> I share your sentiments. While the "purity" of Seaside is a noble objective, > it should be more a guideline than a strict edict. Seaside should be more > flexible in meeting the diverse needs of web development, because we all > know that the *real* world of the web is not neat and tidy. It is messy and > terribly makeshift. And it is NOT the job of Seaside to bring order to the > world of web development. So, yes, let's have *easy* and *convenient* > support for file serving. If you don't make allowance for developer > convenience, you will unfairly limit Seaside's appeal. > > Note that this isn't the same thing as "dumbing down" Seaside. I'm saying we > have to recognize the pragmatic realities of the web environment and > infrastructure, and not cocoon ourselves within an artificially pure, > enclosed world. > > Richard > I think that there is more than one way to skin this cat, as they say. If the core Seaside developers are avoiding code which serves static content from the file system we can always produce a package which adds those capabilities. If it becomes part of: 1) the squeak-web distribution 2) a aptly named package Universe 3) an easily identifiable package on SqueakMap then people who are new to Squeak can be pointed to an easy way to get started in the Squeak/Comanche world. Keith has proposed Jetsam as a home for odds and ends that Lukas and Philippe have rejected. I have a different vision of things but I think Keith has gotten the ball rolling and we should help push it along. If we botch it then I'm sure the community will speak up :-) David _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2007/7/19, David Shaffer <[hidden email]>:
> Richard Eng wrote: > > I share your sentiments. While the "purity" of Seaside is a noble objective, > > it should be more a guideline than a strict edict. Seaside should be more > > flexible in meeting the diverse needs of web development, because we all > > know that the *real* world of the web is not neat and tidy. It is messy and > > terribly makeshift. And it is NOT the job of Seaside to bring order to the > > world of web development. So, yes, let's have *easy* and *convenient* > > support for file serving. If you don't make allowance for developer > > convenience, you will unfairly limit Seaside's appeal. > > > > Note that this isn't the same thing as "dumbing down" Seaside. I'm saying we > > have to recognize the pragmatic realities of the web environment and > > infrastructure, and not cocoon ourselves within an artificially pure, > > enclosed world. > > > > Richard > > > Richard, > > I think that there is more than one way to skin this cat, as they say. > If the core Seaside developers are avoiding code which serves static > content from the file system we can always produce a package which adds > those capabilities. If it becomes part of: > > 1) the squeak-web distribution > 2) a aptly named package Universe > 3) an easily identifiable package on SqueakMap > > then people who are new to Squeak can be pointed to an easy way to get > started in the Squeak/Comanche world. Keith has proposed Jetsam as a > home for odds and ends that Lukas and Philippe have rejected. I have a > different vision of things but I think Keith has gotten the ball rolling > and we should help push it along. If we botch it then I'm sure the > community will speak up :-) What does it do: Make a certain entry point point to a certain place on the file system. Very simple, very inefficient, very inflexible, very untested, very immature, very "reinvent-the-wheel". But half way portable to different dialects and webservers and integrates nicely into the Seaside environment without a single code change. So you're not forced to use Squeak and Kom. How does it work? - go to /seaside/config - add an entry point of type Filesystem Link - enter the directory to which the - save - go to your entry point Given all these issues I'd be surprised if anyone seriously considers using this. It's more proof on concept what an acceptable file serving solution for Seaside might look like once it has matured and acquired enough users and we agree that this in needed for Seaside. Philippe _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside FilesystemLink-pmm.2.mcz (6K) Download Attachment |
Dear Phillippe,
would you have any object to FileSystemLink being added to the Jetsam repository/package etc? many thanks in advance Keith _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Richard Eng
Richard K Eng wrote:
> FINALLY!!! I found the answer here: > > http://inchingforward.blogspot.com/ > > | ma seaside | > HttpService allInstancesDo: [:each | each stop. each unregister]. > WAKom stop. > seaside := WAKom default. > ma := ModuleAssembly core. > ma serverRoot: FileDirectory default fullName. > ma alias: '/seaside' to: [ma addPlug: [:request | seaside process: > request]]. > ma documentRoot: FileDirectory default fullName. > ma directoryIndex: 'index.html index.htm'. > ma serveFiles. > (HttpService startOn: 8080 named: 'httpd') plug: ma rootModule > > > Seems like the configuring of the web server is very arcane and > touchy! I'm going to have the above emblazoned on my forehead... :-) > > Regards, > Richard > Well, it is doing something similar to what you do in those monstrous (and monstrously ugly) apache config files. But having a GUI made to do this kind of configuration would be nice, and much easier since no config files are involved. Long live zero config files! _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by keith1y
Keith, I have never said this to you before (or thought it about you as
far as I recall) but you are off-base here. Seaside doesn't serve files because it isn't a web server. It can't even serve itself, it relies on a web server to do that. Now I agree about apache, I don't use it either and I don't want to. I use Commanche to serve Seaside and this web server can easily serve files as well by just setting it's state correctly (configuration some might say). You can find how to do this on David Shaffer's site [1], among other places. Rather then duplicating functionality by having Seaside *also* serve files, why not use the thing you have to use anyway: your Smalltalk web server (Commanche, Swazoo, I don't know what else we have)? It will have (or at least can) have a lot more options and flexibility. It's already there, and any advances made to the web servers you get for free. I have used Commanche this way from the start, I made a directory in my image directory called "website" or "www" or some such, setup Commanche to use it as described on David's site and put all my files there. And everything is responsible for what it should be: Seaside does all the application work and generates HTML, the web server serves it and so on. Why would you want Seaside to duplicate this role? Would you expect Morphic to also serve files? Or Monticello? Now the reason some people on her recommend fighting with apache is because they are concerned about speed of serving the files. Personally I wish the teams making these web servers would see that as a challenge and try to get their speed compatible enough to be the choice 90% of the time for production [2]. I think this would be achievable at least on Linux by making a plugin for the sendfile system call, and perhaps make it async if it isn't already. Using sendfile is one of the ways lighttp beats apache in speed. [1] http://www.shaffer-consulting.com/david/Seaside/GettingSoftware/index.html [2] I know people say Commanche isn't maintained, but it's open source no? What stops us from just making a "Commanche 2" project on SqueakSource, upload all the current code and fork? If it has anything Swazoo doesn't anyway (i.e. if it's worthwhile to do so). Keith Hodges wrote: > I don't think that everyone is interested in being an expert at > configuring wierdo linux technologies. I myself have no intention of > ever having to write apache rewrite rules. If I ever have to then I > figure something is wrong. > > Why do I think this way you might ask. It is simple, I am a mac user! > > Not that I cant do the "hard" stuff, I used to program my PC's in C > back in '85 and mc code before that. > > The fact is that I don't want to. > > I don't know why everything is so hard. When you collect your images > together, when you edit your images where are they? On disk, so where > should you be able to serve them from by default. Yes thats right ON > DISK. > > If you are fine tuning your site, editing you images what don't you > want the browser to do? Thats right you don't want it to cache the > images! Can seaside do this out of the box no it can't! Never mind > accessing databases, seaside cant even serve files. > > Moving the file in-image is an optimization, and its quite nice for > distributing a pre-configured image without lots of supporting files, > but its not the simplest thing to configure or use. Throwing your > files into a directory or a directory hierarchy is. And seaside cant > handle that, despite, as I was told recently trying to embody the > 80-20 rule, that is supporting the majority of what users want to > achieve. > > So in terms of lowering the bar for newbies some things are basically > obvious, but seaside has acquired an "elitist" approach. It appears > that some things (like serving files) are beneath it, and "best left > to apache". So it turns out that due to this elitism, seaside cant > even do the basics out of the box. The purist mentality doesnt allow > for the "seaside does what it does, and does it well" to be poluted by > compromise positions which would make things more flexible and > therefore perhaps more broadly usable. Serving files is but one > example, using cookies for day to day site things is another, this > facility almost disappeared from 2.8a unnoticed. > > Now I would like to be able to rectify this situation, but I have a > distinct disadvantage, I don't write perfect code, I throw something > together which does the job, I need others with different skills to > refine and hone the result to perfection. > > So as it happens I have on numerous occasions attempted to submit code > which addresses some of these (imho) shortfalls. And time and time > again the purists reject much of what I have offered out of hand. For > various reasons, some of them good reasons. Nevertheless I got tired > of the continuous negative attitude that comes out in this "protecting > the purity" of seaside. > > This has resulted in me making a complete ass of myself by loosing my > rag (fortunately in private) at the maintainers. I have apologized, > and if you have noticed that the seaside repository is now read only, > thats probably all my fault that I pissed off the maintainers and I > apologize to them and also to the community for that. > > But lets examine this a little bit, one example. > > Seaside configuration attributes are organized into groups. So the > function "tell me if this application has the configuration group > named x" (so I can add a dispatcher plugin to it). This function is an > accessor into private information encapsulated within the seaside > kernel so to speak. So in order to make this useful as a feature, > whose responsibility would it be to provide an accessor? I would say > the package that implements the feature should expose enough of that > feature in a public api so as to be useful to users who want to use > it. So I suggest #hasGroupNamed: accessor to match its existing > counterpart #hasAttributeNamed: > > The objection I am given is: "This is dangerous". Why? Because it has > no users within the seaside core package, and having no users it is > fragile and might break or be removed without anyone noticing. Well > hang on, isnt that obvious! It isnt in the base package 'yet' so of > course it hasn't got any users, its whole purpose is to be a public > API so that clients and extensions to the base package can use it. Its > reason for being that is to support users external to the core, not > internal to the core, the internals probably dont need it since they > can access the value directly etc. So somehow we have this statement > of law which says "No public api shall be exposed which is not used > inside the grey-box of the core, which incidentally doesnt need a > public api anyway". > > So what if it does break? Well if it doesnt have any users inside the > core seaside package, then who cares. Its not dangerous at all, if it > breaks its not going to ruin anyones day. Ok so I, with three users of > this api might miss it and flag if it becomes broken. But dangerous it > is NOT. > > This really got my goat I am afraid, I attempted to put this accessor > into the seaside repository 6 times or more. And it still hasnt made > it past the idealistic police. Now I am not writing code or uploading > to monticello for my health. Can you wonder why I got a little peeved. > > So if you are wondering why seaside doesnt make progress in attracting > broader appeal, one possible answer is that the maintainers have a > very narrow and purist perspective. Which is worthwhile, and serves a > purpose to make seaside better in a certain focussed way, just not in > the way that will broaden seaside's appeal (imnsho). > > So lets turn to the question at hand, serving files. What would it > take to add this to seaside. > > 1 Method thats all! Where is it? Not there? Why not? because I guess > serving files must be in the 20 of the 80/20 mentioned earlier. Who > decides this? Well someone who likes configuring apache I guess. > > So in a three method varient a) subclass FileLibrary add an instVar > fileNames and load it up with any resources you want to serve in-image > as defaults which the files can then override. > > the methods: > > WAFileBasedLibrary-initialize > > fileNames := self libraryDirectory fileNames > > WAFileBasedLibrary-libraryDirectory > > ^FileDirectory default directoryNamed: 'resources' > > WAFileBasedLibrary-documentAt: aFilename ifAbsent: aBlock > | doc | > > (fileNames includes: aFilename) > ifFalse: [ ^ super documentAt: aFilename ifAbsent: aBlock ]. > > doc := (WACachedDocument > fileName: (self libraryDirectory pathName, FileDirectory > slash , aFilename)) asMIMEDocument. > > ^ WAResponse > document: doc > mimeType: doc mimeType > > Bingo, now that wasn't hard was it, throw any files you want to serve > into 'resources' directory and you are away. > > best regards > > Keith > > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Igor Stasenko
> Hey, lets look to the roots: Seaside serving http requests. And i can
> assure you, that for 99% of the users in the world, thing which > serving http requests called web-server. > You may call it web application development framework or anything you > want, but this will not makes any difference unless you stop handling > http requests. > Its a layer, which delivers content to browsers using standard > protocol and from this point of view, it must be flexible enough to be > able to deliver any content which developer wants to. > > And you saying 'standalone web server'.. It looks like you insist that > seaside in 90% cases in not complete solution for _BASIC_ web > solutions? > Why it must force developer to use third party tools to be complete? > Its better to be slow, as hog but be COMPLETE rather than flexible, > complex, but incomplete... But that's the issue, Seaside does not handle HTTP requests, Comanche handles HTTP requests, and Swazoo handles HTTP Requests, but Seaside does not. Whilst it does deal with a "Request" object, it does not accept the TCP connection, or listen on a port, or anything that is actually the responsibility of a web server. If the static file handling is to be done in Smalltalk - and I can certainly see the advantage in that for development, then the actual web server - Swazoo or Kom or whatever is where that should be done. Just like in the Java world, no one expects code to handle static files in Struts or JSF or Tapestry, because Tomcat or Jetty do that. So plain static file handling by Seaside involves far more layers and complexity than required - it's pointless. However, having said that, I really like the FileLibrary approach, due to the ability to version the resources. Regards, Stuart. _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |