Dynamic Web Development with Seaside

Buy PDF Buy Print



This is perhaps the most important chapter of the book, because it illustrates the ability of Seaside to compose applications using components as building blocks.  Here is a practical example which I think can tie together many different concepts to show how easily seaside solves web programming problems: Suppose I want to design a 3-panel web page, in which the left panel provides a directory for navigation (see eBay for example), the main panel lists items for sale, and the right panel lists context-sensitive information such as the items included in the shopping card; furthermore, we have a header which lists our current navigation path (using eBay as an example again, Home > Electronics > Cameras & Photo).  How can this be designed in Seaside as embedded components?

We can consider a main component, corresponding to the main window, with 4 children corresponding to the left panel, main panel, right panel, and header.  If a user navigates, using the left panel to a particular location (such as Home > Electronic > Cameras & Photo),  the header component should be updated with the current path, while the main panel lists the items for sale in that particular section, and the right panel lists specials for that section.  The child components need to communicate with each other (using Announcements) in order update themselves.

Can you provide a working example for this description in this chapter?  I think it would be an excellent way to describe how components can be embedded in a web app.  It would be a very practical example, and well worth the extra code to illustrate these concepts.

Copyright © 15 December 2018 Stéphane Ducasse, Lukas Renggli, C. David Shaffer, Rick Zaccone
This book is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 license.

This book is published using Seaside, Magritte and the Pier book publishing engine.