Half PDF Viewer
April 11th, 2006
Finally I've decided to start working on the lightweight PDF viewer I talked about last sunday.
Sure, it won't have the same features that other better document viewers, like Evince, but it will only depend on Poppler and GTK+. Although the way I do my GUI application should let change the GTK+ part for any other toolkit (even raw Xlib!) without too many changes to the application.
What I do for my GUI application is follow the Model View Presenter (MVP) model, which is very similar to the Model View Controller (MVC), but the View layer is much thinner in the MVP than in the MVC. In fact the View layer is just a dumb layer that passes all events to the presenter and waits for the presenter to make a decision.
Since the Model is only the current application's data, it means that all logic is concentrated in the Presenter. It makes a lot easier to test the logic when it's on a single place and, since the view is so thin, it's possible to develop almost the whole application using Test Driven Development (TDD).
That's why I say I have half PDF Viewer: I have coded all application logic inside the Presenter and tested it using CppUnit. It works, but don't show anything interesting yet, besides the white dots on the black console (unless you are using a GUI front end, in which case green bars appears!).
I plan to spend tomorrow creating the "GTK shell" that will make the PDF's visible and perhaps Thurday I will release the first version.
Entry Filled under: Projects.
0 Comments
Leave a Comment