[Seaside] Fast text search and proper design

Benjamin Pollack benjamin.pollack at gmail.com
Sun Dec 12 01:50:59 CET 2004


I am not new to Squeak or Seaside, but I have done very little "real"
work in either. This past semester, I had the opportunity to design a
database-driven website in the language of my choice. I ended up using
Seaside, and learned at tremendous amount about building real
applications in Smalltalk. At the end of the project, though, I was
unhappy with my design. The backend I used was PostgreSQL, and I never
came up with a good place to put the serialization code. I ended up
having a series of class-side statements that fetched and saved
objects (e.g., UMovie>>moviesWithTitleContaining:usingConnection:),
but I can't shake the feeling that this is a poor OO design. What
design is generally considered proper for this purpose? Do you put the
SQL and database connection in your Seaside components? In the model
classes? In the session class? Where? Likewise, whose responsibility
should it be to propogate changes?

On a similar note, I have decided to try to write a Gmail-like mail,
news, and calendaring system to learn both Squeak and Seasiide better.
For this particular project, I would like to use GOODS rather than an
RDBMS, but I need the ability to search very quickly through large
amounts of text and return appropriate matches. I cannot find any
effective data structure to use for that. Avi's B-tree won't really
help, as near as I can tell, because I want to search *within*
strings, and the default string operators likewise seem to be too
primitive to be effective for this. I have neither the time nor
knowledge to write my own system at the moment, so I'm wondering
whether anyone has encountered this problem before and what solution
you used.

Thanks for your help. I have found Seaside and Squeak in general
wonderfully productive, and look forward to continuing to leverage
your excellent framework.

--Benjamin

--
Benjamin Pollack
BS Computer Science
Duke '06


More information about the Seaside mailing list