wiki:GROUP_EMBEDDED_BOOKS_R0

Version 11 (modified by boyan, 16 years ago) (diff)

--

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=GROUP_EMBEDDED_BOOKS_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

This group of tasks is about embedded books support. A user should be able to:

  • Insert a book into a frame (either by dragging and dropping or by using the Insert menu).
  • Choose whether the inserted book should be fully embedded or just linked.
    • These two do not differ in the way the embedded book is displayed but in the way it is stored - inside the book for the former and at a remote location for the latter.
  • Choose how to display the embedded book - in a frame or in its own window.
  • Manage the resources in the embedded book (via the Resources palette).
  • Navigate through the embedded book (change pages, interact with resources (play audio, video, etc.)).
  • Modify some basic properties of the embedded book (rename, scale, delete, etc.)

At this revision only a basic version of some of these features will be implemented.

Task requirements

At this iteration the following should be achieved:

  • Provide basic support for embedded books:
    • Define and implement embedded book frame content.
    • Allow inserting of a Sophie book through the menu.
  • Resolve issues related to embedded book resources:
    • See if cyclic referencies cause problems and resolve them.
    • Make sure that when the embedded book is on focus, only its resources are shown in the Resource palette.
    • Make sure that when the embedded book is on focus, only its pages are shown in the Pages palette.
    • Think of other possible smells and resolve or document them.
  • Define interaction with the embedded books:
    • Add a panel for controlling the embedded books or use the existing book's bottom panel.
    • Allow navigating through pages in the embedded book.
  • Define how embedded books will be managed:
    • Add an embedded books palette or use the existing books palette.
    • Allow renaming and deleting of embedded books.
  • (Optional) Document things related to embedded books in a wiki page: EMBEDDED_BOOKS?

Task result

  • Source code
  • (Optional) Wiki page

Implementation idea

  • Create classes EmbeddedBookContent (similar to other frame contents).
  • You may display the first page of a book as a starting point and change that later.
  • Have a look at the Resource library and see how it handles cyclic dependencies.
  • See similar tasks in the Related section to get an idea of how things can be done.

EMBEDDED_BOOKS_CONTENT_R0
EMBEDDED_BOOKS_RESOURCE_SUPPORT_R0
EMBEDDED_BOOKS_MANAGING_R0
GROUP_PDF_R0
Specification about embedded books

How to demo

  • Insert a Sophie2 book.
  • Navigate through its pages.
  • Show that resources are displayed correctly in the resource palette.
  • (Optional) Show the created wiki page.

Design

Since embdedded books are extra content, they will be separated into a new module - org.sophie2.extra.func.embedded. This module will provide extensions and classes that are required for the embedded books functionality:

  • Extensions and classes for:
    • a menu item in the Insert menu;
    • a frame content provider;
    • a frame content view provider;
    • an embedded books palette;
  • An R3Logic OperationDef for inserting the book.
  • BookFrameContent - a class representing the content of an embedded book frame.
  • BookContentView - a class representing the view of an embedded book frame.

These are new things that will be implemented at this iteration and their relation is shown in the following class diagram:

The diagram goes here.

The following things require changes to existing classes to be achieved:

When a frame with an embedded book is selected (i.e. the embedded book is on focus), the embedded book will become the current book of the application. Thus the page preview palette and the resources palette will display the correct corresponding information. When the frame is deselected, the parent book should become current again. This will also affect the book bottom panel - it will control the embedded book and it will contain only the Navigation and Search panels. (This might be left for the next iteration).

There are some issues related to embedded books:

  • Cyclic references - Book A embeds Book B which embeds book A. Any problems and exceptions that come up with this will be solved by changing the Resource library to handle cyclic dependencies. If that cannot be achieved in a reasonable time, embedding a book that will cause cyclic references will be disabled.
  • Preview mode - A book that is embedded should be displayed as in Preview mode and should not be editable in place. You have to open it in its own window if you want to edit it. Currently the Preview mode is working to a quite basic extent and might need refactoring for proper displaying of embedded books.

Embedded books will be displayed under the Books tab in a new palette. When you select an open book, the new palette will show all the books that are embedded in it. From there you will be able to rename and delete embedded books. This requires the Resources library to provide ability for renaming and deleting and may slow down the task if not implemented.

Since this task depends on a lot of other things documenting will be done only if there is time left and after a stable design has been achieved.

Implementation

New module created. Current supported functionality is:

  • Inserting an book from the menu. Only the first page of a book is displayed in a new frame. It is not editable in place.
  • Listing the embedded books in an embedded books palette.
  • Embedded books are not persistable at this stage.
  • Renaming embedded books is not supported.
  • Deleting an embedded book can be achieved by deleting the frame it is in.
  • Moving through pages of the embedded book is not supported.
  • Showing resources of the embedded books is not supported.

The missing functionality will be achieved in some of the next iterations.

Testing

Place the testing results here.

Comments

Write comments for this or later revisions here.