[Kss-devel] kss implementation of egoban.org

Yiorgis Gozadinos ggozadinos at gmail.com
Thu Sep 20 10:53:07 CEST 2007


On 9/19/07, Godefroid Chapelle <gotcha at bubblenet.be> wrote:
>
> Yiorgis Gozadinos wrote:
> > Hi,
> > I briefly talked with you guys a bit on #kss about converting my site
> > egoban.org <http://egoban.org> which handles Go games and replays them
> > through an AJAX interface.
> > The conversion has been long done, and everything seems to work fine
> > (except that I find it slightly slower which is I suppose expected) and
> > overall I can say I'm pleased with the result.
> > I had promised to bring it over to Naples as a showcase for kss but I
> > had an emergency operation and I'm not sure if I'll attend.
> >
> > Because egoban.org <http://egoban.org> still runs on 2.5.3 without kss
> > if you want to have the code (it's not yet open source) and show it off
> > live I would be happy to hand it over. Let me know...
> > Yours,
> > gg
> >
>
> Hello Yiorgis,
>
> I would really like to see both code base. I think I would like to make
> a lightning talk about your site and migration...
>
> So yes, I'd like to see your code. But more thant that, I'd like some
> feedback about your experience. What were the problems ? What did you
> like ? What do you suggest ?
>
> One line answer to those three questions would be great...
>
> I am looking forward to see what you did !
>
> Godefroid Chapelle (aka __gotcha)- BubbleNet  http://bubblenet.be
>
>

Hey,
I'll start with describing my experience with kss ;)
A bit on my background... Not a python guru but quite a seasoned programmer
I started with plone/python about 2 years ago. egoban.org was a toy project
aiming at getting me familiar with the bits and pieces necessary to do more
serious plone programming. As such the currently running version is working
fine but lacks in terms of design decisions.
I had zero experience with js, so I decided to skip the pain part and
decided to use mochikit which is a really sound lib for painless js. Things
just worked but took a while to implement.

Migrating to kss was much less painful than I originally thought. With zero
previous experience it took 2 days to do everything. Take note that the
first day was spent trying to find out why the first thing I tried on kss
wasn't working. It turned out to be a kss bug that ree fixed. Although it is
always disappointing when the first thing you try fails and you don't get
it, ree was a fast responder and an even faster bug fixer, so after that
everything went smoothly.
I would say that with my currently limited knowledge of kss it would now
take me about 3-4 hours to do the whole thing.

Overall I really like kss. It is light and well designed. Things I missed
are the following:

1) A better documentation. The tutorials are good and get you started but
not everything is covered or well explained. I spent 1 hour for instance
trying to fetch a stateVar from python, without having passed it as an
argument. Although you can do setStateVar from python you can't get it.
Although this is not bad necessarily it's nowhere to be found in the docs
(at least I didn't find it).

2) The ability to let me a few dirty things easily. In the old code, I would
fetch a node from the DOM by id. And I would obtain the whole bloody thing.
I would be able to read it, change it, do whatever. With kss I have to pass
individual attributes of the node as arguments. This, while it forces you to
be more careful about your design, is hindering ocasionally.
I'll give an example from my specific use case, but I think you can thing of
other cases where such things would be useful.

You can see how a Go board looks on egoban. The board is essentially a table
holding images. When a stone is placed on the board the src of the image
changes to the stone. When it is removed the stone is replaced by the
original image. But that image (of the board position) is not the same for
corners, sides and center.
In the old code I used to set an attribute on the image node called emptysrc
(or something similar) which I would copy to src when a stone was removed. I
didn't have to do a series of if-elseif to decide which image to set.
I'll agree this adds state to the client etc etc. But sometimes it's just
simpler (and not necessarily bad) that way.
So, yeah, I would love to be able to grab arbitrary nodes do whatever I want
to them and send them back.
I would also love to do getStateVar server side. I now pass arguments around
just in case I need them. Why not fetch them when I do? That is, let me be
dirty when I really really want to, and use stateVars like I did with global
js vars.

There you go, I'll answer any further questions comments whenever pain slips
away and lets me access my computer. Keep up the good work, kss is in my
opinion the BEST thing that happened with plone3...

Yours,
gg

PS. I'll send to Godefroid full src...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kss-devel/attachments/20070920/153b12c0/attachment.htm 


More information about the Kss-devel mailing list