Welcome Guest, Not a member yet? Register   Sign In
Google AJAX library API and The Future CI JavaScript Functionalities
#11

[eluser]WoOzY KinG[/eluser]
Quote:This could work out very well, but it really depends on how many sites use google’s api…

That's why I'm spreading the word ;p

No seriously, back to my original question, could this be a fairly good idea to have this API loader as an OPTION of loading jQuery lib in CI?
#12

[eluser]Michael Wales[/eluser]
Quote:No seriously, back to my original question, could this be a fairly good idea to have this API loader as an OPTION of loading jQuery lib in CI?

Well - seeing as how everything in CodeIgniter is optional - sure.

More than likely it will be implemented as such: jQuery and everything is provided with the framework and the library will make use of the local copy unless told otherwise.

A quick extension of the Javascript class and you could use a version of jQuery stored on a server in a bunker 20 leagues under the sea.
#13

[eluser]WoOzY KinG[/eluser]
@michael Wales:
Quote:Well - seeing as how everything in CodeIgniter is optional - sure.

But I also have mentioned a doubt:
Quote:What I’m not sure is whether the integration of jQuery and CI has resulted some changes in jQuery’s core to suit the structure of CI.

Or is it sure that CI won't touch the core of jQuery?
#14

[eluser]Sarre[/eluser]
Quote:No seriously, back to my original question, could this be a fairly good idea to have this API loader as an OPTION of loading jQuery lib in CI?
Having options is always a good thing :-p

Isn't loading a script through CI already possible? And if not, it's very easy to implement...

But I don't think writing javascript through CI is good thing:
1. As GSV Sleeper Service said, you'll end up with obtrusive scripts
2. you won't really learn javascript or jQuery. I'm a Mootools-adept, but those libraries can both do amazing things. And those libraries are both very easy to master. So I think it's way better to just learn some basic library-scripting. That will allow you to do far more than the CI-implementation will allow you to do (unless they implement the full api :-o)...

So having it as an option is ok, I just won't use it.
#15

[eluser]Sarre[/eluser]
Quote:What I’m not sure is whether the integration of jQuery and CI has resulted some changes in jQuery’s core to suit the structure of CI.
I see no reason at all why this would be the case.

It would be counterproductive. If jQuery has code changes, you might have to recode parts of CI's implementation...
#16

[eluser]WoOzY KinG[/eluser]
Quote:2. you won’t really learn javascript or jQuery.

Right!!! Really, I don't really want to learn js or jQuery unless I needed certain knowledge background.

I see the code given in the announcement (the one at the beginning of this thread as well) is pretty convenient to use and I believe the methods (functions) of the javascript/jquery classes (or helpers? I'm still not sure what form they will come as) will grow to do more jobs Big Grin
#17

[eluser]WoOzY KinG[/eluser]
@Sarre: I agree with your opinion, but what IF? Even though I hope not.
#18

[eluser]Sarre[/eluser]
Quote:Right!!! Really, I don’t really want to learn js or jQuery unless I needed certain knowledge background.
But it's fun! :-) Really!!!

Quote:@Sarre: I agree with your opinion, but what IF? Even though I hope not.
Then we're all screwed :-p

No, I guess it will depend on what exactly they changed. Maybe you'll be able to use google's api, maybe not. No way to tell right now, unless someone of the CI-developers enlightens us...
#19

[eluser]WoOzY KinG[/eluser]
Quote:unless someone of the CI-developers enlightens us…

That's what I'm waiting for...
#20

[eluser]elvix[/eluser]
I don't see any integration between CI and javascript going on here. Javascript is client-based, CI is server-based. And the examples listed in the first post are simply shortcuts that generate javascript functions and a link (to include the plugin file) that would be inserted in your rendered HTML page (likely the HEAD).

@GSV: that's not how JQuery works (which is the library I believe EE is including with CI). You specify the DOM elements and events you want your javascript functions to run on, and it makes the magic happen without your having to insert onclick codes and the like everywhere. It's a fast, easy way to work with Javascript. You will love it. Smile

As for the libraries, Google has said that they will maintain downloads of ALL versions of these different libraries, so when you want to upgrade your JQuery version, you simply point to a different file, which presumably, users will have cached as well (if other sites they visit are using that version). No editing of core files is allowed, since that would break the whole idea of sharing these "common" files.

Don't know if I'm going to try it out, but it seems like a very cool idea, especially as we rely more and more on these javascript libraries like JQuery.




Theme © iAndrew 2016 - Forum software by © MyBB