Port H5P PHP code to Node.js

Hi 

Do you have a plan to port the code to Node.js and make it work in websites without the need to use Drupal, Joomla or Wordpress. If yes, it is something that I would like to contribute.

Thanks

0
0
Supporter votes Members of the Supporter Network can vote for feature requests. When the supporter network has generated sufficient funding for the top voted feature request it will normally be implemented and released. More about the H5P Supporter Network
falcon's picture

We do, but unless we get external funding or lots of external help we won't be starting on it this year. Are you able to take lead on such a project?

I could take the lead as I am planning to hire a few JS devs to build a learning content creation platform and was very interested in what you have built so far. Could you give me a sense of how big the project is to transform it into a node.js platform without any connection with Drupal, Wordpress or Joomla.

falcon's picture

We've tried to make as little PHP code as possible. All the content types are javascript onlye. I think there is about 1 700 lines of PHP code in the Drupal module.

What is your timeframe for this project? When will you start?

I took a look at the PHP code but it's hard to understand what it does is 5 minutes.

Could you give a very rough explanation of what is the use of it? 

If it's just persistence and serving a few features, it can be rather fast to create a prototype as a node module and iterate from that. NodeJS tends to be less verbose than PHP and our environment have already capabilities. I used PHP in the past (still do for WP).

If it's much more complex then porting from PHP could be a better option.

Next teaming effort between several companies could make it doable, considering the benefits of reusing H5P.

 

falcon's picture

I think I'll try to add this to the documentation, but I won't be able to do that right now, so let me just write down what comes to mind and me or someone else may add to it later.

The PHP code handles:

  1. CRUD for the content
  2. CRUD for libraries
  3. CRUD for user data
  4. Validation of content
  5. Validation of H5P packages
  6. Purifying of content (HTML purification most importantly)
  7. Export
  8. Plug H5P into the relevant places in the CMS (settings page, content creation page etc)
  9. Access control
  10. Provides H5P with all the data it needs (user info, urls, settings etc)

I've probably forgot a lot, but hopefully this might be a start.

Hey Guys,
I'm at a similar point as the others and would be interested in creating an npm module for h5p (or possibly a plugin for a CMS like ghost or keystone) 
Lemme know if I can help..

Also interested in npm module for h5p.

~ Rodney / www.ob3.io

castelmager's picture

Hi, we are very interested in creating an npm module for h5p but we don't have the resources to do it right know. 

But if someone want to do a custom development for us, we are happy to discuss the details.