[Seaside] [Article] Reddit.st - In 10 elegant Smalltalk classes
Sven Van Caekenberghe
sven at beta9.be
Fri Jul 30 21:25:25 UTC 2010
Hey Laurent,
On 30 Jul 2010, at 21:48, laurent laffont wrote:
> Hi Sven,
>
> I've enjoyed reading your tutorial, good work !
>
> ** I've tried to add a link on http://caretaker.wolf359.be:8080/reddit, it always throw this error:
>
> GlorpDatabaseReadError: ERROR: relation "reddit_links_id_seq" does not exist at character 16
>
> Your request could not be completed. An exception occurred.
Thx for reporting this, it should be fixed now.
> ** About code formatting, could you put the class name in front of methods ? Like this:
>
> RedditLink>>initialize
> self points: 0; created: TimeStamp now
>
> or
>
> RedditDatabaseResource class>>login
> DefaultLogin ifNil: [ DefaultLogin := self createLogin ].
> ^ DefaultLogin
>
>
> Sometimes I've been lost....
Good point, I'll put it in the next version.
> ** from Common Lisp to Phyton. -> Python
>
> I've never used GLORP so it was the hard part for me. Indeed I'm not sure about this sort of code:
>
> WAReddit>>voteUp: link
> self session glorpSession inUnitOfWorkDo: [ :session |
> session register: link.
> link voteUp ]
>
> Can WAReddit be independent from persistence solution ? In ActiveRecord way I would expect something like:
>
> WAReddit>>voteUp: link
> link voteUp; save.
Another good point, I'll have to think about that.
> Anyway I will try to code it and see, it's a good opportunity for a screencast :)
>
>
> Cheers,
>
> Laurent Laffont
Regards,
Sven
More information about the seaside
mailing list