Thanks for sharing how you do that, Kjell. That was definitely helpful. I know I will eventually decide on one of the major frameworks to adopt permanently.
But sometimes, you're sitting lazily at the PC on a Sunday afternoon, reading blogs or whatever, and you come across a Javascript function that you want to add to some permanent library somewhere, and this function isn't in whatever Framework I adopted, so I add it to a central generic utility JS file that grows and grows (and of course shrinks sometimes when I realize I've added junk to it as well.). What prompted my post originally is when I ran into this page: http://www.dustindiaz.com/top-ten-javascript/. Even though it's over a year old, there's a couple of handy things in there, so keeping organized allows one to, on the fly, add something useful that one runs into on a website. On Apr 6, 1:46 pm, "Kjell Bublitz" <[EMAIL PROTECTED]> wrote: > I put framework related files into one directory under /js/ > Like jquery + all the plugins i use. > > I name the folder usually after the frameworks name: yui, prototype, etc.. > > /js/jquery/jquery.core.js > /js/jquery/jquery.cookie.js > /js/jquery/jquery.tooltips.js > > So the top folder is usually empty, but i put there my .htacces for > handling all JS requests and redirect them to my php script for gzip > compression and cache settings. > > There is only one javascript file on the app/webroot/js/ root, > and thats the one with my custom code. > > It is usually named after the projectname. > > /js/.htaccess > /js/compression.php > /js/myproject.js > /js/prototype/prototoype_version.js > /js/prototype/event-selectors.js > /js/prototype/datepicker.js > > For your described case of using js-files outside: I never work this > way. I put everything there that i need for the app. If i need it > outside, i just copy it. > > The other way around is: If there is a vendor-app that i include and > it has own javascript files i move them to the cake app/webroot/js > directory for consitency. But i never had it that way either. > > Lets say i have javascript functions that i only need on the profile > action of my users controller i simply extend the filename like so: > > /js/myproject-userprofile.js > /js/myproject-eventcalendar.js > etc.. > > For me, this is perfect to manage. > > On 4/6/07, beetlecube <[EMAIL PROTECTED]> wrote: > > > > > > > I know that many Cakephpers use frameworks/libraries like Prototype > > and JQuery. > > > What about if you come across some general purpose Javascript > > functoin and you add those to a "common.js" file that you keep > > accumulating to ? > > > And I'm talking about a common.js type file that you might use even > > *outside* of your CakePHP websites. > > > If you keep this general purpose common.js file inside you app/js > > directory, but you also use *elsewhere*, then pretty soon they become > > un-Synchronized, like if you forget to make a copy of one to the other > > location after making changes to only one of them. > > > I think it's a common challenge some of us face -- or not. > > > Wondering what you guys do. > > > Steve > > -- > Regards, Kjellwww.m3nt0r.de --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---