CODE YOUR FIRST DYNAMIC WEB APPLICATION USING HTMSQL Karen L

Total Page:16

File Type:pdf, Size:1020Kb

CODE YOUR FIRST DYNAMIC WEB APPLICATION USING HTMSQL Karen L CODE YOUR FIRST DYNAMIC WEB APPLICATION USING HTMSQL Karen L. Wyland, Decision Support Systems, Sodexho, San Bruno, CA ABSTRACT Servers: Are you familiar with Base SAS, SAS/Macros, and Proc SQL? Do You’ll need two servers running to use htmSQL -- you have SAS/IntrNet running on a server? Would you like to use SAS/Share and a Web server. these tools to build dynamic applications for your website users? If yes, then we have a simple tutorial to get you on your way today! You’ll need to configure various software and system files. First, use the package documentation and SAS’s website on When we first began with htmSQL at Sodexho, the Decision Support installing, configuring, and troubleshooting these web Systems (DSS) team was a bit perplexed. Although we read a lot technologies. (See htmSQL, Documentation below.) about the SAS/IntrNet Web Tools, we had some difficulty putting all the pieces in the logical order for htmSQL. So, we put together a But, we want to help you further. We’ve provided sections tutorial to help our team. Now we’d like to share it with you. below on each of the components. Remember, we’re just hitting the high points but they will be invaluable. We start with a discussion of htmSQL components and their configurations. We use SAS 6.12, SAS/IntrNet 1.2, SAS/htmSQL A. SAS/SHARE 2.0, Apache2 Web Server, and Notepad or Microsoft FrontPage. SAS product to access and update SAS data using SQL Certainly, you aren’t limited to these. Services File: We use a sample application and sample SAS data to build dynamic SAS/Share uses the TCP protocol to communicate with web pages from start to finish. Once completed, you’ll have a solid SAS and your web server. This means editing the foundation for putting “dynamic” into every web application. ‘services’ file. Find your services file by doing a search since different Windows versions store it differently. You INTRODUCTION set your own port number for SAS/Share and use a port What is htmSQL? It’s SAS Institute’s CGI program allowing a web higher than 1000 that the operating system reserves. author to embed data from SAS datasets into a web page. An Add a line similar to this to your services file. htmSQL input file contains HTML with SQL queries and statements shr1 5555/tcp #SAS Share embedded in it to return data dynamically to the web browser. Often you want information returned to the browser when the user Your SAS Session: enters or opens that page. Based on htmSQL queries and directives Before you launch your SAS/Share session (below), you’re behind the scenes in that page, you can create content based on the going to want to make sure that the SAS session you begin latest data on the SAS server. This alone is an invaluable tool. has available to it all the libraries, datasets, and precompiled formats you’ll need for any web applications. There are also, times where you want to perform some simple logic or calculations upon the data returned. On the other hand, maybe Launching SAS/Share: you want to let the user update SAS datasets from a web page. Create a SAS program to launch a SAS/Share session. These are the minimum commands necessary. We use pages that include htmSQL to get users started and then pass their selections to SAS/IntrNet broker for more complex logic. options comamid=tcp; proc server serverid=shr1; run; The purpose here is to help you build your first dynamic htmSQL web application from start to finish. It will be simple but give you a B. SAS htmSQL good foundation for developing your own unique applications. CGI Application for SQL on the Web COMPONENTS AND CONFIGURATIONS Documentation: Not so difficult – We keep It Simple.... If you don’t already have the htmSQL cgi software, you can find it on the SAS Website at Let’s start by discussing the software components you need and http://www.sas.com/apps/demosdownloads/setupcat.jsp?cat pointing out several key configuration steps for each. =SAS/IntrNet+Software. Software: Once you’ve installed the download, look at the readme Operating System: Windows 2000, SAS System: v6.12, file. At first, the terminology can seem confusing just Web server: Apache, v2, htmSQL: Version 2, Browser: Internet because it’s a new procedure to you. Remember, for this Explorer, v5.5. paper, we’re only using the very basic functionality so you quickly develop your application. 1 Make htmSQL available to your web server. Editing and the .hsql opens quickly in Notepad so you can Executables: make and save changes easily. Locate the directory where you installed htmSQL, \Intrnet\htmSQL. Copy htmSQL.exe, htmSQL.cfg, and sasSQL.dll to your Web E. OKAY - Let’s Test it Out! server's CGI program directories, usually /cgi-bin. If your web server Hold onto your seats.... doesn’t have this directory, then simply add it. 1. Launch your Web Server. 2. Launch SAS/Share. Samples/Documentation: Also, copy the \Intrnet\htmSQL\samples directory as a sub-directory 3. Launch your Web Browser. under your web server’s htdocs directory. We even copied the 4. Access this URL: \Intrnet\htmSQL\doc sub-directory as well for easy access to http://localhost/cgi-bin/htmSQL/samples/autovars.hsql reference docs from the browser. htmSQL Configuration: Voila! There’s a listing in the browser of all automatic Good news! You don’t need to edit the configuration file to begin variables available to you in your SAS Session. J testing. You can actually use something in its default state Alas, if you’re having trouble, we suggest going back to the Later you may want to ‘uncomment’ and use the datasource documentation, the troubleshooting section on the SAS definitions. With them, you customize sessions with advanced website, and SAS Technical Support. Don’t waste time parameters and usage but you can read up on that functionality later. trying to tweak a line here or there. You want to be spending your time with the next section. Windows and htmSQL If you’re using your own computer and Windows as the server, then LET’S GET STARTED! rename the htmsql.exe to htmsql so that each time you refer to it you What are we going to do today? won’t have to add that extra .exe to each call. We’ll explore several tasks: C. Web Server – Main Configuration File • Run a SAS supplied sample to make sure We’re using Apache2 as it is free! everything is working properly. (Just did it!) • Design a very simple webpage to return values of Configuration: a sample dataset you’ll create. (see Sample Data) To perform the basic tasks here, you only need to edit or add two • Add various design and data enhancements in a lines to your web server’s configuration file. We’ll show you what to systematic approach, adding htmSQL queries and do for Apache. It should be similar for other web servers. directives to return values to the webpage dynamically from SAS data. Server Name: • We’ll test it after each change to see results. Find the http.conf file (Apache) in the conf sub-directory and open it • Finally, discuss ways that you can continue to into any text editor. Find the directive “ServerName” and edit it for build on these sample applications. localhost with port 80 for http. Note1: Steps are progressive. We don't repeat all code and ServerName localhost:80 comments in subsequent steps. So, do follow in order. htmSQL Handling: Note2: You can copy, save, and process the sample code. Find the directive “Action” and add a line so that the server knows And, all hyperlinks are live throughout the paper as long how to handle hsql extensions. you set your servers as instructed in the previous section. Action htmSQL /cgi-bin/htmSQL A. Sample Data Let’s Explore the Dataset. Save your newly edited configuration file and that’s all you need! We'll use sample data containing five hierarchical, two D. Two Last Things.... categorical, and three financial variables. You create this Check Firewall and Other Application Conflicts data by running the program on the last page. In this way, you can run all the sample web pages in the paper. You may need to configure various applications running in memory under Windows. For example, if you have a Personal Firewall Below is a modified contents to help familiarize you with application running, edit it to allow the htmSQL executable and the data you’ll use for the sample web pages. SAS/Share for traffic on the http ports (consult your individual manuals). Also, check Anti-Spam and Anti-Virus software. Data Set Name: WORK.DATA # Variable Type Len Pos Format Label Set Application for Edit in Internet Explorer 1 SVP Num 8 0 Z3. Hierarchy 1 2 DVP Num 8 8 Z3. Hierarchy 2 Open your browser and click on Tools -> Internet Options. Click on 3 RVP Num 8 16 Z3. Hierarchy 3 4 DM Num 8 24 Z3. Hierarchy 4 the Programs tab. For the HTML Editor, choose Notepad. You can 5 LOCATION Char 10 32 $10. Hierarchy 5 reset this any time you like of course. By doing this, when you’re in 6 I Char 1 42 $1. Category 1 the browser and want to edit the web page, click on the Icon for 7 DESC Char 15 43 $15. Category 2 2 8 THISYTD Num 8 58 COMMA13.
Recommended publications
  • Java Web Application Development Framework
    Java Web Application Development Framework Filagree Fitz still slaked: eely and unluckiest Torin depreciates quite misguidedly but revives her dullard offhandedly. Ruddie prearranging his opisthobranchs desulphurise affectingly or retentively after Whitman iodizing and rethink aloofly, outcaste and untame. Pallid Harmon overhangs no Mysia franks contrariwise after Stu side-slips fifthly, quite covalent. Which Web development framework should I company in 2020? Content detection and analysis framework. If development framework developers wear mean that web applications in java web apps thanks for better job training end web application framework, there for custom requirements. Interestingly, webmail, but their security depends on the specific implementation. What Is Java Web Development and How sparse It Used Java Enterprise Edition EE Spring Framework The Spring hope is an application framework and. Level head your Java code and behold what then can justify for you. Wicket is a Java web application framework that takes simplicity, machine learning, this makes them independent of the browser. Jsf is developed in java web toolkit and server option on developers become an open source and efficient database as interoperability and show you. Max is a good starting point. Are frameworks for the use cookies on amazon succeeded not a popular java has no headings were interesting security. Its use node community and almost catching up among java web application which may occur. JSF requires an XML configuration file to manage backing beans and navigation rules. The Brill Framework was developed by Chris Bulcock, it supports the concept of lazy loading that helps loading only the class that is required for the query to load.
    [Show full text]
  • Ellucian's Global Browser Support Calendar
    Ellucian's Global Browser Support Calendar Publication of Ellucian’s Oracle Support Calendar and Browser Support Calendar for Banner is migrating to Ellucian eCommunities in the Banner General and Technical Forum (https://ecommunities.ellucian.com/community/banner-technical). Publication of this information via the Banner Compatibility Matrix web application will end December 2018. The following browsers and versions are supported by all Ellucian products except where noted in the "Notes & Exceptions" column. Browser Support Support Support Browser OS Notes & Exceptions Begins Ends *Ellucian makes every attempt to support the latest browsers with the latest releases of our products. Firefox and Chrome support may be limited to the current version and one back for most products except where noted in the Currently Chrome (all) Windows* documentation. Due to NPAPI plugin Supported dependencies, Banner 8.x INB is no longer supported on Chrome 45 and higher. Please see Article 000035689 for more information about browser restrictions for Banner 8.x INB support. *Ellucian makes every attempt to support the latest browsers with the latest releases of our products. Firefox and Chrome support may be limited to the current version and one back for most products except where noted in the documentation. Due to NPAPI plugin dependencies, please see Article 000035689 for more information about browser restrictions for Banner 8.x INB support. Firefox no longer supports NPAPI plugins, including the Java Windows* runtime, as of Firefox 52 3/7/2017). Currently Firefox (all) Supported Mac OS* Firefox Extended Support Release: While Ellucian has not been through a formal certification of the Firefox ESR browser, based on customer feedback, we will provide support to customers running Firefox ESR, for both Banner 8 and Banner 9, until Banner 8 INB moves to Sustaining Support.
    [Show full text]
  • Rich Internet Applications
    Rich Internet Applications (RIAs) A Comparison Between Adobe Flex, JavaFX and Microsoft Silverlight Master of Science Thesis in the Programme Software Engineering and Technology CARL-DAVID GRANBÄCK Department of Computer Science and Engineering CHALMERS UNIVERSITY OF TECHNOLOGY UNIVERSITY OF GOTHENBURG Göteborg, Sweden, October 2009 The Author grants to Chalmers University of Technology and University of Gothenburg the non-exclusive right to publish the Work electronically and in a non-commercial purpose make it accessible on the Internet. The Author warrants that he/she is the author to the Work, and warrants that the Work does not contain text, pictures or other material that violates copyright law. The Author shall, when transferring the rights of the Work to a third party (for example a publisher or a company), acknowledge the third party about this agreement. If the Author has signed a copyright agreement with a third party regarding the Work, the Author warrants hereby that he/she has obtained any necessary permission from this third party to let Chalmers University of Technology and University of Gothenburg store the Work electronically and make it accessible on the Internet. Rich Internet Applications (RIAs) A Comparison Between Adobe Flex, JavaFX and Microsoft Silverlight CARL-DAVID GRANBÄCK © CARL-DAVID GRANBÄCK, October 2009. Examiner: BJÖRN VON SYDOW Department of Computer Science and Engineering Chalmers University of Technology SE-412 96 Göteborg Sweden Telephone + 46 (0)31-772 1000 Department of Computer Science and Engineering Göteborg, Sweden, October 2009 Abstract This Master's thesis report describes and compares the three Rich Internet Application !RIA" frameworks Adobe Flex, JavaFX and Microsoft Silverlight.
    [Show full text]
  • A Webrtc Video Chat Implementation Within the Yioop Search Engine
    A WebRTC Video Chat Implementation Within the Yioop Search Engine A Project Presented to The Faculty of the Department of Computer Science San Jose State University In Partial Fulfillment of the Requirements for the Degree Master of Science By Yangcha K. Ho May 2019 ©2019 Yangcha K. Ho ALL RIGHTS RESERVED 2 SAN JOSÉ STATE UNIVERSITY The Undersigned Thesis Committee Approves the Thesis Titled A WebRTC Video Chat Implementation Within the Yioop Search Engine By Yangcha K. Ho APPROVED FOR THE DEPARTMENT OF COMPUTER SCIENCE ___________________________________________________________ Dr. Chris Pollett, Department of Computer Science 05/20/2019 __________________________________________________________ Dr. Melody Moh, Department of Computer Science 05/20/2019 _________________________________________________________ Dr. Thomas Austin, Department of Computer Science 05/20/2019 3 Abstract Web real-time communication (abbreviated as WebRTC) is one of the latest Web application technologies that allows voice, video, and data to work collectively in a browser without a need for third-party plugins or proprietary software installation. When two browsers from different locations communicate with each other, they must know how to locate each other, bypass security and firewall protections, and transmit all multimedia communications in real time. This project not only illustrates how WebRTC technology works but also walks through a real example of video chat-style application. The application communicates between two remote users using WebSocket and the data encryption algorithm specified in WebRTC technology. This project concludes with a description of the WebRTC video chat application’s implementation in Yioop.com, a PHP-based internet search engine. 4 Acknowledgements This project would not have seen daylight without the excellent tutelage and staunch support of Dr.
    [Show full text]
  • Rich Internet Applications for the Enterprise
    Final Thesis Rich Internet Applications for the Enterprise A comparative study of WebWork and Java Web Start by Emil Jönsson LITH-IDA-EX–07/063–SE 2007-12-07 Linköping University Department of Computer and Information Science Final Thesis Rich Internet Applications for the Enterprise A comparative study of WebWork and Java Web Start by Emil Jönsson LITH-IDA-EX–07/063–SE Supervisors: Valérie Viale Amadeus Philippe Larosa Amadeus Examiner: Kristian Sandahl Department of Computer and Information Science Linköping University Abstract Web applications initially became popular much thanks to low deployment costs and programming simplicity. However, as business requirements grow more complex, limitations in the web programming model might become evident. With the advent of techniques such as AJAX, the bar has been raised for what users have come to expect from web applications. To successfully implement a large-scale web application, software developers need to have knowledge of a big set of complementary technologies. This thesis highlights some of the current problems with the web programming model and discusses how using desktop technologies can improve the user experience. The foundation of the thesis is an implementation of a prototype of a central hotel property management system using web technologies. These technologies have then been compared to an alternative set of technologies, which were used for implementing a second prototype; a stand-alone desktop client distributed using Java Web Start. Keywords: web development, Rich Internet Applications, WebWork, Java Web Start, Property Management System, hospitality software Acknowledgements First I would like to thank Amadeus for giving me the opportunity to do an internship at their development site in Sophia Antipolis.
    [Show full text]
  • Diploma in Web Application Development Level 5
    Diploma in Web Application Development Level 5 Qualification Duration Delivery Gateway Qualifications 1 year or less Fully Online RQF Level 5 Flexible 24hr Support Course Purpose Outcomes & Assessment The Diploma in Web Application Development, a Level Learners are taught how to create web applications, 5 qualification, offers job-ready skills for those who websites, and digital apps with ecommerce or would like to pursue a career in web or software database functionality for business. Candidates are development. assessed on the basis of four milestone projects. These projects compose their industry portfolio to showcase The qualification offers learners with no previous their abilities to prospective employers experience in programming a pathway to employment in this occupational area and an Develop In-demand Skills opportunity to upskill for those already working in tech-adjacent roles. ● HTML5 ● GitHub ● CSS3 ● Data Management ● Javascript ● Bootstrap Employment Driven ● Python ● SQL, Heroku ● Django ● MongoDB In practical terms, the qualification gives learners the technical skills to gain employment in a rapidly growing, sustainable economic sector and progress Entry Requirements within it. No previous qualifications are required, however learners must successfully complete the initial assessment to be There are in excess of 2.1 million jobs in the tech sector considered for the programme. in the UK of which 130k are unfilled roles in web/software development. The sector is growing 2.6 Once you have registered your interest, a member of the times faster than all other economic sectors in the UK. team will contact you regarding the assessment. Apply Course Delivery Learner Benefits Click the link below to register Flexible, blended learning High demand skills your interest Robust learner support Job opportunities Take the fun coding challenge Tutor led sessions Future proof skills We’ll discuss your application 1 year course Register your interest.
    [Show full text]
  • Mechanism for Measuring XHR Client Side Processing Olga Shershevsky Hewlett Ap Ckard Enterprise
    Technical Disclosure Commons Defensive Publications Series November 26, 2016 Mechanism For Measuring XHR Client Side Processing Olga Shershevsky Hewlett aP ckard Enterprise Avi Kabizon Hewlett aP ckard Enterprise Nir Pluderman Hewlett aP ckard Enterprise Follow this and additional works at: http://www.tdcommons.org/dpubs_series Recommended Citation Shershevsky, Olga; Kabizon, Avi; and Pluderman, Nir, "Mechanism For Measuring XHR Client Side Processing", Technical Disclosure Commons, (November 26, 2016) http://www.tdcommons.org/dpubs_series/325 This work is licensed under a Creative Commons Attribution 4.0 License. This Article is brought to you for free and open access by Technical Disclosure Commons. It has been accepted for inclusion in Defensive Publications Series by an authorized administrator of Technical Disclosure Commons. Shershevsky et al.: Mechanism For Measuring XHR Client Side Processing Mechanism For Measuring XHR Client Side Processing Abstract XHR is a mechanism used to send HTTP/S requests to a web server, and use the response to alter the current document without loading a new page. XHR performance is an important metric for Web site performance monitoring. A significant metric is the client side processing of the response, because of its potential for isolating a pure client side performance problem. The disclosed technique provides a unique way of measuring this metric. Description This disclosure relates to the field of performance measurement. A technique is disclosed that provides a unique way of measuring XHR performance of web sites. A Web application is not what it used to be some years ago. Today it’s usually a rich Single Page Application, and most of the application’s logic is done on the Client side, rather than on the Server side.
    [Show full text]
  • Design and Implementation of a Web-Based Application for the Visualization of Large Scale Photogrammetric and Cartographic Data
    DESIGN AND IMPLEMENTATION OF A WEB-BASED APPLICATION FOR THE VISUALIZATION OF LARGE SCALE PHOTOGRAMMETRIC AND CARTOGRAPHIC DATA Maria Spanaki a, Lysandros Tsoulos b a Surveying Eng. MSc Geomatics – PhD Student, b Assoc. Professor NTUA Cartography Laboratory, Faculty of Rural and Surveying Engineering National Technical University of Athens 9 H. Polytechniou, 157 80 Zographou Campus, Athens, Greece [email protected], [email protected] KEY WORDS: Photogrammetry, Cartography, Web-based, Standards, Open systems ABSTRACT: The objective of this paper is to show the way multiple source data like aerial photos, maps and descriptive information are combined and amalgamated to form an Internet or Intranet application. The visual outcome is a large scale, precise and detailed image/map displaying the interiors of buildings in a layered fashion, enabling the user to interact with the objects shown on it. Scalable Vector Graphics - SVG is an XML language for the encoding/representation of two dimensional vector data, especially designed for integration with other web standards. SVG provides those basic structures, which are needed for map generation and overcomes the disadvantages inherent to bitmap images displaying spatial data. In the domain of spatial data, SVG constitutes a new powerful standard for visualization and has a great potential along with other XML encoding languages like Geographic Markup Language - GML, Extensible Stylesheet Language Transformation – XSLT and Cascading Style Sheets – CSS for the development of Web- based applications utilizing open source software and standards. This paper elaborates on the way SVG data is generated from existing cartographic and photogrammetric sources and the use of scripts in order to provide the user with interactive and animation capabilities, resulting to a comprehensive and user friendly map in the Internet.
    [Show full text]
  • Web Browser Access to Cryptographic Hardware
    Universidade do Minho Escola de Engenharia Leonel João Fernandes Braga Web Browser Access to Cryptographic Hardware Outubro de 2012 Universidade do Minho Escola de Engenharia Leonel João Fernandes Braga Web Browser Access to Cryptographic Harware Tese de Mestrado Mestrado em Engenharia Informática Trabalho realizado sob orientação de Doutor Vítor Francisco Fonte Supervisão na empresa de Engenheiro Renato Portela Outubro de 2012 Acknowledgments I could not conclude this work without acknowledge all the support, time, and understanding of all the people who have been around me during this phase and during my journey of life. I am sure that without them everything would be much more difficult, and the success would be harder to achieve. First of all, I want to thank to my supervisor Professor Victor Fonte for being so helpful and supportive. His guidance certainly improved my work and my knowledge as well. I want also to thank to Engenheiro Renato Portela from MULTICERT for enlightening me when I was more doubtful. A special thanks to MULTICERT for letting me enrol in this project: it made me grow professionally and enhanced my knowledge. I want also to thank the Firebreath community for clarifying all the doubts I had. Congrat- ulations for your great work as well. In this context, there is one person to whom I could not be more grateful: Pedro, thank you for your help and patience, even when I had lots of questions. I am also grateful for the discussions I had with Pedro and Ulisses: they gave me lots of ideas of how I could improve my work.
    [Show full text]
  • Fiz: a Component Framework for Web Applications
    Fiz: A Component Framework for Web Applications John K. Ousterhout Department of Computer Science Stanford University Abstract Fiz is a framework for developing interactive Web applications. Its overall goal is to raise the level of programming for Web applications, first by providing a set of high-level reusable components that simplify the task of creating interactive Web applications, and second by providing a framework that encourages other people to create addi- tional components. Components in Fiz cover both the front-end of Web applications (managing a browser-based user interface) and the back end (managing the application's data). Fiz makes it possible to create components that encapsulate complex behaviors such as Ajax-based updates, hiding many of the Web's complexities from applica- tion developers. Because of its focus on components, Fiz does not use mechanisms such as templates and model- view-controller in the same way as other frameworks. ger and more useful structures. We will release Fiz in 1 Introduction open-source form and hope to build a user community Although the World-Wide Web was initially conceived that creates an ever-increasing set of interesting com- as a vehicle for delivering and viewing documents, its ponents, which will make it dramatically easier to cre- focus has gradually shifted from documents to applica- ate applications that advance the state-of-the-art in Web tions. Facilities such as Javascript, the Document Ob- interactivity. ject Model (DOM), and Ajax have made it possible to offer sophisticated interactive applications over the The rest of this paper is organized as follows.
    [Show full text]
  • Web Application Hosting in the AWS Cloud AWS Whitepaper Web Application Hosting in the AWS Cloud AWS Whitepaper
    Web Application Hosting in the AWS Cloud AWS Whitepaper Web Application Hosting in the AWS Cloud AWS Whitepaper Web Application Hosting in the AWS Cloud: AWS Whitepaper Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. Web Application Hosting in the AWS Cloud AWS Whitepaper Table of Contents Abstract ............................................................................................................................................ 1 Abstract .................................................................................................................................... 1 An overview of traditional web hosting ................................................................................................ 2 Web application hosting in the cloud using AWS .................................................................................... 3 How AWS can solve common web application hosting issues ........................................................... 3 A cost-effective alternative to oversized fleets needed to handle peaks ..................................... 3 A scalable solution to handling unexpected traffic
    [Show full text]
  • Lecture 6: Dynamic Web Pages Lecture 6: Dynamic Web Pages Mechanics • Project Preferences Due • Assignment 1 out • Prelab for Next Week Is Non-Trivial
    Lecture 6: Dynamic Web Pages Lecture 6: Dynamic Web Pages Mechanics • Project preferences due • Assignment 1 out • PreLab for next week is non-trivial 1/31/2020 2 Lecture 5: JavaScript JavaScript has its Quirks • Procedural, Functional and Object-Oriented all at once • Objects are very different from Java/C++ o Newer versions have Java-like classes however • Scoping is different o var versus let or const o Declarations can follow uses o Declarations are optional • Automatic type conversion • Strict versus non-strict equality testing • eval function • Semicolons are optional if unambiguous • Read up on the language (prelab) 1/31/2020 3 Lecture 6: Dynamic Web Pages What is an Interactive Application • How do we want to use JavaScript • What does interactive mean • What does it do when you interact o Check inputs, compute next page o Change the page without getting a new page 1/30/2020 4 Lecture 6: Dynamic Web Pages Dynamic Web Page Examples • http://bdognom.cs.brown.edu:5000/ (spheree) • http://conifer.cs.brown.edu/s6 (s6) • http://conifer.cs.brown.edu:8888 (twitter) • http://fred4.cs.brown.edu:8800/ (sign) 1/23/2020 5 Lecture 6: Dynamic Web Pages Interactive Applications • Respond to user inputs • Change the display (e.g. add fields, show errors, …) • Dynamically check and verify inputs • Allow direct manipulation (drag and drop) • Use animation to highlight or emphasize or show things • Display external changes in real time • Provide input help (e.g. text completion) • Handle dynamic resizing of the display 1/23/2020 6 Lecture 6: Dynamic Web Pages Achieving Interactivity • Using CSS • Handling HTML events using JavaScript o Dynamically check and verify inputs o Handle direct manipulation • With modern HTML features • With animation/drawing/multimedia packages • By talking to the server continually • Displaying external changes in real time • Changing styles and the content of the page o Change the display (e.g.
    [Show full text]