You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+67Lines changed: 67 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -929,4 +929,71 @@ Smart('smart-repeat-button', class RepeatButton extends Smart.Button {
929
929
});
930
930
```
931
931
932
+
## Comparison with Polymer Framework
933
+
934
+
Polymer is a Google-sponsored project. With Polymer, you can build custom elements. Smart Custom Elements can be compared to Polymer’s custom elements and both provide a very similar development style.
935
+
936
+
Similar things:
937
+
938
+
Elements are instantiated using a constructor or document.createElement. Elements are instantiated when the tag is written in the DOM.
939
+
Configured using attributes or properties
940
+
Populated with internal DOM inside each instance
941
+
Responsive to property and attribute changes
942
+
Styled with internal defaults or externally
943
+
Responsive to methods that manipulate its internal state
944
+
945
+
Different things:
946
+
947
+
Property types can be nullable and more strict - validation for Integer. Support for Int64.
948
+
Properties can define `allowedValues` array. If a property is set to a value which is not in that array, an exception is thrown.
949
+
Property invalid value and invalid type validation.
For setting `pageSize`, this could be used: grid.paging.pageSize = 15;
977
+
978
+
Initialization of an element from a JSON object with automatic Dependency Changes handling. When an element is created from a JSON object, the json it two-way bound to the element and any change in the element updates the JSON.
979
+
HTMLTemplates support. When in the Custom Element's template, we have HTMLTemplateElement, that template is re-evaluated on property change and can be used for dynamic user updates.
980
+
Method Arguments and Return Type. Smart validates Methods for Invalid return type, Arguments Count, Arguments Types.
981
+
Agnostic Events - Smart exposes custom events for 'down', 'up', 'move' and 'swipe'. These events are Device agnostic and are raised for Touch and Desktop devices when the Cursor/Pointer is down, up, moved or swiped left, right, up or down.
982
+
Multiple Element Versions on the same web page is supported.
983
+
Localization - Built-in localization support.
984
+
Error Logs - Error logs with different error levels.
985
+
`completed` lifecycle callback which is called when the local DOM is ready and all elements are rendered.
986
+
`resize` notifications when the element's size is changed.
987
+
Style changed notifications - when the element's CSS is changed.
988
+
Using Shadow DOM is optional and is user preference. When disabled, the element's local DOM is part of the document's DOM.
989
+
View-Model Binding. An Element or Multiple Elements can be bound to the same Model object.
0 commit comments