Your SlideShare is downloading. ×
0
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Kissy component system
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Kissy component system

358

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
358
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. KISSY Component System yiminghe@gmail.com 2013-07
  • 2. overview Infrastructure
  • 3. oop • Class – KISSY.extend • superclass
  • 4. Base • Attribute management/change event – ATTRS • getter • setter • valueFn • Value – get/set – before/afterXChange
  • 5. Base • ATTRS – getter • { xy: { getter: function() { return [ this.get(‘x’), this.get(‘y’) ] } } }
  • 6. Base • ATTRS – setter • { number: { setter: function(n){ return parseInt(n); } } }
  • 7. Base • ATTRS – value • { number: { value: 2 } }
  • 8. Base • ATTRS – valueFn • { number: { valueFn: function(){ return this.get(n)*2; } } }
  • 9. RichBase • Extension/plugin/onSet/liste ners – Extend Base – listeners – Initializer/destructor – Extensions/plugins – http://docs.kissyui.com/docs/ html/tutorials/kissy/compone nt/rich-base/index.html
  • 10. RichBase components • Examples – dd • Draggable/DraggableDelegate • Droppable/DroppableDelegate • dd/plugin/constrain • dd/plugin/proxy • dd/plugin/scroll – resizable • Resizable • resizable/plugin/proxy
  • 11. • UI
  • 12. Control • A ui control – Extend RichBase – Control • Life cycle – createDom – renderUI – bindUI – syncUI • Handle dom event • Attribute setup/logic • xclass/xrender • events – afterRenderUI/show/hide
  • 13. render • Render a ui control (div element) – Extend RichBase – Template render • contentTpl/childrenElSelectors – Decorate render • HTML_PARSER
  • 14. Container/ContainerRender • List of control (manage children) – Render children – Add/remove child – Events • beforeAddChild/beforeRemoveChild • afterAddChild/afterRemoveChild
  • 15. Custom Control MyControl
  • 16. Custom Control • http://docs.kissyui.com/kissy/src/component/ demo/my-control.html
  • 17. Control.js • Bind Dom event • Setup attribute • Attribute logic • Setup xrender/xclass
  • 18. Render.js • Setup childrenSelectors • Setup content template • Setup HTML_PARSER • Sync ui and attribute
  • 19. List.js • xclass • focus management
  • 20. UI components • Example: – Button/combobox/editor/filter- menu/menu/menubutton/separator/split- button/tabs/tree/toolbar – scroll-view/date-picker TODO – Bui • http://bui.alibaba-inc.com/start/index.php
  • 21. related • Others – http://www.slideshare.net/yiminghe/

×