[Ur] serving css from urweb

Zach Tatlock ztatlock at cs.ucsd.edu
Wed Jun 22 11:40:42 EDT 2011


> It would be easy to build some separate wrapper web server or deployment
> tool to accomplish this (and distribute that code with Ur/Web), but the goal
> is already so easy to attain with Lighttpd or Apache that it's not high on
> my priority list.  We're generally talking ~3 lines of configuration to
> connect to an Ur/Web app via FastCGI.

Totally agree: it is trivial once those other servers are installed
and configured.

But what if I want to distribute an app that runs locally or takes
part in a decentralized system?  Ideally, I could just hand out
binaries and say "run this".  If a non-expert has to apt-get install
anything or, heaven forbid, edit something under /etc, it is a deal
breaker.

I do not think this is a pressing issue; returnBlob + rewrite can do
everything I want.


> Ur/Web already supports SQLite.  The first few sections of the manual
> explain how to use it.

Yes, extremely handy how compiling dumps the appropriate setup script.
 Thanks for that :)

I do not think this is a pressing issue either; I can distribute
sqlite with an app and, as you point out, just have some wrapper
script orchestrate the whole system.


>> Is there a way to get the fully qualified name of a style as a string?
>>
> There might be some hacky way to do it now, but I haven't intended to expose
> such a feature.  Style names are very predictable from module structure.

Yes, they are predictable.  However, if I embed my css as a string and
then change the style name, I should also change the css string.
Unfortunately, nothing will remind me to do this.  A better approach
would be to programmatically build the css string using the names the
styles will ultimately have in the generated app.



More information about the Ur mailing list