Thursday, April 26. 2007Phonon core/ui splitTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
For instance, I am working on a CD ripper that will have an interactive GUI mode and a command-line interface batch mode. The batch mode does not use a GUI, and it is possible to compile it without GUI support. Keeping Phonon split into core/GUI modules would allow me to utilize Phonon even for batch mode. Furthermore, retaining the split would help to "keep you honest" in how you partition functionality. Think Model-View-Controller or "Document View" and you will know what I mean. Mixing core and GUI into a single module will blur the partitioning of functionality. I see the advantage, of course, for console applications. But is it important enough to justify the added complexity? The split actually doesn't help partitioning functionality it only makes the APIs harder to use. Because you can not, for instance, implement a QAbstractItemModel that provides a decoration (i.e. icon) without adding a hack that provides the icon if you link against phononui. In short: for API design the split does not help, it makes it harder. To implement a backend the split makes it harder. All this added complexity shows up as additional (exported) symbols and more code == bigger libs. Makes sense for Qt, but not for a Desktop Environment. Seriously, do what you think is best. Admittedly, I'm not very much up to date on what in Phonon's design makes it hard to separate the UI part of the libs from the core; I tried hunting down more information on the Phonon Web site, but I could not find API docs there. You should make a post on the technical details of the issue! I'd say, if at all in doubt about community approval, try to run the idea by one of the top dogs like aseigo; if their support doesn't reassure everyone, I don't know what will! I would if I had more time. But kdelibs freeze is coming up really fast now. For kmplayer's plugin this would be a real pity as explained before. Btw. I don't understand your example above of the icon. That's a gui thing, no? kmplayer's plugin would need phononui anyway for the video, no? You can argue that a data model is really a non-UI thing (and QAbstractItemModel is in QtCore as well). So the model is available in phononcore. But I can and want to provide decorations for the items. That needs a hack in phononui to create a global object that creates the icons in a QVariant to be used by the model. That way the model is also full-featured for GUI applications. (Sometime ago we had this discussion whether phonon should use the backends in- or out-of-process and you decided on in-process. For a browser plugin I still find that unacceptable. Painfull that I can't use the phonon controlpanel, yes.) I can't really comment on your model problems, but having a non-gui core that has not this functionality, one should use the gui-lib, would be okay with me. I don't follow the QAbstractItemModel is in QtCore argument. This was just an example of how the split gets in the way of the API design decisions. Of course the other option would have been to put the model class into phononui. But then it wouldn't have been possible for non-GUI applications to use the class. Regarding the out-of-process backend, I'm playing with the idea of a proxy backend that gets loaded by Phonon and loads the real backend in a separate process and handles the communication between them... The poxy backend is indeed okay as well (I guess that would be something I have now, but with the phonon bonuses). But then isn't this something console users might won't, eg. dbus-send/-monitor should be rather easy (assuming the dbus will launch such a service). Other than that, you're right on the QtGui then if video would need a QWidget anyhow. That said, kdelibs freeze is really close, and not having phonon ready would be a shame. On the other hand, APIs really shouldn't be rushed. And you get an added bonus since you suddenly have a real users of your core API - the UI lib. So you notice missing API or missing headers that should have been installed before you release it. Other than that, it's just more work. Do you mean core instead of backend here? [quote]And you get an added bonus since you suddenly have a real users of your core API - the UI lib.[/quote] Real users of my core API are the tests. The UI lib is really not a user of the core API it just adds GUI classes to the non-GUI classes. [quote]So you notice missing API or missing headers that should have been installed before you release it.[/quote] No you don't. Because the sources live in the same directory anyway. So you don't include installed headers but the original uninstalled ones. Which is rather important to be able to include the private headers. > non-GUI classes. Ah, this might be where the misunderstanding comes from. If people here are thinking the way I do, they were probably imagining the GUI classes as /extending/ the core classes, like Qt 4 does. If they don't, then indeed the separation between the two is probably somewhat arbitrary. Thank you for all the good work Matthias! It probably just means that the design is aiming for a lot of things with higher priority than the split of core/ui. [quote]The example you mention should be easily handled by either encapsuling or inheritance, but I know too little of the actual problem to point to an actual solution.[/quote] That would mean two different model classes which in essence accomplish the same except for the icon? I don't think that's intuitive. And as for displaying video without phononui, I was thinking that maby someone would make a replacement based on WXwidgets or GTK rather than QT, not much chance of that if the gui is built in. I don't think anybody will want to write a GTK replacement for phononui... |
Calendar
QuicksearchCategoriesBlog Administration |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||