todomvc
todomvc copied to clipboard
Add RenderJS todoMVC example app
RenderJS is a library to build web applications from reusable components called gadgets. Gadgets are written in Vanilla HTML5/JS/CSS and can be public or iframe-sandboxed. They are stateful and acquire/publish methods from other gadgets. RenderJS apps run in a single, cancellable promise chain giving fine grained control and error handling over what should happen when. We usually combine RenderJS with our other JS library jIO which provides a single API to connect and sync with various storages (indexeddb, dropbox, webdav, ...). Both can be used to build standalone progressive web apps or be dropped in as skeleton with other frameworks.
For the todoMVC app, we put most logic in the todo gadget plus added a simple router gadget and model gadget using an indexeddb jIO storage.
At Nexedi, we're using RenderJS/jIO for our ERP5JS interface and on several production apps. For us, they are very useful but we don't have the punch to market them much, so while we surely don't warrant to be featured in terms of community, I do think the novel approach of RenderJS/jIO makes them a good addition.
More infos and documentation can be found on the RenderJS website (Gitlab repo, Github mirror), and jIO website (Gitlab repo, Github mirror).
Test results:
TodoMVC - renderjs
When page is initially opened
✓ should focus on the todo input field (56ms)
No Todos
✓ should hide #main and #footer (281ms)
New Todo
✓ should allow me to add todo items (1525ms)
✓ should clear text input field when an item is added (737ms)
✓ should append new items to the bottom of the list (2098ms)
✓ should trim text input (802ms)
✓ should show #main and #footer when items added (829ms)
Mark all as completed
✓ should allow me to mark all items as completed (304ms)
✓ should correctly update the complete all checked state (812ms)
✓ should allow me to clear the completion state of all items (581ms)
✓ complete all checkbox should update state when items are completed / cleared (844ms)
Item
✓ should allow me to mark items as complete (1860ms)
✓ should allow me to un-mark items as complete (1709ms)
Editing
✓ should focus the input (89ms)
✓ should hide other controls when editing (148ms)
✓ should save edits on enter (1148ms)
✓ should save edits on blur (1317ms)
✓ should trim entered text (1237ms)
✓ should remove the item if an empty text string was entered (813ms)
✓ should cancel edits on escape (866ms)
Counter
✓ should display the current number of todo items (1293ms)
Clear completed button
✓ should display the correct text (332ms)
✓ should remove completed items when clicked (770ms)
✓ should be hidden when there are no items that are completed (678ms)
Persistence
✓ should persist its data (2557ms)
Routing
✓ should allow me to display active items (715ms)
✓ should respect the back button (1379ms)
✓ should allow me to display completed items (928ms)
✓ should allow me to display all items (1320ms)
✓ should highlight the currently applied filter (650ms)
30 passing (3m)
@frequent Apologies for the delay in responding to your PR - there has been a shortage of people from the core team able to deal with requests. Due to the ever growing number of javascript libraries and frameworks that can assist with developing MVC-like applications, the requirements for incorporation into the curation are getting higher. Given that this work seems largely proprietary to Nedexi, regrettably it is unlikely it can be officially added to the repository at this time. I will forward a suggestion to @FadySamirSadek that this be included in the todoMVC wiki, where worthy frameworks are showcased. Given that your company appears to have had success with a low-bloat, small and flexible approach to frameworking, personally I am a fan!
@whitefire0 : tops for replying, thanks! the wiki sounds great for us already. I'll try and get the PR up to par, so it passes all tests. Might be a bit though, haven't looked at it in a while and vacation coming up. I'll ping you back here.
@frequent Hey Sven, don't worry about looking through this code. I'll make sure it passes the tests this week and get it into the wiki. Enjoy your vacation!
@frequent Thank you for contributing to TodoMVC as @whitefire0 mentioned we are trying to make the list of frameworks/libraries included as short as possible as it is very difficult to maintain all these examples while making sure they are updated. I will try to help by reviewing your code but it seems you already have done a great job so far passing the tests. Once you and @eyqs feel like the example is ready I will be more than happy to include your example in TodoMVC's wiki as your project looks promising. Thanks 🙂