I am developing a cloud service application in C++ that interacts with a database (SQLIte3) and manages user accounts, file uploads/downloads, and metadata. While most of the backend functionality is implemented in C++—such as account registration, authentication, CRUD operations, and password encryption—I am now at a stage where I need to integrate a web layer to provide remote access to the service.
The primary goals for this web layer are:
1. Remote Access: Allow users (and myself) to interact with the service from any device via the web, enabling file uploads, downloads, and management.
2. Scalability: While the application is currently for personal use, I want it to support multiple users and concurrent requests, even if that scenario remains unlikely.
3. Maintainability: Ensure the system is modular and straightforward to maintain or expand in the future.
4. Community Support: Choose a technology with strong community support, rich documentation, and readily available resources.
I am considering using Node.js or PHP for implementing the web layer because certain web-related tasks, like handling HTTP requests, session management, and file handling, are not ideal to implement directly in C++. My questions are as follows:
1. What are the key trade-offs between Node.js and PHP in terms of performance, security, and ease of integration with a C++ backend?
2. Are there specific frameworks or tools you recommend for building this web layer in either Node.js (e.g., Express.js) or PHP (e.g., Laravel)?
3. Considering my use case, which of these languages would be more suitable for integrating with a C++ backend, given that the primary focus is on handling file uploads/downloads, serving data, and managing user sessions?
I’ve reviewed some comparisons online but would appreciate insights from those experienced with similar projects or who have used these technologies for similar purposes. Thank you in advance for your advice!