SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Wizard wheeler's Avatar
    Join Date
    Mar 2006
    Location
    Gold Coast, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    getting started with mootools

    I've used javascript sparingly in the last few years, mostly sourcing little samples from those cheesy old sites with blinding advertising and times new romans fonts... I confess that I only know bits and pieces and have never studied anything much in depth.

    In the last few days i've become aware of some great javascript frameworks that I previously didn't even know existed. I started with prototype and thought that was the best thing since sliced bread, until I discovered mootools which is so tiny and yet seems to do all the things that I want... which is:

    - use an effect called slimbox which is a better alternative than using popups to show full sized images (for e-commerce situations). It also falls back to a direct link to the image should javascript not be enabled.

    - do what seems to be the stock standard ajax trick, requesting a url and replacing a div's contents with the result from the page. this has so many implementations im sure but i'm using it for stuff like "add to watch list" where an id is passed to a php page, a db query occurs and the result is shown on the page without a refresh

    - and the big one, prototype had a function called PeriodicalUpdater, which can be used to repeatedly call upon something. I want to use this to update details of an auction (eg. current high bidder) without a screen refresh.

    I have a couple of questions:

    1. I see that mootools can be downloaded compressed or not compressed. I don't quite understand the requirements to run a compressed js file. Is it safe to assume that almost any lamp server will understand it?

    2. My current theory for the recurring page update without a page refresh, was to basically run the same process as I would for "add to watch list" functionality except repeating say every 10 seconds or whatever, using mootools Periodical.
    a) Does anyone know if mootools has the equivalent of the decay option in PeriodicalUpdater in prototype? You could say the documentation is "lite"
    b) has anyone experienced using this function before, and if using with php/mysql the kind of resource usage that may occur?

    Sorry for the long-winded post... and to js purists who would lament the idea of using js frameworks without properly knowing the language all I can see is a massive shortcut to getting some cool stuff working!
    Studiotime - Time Management for Web Developers
    to-do's, messages, invoicing, reporting - 30 day free trial!
    Thomas Multimedia Web Development

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1. Compressed files don't require any special server configuration to run; it is just regular JavaScript that has been scrunched up into a tiny ball. Have a look at Dean Edwards' Packer tool to see what it does to the source.

    2. Haven't used mootools, sorry.

  3. #3
    SitePoint Wizard wheeler's Avatar
    Join Date
    Mar 2006
    Location
    Gold Coast, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    certainly is impressive turning the uncompressed mootools into the compressed mootools.... I would recommend mootools to everyone I think its such a great way to jazz up a site.
    Studiotime - Time Management for Web Developers
    to-do's, messages, invoicing, reporting - 30 day free trial!
    Thomas Multimedia Web Development


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •