New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android] Refactor Dom and Render code #104

Merged
merged 2 commits into from Mar 15, 2017

Conversation

Projects
None yet
4 participants
@sospartan
Contributor

sospartan commented Mar 14, 2017

No description provided.

@weex-bot

This comment has been minimized.

Show comment
Hide comment
@weex-bot

weex-bot Mar 15, 2017

Warnings
⚠️ Potential BREAK CHANGE. Modify public in android/sdk/src/main/java/com/taobao/weex/dom/WXDomManager.java
⚠️ Potential BREAK CHANGE. Modify public in android/sdk/src/main/java/com/taobao/weex/dom/WXDomModule.java
⚠️ Potential BREAK CHANGE. Modify public in android/sdk/src/main/java/com/taobao/weex/dom/WXDomStatement.java
⚠️ Potential BREAK CHANGE. Modify public in android/sdk/src/main/java/com/taobao/weex/ui/WXRenderManager.java
⚠️ Potential BREAK CHANGE. Modify public in android/sdk/src/main/java/com/taobao/weex/ui/WXRenderStatement.java

Generated by 🚫 dangerJS

weex-bot commented Mar 15, 2017

Warnings
⚠️ Potential BREAK CHANGE. Modify public in android/sdk/src/main/java/com/taobao/weex/dom/WXDomManager.java
⚠️ Potential BREAK CHANGE. Modify public in android/sdk/src/main/java/com/taobao/weex/dom/WXDomModule.java
⚠️ Potential BREAK CHANGE. Modify public in android/sdk/src/main/java/com/taobao/weex/dom/WXDomStatement.java
⚠️ Potential BREAK CHANGE. Modify public in android/sdk/src/main/java/com/taobao/weex/ui/WXRenderManager.java
⚠️ Potential BREAK CHANGE. Modify public in android/sdk/src/main/java/com/taobao/weex/ui/WXRenderStatement.java

Generated by 🚫 dangerJS

mBridgeManager = WXBridgeManager.getInstance();
}
static void initInstance(WXRenderManager renderManager){

This comment has been minimized.

@YorkShen

YorkShen Mar 15, 2017

Contributor

像getInstance一样,做个多线程保护?

@YorkShen

YorkShen Mar 15, 2017

Contributor

像getInstance一样,做个多线程保护?

This comment has been minimized.

@sospartan

sospartan Mar 15, 2017

Contributor

这个方法是给单测用的,不public

@sospartan

sospartan Mar 15, 2017

Contributor

这个方法是给单测用的,不public

public class Actions {
public static DOMAction get(String actionName,JSONArray args){

This comment has been minimized.

@YorkShen

YorkShen Mar 15, 2017

Contributor

get改成create更合理写

@YorkShen

YorkShen Mar 15, 2017

Contributor

get改成create更合理写

This comment has been minimized.

@sospartan

sospartan Mar 15, 2017

Contributor

回头可以打算加pooling

@sospartan

sospartan Mar 15, 2017

Contributor

回头可以打算加pooling

}
public static DOMAction getInvokeMethod(String ref,String method,JSONArray args){

This comment has been minimized.

@YorkShen

YorkShen Mar 15, 2017

Contributor

同上,get改为create

@YorkShen

YorkShen Mar 15, 2017

Contributor

同上,get改为create

* Created by sospartan on 01/03/2017.
*/
public class Actions {

This comment has been minimized.

@YorkShen

YorkShen Mar 15, 2017

Contributor

名字改成ActionCreator 或者 ActionFactory ?

@YorkShen

YorkShen Mar 15, 2017

Contributor

名字改成ActionCreator 或者 ActionFactory ?

@@ -319,24 +275,41 @@ public boolean handleMessage(Message msg) {
public static class MsgType {

This comment has been minimized.

@YorkShen

YorkShen Mar 15, 2017

Contributor

DomHandler有些冗余,消息会经过domModule -> domManger->domHandler->domManger这个序列传递,消息在domManager和DomHandler之间扔来扔去。

建议

  1. DomManger实现Handler.Callback
  2. WXDomHandler.handleMessage移动到DomManger.handleMessage
  3. DomHandler中仅保留public static class MsgType这个内部静态类
@YorkShen

YorkShen Mar 15, 2017

Contributor

DomHandler有些冗余,消息会经过domModule -> domManger->domHandler->domManger这个序列传递,消息在domManager和DomHandler之间扔来扔去。

建议

  1. DomManger实现Handler.Callback
  2. WXDomHandler.handleMessage移动到DomManger.handleMessage
  3. DomHandler中仅保留public static class MsgType这个内部静态类

This comment has been minimized.

@sospartan

sospartan Mar 15, 2017

Contributor

为了尽量减少修改,执行的流程暂时不做修改。

@sospartan

sospartan Mar 15, 2017

Contributor

为了尽量减少修改,执行的流程暂时不做修改。

Show outdated Hide outdated android/sdk/src/main/java/com/taobao/weex/dom/WXDomStatement.java
Show outdated Hide outdated android/sdk/src/main/java/com/taobao/weex/dom/RenderTask.java
Show outdated Hide outdated android/sdk/src/main/java/com/taobao/weex/dom/RenderTask.java
Show outdated Hide outdated android/sdk/src/main/java/com/taobao/weex/ui/WXRenderStatement.java

sospartan added some commits Feb 23, 2017

* [android] new dom statement
 pential break changes: WXRenderStatement#getComponentSize,DomModule#getComponentSize. It's low risk since it's a internal method, users should not dirct use it.
@YorkShen

This comment has been minimized.

Show comment
Hide comment
@YorkShen

YorkShen Mar 15, 2017

Contributor

Impressive.

May god bless this pr 😃 .

Contributor

YorkShen commented Mar 15, 2017

Impressive.

May god bless this pr 😃 .

@asfgit asfgit merged commit 20f6c37 into apache:0.12-dev Mar 15, 2017

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

asfgit pushed a commit that referenced this pull request Mar 15, 2017

@sospartan sospartan deleted the sospartan:new-stmt branch Jun 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment