PHP to NodeJS

As the title suggests, is it currently possible to switch a PHP wappler project to NodeJS server model without breaking data bindings etc. or would it be best to start a new NodeJS project?

Conversion is not yet possible, we will be adding a converter eventually but still 100% automatic conversion is difficult.

If you are starting a new project, best is to go for NodeJS directly.

3 Likes

What I have done @max_gb is start from scratch with NodeJS. I have kept my php project and just started over with NodeJS so that I can learn and understand it better.

While I understand that a conversion tool would be awesome for those that already know NodeJS, for me, I do not know it so I like to take baby steps.

It also gives me a chance to go back through old Wappler tutorials that I have not looked at for a while and appreciate how far I have come in learning. :slight_smile:

2 Likes

Bump

Having started a new project in NodeJS I’m starting to appreciate how much better some things are in it, particularly layouts and partials. @jonl one for you: I LOVE NodeJS!

I have several long-standing PHP projects that I created before NodeJS was implemented in Wappler and would love to recreate them in NodeJS. The major stumbling block is the conversion of Server Actions of which I have hundreds across several projects. A convertor of some description would be thoroughly appreciated!

I completely acknowledge that some actions are complex and have to cope with things like different paths because of the difference in file structures but would it be possible to create a convertor for easily transferrable actions (setting values, conditions, repeats, (queries?) etc. while adding a warning flag for steps that have been converted but need some manual checking, maybe to check that the file paths are correct for an image upload. Doing so would save the majority of the time associated with conversion while not having the complexity of handling every use case. Just a thought…

1 Like

Its all just JSON.
You can play around with copy pasting from PHP files to Node files and see what works and breaks.
Once confident, you can do it faster.
Unfortunately, you will have to do it hundreds of times manually.
(OR, you can write an app to upload PHP SA files and get NodeJS ready SA files, because its all just JSON :man_shrugging: )

Same as sid.

Its all just one big json file. You just need to take into account that some modules are not available in node(argon) so where it’s used it will end in error.

Apart from that if you are careful you shouldn’t have problems.

But be aware. You might open a few bug reports in the forum that are not bugs really but a problem with the migration you did.

Thanks @sid @JonL
I know they are just JSON files which is part of the reason I don’t quite get why a conversion tool would be hard to build into Wappler. On many threads, including those comparing Wappler to Bubble, one of the biggest draws of Wappler is the agnostic nature of the platform. To truly benefit from this, surely users need to be able to adapt to the newest, most suitable technology available.

At the moment, within Wappler, this seems to be NodeJS, but who knows what it will be in 1 year, 5 years or 10 years. People building with PHP just a couple of years ago would have been pretty confident in Wappler only to see NodeJS come out and they are now facing the prospect of manually going through hundreds of files. Imagine the value of a converter that could move from one technology to another, whether now from PHP to Node or in the future from Node to whatever comes next…

1 Like

Don’t get me wrong. I find it useful.
I was just pointing out that you could start already if you need.

Regarding the complexity I guess custom modules could be a problem now.

1 Like