From: Don A. <don...@co...> - 2007-04-28 00:01:24
|
Yes, I know that these are problems with the current report system. However, I don't need to tackle them, because you already are :-) The Database API can be a bit much for a lot of users. For example, to get the birth date of a person, you need to do the following: ref =3D db.get_birth_ref(person) if ref: event_handle =3D ref.get_reference_handle() if event_handle: event =3D db.get_event_from_handle(event_handle) date_obj =3D event.get_date_object() if date_obj: date_str =3D DateHandler.displayer.display(date_obj) else: date_str =3D u'' I think that "self.birth_date(person)" is easier. :-) But in all reality, a major ulterior motive behind this new, abbreviated syntax is to make it easier to port LifeLines reports to GRAMPS. Don On Fri, 2007-04-27 at 08:54 -0700, Brian Matherly wrote: > Don, >=20 > >The biggest issue is that accessing the database can be a bit confusing. > >So I've created a simpler interface for basic reports. >=20 > I disagree. I've worked on plenty of reports and helped other people deve= lop new ones. From what I've seen, people can understand the database acces= s relatively easy by looking at other reports as examples (and the tutorial= on the Wiki is quite good). >=20 > The difficulties, as I see it, are: > 1) Layout (expecially with graphical reports like the calendar). > 2) Adding user options and understanding how those options are handled by= the report system. > 3) Understanding the general report structure and what functionality is a= lready inherited from base classes. >=20 > A lot of magic happens behind the scenes, and in my opinion, the API coul= d be improved to make things seem less magical. For example, how is a user = who is writing a text report supposed to know that he can't use the "draw_t= ext()" function inherited from BaseDoc()? >=20 > I don't think much can or needs to be done for #1. That's the heart of a = report - presenting data in a user friendly layout. > I believe I have made some progress already on #2 and #3 by simply reduci= ng the amount of functionality that is inherited from base classes (Particu= larly Report and BaseDoc). >=20 > This whole topic has been my inspiration for improvement in the 2.3 > branch. I wrote a little about it on the Blog: > http://blog.gramps-project.org/?p=3D53 >=20 > In summary, I don't think your time is being wasted, but I also don't thi= nk you get the largest benefit possible from your effort. >=20 > Feel free to disagree :) >=20 > ~Brian >=20 |