DEV Community

Joshua Johnson for UA1 Labs

Posted on

Bringing uxJS (A Simplified MVVM Framework) To A Modern Standard.

At the point at which I am writing this, uxJS (https://github.com/ua1-labs/uxjs) released some 5 years ago as another framework (https://github.com/joshualjohnson/jquery.x), has yet to be released as a 1.0 production ready library. uxJS was a hard fork of jQuery.x as an attempt to provide an simplified version of an MVVM Framework without using jQuery as the primary force for providing the functionality. This framework has been used in production for creating such user experiences like https://www.thetvshield.com/the-tv-shield-product-selector/.

As rapid as we move in the JS world, I've noticed that it's once again time to update the concepts in uxJS and prepare it for a 1.0 release into the world. In its current version, you can read all about the concept here https://github.com/ua1-labs/uxjs/blob/master/README.md.

Here is what I'm thinking we need to do to modernize the framework:

  1. Move away from controllers all together.
  2. Keep the plugins concept but refactor it so that you can call it a "ux" instead of a plugin.
  3. Remove data-ux-plugins="plugin1 plugin2" and reuse construct data-ux="ux1 ux2" so that you can layer in multiple "ux" definitions to one DOM node.
  4. To register new ux definitions, the api should be refactored from ux.plugin() to ux.define(name)
  5. Update the entire library to use TypeScript
  6. Create an abstract UX class that can be extended can be used to register "ux" definitions.

These are some of the things I am thinking at this point...

I know, I already hear you saying it, "Why yet another JS framework?" and the answer is simple...Because we as humans have the ability push software further along. This framework has lived with me for the past 6 years and will continue to do so and evolve as time moves on. It will remain uxJS for the rest of it's life, but will iterate as we modernize its functionality.

I think that's all I've got! You wanna join me in this refactoring effort?

Top comments (1)

Collapse
 
jackhpeterson profile image
Jack H. Peterson

Dang man, I wish I would have found this before starting on my most recent project. It's still in its early stages, no docs, just exploration. But yeah, looks like we've got almost the same vision. I'd love to at the very least run what I have by you and hear your thoughts on it. Eerily similar ideas, just the lingo and a few differences on events and such. If this project is still alive in some form, please shoot me a quick email at adios@jackhpeterson.com. I'd love to chat.