About Welly code refactoring

7 views
Skip to first unread message

Junliang Liu

unread,
Apr 20, 2010, 8:11:39 AM4/20/10
to we...@googlegroups.com
Hi guys,

Don't you think it weird that the YLView is handling three tasks: drawing the BBS contents, creating a sub view of coverflow, and switching between tabs? In my opinion, there should be a super view that handle the tab switching and display proper subview (telnet view and portal view). The YLView should only care about drawing, handling mouse event and other stuffs concerning BBS contents. There should be no relations between YLView and Portal View.

What do you think 'bout it?

Best,
K.O.ed

Li Lu

unread,
Apr 20, 2010, 2:42:35 PM4/20/10
to we...@googlegroups.com
In my understanding, the new view hierarchy should be like:

WLSuperView (With all tabs)
|-->WLBbsViews (General BBS view)
|-->WLPortalViews (CoverFlow)
|-->WLCachedViews (the cached BBS contents)

Just as KOed mentioned, there will be several different types of
WLCachedViews. Here all of those tabs (no matter a "site tab" or a
"pop up tab ") can be packed together. In this way the user can use
these pop ups across different sites.
--
Subscription settings: http://groups.google.com/group/welly/subscribe?hl=en

Junliang Liu

unread,
Apr 21, 2010, 12:16:37 AM4/21/10
to we...@googlegroups.com
Yep. The advantage of using a super view dealing all the tabs is that we can easily extend our functionality in future, without changing the stable BBS view codes. With current design, each time we add a new kind of view (e.g. portal view), we need to add a state variable in YLView and modify all the codes related to the current state. (You can see how many times we call isInPortalMode!)

Yang Tang

unread,
Apr 21, 2010, 12:18:44 AM4/21/10
to we...@googlegroups.com
support!
possibly embedded youtube one day...
--
TANG Yang
Department of Computer Science and Engineering
The Chinese University of Hong Kong
Tel: (852) 5318 8650

Lilu9.cn

unread,
Apr 21, 2010, 12:48:35 AM4/21/10
to we...@googlegroups.com
That's true. A good view should not have this kind of "state". It shouldn't be a DFA. 

Li Lu

在 Apr 21, 2010,12:16 AM,Junliang Liu <tale...@gmail.com> 写到:

Xi Wang

unread,
Apr 21, 2010, 1:14:56 PM4/21/10
to we...@googlegroups.com
i am not sure what a cached view is, but it seems easy to store the
bbs content as a core animation layer..
Reply all
Reply to author
Forward
0 new messages