HV2 for Pier

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

HV2 for Pier

Göran Krampe
Hi folks!

The other night I was on IRC and chatted with Ken and Lukas etc about
Pier. I ended up more or less hinting/promising to take a look at putting
a HV2 web face on top of the Pier model and I actually took a stab at it.
The main argument in favor is to get "nice URLs" and I personally don't
care but thought the task was fun. :)

I got so far so that you can start a HV2 view on a PierKernel and it groks
the hierarchical naming etc using the lookup code in Pier and using some
double dispatching (added a few method extensions on the Pier structure
classes) it tries rendering stuff. I also made a subclass of
PRDeepRenderer (I think it was called) to render structures, and tada -
out comes... some really crap looking stuff. But it works. :)

Now, why am I doing this? I dunno. It was fun trying to grok Pier (Lukas
sure likes the Visitor pattern! I recognize the style from Mewa and must
confess I think it gets a bit too convoluted at times, but that's just me)
and reviving HV2 a bit. The end result can hopefully become an easily
hackable small implementation of a RESTful, readonly (yes, I think so) web
view on top of a Pier kernel.

There is of course quite a lot of work left - the rendering parts. I
didn't do much on that (just enought to get a feeling for how it could
work) and perhaps the new Canvas model that Giovanni Corriga is adding to
HV2 (inspired of course by the similar model in Seaside) is a better fit.
But since Pier uses visitors it should be good to hook in, not sure about
the Widgetry though but most of that is probably only needed for
manipulation.

Code: http://squeak.krampe.se/httpview

The package is called "Bayliner" (I am itching to buy a Bayliner Capri
1952) and well, Seaside... Pier... and Bayliner for day cruising. :)

regards, Göran

PS. Anyone interested, feel free to jump into the boat - I think it has
room for at least 7 people. :) Email me to get write access to repo.


Reply | Threaded
Open this post in threaded view
|

Re: HV2 for Pier

Philippe Marschall
Hi

As you have for time for hacking, what about Kom? What is the status
of the two patches (Squeak 3.9 and cookie parsing) that I sent you?

Cheers
Philippe

2007/4/12, Göran Krampe <[hidden email]>:

> Hi folks!
>
> The other night I was on IRC and chatted with Ken and Lukas etc about
> Pier. I ended up more or less hinting/promising to take a look at putting
> a HV2 web face on top of the Pier model and I actually took a stab at it.
> The main argument in favor is to get "nice URLs" and I personally don't
> care but thought the task was fun. :)
>
> I got so far so that you can start a HV2 view on a PierKernel and it groks
> the hierarchical naming etc using the lookup code in Pier and using some
> double dispatching (added a few method extensions on the Pier structure
> classes) it tries rendering stuff. I also made a subclass of
> PRDeepRenderer (I think it was called) to render structures, and tada -
> out comes... some really crap looking stuff. But it works. :)
>
> Now, why am I doing this? I dunno. It was fun trying to grok Pier (Lukas
> sure likes the Visitor pattern! I recognize the style from Mewa and must
> confess I think it gets a bit too convoluted at times, but that's just me)
> and reviving HV2 a bit. The end result can hopefully become an easily
> hackable small implementation of a RESTful, readonly (yes, I think so) web
> view on top of a Pier kernel.
>
> There is of course quite a lot of work left - the rendering parts. I
> didn't do much on that (just enought to get a feeling for how it could
> work) and perhaps the new Canvas model that Giovanni Corriga is adding to
> HV2 (inspired of course by the similar model in Seaside) is a better fit.
> But since Pier uses visitors it should be good to hook in, not sure about
> the Widgetry though but most of that is probably only needed for
> manipulation.
>
> Code: http://squeak.krampe.se/httpview
>
> The package is called "Bayliner" (I am itching to buy a Bayliner Capri
> 1952) and well, Seaside... Pier... and Bayliner for day cruising. :)
>
> regards, Göran
>
> PS. Anyone interested, feel free to jump into the boat - I think it has
> room for at least 7 people. :) Email me to get write access to repo.
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: HV2 for Pier

Lukas Renggli
In reply to this post by Göran Krampe
> Now, why am I doing this? I dunno. It was fun trying to grok Pier (Lukas
> sure likes the Visitor pattern! I recognize the style from Mewa and must
> confess I think it gets a bit too convoluted at times, but that's just me)
> and reviving HV2 a bit.

This is impossible. These visitors were already present in SmallWiki
and SmallWiki is older than Mewa. I learned the Visitor patter from
the Refactoring Browser and the Pier document representation is
essentially the same as the AST of a compiler. With the only
difference that I don't generate byte-codes but XHTML views, plain
text, Latex, Wiki markup, etc.

I have not seen any other Wiki implementation doing this. Probably
other people like to write a lot of procedural code. Even better, if
they can duplicate it for the different output formats. Playing around
with strings and page long regular expressions must be fun. Sorry that
I skipped that:-)

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: HV2 for Pier

Göran Krampe
Hi Lukas!

"Lukas Renggli" <[hidden email]> wrote:
> > Now, why am I doing this? I dunno. It was fun trying to grok Pier (Lukas
> > sure likes the Visitor pattern! I recognize the style from Mewa and must
> > confess I think it gets a bit too convoluted at times, but that's just me)
> > and reviving HV2 a bit.
>
> This is impossible. These visitors were already present in SmallWiki
> and SmallWiki is older than Mewa. I learned the Visitor patter from

Well, I didn't mean to imply any chronology of implementation - just my
personal chronology of discovery. :)

> the Refactoring Browser and the Pier document representation is
> essentially the same as the AST of a compiler. With the only
> difference that I don't generate byte-codes but XHTML views, plain
> text, Latex, Wiki markup, etc.
>
> I have not seen any other Wiki implementation doing this. Probably
> other people like to write a lot of procedural code. Even better, if
> they can duplicate it for the different output formats. Playing around
> with strings and page long regular expressions must be fun. Sorry that
> I skipped that:-)

I am not saying it is "bad". And I am not saying I have any better
approach in my head, haven't bothered to reflect on that.
I just found the code a bit hard to follow because of it. I felt "bumped
around" pretty good. :)

regards, Göran

Reply | Threaded
Open this post in threaded view
|

Re: HV2 for Pier

Göran Krampe
In reply to this post by Philippe Marschall
Hi!

(btw, your posts are base64 encoded - looks pretty odd unencoded in my
Celeste)

> Hi

As you have for time for hacking, what about Kom? What is the status
of the two patches (Squeak 3.9 and cookie parsing) that I sent you?

Cheers
Philippe


I will try to take a look. And no, I have very little time for "hacking"
generally - but sometimes I just need to go for it - spur of the moment
thing. Much of what I do with Squeak are just "for fun" anyway, so
sometimes I end up doing stuff I just feel like doing.

But hey, even better - are you interested in co-maintaining Kom? :)

regards, Göran

Reply | Threaded
Open this post in threaded view
|

Re: HV2 for Pier

Brad Fuller-3
[hidden email] wrote:
> Hi!
>
> (btw, your posts are base64 encoded - looks pretty odd unencoded in my
> Celeste)
>  
Hey Göran: are using celeste for all your email reading? If so, modified
or the one on squeakmap?

Reply | Threaded
Open this post in threaded view
|

Re: HV2 for Pier

Göran Krampe
Brad Fuller <[hidden email]> wrote:
> [hidden email] wrote:
> > Hi!
> >
> > (btw, your posts are base64 encoded - looks pretty odd unencoded in my
> > Celeste)
> >  
> Hey Göran: are using celeste for all your email reading?

Yes.

> If so, modified
> or the one on squeakmap?

Old one.

regards, Göran