[Zope] Best Practice for including Javascript in Zope Applications

Tim Nash thedagdae at gmail.com
Wed Jan 2 14:02:42 EST 2008


I am writing an application that uses extjs as the front end and zope
on the back and they work together really well.
I am using a webserver to server the extjs library and everything else
comes out of zope.  So far I have had no trouble with relative links
or files broken up in different locations. It may be because I have
fully committed to having an extjs front end. I typically serve a page
out of zope, it calls the extjs library as well as custom JavaScript
files. The web2.0 style page then makes multiple xhr calls back to
zope to load smaller html and json fragments. Works like a charm and
has the additional benefit of letting me cache the majority of the
front end in the webserver and in the users browser.

Have fun because you have just come across a wonderful
combination...extjs and zope!
Tim


On Jan 2, 2008 6:38 AM, Tom Von Lahndorff <tom at modscape.com> wrote:
>
> On Jan 1, 2008, at 7:20 PM, Matt Hollingsworth wrote:
>
> > Hello,
> >
> > I'm new to developing for zope, and I have a quick question
> > regarding some best practices when using Javascript in zope
> > applications.
> >
> > I would like to use Ext JS (http://www.extjs.com/ ) in an
> > application that I am writing.  It is a fairly extensive library, so
> > I didn't really want to copy/paste every single file into a dtml
> > method.  I looked all over the place for some discussion on this
> > subject, but only found things relating to plone (which apparently
> > has a javascript registry); however, I wish to stay away from plone
> > for this particular application.
> >
> > What should I do to use these libraries?  Is there a canned solution
> > for this sort of thing?
> >
> > Thank you much!
> >
> > -Matt
> > _______________________________________________
> > Zope maillist  -  Zope at zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> > http://mail.zope.org/mailman/listinfo/zope-announce
> > http://mail.zope.org/mailman/listinfo/zope-dev )
>
>
> You can ftp the files to a "static" directory on the file system and
> use LocalFS to access them.
> http://wiki.zope.org/zope2/LocalFS_______________________________________________
>
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>


More information about the Zope mailing list