Saturday, 29 August 2009
ESUG and Keychain integration for Firefox
There will be much Seaside to come but, taking a break from that over the past few days, I also managed to get a beta version released of my Keychain Services Integration extension for Firefox that allows OS X users to store their logins and passwords in Apple's keychain. This allows the passwords to be shared with other browsers like Safari and Camino and also lets you take advantage of features like Keychain locking to protect your stored passwords. If you use Firefox 3.x on OS X, give it a try and let me know how it goes - it's scratching an itch for me anyway.
Tuesday, 14 July 2009
Through the eyes of a child
On a whim, while walking in London yesterday, I popped into the Tate Modern gallery. I'm not a huge modern art fan, but a few pieces caught my attention. Two of the most interesting were No Title (Table and Four Chairs) and Red Room, which I've just discovered are both by Robert Therrien.
Red Room is, as the title suggests, a room where every single object (except the single white light bulb in the ceiling) is practically the same shade of red. The room is packed with stuff and it's surprisingly compelling to look at. The collection of objects screams that there's some hidden story here waiting to be deciphered.
No Title (Table and Four Chairs) is a large scale (3.5 times normal) dining table and four chairs. On first glance, I thought, "ok, a big table". But the more I studied it, the more I was almost unable to walk out of the room. I began to contemplate the effect of looking up at the underside of a table, of standing barely higher than the seat of a chair. Obviously, as children, we all saw the world from exactly this position, but I found the situation almost impossible to fathom, let alone to recall. Very interesting.
Check out photos of both or if you're in London drop by the gallery and see them for yourself.
Monday, 29 June 2009
Web Velocity released
Tuesday, 23 June 2009
London
Friday, 5 June 2009
Seaside 2.9 on VisualWorks
Meanwhile, we're eyeing another alpha release and trying to stare down a few remaining rough edges that are preventing a reasonable attempt at a beta. If anyone feels like tackling an improved set of configuration/administration/development tools, let us know!
Friday, 8 May 2009
BC-STV
I'm voting yes to STV for one very simple reason: it removes the fear of vote splitting, allowing me to indicate my true preferences. Period.
Have you ever heard any of the following statements?
- "This is an NDP riding, there's no point even voting for someone else."
- "This could be a close battle. Voting for the Green party might help the Liberal party get in."
- "I like this party but I don't like their candidate in my riding."
Any electoral system is a complex balance between individual and group freedoms, degree of proportionality, cost, and many other factors. There is no "perfect" system. BC-STV may get tweaked over time but, in the meantime, the freedom to vote the way I want is reason enough to support it.
It's a shame that our province doesn't seem able to manage a real debate about this significant and important issue but don't be fooled by the mudslinging from either side. If you find the pro and con sites for STV in BC a little too heated, the Wikipedia articles on STV and FPTP (as well as on other voting systems) at least list both pros and cons for each. I also found the website of the Electoral Reform Society in the UK had useful and interesting reading (including pros and cons) on many different electoral systems. Although their stated preference for STV may bias their assessments of other systems, the site is much more balanced than any of the BC sites.
When to use a Seaside Component?
To some extent these decision end up being subjective design decisions but there are some pretty compelling reasons why you might need to use a Component. I took a crack at answering the question but I encourage you to post or look for alternate answers there if you think mine is wrong in some way. I think the question is an excellent one so I'd also encourage you to upvote the question and/or answer if you think it is appropriate.
While we're on the topic, asking and answering Seaside questions on StackOverflow might help gain us some exposure and legitimacy. I actively monitor the RSS feed for Seaside questions and I'm guessing a few other developers do as well.
The main content of my answer was:
First of all, you are correct that you do not need to use a Component in order to access the Session. Seaside 2.9 moves
#sessionup to a new classWAObjectwhich makes it accessible to almost all Seaside objects (including Components) but you can definitely refer toWACurrentSessionyourself for now in 2.8.Components provide roughly the following functionality in 2.8:
#renderContentOn:is called with an instance of whatever renderer class you specify in#rendererClass(instead of whatever renderer is in use when your object is asked to render itself)- A hook (
#updateUrl:) to allow updating the URL used by the renderer to generate links- Hooks (
#updateRoot:,#style,#script) to allow updating the HEAD section of the HTML document- The ability to be the root of an Application
- Hooks (
#updateStates:,#states) to make state backtracking easier- A hook (
#initialRequest:) to allow initialization based on the request that caused the Session to be created- A facility (
#children) to make sure all components below you will also have the above hooks called on them- The ability to add Decorations
- The ability to show/answer/call (uses Decorations)
- Some convenience methods (
#inform:,#isolate:, etc)If you don't need any of the above, you don't need a Component. If you need any of the above, you pretty much do need a Component unless you want to implement the equivalent functionality on your own class.
The simplest metric is probably: if you intend to keep the object around between HTTP requests it should be a Component; if you intend to throw the object away and create it on each rendering pass it probably doesn't need to be. If you imagine an application that was displaying blog pages, you'd probably have Components for a menu, a blog roll, the blog body, each comment, and so on. You might want to factor out the reading of the blog's markup and generation of its HTML so that you could support different markups or different renderers and so that the comment Components could support the same markup. This could be done with a non-Component class that implements
#renderOn:and could be created and used by other Components as needed.Seaside 2.9 currently splits up the above functionality by making
WAPresenterconcrete and introducingWAPainteras its superclass. 1-3 above are implemented onWAPainterand 4-7 onWAPresenterso you have your choice of what to subclass depending on your needs. It also removes a lot of methods from WAPresenter and WAComponent in an effort to make them easier for end users to understand.