Part of the EllisLab Network
   
2 of 3
2
Poll
Do you agree that we need an official AJAX library ?
Yes! please 135
NO! dont waste your time, CI team!! 21
being a noob doesn’t mean we should make a whole library for you! 7
Total Votes: 163
You must be a logged-in member to vote
We need official AJAX library from CI team !
Posted: 15 December 2008 01:54 AM   [ Ignore ]   [ # 16 ]  
Grad Student
Rank
Total Posts:  85
Joined  05-14-2007

Nothing is as good as XAJAX.  I see no reason to duplicate what has already been done.

Profile
 
 
Posted: 15 December 2008 02:00 AM   [ Ignore ]   [ # 17 ]  
Grad Student
Rank
Total Posts:  98
Joined  05-26-2008
usmc - 15 December 2008 06:54 AM

Nothing is as good as XAJAX.  I see no reason to duplicate what has already been done.

I disagree. I felt that XAJAX had quite a large footprint for something fairly straightforward.

 Signature 

Freelance Web Development - http://www.kirkbushell.com
Also development tutorials, blog posts and random musings.

Profile
 
 
Posted: 15 December 2008 03:46 AM   [ Ignore ]   [ # 18 ]  
Sr. Research Associate
RankRankRankRankRank
Total Posts:  4785
Joined  07-14-2006

Javascript should have no ties with a server side programming language. The only connection between javascript and a server side programming language is the url, and only when you add the programming language file extension to the url.

I think the concern; why do i need a whole library to add AJAX, is false because if you want you can extract the AJAX parts from the javascript libraries. If you apply this on CI you can say why do i need all those other libraries, i only want MVC. Maybe you don’t need the functionality while you are developing one part but you could use it for another part of you application/site.

Profile
 
 
Posted: 15 December 2008 10:36 AM   [ Ignore ]   [ # 19 ]  
Lab Technician
RankRankRankRank
Total Posts:  1040
Joined  06-19-2007
xwero - 15 December 2008 08:46 AM

Javascript should have no ties with a server side programming language. The only connection between javascript and a server side programming language is the url, and only when you add the programming language file extension to the url.

@xwero, would you agree that JavaScript gets tied up into our presentation to a great degree if we’re relying on javascript events to trigger AJAX calls and the like?  When considering the entire JS event model (onClick(), onContext(), etc.) we’re reminded that all those event handlers get built into our presentation logic when we’re coding our View parts of the MVC.  Whether this is a form or any other block level HTML element.  Many times these are dynamically constructed with a View file using dynamic data as well.  AJAX callbacks paths are often generated in this manner for View files.

If we consider these points, it makes sense that the client-server environment we are in requires some construction of the client-side foundation on the server.  That implies javascript and php will be linked up in some way.

I think you hit the nail on the head, it’s the choice in how one implements it that drives things. 

Choice in which library to choose is important to many of us. I’m personally hoping we’ll be able to do a drop-in replacement of jQuery once it is included.

Randy

 Signature 

My new therapist is working with me every day, the third one gave up… ohh

Profile
 
 
Posted: 15 December 2008 11:06 AM   [ Ignore ]   [ # 20 ]  
Sr. Research Associate
RankRankRankRankRank
Total Posts:  4785
Joined  07-14-2006

Randy the event handlers you are talking about are in the view which outputs html. It should not matter if the content of the view is generated by php, python or perl. As long as the html stays the same your javascript code doesn’t need to change.

Profile
 
 
Posted: 15 December 2008 11:39 AM   [ Ignore ]   [ # 21 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  496
Joined  07-16-2008
Randy Casburn - 15 December 2008 03:36 PM

onClick(), onContext(), etc.) we’re reminded that all those event handlers get built into our presentation logic when we’re coding our View parts of the MVC.

What!? Who still embeds JS into HTML!? Come on guys - this is almost 2009. JavaScript has no business inside your HTML views. It should stay in it’s own file - far away from our valid XHTML.

 Signature 

My Blog, C2D, PHP Videos, Résumé, Super .htaccess, Extra hooks, and MicroMVC

Profile
 
 
Posted: 15 December 2008 11:51 AM   [ Ignore ]   [ # 22 ]  
Lab Technician
RankRankRankRank
Total Posts:  1040
Joined  06-19-2007

Alrighty then Xeon - tell me how you’re going to press a button and invoke an AJAX response from the server without an onClick() javascript function within your HTML tag?

 Signature 

My new therapist is working with me every day, the third one gave up… ohh

Profile
 
 
Posted: 15 December 2008 11:51 AM   [ Ignore ]   [ # 23 ]  
Sr. Research Associate
RankRankRankRankRank
Total Posts:  4785
Joined  07-14-2006

Xeoncross when i responded i didn’t mean i still use those tag attributes but you need to link the event functionality somehow to tags. The way it’s done now is by using classes but they have to be added too. And that is what Randy meant by the link between php and javascript.

I try to use dom traversing as much as possible but sometimes you have to use classes or ids.

Are the attributes written out of XHTML? AFAIK they are still a part of the specification.

Profile
 
 
Posted: 15 December 2008 11:57 AM   [ Ignore ]   [ # 24 ]  
Lab Technician
RankRankRankRank
Total Posts:  1040
Joined  06-19-2007

binding the events the objects goes directly to my post to xwero by the way!

 Signature 

My new therapist is working with me every day, the third one gave up… ohh

Profile
 
 
Posted: 15 December 2008 12:12 PM   [ Ignore ]   [ # 25 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  496
Joined  07-16-2008
xwero - 15 December 2008 04:51 PM

Xeoncross when i responded i didn’t mean i still use those tag attributes but you need to link the event functionality somehow to tags. The way it’s done now is by using classes but they have to be added too. And that is what Randy meant by the link between php and javascript.

I try to use dom traversing as much as possible but sometimes you have to use classes or ids.

Are the attributes written out of XHTML? AFAIK they are still a part of the specification.

Ok, I just wanted to point that out.

As far as I am aware, event handlers built into (X)HTML are invalid and cause issues with some of our favorite browsers. Plus, it is much cleaner to tie events to DOM elements by a class or ID than it is to place a bunch of JS in the element.

<a href="#" class="ajax_popup">Modal</a>
vs
a href
="#" ONMYEVENT="MYJAVASCRIPTFUNCTION;"Modal/a
//JS is filtered in this forum. ;) 

Alrighty then Xeon - tell me how you’re going to press a button and invoke an AJAX response from the server without an onClick() javascript function within your HTML tag?

haha, I think you’ve been in PHP too long my friend. Go check out jQuery or Mootools and see what you can do with a good lib behind you. It will help you to break out of the old embeded JS ideals. (And yes, you can still use DOM and events even if you don’t have a JS lib)

 Signature 

My Blog, C2D, PHP Videos, Résumé, Super .htaccess, Extra hooks, and MicroMVC

Profile
 
 
Posted: 15 December 2008 12:17 PM   [ Ignore ]   [ # 26 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2280
Joined  07-30-2007

The EllisLab Team, namely Derek Allard, have already stated that some jQuery goodness is coming to CodeIgniter. I believe they are making use of it with EE2 - I would assume after EE2 is released we will see a new version of CI released shortly thereafter.

 Signature 

Follow me on twitter here.
MichaelWales.com | MichaelWales.info

Profile
 
 
Posted: 15 December 2008 12:18 PM   [ Ignore ]   [ # 27 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  496
Joined  07-16-2008

Well, as long as it isn’t built into CI that is fine with me wink

 Signature 

My Blog, C2D, PHP Videos, Résumé, Super .htaccess, Extra hooks, and MicroMVC

Profile
 
 
Posted: 15 December 2008 12:27 PM   [ Ignore ]   [ # 28 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2280
Joined  07-30-2007

I would assume it will be a library/helper - just like any other portion of CI, you won’t have to use it if you don’t want to.

 Signature 

Follow me on twitter here.
MichaelWales.com | MichaelWales.info

Profile
 
 
Posted: 15 December 2008 12:28 PM   [ Ignore ]   [ # 29 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  496
Joined  07-16-2008
Michael Wales - 15 December 2008 05:27 PM

you won’t have to use it if you don’t want to.

And I almost forgot why I loved CodeIgniter…

 Signature 

My Blog, C2D, PHP Videos, Résumé, Super .htaccess, Extra hooks, and MicroMVC

Profile
 
 
Posted: 15 December 2008 12:55 PM   [ Ignore ]   [ # 30 ]  
Lab Technician
RankRankRankRank
Total Posts:  1040
Joined  06-19-2007

Thanks for the clarification Michael.  That eases the mind some.

Randy

 Signature 

My new therapist is working with me every day, the third one gave up… ohh

Profile
 
 
   
2 of 3
2