How to use the IBM Social Business Toolkit in HTML/JavaScript Applications - SBT Webinar 06/12/13
Choosing the best JavaScript framework/library/toolkit
-
Upload
hristo-chakarov -
Category
Technology
-
view
1.145 -
download
3
description
Transcript of Choosing the best JavaScript framework/library/toolkit
Presentation goals
• Give directions• Compare few major libraries, frameworks &
toolkits• Statistics
Universal, reusable software platform, foundation of applications, products and solutions.• MooTools• AngularJS• BackboneJS
Framework
A set of independent libraries, designed to work well together, that you can pick and choose from.• Dojo• YUI
Toolkit
Size
• Size does not matter much if the resources are distributed over CDN
• cdnjs.com
• Content
Code structure
• Classes for reusable components• Constructor options• Use synchronization API instead of nested
callbacks
Utilities
• A utility should first try to delegate to native and in case it fails - use it’s own implementation
• The more utilities, the better
• Stringtrim() hyphenate() camelCase() escapeRegExp() toInt() toFloat() substitute()
• Object & Array each() some() every() filter() contains() map() empty() append()
Commonly needed utilities
• Objectvalues() keys() clone() merge() toQueryString()
• Array associate() clean() unique() flatten()
Commonly needed utilities
• API should provide full controlo destroy()
o DatePicker should be able to have its value set from outside
o Tabs should provide API for selecting tab dynamically
User Interface
When to use MV*
• AJAX-heavy web apps• JSON data structure• Need to render data in different ways on the same
page• A lot of user interaction that triggers updates
• Your server cannot handle all the requests• Your app has little interactions on the page• Data changes rarely• MV* may be overkill for small projects
o Heavy to implement - if you could have gotten away with 1 class, you now have 3
When NOT to use MV*
Releases
• When was the latest version released?• How often do they release new version?• Are there currently any betas?• Is there huge incompatibility between versions?
Support
• How many opened issues are there?• Is the documentation rich & easy to use?• How steeper is the learning curve?
Tips
• Spend some time browsing the source code• Read other people’s opinion, but don’t count on
them!
Tips
• Write a module/component for your App in plain JavaScript or pseudo code; then migrate to the selected library/framework and see how it feels
• TodoMVC has implementations in several MV* frameworks - check it out at todomvc.com