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 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据