donglinxi1467 2015-02-14 20:29
浏览 41
已采纳

Symfony2 + NodeJS + AngularJS?

I want to start the development of an real time and single-page application with authentification, actions, and notifications.

Is it possible to make the back-end treatment with Symfony whom I know well, and to add NodeJS / AngularJS by above?

This plan will help you has to understand me. Is it possible to apply it, and is it a good practice?

enter image description here

  • 写回答

2条回答 默认 最新

  • doumi5223 2015-02-14 21:02
    关注

    First, I believe we need to clarify some misunderstandings regarding the real time and AngularJS. AngularJS $http and $resource use Ajax in the background.

    To have real time communication where the server pushes information to the client (instead of responding to Ajax calls), you would have to use Websockets. There are several alternatives in this domain, for example, socket.io integrates very well with nodejs, Ratchet socketo.me is specific for PHP, or you can use a 3rd party like Pusher through github.com/pusher/pusher-angular.

    Second, you can certainly invoke PHP scripts from nodejs, however, unless you have a very specific reason to do so, it seems to me that it defeats the purpose of using nodejs. If you do not have such a requirement on use nodejs.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥30 Matlab打开默认名称带有/的光谱数据
  • ¥50 easyExcel模板 动态单元格合并列
  • ¥15 res.rows如何取值使用
  • ¥15 在odoo17开发环境中,怎么实现库存管理系统,或独立模块设计与AGV小车对接?开发方面应如何设计和开发?请详细解释MES或WMS在与AGV小车对接时需完成的设计和开发
  • ¥15 CSP算法实现EEG特征提取,哪一步错了?
  • ¥15 游戏盾如何溯源服务器真实ip?需要30个字。后面的字是凑数的
  • ¥15 vue3前端取消收藏的不会引用collectId
  • ¥15 delphi7 HMAC_SHA256方式加密
  • ¥15 关于#qt#的问题:我想实现qcustomplot完成坐标轴
  • ¥15 下列c语言代码为何输出了多余的空格