Making an Application Extensible
We’ve built all the tools you need to provide the user with a macro language. We’ll now look at ways to let users extend the object model. Exactly what you choose to make extensible depends a great deal on the application.
In the case of the Doubletalk browser, we’d like to add two new
capabilities. We want to trap certain events occurring in the
BookSet and allow users to write code to respond,
and we’d like to let users write their own views.
Bear in mind that from now on we are talking about power users, who are presumed to have some programming experience or at least aptitude. With a well-documented object model, their task should be easier in Python than in other languages; but they still have the ability to create bugs and damage data. We’ll try to structure the application in a way that keeps users away from critical code and keeps it simple.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access