Where to start learning about Seaside internals?

316 views Asked by At

I've become pretty enamored of the Seaside web framework lately. I'd like to start digging into the source to figure out how it works. Unfortunately, there are a lot of classes and I don't know where to start! Does anyone know what classes I should try to understand first? I assume that there's a routing class somewhere that I should start with...

3

There are 3 answers

0
Julian On BEST ANSWER

Stephan gives good suggestions. Basically, if you understand the Seaside-Core package in Seaside 3.x, you understand how everything fits together:

  • The Canvas stuff is all a specific implementation of WARenderer from the Seaside-Core-Rendering category
  • The Session/Application stuff is all a specific implementation of WARequestHandler from the Seaside-Core-RequestHandling category
  • The Component/Task stuff is all an implementation of WAPainter from the Seaside-Core-Presenters category

There are really two ways of approaching studying the framework. Either start with one of the specific things you are interested in (say WAComponent) and work your way up the superclasses. Then repeat with each of the other classes Stephan mentions.

I'd suggest the other way: starting with the three sets of abstract classes I mentioned in Session-Core. Looking at them together (combined with the HTTP and Document classes) will give you an idea of the generic concepts and how they plug together to form the framework. You can look at each of the specific implementations as needed to relate the generic concepts to the actual implementation.

Subclasses of WAServerAdaptor form the starting point of request handling in Seaside, where a request from a specific web framework is converted into a Seaside request and dispatched to an appropriate handler. Callbacks are also pretty important and are in Seaside-Core-Callbacks.

If you understand everything in Seaside-Core, you basically understand how the framework works at a high level. Once you have a broad understanding of the basic core concepts, you can then proceed to get a deep understanding of each area that interests you by examining the concrete implementations in more detail. But keep in mind that everything in Seaside-Core is intended to be subclasses and plugged together to extend the framework.

1
Bernd Elkemann On

I assume you have read the Seaside-Book?:

http://book.seaside.st/book

If you want to go deeper just look at the source, starting with the classes WAComponent and WARenderCanvas+WAHtmlCanvas. The routing class is WAAdmin in the sense as "this is the place where different Seaside-apps are registered".

0
Stephan Eggermont On

There are several parts that are interesting. Start from WARenderCanvas to understand how the html generating dsl is build. WAComponent is the starting point for the composite page structure with call: and answer:. WAApplication represents a Seaside application, WASession a session, WAServerAdapter connects the Seaside framework to a http server and WARequestHandler handles http requests. The Grease package handles differences between Smalltalk dialects.

You are using the different browsers (class and hierarchy), class commments and senders and implementors, aren't you?