React, Vue, Angular - eer attempted to make them work with SE?

    • 75 posts
    January 24, 2018 6:06 PM EST

    Has anybody ever attempted to use one of the most recent JavaScript frameworks, like React, Vue or Angular with SE ?

    I hear that some customizations have been successfully running JQuery instead of MooTools, but never heard about those others

    If anybody tried that, please let me know

    • Moderator
    • 6923 posts
    January 25, 2018 5:14 AM EST

    I had to Google this. Found that there's an API plugin (maybe there are more) that does allow what you want. https://www.socialengine.com/marketplace/app/socialengine-rest-api-plugin Best to contact them and check with some other experts such as Hire-Experts, SocialEngineSolutions, Webhive, SocialEngine Mobi. 

    • 75 posts
    January 25, 2018 5:48 AM EST

    That was not exactly what I meant but yours is a very good and smart answer, Donna! 

    Have any lucky man managed to marry you already? Otherwise count me in! :-D

    • Moderator
    • 6923 posts
    January 25, 2018 7:17 AM EST

    LOL. You don't know how many times I got asked that when I worked at fox and was the community manager as well as sales manager. Thankswish I knew more about what you need but perhaps a third party expert will answer. 

    • 75 posts
    January 25, 2018 7:32 AM EST

    I'm not surprised.

    You know the old wisdom: the road to a programmer's heart goes through his APIs....

     

    Apart from jokes: this API plugin might indeed solve many of our doubts and questions

    Other than with this plugin how do you normally handle a JSON response in SE? Can/would you make pages that are just a JSON response instead of an HTML page? Or how else?

    • Moderator
    • 6923 posts
    January 25, 2018 12:01 PM EST

    I'll copy and paste the answers I got as I wasn't sure so I asked. Since we are pretty swamped, perhaps this will help you figure things out and you can also check how the script makes the plugins in the developer sdk as it creates json files.

    Well, creating a JSON page is just using the built-in JSON functions provided by PHP.

    Regarding "Has anybody ever attempted to use one of the most recent JavaScript frameworks, like React, Vue or Angular with SE ? I hear that some customizations have been successfully running JQuery instead of MooTools, but never heard about those others"

    General answer, is yes. They are frameworks and/or libs. You can use them for your own modules. Specifically jQuery, I would assume you need to assign the `$` function since MooTools uses it, however other then that you can use it for your own projects

    • 75 posts
    January 25, 2018 12:37 PM EST

    LOL 

    I do know how to generate a JSON via json_encode function - my question was: how would the CMS return that JSON?

    Is a JSON page just a page like any one else for SE? You just adjust the headers and include the json inside the tpl file?

    Or is there a specific instrument / class / route / module to respond to an ajax call with a json?