[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-489288-105":59,"doc-detail-489288-en":130,"doc-similar-489288":162},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","templates-and-databinding-swe-432-lecture-16-design-and-implementation-of-software-for-the-web","Templates and Databinding - SWE 432 Lecture 16 - Design and Implementation of Software for the Web","","SWE 432 Fall 2017 lecture notes on templates and databinding in web apps, focusing on frontend components and how templates support repeated UI structure. The material analyzes problematic JavaScript code, then introduces widgets as units that combine visual presentation with logic and form hierarchical parent-child relationships. It explains template instantiation via variable binding, compares server-side templating (e.g., JSP, PHP) with client-side frameworks (e.g., React), and discusses updating DOM on demand through template literals.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/templates-and-databinding-swe-432-lecture-16-design-and-implementation-of-software-for-the-web/489288/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/templates-and-databinding-swe-432-lecture-16-design-and-implementation-of-software-for-the-web/489288.png","ImageObject",300,407,{"name":92,"@type":93},"CatatanPagi","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-25","2026-10-01",true,{"@type":102,"interactionType":103,"userInteractionCount":24},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What is the main purpose of templates in web app UIs?","Question",{"text":112,"@type":113},"Templates describe repeated HTML using a single common representation. They may include variables and logic, which are bound to values to instantiate HTML and update the DOM.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"Why is the provided JavaScript code considered problematic?",{"text":117,"@type":113},"The lecture points out missing syntax checking in the snippet, indicating that the code lacks safeguards and can lead to issues when generating and updating HTML strings.",{"name":119,"@type":110,"acceptedAnswer":120},"How do server-side and client-side templating differ?",{"text":121,"@type":113},"Server-side frameworks instantiate templates on the server, run logic there, and generate HTML served to the browser. Client-side frameworks run templates in the web browser, enabling presentation logic to exist entirely in the client.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},489288,1793029577,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":24,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":145,"preview_page_count":19,"preview_urls":146},962090894170,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","Templates and Databinding  \nSWE 432, Fall 2017  \nDesign and Implementation of Software for the Web  \nToday  \n• What are templates?  \n• What are frontend components?  \n• How can I use these with React?  \nLaToza GMU SWE 432 Fall 2017 2  \nWhat’s wrong with this code?  \nfunction createItem (value, key)  \n{  \ndocument.getElementById('todoItems') .innerHTML +=  \n'\u003Cdiv class=\"todoItem\" data-index=\"' + key  \n+ '\">\u003Cinput type=\"text\" onchange=\"itemChanged(this)\" value='  \n+ value + '\">\u003Cbutton onclick=\"deleteItem(this.parentElement)\">&\\#x2716;\u003C/button>\u003C/div>';  \n}  \nLaToza GMU SWE 432 Fall 2017 3  \nWhat’s wrong with this code?  \nfunction createItem (value, key)  \n{  \ndocument.getElementById('todoItems') .innerHTML +=  \n'\u003Cdiv class=\"todoItem\" data-index=\"' + key  \n+ '\">\u003Cinput type=\"text\" onchange=\"itemChanged(this)\" value='  \n+ value + '\">\u003Cbutton onclick=\"deleteItem(this.parentElement)\">&\\#x2716;\u003C/button>\u003C/div>';  \n}  \nNo syntax checking  \nLaToza GMU SWE 432 Fall 2017 4  \nAnatomy of a Non-Trivial Web App  \nUser proﬁle widget  \nWho to follow widget  \nFollow widget  \nFeed widget  \nFeed item widget  \nLaToza GMU SWE 432 Fall 2017 5  \nTypical properties of web app UIs  \n• Each widget has both visual presentation & logic  \n• e.g. , clicking on follow button executes some logic related to the containing widget  \n• Logic and presentation of individual widget strongly related, loosely related to other widgets  \n• Some widgets occur more than once  \n• e.g. , Follow widget occurs multiple times in Who to Follow Widget  \n• Need to generate a copy of widget based on data  \n• Changes to data should cause changes to widget  \n• e.g. , following person should update UI to show that the person is followed. Should work even if person becomes followed through other UI  \n• Widgets are hierarchical, with parent and child  \n• Seen this already with container elements in HTML…  \nLaToza GMU SWE 432 Fall 2017 6  \nIdea 1: Templates  \ndocument.getElementById('todoItems') .innerHTML +=  \n'\u003Cdiv class=\"todoItem\" data-index=\"' + key  \n+ '\">\u003Cinput type=\"text\" onchange=\"itemChanged(this)\" value= \" '  \n+ value + '\">\u003Cbutton onclick=\"deleteItem(this.parentElement)\">&\\#x2716;\u003C/button>\u003C/div>';  \n• Templates describe repeated HTML through a single common representation  \n• May have variables that describe variations in the template  \n• May have logic that describes what values are used or when to instantiate template  \n• Template may be instantiated by binding variables to values, creating HTML that can be used to update DOM  \nLaToza GMU SWE 432 Fall 2017 7  \nTemplates with template literals  \ndocument.getElementById('todoItems') .innerHTML +=  \n`\u003Cdiv class=\"todoItem\" data-index=\"${key}\">  \n\u003Cinput type=\"text\" onchange=\"itemChanged(this)\" value= \" ${value}\">  \n\u003Cbutton onclick=\"deleteItem(this.parentElement)\">&\\#x2716;\u003C/button>\u003C/div>` ;  \n• Template literals reduce confusion of nested  \nstrings  \nLaToza GMU SWE 432 Fall 2017 8  \nServer side vs . client side  \n• Where should template be instantiated?  \n• Server-side frameworks: Template instantiated on server  \n• Examples: JSP, ColdFusion, PHP, ASP.NET  \n• Logic executes on server, generating HTML that is served to browser  \n• Front-end framework: Template runs in web browser  \n• Examples: React, Angular, Meteor, Ember, Aurelia,…  \n• Server passes template to browser, browser generates HTML on demand  \nLaToza GMU SWE 432 Fall 2017 9  \nServer side vs . client side  \n• Server side  \n• Oldest solution.  \n• True when“real” code ran on server, Javascript  \n• Client side  \n• Enables presentation logic to exist entirely in browser  \n• e.g. , can make call to remote web service, no need for server to be involved  \n• (What we’ve looked at in this course) .  \nLaToza GMU SWE 432 Fall 2017 10","cbCaipgABA1VvD9I","https://ap.wps.com/l/cbCaipgABA1VvD9I","pdf",1277360,32,"English","# What are templates?\n## What are frontend components?\n## Using templates with React\n# What’s wrong with this code?\n# Anatomy of a Non-Trivial Web App\n## Typical properties of web app UIs\n## Idea 1: Templates\n### Templates with template literals\n# Server side vs. client side","[{\"question\":\"What is the main purpose of templates in web app UIs?\",\"answer\":\"Templates describe repeated HTML using a single common representation. They may include variables and logic, which are bound to values to instantiate HTML and update the DOM.\"},{\"question\":\"Why is the provided JavaScript code considered problematic?\",\"answer\":\"The lecture points out missing syntax checking in the snippet, indicating that the code lacks safeguards and can lead to issues when generating and updating HTML strings.\"},{\"question\":\"How do server-side and client-side templating differ?\",\"answer\":\"Server-side frameworks instantiate templates on the server, run logic there, and generate HTML served to the browser. Client-side frameworks run templates in the web browser, enabling presentation logic to exist entirely in the client.\"}]","Templates and Databinding - SWE 432 Lecture 16 - Design and Implementation of Software for the Web | PDF",1790821969,81,[147,151,154,158],{"page_no":8,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/4aa6e148bd2b81db92bcbc4b866fe458.webp",983,736,{"page_no":14,"url":152,"width":153,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/9a691503c8606bf3ed94a71cdd0dbe84.webp",982,{"page_no":81,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/0a065ef06b1658248932d3d0e563b7b2.webp",981,735,{"page_no":19,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/181c85f15a558983156981e5f90f463d.webp",980,734,{"list":163,"token":66},[164,171,178,184,191,198,205,212,219,226],{"doc_id":165,"doc_title":166,"file_type":137,"home_preview_img_url":167,"slug":168,"view_count":169,"category_name":30,"create_tm":170},391794,"INTERVIEW QUESTIONS FOR FULL STACK DEVELOPMENT - Interview Questions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917406683/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796222519&Signature=vFcP7aVBtCOxv1tYzikU8VNSTF0%3D","interview-questions-for-full-stack-development-interview-questions",21,1790358757,{"doc_id":172,"doc_title":173,"file_type":137,"home_preview_img_url":174,"slug":175,"view_count":176,"category_name":30,"create_tm":177},181273,"JavaScriptClientGuideJS13","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229877629235/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796222519&Signature=V6CQtBuPy56%2F0sq%2Bw1jxciAXeeQ%3D","javascriptclientguidejs13",14,1788344055,{"doc_id":179,"doc_title":180,"file_type":137,"home_preview_img_url":181,"slug":182,"view_count":19,"category_name":30,"create_tm":183},697385,"Frontend Developer Manual - Frontend Developer Manual","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230009184523/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796222519&Signature=3ACZ15isK42lTbmPnM5ljTamXHI%3D","frontend-developer-manual-frontend-developer-manual",1794438242,{"doc_id":185,"doc_title":186,"file_type":137,"home_preview_img_url":187,"slug":188,"view_count":189,"category_name":30,"create_tm":190},489327,"Vue.js - SiteFarm Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229927227849/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796222519&Signature=v71lpjoyllRyqESXy8cQtqMyX5g%3D","vuejs-sitefarm-introduction",13,1790822267,{"doc_id":192,"doc_title":193,"file_type":137,"home_preview_img_url":194,"slug":195,"view_count":196,"category_name":30,"create_tm":197},489329,"Become a ninja with Vue - free sample","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229926991859/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796222519&Signature=PDiloJaKSpR2V%2Buzfv4iQZl8IvA%3D","become-a-ninja-with-vue-free-sample",12,1790822270,{"doc_id":199,"doc_title":200,"file_type":137,"home_preview_img_url":201,"slug":202,"view_count":203,"category_name":30,"create_tm":204},115355,"Claude AI Bible - The Complete Guide to Mastering Claude, Claude Code, Claude Cowork, MCP, AI Agents, Automation & Advanced Prompting","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229831893665/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796222519&Signature=geTrv0TQo0vFLm%2Bs6SAGG9roKR0%3D","claude-ai-bible-the-complete-guide-to-mastering-claude-claude-code-claude-cowork-mcp-ai-agents-automation-advanced-prompting",951,1785472614,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":210,"category_name":30,"create_tm":211},185,"XNX Universal Transmitter Installation Manual (Complete Guide) [Honeywell Official]","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229693710157/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796222519&Signature=1F29mJQedVO7TsYIp2j7zIP17k4%3D","xnx-universal-transmitter-installation-manual",865,1776135954,{"doc_id":213,"doc_title":214,"file_type":137,"home_preview_img_url":215,"slug":216,"view_count":217,"category_name":30,"create_tm":218},299143,"THE CANDLESTICK TRADING BIBLE - Trading Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229905832418/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796222519&Signature=4wv5HnM0%2B13mbKJlURIb3%2BEVCa4%3D","the-candlestick-trading-bible-trading-guide",821,1789767270,{"doc_id":220,"doc_title":221,"file_type":137,"home_preview_img_url":222,"slug":223,"view_count":224,"category_name":30,"create_tm":225},176,"Free Fire Proxy Server","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229693709822/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796222519&Signature=6VCmpRZYTXPxAY3AdqsKKe6RLnQ%3D","free-fire-proxy-server",572,1776135932,{"doc_id":227,"doc_title":228,"file_type":137,"home_preview_img_url":229,"slug":230,"view_count":231,"category_name":30,"create_tm":232},129220,"Operations and Supply Chain Management - Eleventh Edition - Dedicated to students and faculty","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229840674154/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796222519&Signature=lKEX07I0xAk0T9h7l79lh4TLy9s%3D","operations-and-supply-chain-management-eleventh-edition-dedicated-to-students-and-faculty",501,1786012506]