开发者

cakephp prototype + jquery usage

开发者 https://www.devze.com 2023-02-16 10:51 出处:网络
We\'re using cakephp 1.2 version for one of our newly developing projec开发者_如何学Got, so would appreciate if you can help us with usage of Prototype and jQuery usage.

We're using cakephp 1.2 version for one of our newly developing projec开发者_如何学Got, so would appreciate if you can help us with usage of Prototype and jQuery usage.

  • Can we use both Javascript libraries together?
  • If yes, which one is preferable?
  • Can we work like, only use jQuery, not Prototype?

Earliest reply would be appreciated.


Yes, you can use both libraries together or only one of them. Prototype is integrated in cakephp1.2 as a helper.

But i prefer to program JS on my own and not to use the intern Helper.

If yes, which one is preferable?

This is your choice. Which lib. fits better to your project?

But, why you do not choose the new version of cakephp? There are a lot of improvements in it.


First Question : Yes you can use either or both libraries with CakePHP. All you need is to set it up in the layouts. Have a look at this article : http://book.cakephp.org/view/1594/Using-a-specific-Javascript-engine.

Note - However, if you don't make use of the JSEngine helpers, you can use pretty much any library you want without limitations. You can write you JS code in the view and use the JS helper to capture this and output to the layout

Second Question : Which one is preferable is totally up to you. Which one do you know how to use?

Third Question : See the first reply :)

Another Note! You're using an outdated version of cakePHP. 1.3 itself has been out for awhile and has some good features over 1.2. If this is a new project, I recommend you switch. Even cakePHP 2 is coming out soon.

0

精彩评论

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