What you are doing is fine-tuning the performance of your app before you're written it. Do the cleanest design you can to get the functionality you want. If there are performance problems, THEN start to tweak and optimize the code. Premature optimization is the root of all evil. Well, the root of MOST evil, anyway.
-- Joe B. On Thu, Oct 1, 2009 at 8:02 AM, Pynthon Pynthon <[email protected]> wrote: > Thanks, so if I'm going to build something like MySpace in web2py (just as > example) it would be better to put it into one file? And does web2py support > this or would take that a lot of tweaking? > > 2009/10/1 mdipierro <[email protected]> > > >> It is a tradeoff. If you have a lot of JS code that does not change >> over time you want it in a separate file so that it gets cached and >> not requested all the time. If you have very small JS than it is >> better to embed it in the page so that you save from checking with the >> server if the file has been modified since last download. >> >> On Oct 1, 9:51 am, Pynthon Pynthon <[email protected]> wrote: >> > Hello >> > >> > A long time ago I read something about putting javascript in one >> specific >> > page instead putting it in every page again. But why is this better? >> Because >> > if takes less size. Maybe there are also other good things about it but >> that >> > was the first one I thought about. However, do you think this is a good >> > idea? I'm just someone who is playing with web2py and other languages so >> > please do blame me if it is a wrong idea. >> > >> > Thanks >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

