开发者

Rewriting php in Grails - Totally stuck! [closed]

It's difficult to t开发者_如何学Goell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

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!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜