donglu9898 2010-02-12 09:25
浏览 43

在Grails中重写php - 完全陷入困境! [关闭]

I have to re-write a few php pages in in Grails (don't ask why!). I have never done any php, so it's proving a little tricky.

Basically I have a html page which has a function in it that is executed every 60 seconds, and that .js creates a new XMLHttpRequest which then does xmlHttp.open("GET", "myphpfile.php", true);

I can get the .js to be called from the gsp no problem at all - but what on earth do I do with the php? I assume I could create a service which would do something similar, but can that be accessed from the .js?

Please help - I am totally stuck!

  • 写回答

1条回答 默认 最新

  • douer9399 2010-02-12 13:52
    关注

    Work out what the thing's meant to do, draw some pretty UML, write some documentation, then dump the PHP.

    Unless you properly understand what the system as a whole is meant to do, you'll end up trying to do PHP-style stuff in Grails which is a very bad idea. Writing it from scratch in Grails will let you use proper Groovy tricks (closures etc) and it will end up a better system.

    You'll also be left with some documentation, which is always nice.

    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘