[haiku] Re: [GSoC] Python Bindings for the Haiku API

  • From: Ryan Leavengood <leavengood@xxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Tue, 30 Mar 2010 17:30:57 -0400

On Tue, Mar 30, 2010 at 4:10 PM, Niels Reedijk <niels.reedijk@xxxxxxxxx> wrote:
>
> I was thinking about JSON as well. As for speed, building a UI will
> never be the most time consuming task and as such it seems like
> overkill to compile it.

Unless it was compiled down to the Haiku view archive format, in which
case it would be trivial to load by the existing Haiku API.

> In my opinion, wrapping the UI part of the Haiku API is the most
> challenging part for any bindings. If there is a powerful declarative
> UI mechanism (in JSON or XML) and there is a C++ parser that
> constructs the UIs from that, you can wrap that library both in Python
> and Ruby then you have a common declarative UI and you can implement
> the rest of the app in a sort of View-Controller(-Model).

I had similar thoughts in the sense that this declarative UI would
also be useful from Haiku C++ applications. And in fact in the future
we could build an interface builder which produced this code and the
archived view format as well. Then the interface builder could be used
by all Haiku developers, regardless of their language of choice. I
imagine this has some similarities to what Microsoft has done with
.NET, but in a Haiku/BeOS style.

> Of course you would loose some features (like reimplementing
> controls), but that's not necessarily a bad thing: if the Python/Ruby
> API would be identical to the C++ API, then why have it?

Well I still think it might be handy or cool to implement controls
with Python or Ruby, though I definitely agree a Ruby or Python API
should have some advantages to be worthwhile.

-- 
Regards,
Ryan

Other related posts: