Pandora Frameworks On The Pandora


dflemstr

It's a ball.
Joined
Jul 31, 2008
Messages
2,514
Location
Stockholm, Sweden
Website
Visit site
Let's assume for a second that I'm writing an application for the Pandora, and I want to be a Good Linux Citizen™ and use various standard frameworks/libraries instead of rolling my own (and if YOU don't want to do this too, then YOU are the cause of Linux's fragmentation and non-standardization. The Linux Foundation would like to have a serious chat with you ;))...

In this hypothetical situation, which frameworks should I choose, meaning: which ones will all of you others choose and which ones will be present in the first place?

Example: configuration framework. What should I do? Use GConf, kconfig, put a custom config file in "~/.config/*", put a custom config file in "~/.myapp", adhere to some of the gazillion FSF/FDF standards and use a .desktop-style config file, or what?

Or what about device control (say that I want to write an encryption program that needs raw disk access for some reason, or that needs a notification of when a disk of a certain type is inserted). Raw "/dev/*" scouting, udev, DeviceKit, basic HAL, KDE Solid: what can I expect to be there?

And will the DBus be there (dumb question)? Will certain standard services be there, either from the GNOME side or from the KDE side (like Solid for example)?

Which species (pun intended) of configuration tools for screen resolution, keyboard layout, language settings, etc, will be there, and where are their configuration files? XRandR or xorg.conf, for example? I know there are some standard Ångström ones, but they don't cover everything and OpenPandora might be using a different overlay.

The reason for asking all this is of course that it wouldn't be wise to bloat the precious 512 MiB of NAND with too many alternative solutions to the same fundamental problem. If everyone could use the same tools when creating new programs and adapt programs when porting them to do so as well (it's not that difficult; the tools mentioned above have about the same number of features) we would save a lot of space that could be used for something else.

If you know the answers to some of these questions, please enlighten me.
If you don't, make this into a flame war about what SHOULD be on the Pandora! :p
 
dflemstr said:
which ones will all of you others choose

I've used Lua for configuring a couple of small applications.
It has the following interesting features:

* Does not rely on any sort of service or desktop environment
* Settings can be defined in terms of other settings, or in terms of mathematical equations
* Configuration files are the same size and readability as .conf files, whereas XML is confusing.
* The same Lua interpreter can also be used for in-application scripting or plugins.

I've never really tried an alternative, and I'm already hesitant to use KConf because I don't trust the KDE guys to make anything simple. I tried to make a Plasmoid once and had to get, like, cmake and something else involved, and none of it made any sense. I thought it would be like a Java applet, but all I remember is installing weird dev tools, and feeling unclean for days afterwards.

Edit: Almost forgot. I DO trust the Qt guys to make things that make any sense, so I used QSettings in the only Qt application I've ever written. It works well enough, and it takes basically no effort since I was already using Qt, but it's not really any better than Lua scripts or any other INI / .desktop-like language.
 
Last edited by a moderator:
Hi dflmestr,
i'm sure skeezix Will answer all your question :)

it's not a superb answer from me but I'm too lazy to answer all that ( whoa, best post ever)
 
Sphinxter said:
I hope we'll be following the standards, even though they're not really; http://www.freedesktop.org
Yeah, as said above, following the FDF standards would be an alternative, but nobody seems to be using them for some weird reason? Also, those standards aren't really library-bound so it's not like it'll be a huge deal if someone decides to follow the FDF guidelines even if we standardize on another configuration framework for the Pandora.
 
Last edited by a moderator:
Like cpas said ;)

This is a multipart question --

First, yes, dbus is present.

As to which desktop environments, qt (kde) versus gtk (gnome), we're putting in a good assortment but not overdoing it (for space).. less qt though, last I checked.

For common device functions (reading some of the controls, get/set clock, etc) there is libpnd; admittedly I'veonyl had time to build a few things in and have some sample code I really shoudl glue in there, but it is my hope that by our apps depending on libpnd and libpnd being incluided in every device, that it will become a common place for rerusable code.

ie: While I'm including some goodies, I'm really hoping the community will quickly throw in more bits. You work out a cool audio routine, stick it into libpnd! etc .. after a few people do just a couple apps, we'll have flshed out the holes, easy as pie.

That said, libpnd does include a handy little conf file reader, and we use tinyxml for a few other bits and bobs.

libpnd (I will add documentaion to the public wiki soon) is written very brute force straight-C, to maximize reusability. ie: theres some C++ (for tinyxml) in there, but most of it is straight C .. thus it coudl easilybe wrapped for python or whatever, or used by c and c++ apps directly.

libpnd is in the git repo already; take a look and let me know what you'd like to see.

I have stubbed in a lot of things (ie: theres a mostly empty pnd_device.[ch] interface that needs filling in more, for instance, but its there to remind people. Theres lots of goodies in there already though, and it manages all the pnd-file and PXML stuff already, and so on.

So yes, we've got some common frameworks for Pandora specific stuff, and we're leveraging a standard Linux dustro so the rest is there too.

jeff
 
Back
Top