Show HN: Sentinel.JS - The simplest alternative to angular.js
bitbucket.org
bitbucket.org
This is a small timetracking app for freelancers, that only uses html and javascript that I created using Sentinel.js. It uses local storage to store the data.
Your simple example is (IMO) more complicated than the AngularJS version, and Sentinel JS requires Jquery:
Please correct me if I'm wrong, just don't see the benefit of using this over AngularJS, you're ultimately going to want more functionality anyway.
Thanks. And what you say is only reasonable. I wouldn't imagine Sentinel.js to be any where near as stable as Angular.js. I rewrote the whole thing three times, to get the code in a manageable form. There are tests that cover most of the functionality. Since there are only a handful of directives, there are actually less 'moving parts' than something big like angular.js. But still, there are a lot of things that can go wrong for some combination of directives.
And can you please tell me which example you found more complicated than the angular version? Also can you think of any use case that something like this would fail to meet?
It's one of the fastest out of all the frameworks, solid documentation and very easy to use.
Which part?
All you have to do is get yourself a "scope" from Angular.js, which is linked to a DOM-Node, and you are good to go.
You can use my code [1], which will do this for you.
Sorry sir, you may have heard about angular.js but you don't understand it at all.
Well, there are directives, but not custom ones...
Yes, probably. But these are my thoughts
1) How Important are the missing parts. For eg, I think you can define custom directives in angular.js. You can't do that with Sentinel.js. But can this be still useful without that feature? What I have tried to do is to minimize the number of 'things' that one needs to learn, by providing more powerful constructs. For eg, angular have ng-even and ng-odd directives to distinguish between even and odd iterations for a repeat loop. But in Sentinel.jS, you can give "sn-computed-" prefix for an attribute, and that attribute value will be evaluated and bound to the given expression. So you can cover a lot of cases with this feature that angular.js cover with a lot of directives.
2) Can we add those missing parts without sacrificing its simplicity. For eg, Dependency Injection. May be we can add it without making it a lot more complex.
Pardon me calling it as an alternative to angular.js. I just couldn't find another way to convey what it does under 80 characters. I know all of these are kind of naive. I know I am a nobody, and there is no way I can be right about these things. But those are my thoughts. Please correct me where I am wrong....
As a matter of fact, storing user data in data-* attributes is unnecessary in React. Just like graphics programming, you're better off storing vertices data in the data structures themselves, not in the final onscreen output of the vertices.