Reputation: 10071
I am going to start developing a webapp using php framework codeigniter. The app is going to do most of the database dealing using ajax/jquery. From what I know, I would be implementing the following steps to do a particular task
Now, my question is whether there is an ajax framework that can further simplify the implementation of steps given above. if not a framework, then may be a better approach to implementing ajax and php.
// This is part of view page
<a href="Delete User" onclick="deleteUser('<?php echo $userid; ?>')" />
Upvotes: 0
Views: 909
Reputation: 30766
Welcome to jQuery. This is not an AJAX framework (I have never heard of one of those) but it is a JavaScript Framework that incorporates some easy AJAX functionality.
Everyone talks about "integrating with the PHP framework!" like its some sort of crazy feature in PHP. JavaScript makes a request to a URL and does something with the response. That URL could be native PHP, CodeIgniter, a static file or bloody ColdFusion, it is all the same.
So if you are using CodeIgniter, in your view put:
$.get('/controller/method/param1/param2', function(data) {
$('div#someid').text(data.whatever);
}, 'json');
Upvotes: 4
Reputation: 4984
Codeigniter has a javascript class that might help avoid "the Mess" you spoke of.
http://codeigniter.com/user_guide/libraries/javascript.html
Upvotes: 0
Reputation: 18350
I don't really know what you mean by "AJAX framework" and whether you're talking about a clientside or serverside framework.
In the event you're looking for a clientside framework that handles client-server data synchronization, check out http://documentcloud.github.com/backbone/
Upvotes: 1