gwtd3 / gwt-d3

A GWT wrapper library around the d3.js library
Other
131 stars 53 forks source link

Refactoring / Renaming JsArrays to Arrays #55

Closed anthonime closed 10 years ago

anthonime commented 11 years ago

Keep the same package, but just rename JsArrays to Arrays, for consistency with the Array class.

Also; rename the asJsArray methods into create() methods.

anthonime commented 11 years ago

@ericcitaire please tell me what do you think about it

ericcitaire commented 11 years ago

I'm totally ok with renaming asJsArray() to create(). It sounds more GWT-ish naming. ;)

I don't know about the class name, maybe we could also look at it the other way around and rename Array to JsArray. I don't know... Anyway, I agree with you, it needs to be consistent.

IMHO, most of the code in Array, JsArrays and in the array package is not directly related to D3. It's mostly standard Javascript API. Maybe we should think about creating a dedicated project for this stuff. What do you think ?

anthonime commented 11 years ago

IMHO, creating a new project for (Js)Array would be overkill. In fact, I was thinking about suggesting to the steering community our Array class as an improvement to GWT code base. But I think before to do it, we should investigate more about the different posts that have been made about GWT built-in JsArray class, such as: https://groups.google.com/forum/#!searchin/Google-Web-Toolkit-Contributors/gwt$20array$20javascript$20/google-web-toolkit-contributors/u6gjpXzoeNQ/d4gRBhHA_qgJ

But I agree with you: JsArray sounds better than Array since it is pure Javascript (e.g gwtquery adopts the same naming convention, see gwtquery.googlecode.com/svn/trunk/gwtquery-core/javadoc/com/google/gwt/query/client/js/JsObjectArray.html).

By the way, I think we should change the return type of the methods JsArrays.asJsArray() to return gwtd3 Array rather than GWT built in JsArray.

anthonime commented 10 years ago

abandonned. We are keeping Array class but provide good javadoc for it. JsArrays class has been removed