[Webkit-unassigned] [Bug 77337] [EFL] Refactor ewk_js files.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 16 08:12:26 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=77337


Gustavo Sverzut Barbieri <barbieri at profusion.mobi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |barbieri at profusion.mobi




--- Comment #14 from Gustavo Sverzut Barbieri <barbieri at profusion.mobi>  2012-02-16 08:12:23 PST ---
(In reply to comment #13)
> (In reply to comment #12)
> > Eina_Model already has the concept of properties, Eina_Value is a better Ewk_JS_Variant, Ewk_JS_Class_Meta shouldn't be needed etc. I haven't thoroughly thought about how it would work exactly, but the point is to leverage what already exists in Eina as much as possible.
> My main intention was to obtain small, easy and clear API for final user with few functions to create and manipulate objects and put all ewk_js implementation to internal port files. It is a good idea to use Eina_Model and Eina_Value but only internally. These objects should be encapsulated by few public API functions. This way will allow to make browser application independent to future Eina_* object changes, library and it will be more save due to that API functions could be properly handled. 

You should not abstract away Eina, actually the other way. It is to be considered a base of common knowledge in EFL. The idea of Eina_Model is to be the common language for hierarchical data objects, with reference counting, signals, properties and inheritance.

There are couple of sites that needs this: EWK, Elementary (GUI), Object-Relational Mappers (ORM/SQL) and also DBus. Imagine you want to expose your recently built model to the WebView, do you want to translate it all over again? Why? Qt did not do this, you could export any object to view without effort.

It was introduced by recently, that's why we did not use it before. And really, people liked it so much that it's going to be made an eina_object with the non-model specific bits, and eina_model will inherit from it.


> Anyway, why Ewk_Js_Class_Meta will be not need?

Because the Eina version already exposes properties and so on. Just methods are missing, given that methods have no string name. What can be done is to add a layer to do this in Ewk, or simply create a value type that is JS_METHOD, thus the property can hold a value that is actually a method (like Python does).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list