1. Trang chủ
  2. » Công Nghệ Thông Tin

Chapter 6: Clientside dynamics pages pdf

23 88 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 23
Dung lượng 75,95 KB

Nội dung

Chapter 6: Client- side dynamics pages Contents  Client-side dynamic pages  JavaScript Client-side dynamic pages  Web page contains programs (script) that will be executed in the client side by browser.  Script improve the interaction of users and web page (than HTML)  Program is written by different scripting technologies  Javascript:  Vbscript  Flash  Applet  Ajax  … Javascript, VBscript  Javascript:  An interpreted programming, a script language from Netscape.  Syntax similar to Java but it is not Java  Easier and faster to code in than the more structured and compiled languages such as C and C++.  Take longer to process than compiled languages, but are very useful for shorter programs.  Vbscript  A scripting language similar to Javascript  Based on VB Applet  A java program that can be embedded into HTML pages.  Code of the applet is downloaded from a web server.  Runs on the java enables web browsers such as mozila and internet explorer.  Run remotely on the client browser, but cannot access system resources on the local computer.  No more popular. WHY??? Applet: Advantage/disadvantage  Advantages of Applet:  Applets are cross platform and can run on Windows, Mac OS and Linux platform  Applets can work all the version of Java Plugin  Applets runs in a sandbox, so the user does not need to trust the code, so it can work without security approval  Applets are supported by most web browsers  Applets are cached in most web browsers, so will be quick to load when returning to a web page  User can also have full access to the machine if user allows  Disadvantages of Java Applet:  Java plug-in is required to run applet  Java applet requires JVM so first time it takes significant startup time  If applet is not already cached in the machine, it will be downloaded from internet and will take time  Its difficult to desing and build good user interface in applets Flash  Technology of Adobe  Previously called Macromedia Flash  A popular method for adding animation and interactivity to web pages.  Commonly used to create animation, advertisements, and various web page components, to integrate video into web pages, and more recently, to develop rich Internet applications.  Macromedia argues that Flash is the way to go instead of HTML because:  Flash movies load faster and save on download time because Flash is vector based whereas HTML is not.  Flash intelligently ‘caches’ it’s movies so they don’t have to be reloaded.  Flash gives the user (the person viewing/using the Flash movie) a more responsive ‘rich-client’ like experience. Javascript  Javascript:  A scripting language  Interpreted language  Used to enhance the interaction of users with HTML  Is embeded in the HTML document  Is not case sensitive  Does not distigush clearly between data types Javascript  Javascript allows:  Incoporating programing code to HTML.  Ex: code to virsualise the current time  Building web page that is able to react against different events.  Ex: users click to an element in a form and the data in the form will be validated  Read and write HTML elements Put Javascript into HTML  Ex: <html> <body> <script type =“text/javascript”> alert(“Hello world”); </script> </body> </html>  Javascript code is written inside <script>… </script> . Chapter 6: Client- side dynamics pages Contents  Client-side dynamic pages  JavaScript Client-side dynamic pages  Web page contains programs (script). animation and interactivity to web pages.  Commonly used to create animation, advertisements, and various web page components, to integrate video into web pages, and more recently, to develop. language similar to Javascript  Based on VB Applet  A java program that can be embedded into HTML pages.  Code of the applet is downloaded from a web server.  Runs on the java enables web browsers

Ngày đăng: 28/06/2014, 02:20