On Tue, Dec 9, 2008 at 12:14 PM, Viktor Kojouharov
<[EMAIL PROTECTED]> wrote:
> On Tue, 2008-12-09 at 11:00 -0200, Gustavo Sverzut Barbieri wrote:
>> On Tue, Dec 9, 2008 at 10:52 AM, Vincent Torri <[EMAIL PROTECTED]> wrote:
>> >
>> >> quietly behind the scenes we have agreed we need to merge and be 1 - they 
>> >> are
>> >> close enough in structure and gaols that this is not a technical problem 
>> >> - and
>> >> it's definitely not a political one. we both very much want a merge. it is
>> >> simply that both started development in separate pools for separate goals 
>> >> and
>> >> reasons that they are not the same right now - but this will change, so 
>> >> expect
>> >> in the future to see a merge. the real questions are more like "what the 
>> >> hell
>> >> will we do with the api?" ie grn_* vs elm_* ... or will we maintain both 
>> >> or use
>> >> #defines (for now) to at least keep codebases mostly building with minor
>> >> changes...
>> >
>> > choose one namespace as soon as possible, as they are currently not much
>> > code using those 2 widgets sets.
>>
>> it will be elm, guarana will still exist for non-widget parts (right
>> now guana_widgets is a sub-library of guarana), includes MVC and other
>> stuff, eventually we can move more stuff to elementary, but I guess we
>> can keep like that for now.
>>
> Oh, I rather wanted it to be grn_, since it doesn't start with an "e" :)

eheheh...


> Also, what kind of widgets would guarana provide? Since you mentioned
> MVC, would it add tree/list/icon/combo/whatever view widgets?

guarana today provides mostly what we used in the projects for our
clients on set-top boxes, that includes button, lists, select
(combo-like) and slider.

I'm all against tree, so you probably will not get it from me. But we
provide a great list that is very optimized (but comes with some
constraints), used for huge amount of data that can use similar
objects to renderer (ie: music list).

Widgets per see are not MVC, they're supposed to be the VIEW of MVC,
this list, for instance, you can provide accessor and render functions
so it will work with any model you provide, including grn_model or
PyObject if you wish.

Our model is very thin, we provide common interface to access its name
(including translation) so you can generically represent it anywhere.
We also have the "Model Folder" as a container of models.

Our controller is also very thin and basically define a back-linked
list of controllers, you can have lots of child controllers but just
have one parent. You can do grn_controller_resume(), suspend() to make
controller load/unload resources (like its view). You can use back()
to call parent's back_from() virtual, that usually will do some
action, like request child to suspend() and hide its view somehow.
Each controller can have one view and model associated, but that's
optional, we just define the common interface.

What's nice is that you can use guarana module loader and
automatically load shared-objects that contain symbols to create
controllers to handle some model. This boosts modularity of projects
and make it simple to use.

>From module loader you create a mapping (stored in EET, configured
with guarana_loader_conf):
     Model/Folder/Audio/Local: model_local.so  my_sqlite_model_folder_new
     Model/Folder/Audio/Local: model_local.so  my_mysql_model_folder_new
     Model/Folder/Audio/Remote: model_remote.so my_remote_model_folder_new
     Controller/Folder/Audio: controller_audio.so
my_generic_audio_folder_controller
     Controller/Audio: controller_audio.so my_generic_audio_controller

then you can ask for all symbols that provide
Model/Folder/Audio/Local, call it and assume you'll get model_folders.

then you present items somehow on the screen, possible using their
names (every model have a name). When user select one item, you need
something to handle it, so you ask:

   grn_controller_new_from_model(model)

it will try to match exactly, in this case Model/Folder/Audio/Local
and will find nothing, then it will fallback to Model/Folder/Audio and
so on. In this case it will find the first fallback.

The nice thing about this is you can later just register a new symbol
to handle the more specific version and it will just work, no need to
recompile nothing. it will just work.

This is used in Zope, Freevo and we used it for Canola1 and Canola2
with great success, I'm using it for ProFUSION products with great
success as well.

Regards,

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to