Skip to content

Easily enable plugin extension to your application by using this library.

License

Notifications You must be signed in to change notification settings

dont-code/ng-xtend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

ng-xtend, what for ?

The most successfull web applications have developed an eco-systems around them. Check Nextcloud, Drupal, Joomla! or Wordpress, it's so easy to add a plugin that meets your needs.

The technology they are using, PHP, makes it easy to develop and install new plugins. With additional efforts, these plugins are automatically installed, recognized and available.

While I love the way Angular & Typescript work, there is no easy way to provide extension capabilities through plugins developed by external teams.

That's why I am developing ng-xtend !

What is ng-xtend concretely ?

It's an Angular library allowing you to:

  • Easily hosts plugins into your Angular components or pages at pre-defined xtend-points.
  • Dynamically load and install plugins in your Angular application
  • Easily develops Plugins that will be automatically recognized and use at the right time and the right place.

What kind of plugins will be supported

3 types of plugins will be supported as a first step

  • Simple Component: With limited effort and intrusion in your code, you can transform a regular Angular component into a pluggable one. Ideal for providing view or display of a custom type.
  • Complex Component: With some additional effort, this type Angular Component can itself provide xtend-points, filled by ng-xtend with the right plugin. Ideal for displaying complex information, where you want to delegate actions or display. For example, think of a "Money" plugin that delegates the "Currency" management to another plugin, without even knowing it.
  • Action Components: Provides actionable services on types without User Interface elements.

How will it work ?

As you can infer from the preceding descriptions, the ng-xtend framework heavily relies on types. Any data manipulated in a ng-xtendable application manipulates data with a type.

With the type, ng-xtend selects the right plugin and invokes it. As mentioned, a plugin can be used to display or edit a certain type in the UI, or provides possible actions to the type. The actions will be displayed as buttons the user can click.

Upon loading, the plugin registers itself to ng-xtend and provides the list of types and actions it supports.

A plugin can add additional types, however to keep compatiblity the most used ones are defined in this list. Whenever encountering a certain type, ng-xtend will look for the right plugin depending on the context, and call it. This happens without the host knowing the plugin.

The host only provides xtend-points in their application, like "here you can display buttons of all actions of this 'type'", or "here I need the user to enter this 'type', please find the right plugin".

As well, plugins can alter the application menus and some other customizations.

What is the roadmap ?

  • Insertion of simple component dynamically
  • Registry of plugins
  • Dynamic loading of plugins
  • Easier support for complex components
  • v1 !
  • Enhanced component selection criteria (xt-type, context)
  • Support for action components
  • v2 !

Thank you

About

Easily enable plugin extension to your application by using this library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published