Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

How-To On Ajax Code To Show Movies and Slide Shows

Zonk posted more than 6 years ago | from the showing-them-around dept.

Media 73

An anonymous reader writes "Sites like Flikr and YouTube show just the tip of the full potential for media on the Web. An IBM DeveloperWorks article provides some easy implementations of video and image browsing that you can use in your own project. Learn how to combine media with technologies such as PHP and Ajax to create a compelling experience. All Sample code is made available, and if you're into Mashups the site's Mashup resource space should have everything you need to create a Mashup of your own."

Sorry! There are no comments related to the filter you selected.

Really? (-1, Troll)

Anonymous Coward | more than 6 years ago | (#21135079)

No, please.

Confusing parser error... (0, Redundant)

Tetsujin (103070) | more than 6 years ago | (#21135095)

Ah, I get it... I thought the headline was saying something like this:

"There will be a how-to on Ajax code. The how-to will show movies and slide shows."

It was like, that's nice... a well-made how-to I guess... But this is a how-to that tells you how to write AJAX code, such that said AJAX code will be able to show movies and slide shows...

Re:Confusing parser error... (0)

Anonymous Coward | more than 6 years ago | (#21135117)

*yawns*

Re:Confusing parser error... (0)

Anonymous Coward | more than 6 years ago | (#21136131)

I thought the headline was saying something like this:

"There is a how-to guide on Ajax. The guide will show you how to use AJAX code to show movies and slide shows"

I thought, oh, nice. I would like to learn to incorporate movies and slide shows into my sites. I shall proceed to click this link.

And here I am.

What are you doing here?

Re:Confusing parser error... (2, Insightful)

ObsessiveMathsFreak (773371) | more than 6 years ago | (#21136807)

But this is a how-to that tells you how to write AJAX code, such that said AJAX code will be able to show movies and slide shows...
I speak for many when I say: I sincerely hope not.

Great, more Ajax (5, Insightful)

The_Mystic_For_Real (766020) | more than 6 years ago | (#21135109)

I suppose the 12 year olds creating Geocities pages have grown up and want to incorporate all the extravagant flash into their more grown up web pages.
We really need to get back to simple, clean cut pages that display the information and resources that your site is offering. The trend towards flashier
page is rapidly decreasing the utility of the web while increasing overhead and security issues. Simple can be beautiful, and it is almost always useful.

Re:Great, more Ajax (3, Insightful)

whiskey6 (1172575) | more than 6 years ago | (#21135255)

See, this is where I disagree with you. What we don't need more of are these clean, simple sites that you long for. Clean cut is great, but clean a shave is far better, as demonstrated on this flickr page: http://www.flickr.com/photos/14815126@N03/show/ [flickr.com] (NSFW) What's not to like?

Re:Great, more Ajax (0)

Anonymous Coward | more than 6 years ago | (#21144135)

That's great, but it ain't the web. It's flash. That doesn't mean it is bad, or that it is useless, but you should call it what it is. Many of the ways that I use the web completely break down and fail to work when I follow that link. These people want to have it both ways. They want to write interactive flash apps, or AJAX, are Java applets, and pretend that it is still a web site just because it is inside a browser window. That's BS.

Re:Great, more Ajax (0)

tehcyder (746570) | more than 6 years ago | (#21155259)

Why's that link NSFW? Do you work in a Saudi Arabian mosque? Or did I miss something?

Re:Great, more Ajax (5, Insightful)

Bonewalker (631203) | more than 6 years ago | (#21135261)

It is my understanding that Ajax is really about bringing new/fresh data based on things like user-input without having to reload the page, thus making the web experience much faster and more user-friendly. So, it would seem to me that it doesn't necessarily mean the page(s) or site(s) can't be simple and useful regardless of whether or not they incorporate Ajax. Am I wrong on this analysis?

Re:Great, more Ajax (1)

cyphercell (843398) | more than 6 years ago | (#21135329)

I'm inclined to think along those lines also. Seems to me that if Javascript is W3 compliant, as is xml, then we ought to use it to rid ourselves of things like silverlight, flash, or (insert obscure browser plugin here).

Re:Great, more Ajax (1)

JebusIsLord (566856) | more than 6 years ago | (#21135395)

I'm really torn on this one... javascript is compliant, yeah. i also hate it. HATE. WPF/C# is soooo much easier to work with for this stuff. But browser plugins are bad, as is proprietary code. But Silverlight works on all platforms. Argh! I'd probably use Ruby on Rails for most ajax web-apps, but for really interactive stuff, its gonna be Silverlight. Flash? Blech.

Re:Great, more Ajax (1)

Kristoph (242780) | more than 6 years ago | (#21140855)

But Silverlight works on all platforms.

It runs on Windows XP, Vista and Mac OS X. The Linux version is an open source effort.

You do understand this is a Microsoft product and so is subject to 'no business case' discontinuation of versions for Mac OS X and Windows XP. Yes, Flex is not as good as Silverlight but at least Abobe does not have a vested interest in discontinuing versions of their product in an attempt to hurt competitors.

]{

Re:Great, more Ajax (1)

heinzkunz (1002570) | more than 6 years ago | (#21135701)

You are right, Ajax enables some improvements in usabilty that simply aren't available without Ajax. However, the grand parent posted in response to the summary, which says: "Sites like Flikr and YouTube show just the tip of the full potential for media on the Web."

In this context, I totally agree the the GP. Flickr and YouTube don't show the tip of the full potential, the show a reasonable usage of Ajax, and that's why they are successfull. Add more Ajax, and these sites will become less usable.

Re:Great, more Ajax (2, Interesting)

polaris878 (716143) | more than 6 years ago | (#21135717)

Am I wrong on this analysis?


Somewhat... Yes Ajax can make a web page feel more like a computer program. The problem with Ajax is that it's based off of JavaScript, which is clunky, bloated, and insecure. The fact is that you can deliver these web applications in a much faster way. I know I will get criticized, modded down or whatever, but that is one of the huge advantages of .NET. You can create these interactive web pages using something like C#. If you are looking for something not Microsoft, you can use Java/JSPs/JavaFX or Flash. IMO JavaScript is just junk. JavaScript needs a replacement/upgrade or whatever

two words (2, Informative)

Hooya (518216) | more than 6 years ago | (#21137327)

apples and oranges.

it might surprise you that when you're using C# for creating these interactive web pages, that it's just acting as a javascript 'translator' in the sense that you do end up creating and sending javascript to the the client browser. before you dismiss javascript as bloated and insecure, and attribute all the supha cool interactivity to .NET, you may want to check the color of the cool aid.

and never, ever, suggest JSP or C# as a replacement for javascript when talking about client (browser) programmability. might help in getting people to take you seriously.

Re:two words (1)

WebCrapper (667046) | more than 6 years ago | (#21139015)

I know I'm late to this argument, but I couldn't agree more.

Any developer thats been working with .Net for long enough to cause a stack trace should know this. It dumps about 3 pages of Case and If/Else statements on the screen.

On top of that, .Net only speeds up development by dumbing down the UI process (drag'n'drop) and automagically "programming" elements for you. Look at the dump next time and you'll see stuff you would normally do inside PHP and other languages.

Re:Great, more Ajax (1)

wralias (862131) | more than 6 years ago | (#21137477)

The problem with Ajax is that it's based off of JavaScript, which is clunky, bloated, and insecure.
I don't agree with you on one single point here. There is nothing insecure about JavaScript. The insecurity is in your web app running on the server, your browser's JavaScript interpreter, or the OS you are using. I don't even know what clunky means. Maybe what you are trying to say is that JavaScript is slow. Well, it's not that slow. Browser rendering is slow. That is pretty much what causes JavaScript to seem slow. You can test this by profiling code that does and doesn't interact with the DOM. Please, look at the libraries that have been developed for JavaScript and tell me it is bloated again. My problem with JavaScript is quite the opposite - it has too few native features. So many frameworks try to make up for this by providing more methods on native types like Array, on the DOM, or for Ajax or DHTML. God, languages like PHP have every damned function to do with an array that you could ever imagine. Not JavaScript. You get about 10 methods and that's it - you're on your own. I just don't see how it is bloated.

IMO JavaScript is just junk. JavaScript needs a replacement/upgrade or whatever
Excellent observation, backed by irrefutable evidence. Now I know why major players like Yahoo and Google shouldn't have used JavaScript to do thinks like Google Maps or Yahoo Mail. God, what a bunch of retards. Say, why don't you go and write a replacement, and then get the [however many] browsers to implement it? Surely your implementation will be perfect, will be adopted by every browser, and will be interpreted the same way by every browser. Please, learn JavaScript. It's fun. You will like it. Just because there are 1,000,000 idiots writing "My First JavaScript" doesn't mean that JavaScript sucks. It means that it is easy to learn. And that is true, to a point.

Re:Great, more Ajax (0)

Dragonslicer (991472) | more than 6 years ago | (#21137523)

The problem with Ajax is that it's based off of JavaScript
Ajax is based off of JavaScript as much as LinkedList is based off of C++.

Re:Great, more Ajax (1)

LiquidFire_HK (952632) | more than 6 years ago | (#21141781)

What other options do you have? JavaScript is the only widely-supported client-side scripting language. It's even part of the name "AJAX" - the "J" stands for JavaScript.

Re:Great, more Ajax (1)

TheRaven64 (641858) | more than 6 years ago | (#21141477)

The problem with Ajax is that it's based off of JavaScript, which is clunky, bloated, and insecure
I've been using JavaScript a bit recently for a project that is not related to the web. JavaScript is actually a very nice language to use. It's a clean prototype-based OO language. It's not quite as clean as Self, and the syntax is a little less readable, but it's close. It has all of the standard things you'd want from a language (introspection, closures, etc.) and all it really lacks is a clean Lisp-style lambda operation (you can force a beta reduction via a function call returning a closure, but it's a bit messy).

The core language is very small (not as small as Self or Io, but you can't have everything), and the spec defines a small number of objects in the core language. The DOM stuff is required in a web browser for accessing the document, but it's not particularly big. Not sure where you get bloated from.

As to insecure, that's an interesting comment. It runs in a VM, and so any interaction with the system is mediated by the web browser. Unlike ActiveX, any insecurity comes from poor implementation, rather than poor design.

Re:Great, more Ajax (3, Insightful)

chris_7d0h (216090) | more than 6 years ago | (#21136243)

Asynchronous Javascript and XML (or in practice XmlHttpRequests using any kind of text based wire format) are a nice addition and if used as pure decorators on top of sites driven by server side markup generation, then it is a good thing. The issue I and others have is that what "Ajax" seems to also imply when applied by sites in practice is a heavy reliance on a lot of client side DOM manipulations.

A site designed around the notion that as long as "Firefox and IE" can morph the bootstrap HTML page through an infinite number of morphs to something completely different, then the site is good. Those kinds of sites are neigh impossible to use via Wget, perl, lynx or any client not having:

1) A Javascript engine
2) A DOM engine
3) a special variant of A and B combined in such a way that they replicate the same quirks (attributes and behavior) inherent in IE and Mozilla.

So to sum it up, I don't think anyone has anything negative to say about requesting data fragments as an alternative to doing full posts/gets to the server. It's when people are being forced to one of a select few specific applications in order to use the web that irritation starts surfacing.

Woooah there dobbin. (0)

Anonymous Coward | more than 6 years ago | (#21138447)

Those kinds of sites are neigh impossible to use via Wget, perl, lynx or any client not having:
Straight from the horse's mouth.

Re:Great, more Ajax (2, Insightful)

Talchas (954795) | more than 6 years ago | (#21136351)

Besides the issues others have mentioned, many AJAXy sites play havoc with the back button, and very few support open in new tab or open in new window. The same issues can lead to problems with bookmarks.

Re:Great, more Ajax (0)

Anonymous Coward | more than 6 years ago | (#21144193)

Not to mention page search, copy+paste, archiving(which is related to search engine indexing), and so on. Slashdot gets it right though(amazing, I know). If you turn javascript off then you get the whole comment thread flat. You can search it, you can copy stuff, all of the links are regular links which you can open in tabs, and you can copy threads for archival purposes easily. Most other sites that do AJAXy stuff fuck all of this up.

Re:Great, more Ajax (1)

spanielrage (250784) | more than 6 years ago | (#21136517)

Agreed - at the very least, AJAX helps minimize the number of page refreshes required on a particular form. I find that as I add more AJAX code to our web application, I'm thinking more about client-side (browser-side) and how I could give the user a better experience. We don't have any flash, video, or other graphics done with AJAX.

It's all about exploiting the browser a little more, handing some of the workload over to the client.

AJAX also provides the ability for offline-mode applications (see Google Gears).

Re:Great, more Ajax (1, Insightful)

Anonymous Coward | more than 6 years ago | (#21136631)

The theme in this discussion is that "Ajax" can be OK, if used extremely carefully. The reason there is so much hate for Javascript/Ajax is that most (99%+) uses of Javascript/Ajax are completely incorrect and broken (especially with regards to usability). For every "correct" implementation such as Google Maps, there are another 10000+ websites which have broken implementations or very poor design.

Data and layout separation are very important, and this is often overlooked with Ajax/Javascript code. If Ajax is reading data from an XML document that is constantly updated, you still have a form of data/layout separation. But a lot of websites have inlined Javascript DOM code which writes the HTML document in-place using Javascript. Therefore no data/layout separation exists. The site either works or it doesn't depending on whether you have a bloated and "expensive" (system resources) Javascript engine. Breakage of the back/forward buttons on a browser is also a huge problem with people using Javascript and Ajax. These buttons are VITAL to web usability.

As for Flash, there is nothing positive to say for it. It COMPLETELY breaks usability, has huge overhead and is proprietary. The real problem is recreating GUI components instead of using native controls/buttons/etc to the parent system. Content/layout separation barely exists - and even then, no one adheres to this separation. Back/forward buttons are broken. Standard accessibility features are non-existent and do not tie in with the rest of the operating system. There is no need for Flash at the moment except for embedded video... something HTML5 will fix. Hopefully from this date forward, the need for Flash will be non-existent.

Most people can't even get basic HTML/CSS web usability right. If you can't understand web usability in terms of HTML/CSS, you have *NO* hope at getting it right with Javascript/Flash. You'll just dig yourself into a deeper hole.

Re:Great, more Ajax (1)

x_Curious_x (1068840) | more than 6 years ago | (#21140803)

You are correct. Ajax used where appropriate is soley to give a better user experience and present data to the user more intuitively than clicking everwhere to get it. To the parent, some of us 12 yr olds that are grown now(24) and use the tools available DO understand this.

Re:Great, more Ajax (1, Insightful)

Anonymous Coward | more than 6 years ago | (#21135317)

why was this modded insightful? i think it's just a bitter, poorly thought out response. what's so bloody horrible about using AJAX in a context like this? it makes perfect sense, especially if you actually spend some time to extend things to allow say, photo commenting w/dynamic updates....as a photographer i see a lot of use for something like that - say if i wanted to keep clients updated throughout the day on an important shoot..they'd see the freshest updates and we could comment back and forth on particular images. it would certainly save me time in the evening. in fact, it has - i've already written something more fleshed out than the example that does just what i spoke about...and it's saved me a lot of time(which makes me money) and has made some of my toughest clients infinitely happy. now they can play backseat driver without me having to be involved while they're shouting directions. so to speak.

and not everyone wants the web to go back to 1992...simple is often pointless, especially if commerce is involved. you think the old saying a picture is worth 1000 words is a joke? that's why people add "flash", because it sells. but you of course cannot be swayed by flash and bling, i'm sure...right?

and also, it's not like this example is horribly insecure, or resource intensive....so what are you really going on about? it's nonsense at +4

take some antidepressants and go outside...geez

Re:Great, more Ajax (0)

Anonymous Coward | more than 6 years ago | (#21143999)

People like you are the cancer killing the internet.

Re:Great, more Ajax (1)

JamesRose (1062530) | more than 6 years ago | (#21135323)

The main problem with this cunning plan of yours of course, is, we've been there, smart people built sites to provide information, it worked really well. It worked so well infact, that it attracted companies, who attracted the public, and as with all things, the collective IQ dropped to zero. The reason we need AJAX is because the number of webpages around is increasing hugely, while the amount of content to put therein, is dwindling, to a point where sites like PC World take 15 pages on one of those stick-it-in-a-template-and-publish top 15 articles.If there was no flashy code attracting your attention to how the creator of the page looks 20% like sienna miller then people would be able to compile all these sites into one page. In fact if we're going down that road, due to the way facebook works currently, you have to go to each person's profile to see them say the same thing over and over, but a simple database where they put their interests in, could provide a way for you to input the 20 people's names you want to know about and you'll get a tally of how many of these people are in fact My Chemical Romances' biggest fan ever. IMHO companies are too afraid that people may not scroll down, so they put everything on a new page, and too many people are allowed to be suckered into social networking while they're relentless pounded with popup ads directed demonstrating just how much google has been spying on you, but fortunately, the adds look really good now- We've got some really cool AJAX to code them with ;)

Re:Great, more Ajax (2)

updog (608318) | more than 6 years ago | (#21135337)

Oh, so I suppose sites like Google Maps, Gmail, Flickr, etc etc are all about "extravagant flash" ?

Like anything else Ajax can be abused, but no one can refute that it powers many very useful, successful, and popular sites.

Get off my lawn! (0)

msimm (580077) | more than 6 years ago | (#21135361)

Damn kids.

Re:Great, more Ajax (1)

lordsid (629982) | more than 6 years ago | (#21135385)

You just dated yourself. Twelve year olds don't know what geocities is. Its myspace now, however sad that is.

Re:Great, more Ajax (0)

Anonymous Coward | more than 6 years ago | (#21135407)

I'm from Ork, you insensitive clod!!!

Re:Great, more Ajax (0)

Anonymous Coward | more than 6 years ago | (#21135525)

this one's fairly clean, simple. check out that source. as for Ajax.... does the gwt count?

http://www.gochongo.com/#Surf!Project!448542 [gochongo.com]

Re:Great, more Ajax (1)

GWBasic (900357) | more than 6 years ago | (#21135539)

The trend towards flashier page is rapidly decreasing the utility of the web while increasing overhead and security issues.

Which is why I hate web-based slide shows. They either switch the slides too fast, or take too long to read.

Re:Great, more Ajax (1)

jo42 (227475) | more than 6 years ago | (#21136107)

KISS(S)

Keep It Simple Straightforward (Stupid!)

Re:Great, more Ajax (0)

scifiber_phil (630217) | more than 6 years ago | (#21136195)

Amen, brother.

You are a geezer (1)

wralias (862131) | more than 6 years ago | (#21137279)

I'm surprised at the number of geezers who really think that using JavaScript or Flash on a web page is bad. I work at a web company, and there are some "web 1.0" holdouts there who are totally lost with client-side programming. They've been doing Cold Fusion, Perl, C++, and Java all their lives and think that a plain text-based website is awesome. They also believe that UI guys don't know shit about programming. Well guess what - I'm a UI guy, and I make as much if not more money than the average server-side programmer or "software developer." Why? Because what I do is all about first impressions. Think about it: is a plain text website really good enough for a Fortune 500 company? It might have been good for your BBS in 1991, but that was then and this is now. Huge reputations are at stake, and they are not going to be trusted to people who are in denial about the fact that the web industry is changing.

Re:Great, more Ajax (1)

hendridm (302246) | more than 6 years ago | (#21138449)

We really need to get back to simple, clean cut pages that display the information and resources that your site is offering.

Hmmm, I agree with you completely when it comes to the web. However, I think Ajax has improved the INTERNAL user experience where I work (where everyone is browsing using the same environment). Ajax has made applications more responsive and more like standard Windows apps. It's not about flash - it's about avoiding unnecessary postbacks ;)

So far the experience has been pleasant for our Intranet. Again, I do agree that would would like to see the more simplified experience of Web 1.0. I'd hate to be using a Braille reader on any semi-modern web site.

Re:Great, more Ajax (1)

analyzediz (812864) | more than 6 years ago | (#21148271)

The issue here is not about simplicity vs. complexity or flashy vs. minimalist; but rather placing the focus on what the user actually needs. The best way to accomplish this is through a user experienced based design. To this effect, a group of users that roughly represent the expected user base is interviewed. This way the information/user experience architects of the new site/application gets a feel for what the current processes are that surrounds the users. From this standpoint one gets a better feel what the users might need. With the user interviews being completed, the architects can then create wireframes of the application that, after various iterations, will closely be in alignment with what the user actually wants. Once these fundamental designs and layouts are finalized, visual designer can then add the flashiness to the application with some guidance (reality checks) provided by the technical folks. This is an approach that I've found to work on numerous projects that I've worked on. Yes, it's a bit more time consuming and potentially more expensive but what better way to ensure that the end-product is actually what the user wants than driving out the design from the users themselves.

Re:Great, more Ajax (1)

unlametheweak (1102159) | more than 6 years ago | (#21149473)

I suppose the 12 year olds creating Geocities pages have grown up and want to incorporate all the extravagant flash into their more grown up web pages.

Earlier today I went to get an update to Process Explorer from Microsoft (http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/ProcessExplorer.mspx), and noticed a link to a Video by Mark Russinovich (http://www.microsoft.com/emea/spotlight/Mark_Russinovich_Advanced_Malware_Cleaning.aspx). To watch this movie you need to install Microsoft's proprietary Silverlight spyware, oooops, I meant software. To even realize that you need to install this software you need a JavaScript capable browser with JavaScript enabled (M$ Web sites don't tend to be Lynx compliant). So OK I figured I'd read the user agreement, and after following a link to another page I found their privacy policy. There was a whole section entitled "Collection and Use of Information About Your Computer" (http://www.microsoft.com/silverlight/privacy.aspx).

It's ironic, that with simple HTML Microsoft could have animations and video downloads on their Web sites without any so-called DHTML, Ajax, Web 2, or whatever the popular catch-phrase is for the combination of bloat and spyware.

I think it's mainly just the marketing people who like Flash and the like. The rest of us just prefer to see and read information without the glut.

Damn. (3, Funny)

jd (1658) | more than 6 years ago | (#21135189)

If everyone gets a full house on their Buzzword Bingo cards from the summary alone, we're going to have to divide up the prize again. Now to cut the coffee cake into 100,000 equal slices. Don't cut your fingers on the crumbs...

Putting things in prospective (2, Informative)

edxwelch (600979) | more than 6 years ago | (#21135199)

For those of you that think that Ajax is the new next generation platform, let's just things in prospective.
Ajax is one single function: XMLHttpRequest, a extension to the browser DOM invented by MS. In other words its a propierty hack on the browser API, nothing more.

Re:Putting things in prospective (4, Informative)

merreborn (853723) | more than 6 years ago | (#21135263)

Ajax is one single function: XMLHttpRequest, a extension to the browser DOM invented by MS. In other words its a propierty hack on the browser API, nothing more.


"proprietary hack"? Not for long:

http://www.w3.org/TR/XMLHttpRequest/ [w3.org]

Re:Putting things in prospective (1, Funny)

Anonymous Coward | more than 6 years ago | (#21135291)

For those of you that think that Ajax is the new next generation platform, let's just things in prospective.
Ajax is one single function: XMLHttpRequest, a extension to the browser DOM invented by MS. In other words its a propierty hack on the browser API, nothing more.

And I thought Ajax was for cleaning toilets.

Re:Putting things in prospective (1)

ResidntGeek (772730) | more than 6 years ago | (#21135707)

You're closer than me; I couldn't figure out why they were using a Homeric hero to show videos.

Re:Putting things in prospective (1)

Fallingcow (213461) | more than 6 years ago | (#21135985)

Haha, awesome.

Both Ajaxes (Ajaxen?) in that book kicked serious ass, and deserve more recognition.

Re:Putting things in prospective (1)

ResidntGeek (772730) | more than 6 years ago | (#21136721)

Ajaxen?
I believe that, strangely enough, the plural is Aiai, pronounced aye-aye. Ajax isn't really a very good transliteration of the singular either. But I'm no Homeric linguist, so I could be wrong.

Re:Putting things in prospective (1)

Black.Shuck (704538) | more than 6 years ago | (#21139543)

AJAX = Asynchronous Javascript And XML. The name was coined by Jesse James Garrett [adaptivepath.com] at when he wanted to tout the merits of Javascript, the DOM and XMLHttpRequest to a client, so yes it describes old technologies with a new buzzword.

I also used to balk at it - in much the same way as most of you also balk at web2.0 - but I feel it's helped inspire great design concepts and propel the development of such Javascript projects as Prototype, Mootools, Dojo, and the stalled-but-promising TIBET from Technical Persuit, as to make it all worthwhile. Certainly it has generated more excitement than "DHTML" did in its day.

In moderate doses AJAX can do great things for a web-site. But just as with Flash, Java and animated GIFs, too much can be a disaster. Use sparingly.

Re:Putting things in prospective (1)

sahala (105682) | more than 6 years ago | (#21176621)

Ajax is one single function: XMLHttpRequest, a extension to the browser DOM invented by MS. In other words its a propierty hack on the browser API, nothing more.

In the old days we'd use javascript to dynamically create an iframe on the client, set the onload callback and src attribute, and got whatever data we wanted. We liked it, too.

Great but... (0)

Anonymous Coward | more than 6 years ago | (#21135295)

There's an easier way that's more accessible - a download link.

Re:Great but... (0)

Anonymous Coward | more than 6 years ago | (#21135923)

um - and if you have 100 photos?

Gahhh! (1)

graviplana (1160181) | more than 6 years ago | (#21135297)

"Mashup" needs to be stricken from use for all of eternity. The only word or phrase I'm sick of more than "Mashup" is "Web 2.0".

Re:Gahhh! (1)

HTH NE1 (675604) | more than 6 years ago | (#21135331)

What about "compelling experience"?

Learn how to combine media with technologies such as PHP and Ajax to create a compelling experience.
The Power of PHP and Ajax compels you!

Re:Gahhh! (1)

Doctor Memory (6336) | more than 6 years ago | (#21135663)

Heh. My first thought was "Oh, mashups....how....last month! Could I have some fresh hype, please, this one seems to have gone cold..."

<shrug/>

Re:Gahhh! (1)

chadmanmn (1179815) | more than 6 years ago | (#21135877)

I'm with you graviplana. The term reminds me of "serving up" from the '90s, which also annoyed the hell out of me.

YO0 FAIL IT! (-1, Troll)

Anonymous Coward | more than 6 years ago | (#21135339)

deeper iNto the Fact: *BSD IS A

Can you stop using that word please? (1)

Colin Smith (2679) | more than 6 years ago | (#21135419)

Really... just... stop...

And there's no need to capitalise it.

Re:Can you stop using that word please? (1)

Pie-rate (1098693) | more than 6 years ago | (#21137687)

There's no reason to put "and" at the beginning of a sentence, either.

Font popu menu in aja* (1)

Joseph_Daniel_Zukige (807773) | more than 6 years ago | (#21135719)

Anybody know how to get a font menu on a web page? Besides using the M$haft extenstions, of course.

Not knowing how to _safely_ get a font menu appropriate for the user's machine is one reason I find myself trying to use Java instead of Javascript.

With Javascript, the browser presents a runtime which includes a "pretty decent" default event-handling and printing environment, whereas with Java I find myself re-building the event-handling from something that is anything but scratch, and a bit contrary to my expectations. I think my frustrations with printing have something to do with my not really understanding the event handling, and the logic behind the various traditional methods of assembling JComponents.

Anyway, anybody know how to assemble a useful font menu?

Re:Font popu menu in aja* (0)

Anonymous Coward | more than 6 years ago | (#21138821)

What exactly do you want that for? If it's to allow the user to pick a font to display the page with, all(?) graphical browsers already have a configuration section for that.

not the whole page (1)

Joseph_Daniel_Zukige (807773) | more than 6 years ago | (#21139167)

What exactly do you want that for? If it's to allow the user to pick a font to display the page with, all(?) graphical browsers already have a configuration section for that.

Just the bingo game part of the page. Besides, most browsers, the average user doesn't know where to get at the font settings, and the settings are really designed more as preferences than for trying several different fonts to see which looks like it will print up best.

Re:Font popu menu in aja* (0)

Anonymous Coward | more than 6 years ago | (#21144061)

, whereas with Java I find myself re-building the event-handling from something that is anything but scratch, and a bit contrary to my expectations. I think my frustrations with printing have something to do with my not really understanding the event handling, and the logic behind the various traditional methods of assembling JComponents.

Why don't you simply learn Java? It seems like your problems stem from ignorance of the Java APIs, rather than failings of the Java platform itself. Swing (the Java UI toolkit) is pretty simple to learn once you understand a few concepts; Sun has a decent tutorial you can read through.

There is no way to pop up a fonr dialog in Javascript; however it is trivial in Java. Just take a week or so to understand the system. ^_^

Outrageously bad code (-1, Flamebait)

Anonymous Coward | more than 6 years ago | (#21136423)

How did this get on Slashdot? There's absolutely no point in using an asynchronous request for getting a static XML file. Server-side or client-side XML+XSLT would have been much cleaner. Also the video embedding code is extremely rudimentary. Video embedding is tricky (until HTML5 with the VIDEO tag), you need some cross-browser redundancy. There isn't even an OBJECT tag. EMBED is not standard HTML btw, and if you must use it (for older Mozillas and Netscape) at least provide a mimetype.

Compelling, indeed (2, Insightful)

noidentity (188756) | more than 6 years ago | (#21136885)

The first thing a site with unnecessary video or Flash compels me to do is leave.

Re:Compelling, indeed (1)

bibel (1072798) | more than 6 years ago | (#21138561)

What if you are one out of one hundred that does that ? The first thing I learned as a web developer was tot treat the average user as a stupid being that does has no idea what he's doing. How do you let that user know that you're presenting a simple CSS fluid layout that respects the standards, and does not use flashy useless animations ... movies ... slideshows ? The average user wants to see ajax on every single block on your page, javascript animations, flash movies .... There's nothing you can do as a developer but compromise yourself and give the idiots what they want.

ajax (1)

smoker2 (750216) | more than 6 years ago | (#21138091)

I used to be quite happy using iframes, and a bit of perl server side to generate the requested content. It saved having to do a complete page reload and allowed multiple different frames to change according to what was requested.
Then there were exploits based around iframes and they became a dirty word, although the exploit was mainly one of a malicious phishing style, where the site appeared to be 1 thing but the content was coming from elsewhere. As long as all the content is coming from the same server, I don't see a problem with them.
So, why should I use ajax ?

Why not improve the slide show? (1)

msclark (413170) | more than 6 years ago | (#21139699)

Here's an improved slide show with nicer transitions and other features:
    http://www.scriptio.us/slides/ [scriptio.us]

The Ajax-based library is open source, and easier and cheaper than Flash development. Since you don't need Flash, it also works on iPhones/iPodTouch and is not thwarted by Flash-blockers.
    http://www.scriptio.us/ [scriptio.us]

Disclaimer: I wrote it and put this library in the public domain.

Matt Clark

Not more of it (1)

MortenMW (968289) | more than 6 years ago | (#21140233)

When my boss hears about Ajax (which he probably should by now) it will be the Web 2.0 thing all over again. Management-people running around, setting things on fire and screaming "We need to become Ajax-compliant!".

Enough ajax talk already (1)

kaivix (1180659) | more than 6 years ago | (#21143453)

I liken ajax to any other browser markup... it's nothing fancier than knowing how to use a <div> tag or knowing how to create new DOM elements dynamically. We don't see articles about how to use divs, so why do we keep getting articles on how to use XMLHttpRequest? XHR is just another tool we can use; there is no big mystery or learning curve to using it. It's simple, has limited functionality, and takes -- at maximum -- a couple of hours to master.

Learn to use XMLHttpRequest. Learn how to manipulate the DOM with JavaScript. That's all there is to it. If you can't figure out how to put together your own slideshow without having to refer to others' markup and code, you obviously haven't got the slightest clue as to what you're doing. Perhaps saying it so bluntly is somewhat rude, but it really is true... XHR is _not_ a difficult object to manipulate.

It's bad enough that people depend on the prototype library as their crutch to use JS and XHR. For Internet Explorer, prototype doesn't even invoke the proper ActiveX objects (for anyone interested, read up from the source [msdn.com] ). I mean come on, prototype doesn't even support adding a timeout callback to the XHRequest.

As for the linked article itself, the writer writes non-validating HTML (what's with the <script> tags sans attributes?), and his PHP is worse than atrocious (not to mention he's not outputting an opening <?xml ?>). Whatever happened to posting quality work on /.?

This instills much confidence (1)

stoneycoder (1020591) | more than 6 years ago | (#21143815)

He ends the article with "If it works for you, please let me know". Typically before writing and publishing an article, you should test that your code is going to work on some other configurations than your own. Rather than using the article, and subsequent slashdotting as a test bed for your crap.
Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?