A versatile framework built to enrich the developer experience in terms of simplicity and speed of application development.
- 🔨 Installation
- 📢 Introduction
- 📖 Getting Started and Documentation
- 🔌 Bootstrap Integration
- 👍 Contribution
- 📶 Browser Support
- 📋 Plans
Run the following npm command:
$ npm install @plazarjs/core
Or, place the script tag on your page:
<script src="https://cdn.jsdelivr.net/npm/@plazarjs/core"></script>
Check out the list of available dependant packages.
PlazarJS is a un-opinionated framework for JavaScript. It has no dependencies and by leaning on Object-Oriented-Principles (OOP) it can easily be used to create a large Single-Page Application or it can be integrated to a portion of a web page where dynamic workflow is required. It's built to be flexible and designed to help you build the application the way you want it without forcing you to follow a path you don't think is suitable for the application you are developing. The main focus is on good old trio, HTML, CSS and JavaScript.
- Can define components, mixins or classes by invoking
pz.define
,pz.component.extend
orpz.class.extend
. Mixins are not extendable. - Reuse each type later in the app as much as needed. One type, multiple instances.
- Extend each type with another by setting the
ownerType
. Note that this config is not required when using theextend
approach. TheownerType
is automatically recognized. - Override parent method implementation.
- Each method overridden in a child type can call its parent by invoking
this.base(arguments)
.
- Modularity
- Components
- Mixins
- Classes
- Inheritance
- Bindings and Templating (inline, pre-rendered, async templates)
A quick example:
// define the component
import pz from '@plazarjs/core';
const helloWorld = {
ownerType: 'component',
template: '<div>Hello from {fw}</div>',
renderTo: 'body',
autoLoad: true,
viewModel: {
fw: 'plazarjs'
}
};
export default pz.define('hello-world', helloWorld);
// create the component where required
import helloWorld from 'my-path/helloWorld';
helloWorld.create();
The equivalent of the code above written with the extend API looks like this:
// define the component
import pz from '@plazarjs/core';
const helloWorld = {
type: 'hello-world',
template: '<div>Hello from {fw}</div>',
renderTo: 'body',
autoLoad: true,
viewModel: {
fw: 'plazarjs'
}
};
export default pz.component.extend(helloWorld);
// create the component where required
import helloWorld from 'my-path/helloWorld';
helloWorld.create();
Detailed documentation can be found here.
Live demo can be found here.
Checkout the module integration here.
Please read the Contributing Guide before making a pull request.
PlazarJS supports all ECMAScript 5 compliant browsers. Check out the compatibility table.
Every implementation/change is done in a way to ignore IE version 9 and lower.
Some of the next major releases will contain:
- TypeScript support.
- Core plazar-ui (set of controls out of the box). This will eliminate the need for any external CSS framework integration. Of course, you would still be able to integrate any of them if you choose so.