Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roadmap for HaxeVX - VueJS #2

Open
11 of 14 tasks
Glidias opened this issue Dec 31, 2016 · 3 comments
Open
11 of 14 tasks

Roadmap for HaxeVX - VueJS #2

Glidias opened this issue Dec 31, 2016 · 3 comments

Comments

@Glidias
Copy link
Owner

Glidias commented Dec 31, 2016

Vue:

Vue components:
For a streamlined codebase, ensure absolutely zero reflection considerations when coding purely in Vue. For both Vue/Vuex, RTTI references should be phased out completely.

VxMacros.buildComponent() macro:

  • Add VComponent base constructor, so super() required to be called, with the base class calling a standard macro-generated method _Init() that contains multiple eg. "untyped this.render= {{ThisClass}}.prototype.Render" to mimic Vue component option initializations. This will forego the need to use _toNative() anymore for runtime reflection conversion. In short, due to macros, the Vue component should work right off the bat upon instantiation (eg. new Vue( new HaveVueComp()) ) without any need for further runtime reflection or initialization.
  • @:watch field metadata support
  • VComponent to extend VueInstance extern properties to gain access to Vue's standard native $apiFields as _vApiFields within Haxe. Just type out "_v" prefix in your IDE to list out all standard native Vue instance api properties.
  • GetDefaultPropValues() / GetDefaultPropSettings() dynamic overwrite support over metadata prop settings
  • @:validateProp metadata support
  • Extending VComponent classes multiple times down the inheritance chain should be made allowable. (ensure autobuild macro allows this)

Virtual DOM:

  • Do up and test working draft within Render() function with VuejS' VNode related externs.

JSX:

CSS/Stylesheet:

  • .css/.vue export ~~~with class prefix namespacing spec.~~~ via CSS modules and gulp pipeline integration via Haxe compile/build macros.

Vuex:

  • In Mutator and Action classes.

    • Autobuild macros
      • to auto-generate public inline commit/dispatch methods (with macro-resolved namespaced commit/dispatch(strings) ) from explicitly declared class instance private handler functions, rather than return anonymous function bodies that requires runtime reflection checks and hackish runtime prototype function overwrites.
        In short, the Vue components should already execute inlined code that outputs something like "context.dispatch({{macroResolvedStringId}}), through the mutator/action class' function call itself. (eg."dispatcher._doAPIAction(payload)" within Haxe, will be automatically compiled as "context.dispatch("AppDispatcher|doAPIAction", payload) in the JS codebase.
  • In Getter/Module classes

    • Autobuild macros
      • to auto-generate quick utility public getter/get_getter accessors from a single private getter(state) function, instead of the x3 declaration boilerplate being used at the moment which is very verbose.
  • General cleanup, look into _toNative and bootstrapping implementations, etc. for streamlining, particular via macros to replace some of the runtime tasks.

  • Extra VuexMacros type-checkings in macro for checking types between store/module/mutators/actions.

Vue/Vuex:

  • Ensure all RTTI-related code dependencies are no longer needed.
@Glidias
Copy link
Owner Author

Glidias commented Feb 1, 2017

KIV Yagni/When u need it:

Vue

  • (kiv yagni) When __option parameters are accessed within other Vue instance lifecycle methods where the $options is already made available, haxe macro will convert those references to "untyped this._vOptions.___option" to prevent null referencing at runtime.
  • (kiv when you need it) strict-typed @:mixin directives
  • (Advanced. kiv) higher order component with @:mapStateToProps.

Vuex

  • In Vue Component classes under Vuex
    • (Advanced. kiv ) static functions for mapGetters, mapFilters, mapState, mapMutations and mapActions field generation via the build macro,

@gogoprog
Copy link

gogoprog commented Dec 9, 2019

Hello,

Very nice project, it works really well!

It seems you're not working on this anymore but do you accept PRs?

@Glidias
Copy link
Owner Author

Glidias commented Dec 10, 2019

yup, not working on it anymore, but i do still use this for side projects, eg. http://glidias.github.io/Asharena/demos/sosgame/
https://github.com/Glidias/trosink/blob/master/haxe/src/troshx/sos/vue/combat/components, and i accept prs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants