douna2633 2011-07-03 08:59
浏览 24
已采纳

为旧的Web应用程序构建开发API

We have a popular web-app developed using CodeIgniter. Now we want to expose our data through a RESTful API.

Once we are done that we will rebuild the front end such that it merely acts as a client of our API.

People suggested that I should use NodeJS (or similar frameworks like SINATRA) for this API. I have few questions regarding this and I am sure experience devs can help.

If I chose NodeJS where do I put the business logic ? In the NodeJs code itself? Or does NodeJS code merely act like an interface between API clients and business logic implemented in more complicated framework ?

I am assuming here that the existing code is not much reusable.

  • 写回答

2条回答 默认 最新

  • doubo1871 2011-07-03 09:09
    关注

    I'm not sure if NodeJS is the right tool to use in this case (sure, it's cool to say "use nodejs" these days, but unless the tool fits the need, don't use it).

    Have you looked at REST frameworks for PHP that are out there? e.g. FAPI

    EDIT: You should also read: https://stackoverflow.com/questions/238125/best-framework-for-php-and-creation-of-restful-based-web-services

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

报告相同问题?

悬赏问题

  • ¥15 高价求中通快递查询接口
  • ¥15 解决一个加好友限制问题 或者有好的方案
  • ¥15 关于#java#的问题,请各位专家解答!
  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?