V
V
Viktor2018-05-11 03:25:10
Algorithms
Viktor, 2018-05-11 03:25:10

How to make PHP and JavaScript code easily embeddable in other people's applications?

I want to write a chat plugin and put it in open source.

  1. How to think over its architecture so that it is as easy as possible to integrate it into someone else's application?
  2. What frameworks and approaches are best to use if I want to integrate my code as a plugin to Wordpress and Laravel with minimal effort (I chose based on popularity)?

The most successful thing that came to my mind is to provide support for the maximum number of PSR-** standards in the php code.
And in js, take one of the most popular frameworks, but one that allows it to be embedded anywhere without conflicting with jquery or something else.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stalker_RED, 2018-05-11
@Stalker_RED

https://codex.wordpress.org/Plugin_API
https://laravel.com/docs/5.6/packages
And for js it would be nice to figure out what a "scope" is and make it so that only some kind of API sticks out, not all intestines.

V
Vitaly Mironov, 2018-05-11
@nor1m

It's easy enough to write in OOP. Easy to connect<script src="path/to/script_js"></script>
include "path/to/script_php"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question