Slashdot Mirror


Web 2.0 Recipes With PHP + DHTML

An anonymous reader writes "Take a look at these full simple code examples for dynamic elements for your web apps, including: Ad boxes, Pop-ups, Spinners, and Tabs. Easy ways to show and hide content on the page." From the article: "Incorporating JavaScript into your page makes the page dynamic and creates a more compelling user experience. Users can get more data more quickly, look at information from different aspects, and seamlessly navigate the site -- and the site doesn't have to go back to the server for lots of pages. However, there's also a reason to avoid using JavaScript: browser compatibility. In the early days of flat HTML, Internet Explorer rendered pages differently from Netscape. Those problems were fixed, but when support for CSS was added, new compatibility issues arose. Now most of the CSS issues have been solved, but JavaScript compatibility issues have cropped up. These compatibility problems have no easy solution. You need to weigh the benefit of what the JavaScript is doing against the number of browsers you'll need to test against and support."

4 of 134 comments (clear)

  1. Hmmm.... by Anonymous Coward · · Score: 3, Interesting

    This will make for some interesting comments. Begrizzled hippies whining about Javascript. Puzzled newbies arguing the merits of PHP. Flamefests over ruby on rails and other frameworks. Etc.

  2. Re:Oh greaaaat... by radiotyler · · Score: 2, Interesting

    The double underlines thing drives me freakin' wild, man. The thing that bothers me about that is I think it's (un?)intentionally teaching people that the link that has been inserted into the article you're reading may not be endorsed by the site writing the piece, and getting people a bit paranoid about what they click on.

    Of course, this can all be cured by taking your information from "reputable" websites - but sometimes I like to visit the other side of the tracks, and it just makes me that much more cautious. Embedded ads and content just seem like a really bad idea to me. But what the hell do I know.

    --
    hi mom!
  3. Crap Code Alert by porneL · · Score: 2, Interesting

    This code is crap. Use of <a href="javascript:"> makes it same quality as <marquee><font color="#ggggg">OMG Web 2.0!</td></font>

    Unlike TFA, here are some resources worth reading:

  4. Why I left front-end web development by onlyjoking · · Score: 3, Interesting

    I spent years wading through the quagmire of DHTML/CSS/Javascript compatibility issues and eventually realised that it was a full time job getting it right. 'Trouble was the job went largely unrewarded as the end user was only interested in how pretty it looked and it's difficult to get a client to pay you properly for time spent working round compatibility problems. Eventually I got wise and realised M$ had screwed up the CSS and Javascript game beyond recovery and decided to concentrate my energies where my time would be rewarded. I've been working with Perl, PHP, MySQL and PostgreSQL ever since and haven't looked back. For front-end design I keep it simple - basic CSS and no Javascript. That way I can sleep at night and wake refreshed to concentrate on the aspects of web development which add real value to a site. "Web 2.0" won't tempt me back into the fray as IE5/6 issues will haunt web developers for many years yet, regardless of what Vista and IE7 brings.

    One area of web development I think is very much neglected is semi-dynamic web development with Template Toolkit and cron. The content of many dynamic sites only changes periodically so it can often be better to have templates generate static pages periodically from your database with a cron script instead of coding the whole site in PHP, Perl/CGI or whatever.