Picture of Mike Stevens
Is JSON still supported in Framework 5+?
by Mike Stevens - Tuesday, 10 January 2023, 7:36 PM
 

Does anyone know if JSON is still supported in the latest Framework 5 version or what was the last version it was supported in. Perhaps until Version 6 but can't find this info anywhere?

Picture of Oliver Foster
Re: Is JSON still supported in Framework 5+?
by Oliver Foster - Tuesday, 10 January 2023, 8:52 PM
 

Could you explain a little more, what you mean by the question 'Is JSON still supported?'

Adapt Framework has always used JSON to define the course structure.

Picture of Mike Stevens
Re: Is JSON still supported in Framework 5+?
by Mike Stevens - Wednesday, 11 January 2023, 2:26 PM
 

Hi Oliver,
So to explain a bit better my question was more about plugins and their "templates" folder files switching from ".hbs" to ".jsx" I just wanted to know if the latest framework 5 was still supporting the ".hbs" files in the "templates" folder when a course gets compiled. 

For example right now the adapt-contrub-textInput/templates file is ".jsx"  where as the adapt-contrib-hotgraphic/templates file is still ".hbs". So I would guess the newest framework is still supporting both formats but wasn't sure and curious if perhaps it will be removed in the next framework 6. I have to go through a lot of plugins from menus, ext., themes and components for this update so I am curious when exactly support will be dropped?

Picture of Oliver Foster
Re: Is JSON still supported in Framework 5+?
by Oliver Foster - Wednesday, 11 January 2023, 3:53 PM
 

Oh I see.

Handlebars is a templating engine for producing html strings from Handlebars markup and JSON data, we inject the resultant html strings into the DOM. After the initial template is rendered, we use jQuery to change the DOM if necessary from the Component's View.

JSX is a templating and rendering engine for producing DOM from JSX markup and JSON data. We use it to represent the entire state of the DOM from the JSON and leave it to make the changes required when the model changes. It reduces bugs and manual DOM change coding with jQuery.

They effectively do the same job, define a template, render it based upon some JSON.

Handlebars support is not planned to be dropped at all yet.

 

Picture of Mike Stevens
Re: Is JSON still supported in Framework 5+?
by Mike Stevens - Wednesday, 11 January 2023, 7:11 PM
 

Thanks Oliver for the background view of both Handlebars and JSX. I look forward to having a deeper look into JSX and good to know about support of handlebars too. Much appreciated!