Quick question, looking at building an app with a realtime text editor along the lines of Quill.js with note editor built in node but rest of app to be Laravel Spark based, so need to be able to access the data in notes via PHP etc. For example it might be the content of the note, or it might be a section of the text that has been highlighted/tagged.
I’m not a developer, but the devs I’m looking at contracting are having challenges with this due to the different stacks. Has anyone had success doing things with Node and Laravel and could offer me any tips I could pass on, or help me understand the challenges here from another perspective?
Your post doesn’t really make it clear where Node.js comes in to play in the stack. But regardless, they should just communicate over a REST API, similar to how the frontend would communicate with the backend.
Thanks for your reply. From what I understand, they know how to send data back and forth but its more how I had suggested it might work by putting the editor into the same window as the rest of the front end rather than it running as a seperate app and sharing data. Maybe this attached mockup will help to explain:
It dramatically simplifies the real world example, but in essence you would have data from inside the editor that you would need to also reference in other parts of the app - for example I might want to show text that is highlighted in a note on another page. Or is the solution here that if you are building something that require a realtime editor it can’t be built with Laravel and everything should be built with Node rather than mixing stacks? I feel as if that wouldn’t make total sense, since I’m sure Google Drive for example must use a mix of tech (then again, they do open the text editor in a completely seperate page)
Would be really interested in your thoughts. Thanks in advance.
Instead of trying the dictate the technical aspects of the solution, why not just send out an explanation of what you want to accomplish and see what sort of results come back?
I have read your words several times and looked at your screen shot but things just don’t add up. Both PHP and Node.js are server side technologies. The idea of having a note editor built in Node.js for a web application just does not make sense to me.
There’s no reason your JS can’t open a WebSocket connection to a separate Node server to handle realtime collaboration with other users. This would actually be playing to each language’s strengths somewhat.
So you have some sort of WYSIWYG text editor; this is entirely a matter of JS running in the browser. And that the editor is written in JS doesn’t mean that it has to be served by node – PHP can serve JS as well, just like any other web content.
The editor can then communicate with your backend (or access the rest of the page) as usual via the hypertext transfer protocol (or the document object model respectively); JS provides built-in interfaces for that.
Sorry if it came across that way, its more I was jumping in at the current cross roads - while I did a bit of a search for some tools that might help, the developers asked to quote the project had complete freedom to work out the best way to do it - they got stuck finding an editor that could do what I need it to do, I found one which they said would but it runs Node.js - and here we are. So yes, of course I would be interested in how you would approach, all ideas welcome.
Most of the editor frameworks I’ve found seem to be based on Node. Have you built/seen anything yourself that works easily with a PHP backend?
Interesting, that’s kind of what I had assumed would be the case. Which is why I’m struggling to understand the complications a bit. Would definitely like to play to the strengths of whatever technology is used rather than force one to do something its not designed for.
Given the various views, I suspect its a language/translation issue with the developers since English is a second language for them - I’ve found a local developer I can sit down with who can hopefully help worth through this with me in more detail (because there may well be something in the spec that is causing the issue I could just remove and they might be able to go ahead in a way one of you has proposed above).
I suspect there are several technologies being mixed up here, without a full understanding of what they all do.