DHTML library for handling pictures and videos using AJAX

徘徊边缘 提交于 2020-01-25 18:40:54

问题


This is based on my full question. I decided to take it in parts and see if I still can't get any help.

What are all the options we've got for client-side frameworks?

I've heard mostly about prototype and jquery, but I know there are way too many options out there beyond those two, and I don't know if they handle async download.

From all of them which one is the fastest, both on the DHTML (interface) and the AJAX (download)? What are the advantages it has over the others?


回答1:


What is it that you want to do?

DHTML is Dynamic HTML - which gives you the ability to set properties of HTML elements dynamically, at runtime while the page is displayed in a browser. A script can change the content of a div, the src of an <img> tag, the style of a paragraph.

AJAX is Asynchronous Javascript and XML, and as a term was initially coined to describe the practice of using Javascript running in the browser to asynchronously download data formatted in XML, and then do stuff with that data in the execution context of the browser's web page. For example, update a table. The term "Ajax" has now expanded its meaning to encompass the async download of data of any form, not just XML, into the browser. Very often web apps will download data in json format, or csv, or html, or... ? AJAX has very little to do with "graphical frameworks". It can act as a complementary technology. For example, you could download a set of URLs, or a set of image properties, via AJAX.

jQuery is a library of javascript functions that makes it easier to do "DHTML" -type things in a cross-browser environment.


You asked, which is fastest for dealing with images?, but you haven't described what you're really after, what exactly "dealing with images" means. Regardless, I think the answer is mu, because #1, these things are independent of graphical frameworks, and #2, they are not easily comparable. You are asking for a comparison between apples, hammers, and music.

But, maybe you're not really asking about graphical frameworks. The title of your question seems to be completely unrelated to the text you've posted - it suggests you want to download and cache a few images. If that's what you're after, you can do that via DHTML or jQuery. Any modern browser will automatically cache these images for you; you don't need to do anything special. But in all cases you'll be relying on the browser's communication infrastructure to do the download, and so there will be no speed differential. They will download as fast as the browser and the network allows.


Addendum
I think maybe your focus on speed is misplaced. What do you really want to do? Is speed a problem now? Seems like you are just getting started. Seems like what you really want is to learn the landscape a little better, figure out what is possible, rather than what is fast.

For playing videos in a browser, check out flowplayer - a flash video player that can be scripted with javascript/jQuery.



来源:https://stackoverflow.com/questions/2495695/dhtml-library-for-handling-pictures-and-videos-using-ajax

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!