That's an interesting question. My experience leads me to go with that old engineering standby: It depends.
For sites that can easily translate between platforms using CSS, etc, and its not a gnarly mess, them that seems to be a good approach. Once the pain of maintaining the data in one place exceeds the value then splitting seems called for. Hopefully the improvements in maintainability and understandability outweighs the effort that may be required to change things in two places.
Is it possible to keep the common things in a single file and the platform specific items in another file (or one for each platform)? I haven't done anything big enough to know whether this would work or just cause a different mess.
Cool. Given the title of the book I expected it to focus a lot on design rather than implementation. Do you provide code examples that show how you implement the design concepts you present on the different platforms?
Thanks for the response. Being an engineer and programmer it is really cool to see people involved in this area from different backgrounds. I only occasionally get to work on interfaces so I have to make do with taking classes much of the time.
Speaking of inspirational books - I read Norman's The Design of Everyday Things in the mid-90s. Made me see things a new way. I'm currently reading the revised edition.
If line 3 is something you need to do no matter what you could put it in a finally block. If line 2 is the only thing that will throw an exception and you can handle it and you want to go onto line 3 after that then you should move line 3 out of the try block or into its own try block.