SlideShare una empresa de Scribd logo
1 de 17
Код Бааз Цөм Функцын хамаарал DOM Events Ajax Animations Хэрэглэгчийн интерфайс widgets
Цөм Функцын хамаарал Динамик “Ajax” веб сайт хийхэд шаардагдана: “DOM (Traversal and Manipulation)” Үзэгдэл “Ajax” “Animations”
DOM “Traversal” CSS сонгогчыг ашиглан элементийн байршлыг тодорхойлох Өөрчлөлт Элементийг өөрчлөх, устгах, үүсгэх “DOM builder”-тэй байх нь чухал
DOM Traversal Prototype, Mootools: $$(“table > tr”) jQuery: $(“div > p:nth-child(odd)”) Dojo: dojo.query(“table tr:nth-child(even)”) Yahoo UI: Y.get('div p')
DOM өөрчлөх Prototype: $(“list”).insert(“<li>Another item</li>”); jQuery: $(“#li”).append(“<li>An item</li>”); Mootools: $(“li”).append(new Element(“li”,{html:“Anitem”}));
DOM Manipulation Dojo: dojo.query(“#li”).addContent(“<li>An item</li>”); Yahoo UI: Y.get(“#li”).appendChild( Y.create(“<li>Anitem</li>”));
Үзэгдэл Энгийн үзэгдэл барих, арилгахыг дэмжинэ Хэрэглэгчийн үзэгдлийг дэмжих нь чухал • Prototype: $$(“#button”).invoke(“observe”, ”click”,function(){ alert(“Thanks for the click!”); }); • jQuery: $(“div”).click(function(){ alert(“div clicked”); });
Үзэгдэл (үргэлжлэл.) Yahoo UI: Y.get(“#list”).on(“click”, function(){ alert(“List Clicked”); }); Dojo: dojo.query("#mylink").connect("click", function(){ alert(“Link clicked”); }); Mootools: $$("#mylink").addEvent("click", function(){ alert(“Link clicked”); });
Ajax Алсын баримт бичигт хүсэлт илгээх ба хандана Prototype: new Ajax.Request(“test.html”, { method: “GET”, onComplete: function(res){ $$(‘#results’).invoke(“update”,( res.responseText ); } }); jQuery: jQuery.get(“test.html”, function(html){ $(“#results”).html( html ); });
Ajax (үргэлжлэл.) Yahoo UI Y.on(“io:complete”, function(id, data){ Y.get(“#results”).set(“innerHTML”, data.responseText); }); Y.io(“test.html”); Dojo dojo.xhrGet({ url: "test.html", load: function(type, data) { dojo.query(“#results”).empty().addContent( data ); } });
Ajax (үргэлжлэл.) Mootools: new Request.HTML({  onComplete: function(t, e, html){ $$(“#results”).html( html ); } }).get('myPage.html');
Ajax (үргэлжлэл.) jQueryбаMootools нь XML-ээр DOM-ийг дамжуулах чадвартай байдаг • jQuery.get(“test.xml”, function(xml){ $(“user”, xml).each(function(){ $(“<li/>”).text( $(this).text() ) .appendTo(“#userlist”); }); });
“Animations” Энгийн animations(нуух, харуулах) Ойлгомжтой энгийн шилжэлтээр хангах Prototype, Scriptaculous– ийг хэрэглэн: $(‘menu’).appear({duration: 0.6}); jQuery: $(“#menu”).animate({opacity: 1}, 600);
“Animations” (үргэлжлэл.) Yahoo UI: new Y.Anim({ node: “#list”, duration: 600, { to: {opacity: 1}}}).run(); Dojo: dojo.query(“#list”).anim({opacity: 1}, 600); Mootools: new Fx.Tween(“list”, {duration: 600}).start(“opacity”, 0, 1);
Гол онцлог шинжүүдийн товчлол
Хэрэглэгчийн интерфэйс “widget” Бүрэлдэхүүн хэсгүүдийг гүйцэтгэхэд хэцүү, хийхэд хялбар Нийтлэг хэрэглэгддэг, хуулбар хадгалдаг Some common components: Drag & Drop, Tree, Grid, Modal Dialog, Tabbed Pane, Menu / Toolbar, Datepicker, Slider
Хэрэглэгчийн интерфэйс багцууд Зөвхөн албан ёсны дэмжигддэг кодууд Prototype нь “Scriptaculous”-тай jQueryнь “jQuery UI”-тай Dojo has “Dijit”-тай Mootoolsнь зарим Цөмтэй Yahoo UI-д багтдаг

Más contenido relacionado

Destacado

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destacado (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

кодын суурь

  • 1. Код Бааз Цөм Функцын хамаарал DOM Events Ajax Animations Хэрэглэгчийн интерфайс widgets
  • 2. Цөм Функцын хамаарал Динамик “Ajax” веб сайт хийхэд шаардагдана: “DOM (Traversal and Manipulation)” Үзэгдэл “Ajax” “Animations”
  • 3. DOM “Traversal” CSS сонгогчыг ашиглан элементийн байршлыг тодорхойлох Өөрчлөлт Элементийг өөрчлөх, устгах, үүсгэх “DOM builder”-тэй байх нь чухал
  • 4. DOM Traversal Prototype, Mootools: $$(“table > tr”) jQuery: $(“div > p:nth-child(odd)”) Dojo: dojo.query(“table tr:nth-child(even)”) Yahoo UI: Y.get('div p')
  • 5. DOM өөрчлөх Prototype: $(“list”).insert(“<li>Another item</li>”); jQuery: $(“#li”).append(“<li>An item</li>”); Mootools: $(“li”).append(new Element(“li”,{html:“Anitem”}));
  • 6. DOM Manipulation Dojo: dojo.query(“#li”).addContent(“<li>An item</li>”); Yahoo UI: Y.get(“#li”).appendChild( Y.create(“<li>Anitem</li>”));
  • 7. Үзэгдэл Энгийн үзэгдэл барих, арилгахыг дэмжинэ Хэрэглэгчийн үзэгдлийг дэмжих нь чухал • Prototype: $$(“#button”).invoke(“observe”, ”click”,function(){ alert(“Thanks for the click!”); }); • jQuery: $(“div”).click(function(){ alert(“div clicked”); });
  • 8. Үзэгдэл (үргэлжлэл.) Yahoo UI: Y.get(“#list”).on(“click”, function(){ alert(“List Clicked”); }); Dojo: dojo.query("#mylink").connect("click", function(){ alert(“Link clicked”); }); Mootools: $$("#mylink").addEvent("click", function(){ alert(“Link clicked”); });
  • 9. Ajax Алсын баримт бичигт хүсэлт илгээх ба хандана Prototype: new Ajax.Request(“test.html”, { method: “GET”, onComplete: function(res){ $$(‘#results’).invoke(“update”,( res.responseText ); } }); jQuery: jQuery.get(“test.html”, function(html){ $(“#results”).html( html ); });
  • 10. Ajax (үргэлжлэл.) Yahoo UI Y.on(“io:complete”, function(id, data){ Y.get(“#results”).set(“innerHTML”, data.responseText); }); Y.io(“test.html”); Dojo dojo.xhrGet({ url: "test.html", load: function(type, data) { dojo.query(“#results”).empty().addContent( data ); } });
  • 11. Ajax (үргэлжлэл.) Mootools: new Request.HTML({ onComplete: function(t, e, html){ $$(“#results”).html( html ); } }).get('myPage.html');
  • 12. Ajax (үргэлжлэл.) jQueryбаMootools нь XML-ээр DOM-ийг дамжуулах чадвартай байдаг • jQuery.get(“test.xml”, function(xml){ $(“user”, xml).each(function(){ $(“<li/>”).text( $(this).text() ) .appendTo(“#userlist”); }); });
  • 13. “Animations” Энгийн animations(нуух, харуулах) Ойлгомжтой энгийн шилжэлтээр хангах Prototype, Scriptaculous– ийг хэрэглэн: $(‘menu’).appear({duration: 0.6}); jQuery: $(“#menu”).animate({opacity: 1}, 600);
  • 14. “Animations” (үргэлжлэл.) Yahoo UI: new Y.Anim({ node: “#list”, duration: 600, { to: {opacity: 1}}}).run(); Dojo: dojo.query(“#list”).anim({opacity: 1}, 600); Mootools: new Fx.Tween(“list”, {duration: 600}).start(“opacity”, 0, 1);
  • 16. Хэрэглэгчийн интерфэйс “widget” Бүрэлдэхүүн хэсгүүдийг гүйцэтгэхэд хэцүү, хийхэд хялбар Нийтлэг хэрэглэгддэг, хуулбар хадгалдаг Some common components: Drag & Drop, Tree, Grid, Modal Dialog, Tabbed Pane, Menu / Toolbar, Datepicker, Slider
  • 17. Хэрэглэгчийн интерфэйс багцууд Зөвхөн албан ёсны дэмжигддэг кодууд Prototype нь “Scriptaculous”-тай jQueryнь “jQuery UI”-тай Dojo has “Dijit”-тай Mootoolsнь зарим Цөмтэй Yahoo UI-д багтдаг