Re: Simple Routing for web apps

2016-11-14 Thread Joe Golden

Thanx Beneroth.

Your reference to http://software-lab.de/doc/app.html#urlSyntax was what I was 
looking for.

This stuff is dense!

Thanx for all the responses.

On Sat, Nov 12, 2016 at 01:14:53AM +0100, andr...@itship.ch wrote:

Hi Joe

Please note that on the page http://picolisp.com/wiki/?web the section Tutorial
and the section Libraries and Alternatives talk about different things.
The Tutorials section is all about the official Web-GUI/DB-Framework built on
top of picolisp, which is part of the official distribution.

Some people made other web frameworks which are also built on top of picolisp,
but do not use this GUI framework
The concepts and software design of the various frameworks are very different.
Some people have special use cases and made their own framework to be optimal
for their use (e.g. websocket support), or they found the normal framework to
difficult to start with, many different reasons.

The standard (web-) GUI framework is very powerful and rich on functionality,
though it follows complete other principles than most current web frameworks,
so if you are already used to them, this one can be quite hard to wrap your
head around.
E.g. with it you define the GUI directly (this part should do this, this part
should do that), and you don't have really to care much about which part is on
the server and which on the client, it takes care of that (you should
understand the underlying principles though...), no MVC pattern or the like.

Currently its (as far as we know) mainly used to build ERP systems, so the
default styling might be more functional than stylish. If you want to quickly
create extremely powerful CRUD-Applications, use this.
It can be used for ordinary websites, e.g. http://picolisp.com is implemented
with the default GUI framework.

It of course has Routing, see Email from Alexander Burger (who is the creator
of piclisp and this framework) and check out the documentation here: http://
software-lab.de/doc/app.html#urlSyntax
This stuff is implented in the function http in @lib/http.l (@ here means:
within picolisp directory in your installation).

For full functionality, especially session handling (one process per session,
not one process per request) its usually operated together with the little
C-application httpGate (also part of the picolisp distribution), which acts as
proxy, SSL terminator and does session routing.

Study the Tutorials section, especially the first link: http://software-lab.de/
doc/app.html

Or, go with one of the alternative frameworks (see Email from Henrik or the
Library and Alternative sections on the page).
If you intend to roll your own, then its easiest to learn and play around with
the one from José mentioned in Henriks Email to have a start.
Also, if you don't know the inner workings of HTTP, check out: http://
www.jmarshall.com/easy/http/

You know IRC ? Come to our chat channel #picolisp on freenode.org, we love to
talk and most times people are available for instant help.

Greetings,
beneroth

- Original Message -
From: Joe Golden [mailto:j...@joegolden.com]
To: picolisp@software-lab.de
Sent: Thu, 10 Nov 2016 15:46:34 -0500
Subject: Simple Routing for web apps

Can someone point me to a reference for simple web routing? As in "If xyz is
your URL, do this"?

On the wiki http://picolisp.com/wiki/?web is states "pl-web: A small http
application server with websockets and routing". Does this mean that the base
library http.l lacks routing?

Any guidance appreciated.
--
Joe Golden
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe



--
Joe Golden 
--

UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Simple Routing for web apps

2016-11-11 Thread Henrik Sarvell
Hi Joe, you might want to take a look at Jose's stuff:
https://bitbucket.org/iromero91/web.l/src/718174234c82c0d5931754d6c172ef6799eed54d?at=default

I'm the author of pl-web ( https://bitbucket.org/hsarvell/pl-web ),
it's a bit different than the pure blabla -> blabla mapping, it
doesn't provide that out of the box, just a few globals that you can
use to create something like Macropis for instance:
https://bitbucket.org/hsarvell/macropis

I just noted that the websocket docs on the pl-web page is very
outdated, will try to update it when time permits.



On Fri, Nov 11, 2016 at 6:31 PM, Alexander Burger  wrote:
> On Fri, Nov 11, 2016 at 10:50:00AM -0500, Joe Golden wrote:
>> " http[s]://server.org/12345/path/file
>>
>>   is forwarded to a server on localhost listening on port 12345, to ask for 
>> the resource "path/file". "
>>
>> How is this resource generated from the "path/file" request. Is
>> "path/file" a real pathname and file? I come from Drupal and PHP and the
>> URLs are all "virtual" or simply patterns and don't refer to a real
>> filesystem
>
> That's a valid question. In case of PicoLisp, all such pathnames in URLs
> are relative to the current working directory of the server process.
> This is normally the PWD the server was started in (in case of httpGate
> the 4th config parameter). No magic involved :)
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Simple Routing for web apps

2016-11-11 Thread Alexander Burger
On Fri, Nov 11, 2016 at 10:50:00AM -0500, Joe Golden wrote:
> " http[s]://server.org/12345/path/file
> 
>   is forwarded to a server on localhost listening on port 12345, to ask for 
> the resource "path/file". "
> 
> How is this resource generated from the "path/file" request. Is
> "path/file" a real pathname and file? I come from Drupal and PHP and the
> URLs are all "virtual" or simply patterns and don't refer to a real
> filesystem

That's a valid question. In case of PicoLisp, all such pathnames in URLs
are relative to the current working directory of the server process.
This is normally the PWD the server was started in (in case of httpGate
the 4th config parameter). No magic involved :)

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe