Development of Modern User Interfaces in Angular Framework

Total Page:16

File Type:pdf, Size:1020Kb

Development of Modern User Interfaces in Angular Framework Masaryk University Faculty of Informatics Development of Modern User Interfaces in Angular Framework Master’s Thesis Bc. Martin Hamerník Brno, Fall 2020 This is where a copy of the official signed thesis assignment and a copy of the Statement of anAuthor is located in the printed version of the document. Declaration Hereby I declare that this paper is my original authorial work, which I have worked out on my own. All sources, references, and literature used or excerpted during elaboration of this work are properly cited and listed in complete reference to the due source. Bc. Martin Hamerník Advisor: RNDr. Daniel Tovarňák, Ph.D. i Acknowledgements My thanks belong to my advisor RNDr. Daniel Tovarňák, Ph.D for leading this thesis, valu- able consultations, and technological leadership. I would also like to thank my family and friends for their endless support. iii Abstract This thesis aims to analyze the current state of development of web user interfaces in gen- eral and in the CSIRT-MU environment, design and apply modern architectural approaches based on microservices, and create a set of supportive tools to improve quality and speed of development of new user interfaces. To achieve this goal, the author designs and imple- ments a framework for Angular applications. The framework consists of libraries provid- ing a unified pre-defined layout, a set of base components for the development ofcomplex user interfaces, and interfaces for authentication and authorization. In addition to the afore- mentioned capabilities, the framework proposes several architectural patterns suitable for developing complex Angular applications. A part of this thesis is a practical application of the proposed architectural patterns and integration of the framework into the KYPO Cyber Range Platform and Security Dashboard web applications. iv Keywords frontend, user interface, angular, kypo, cybersecurity, csirt-mu, software architecture, soft- ware engineering v Contents 1 Introduction 1 2 Modern Frontend Development 3 2.1 The Basics .......................................3 2.2 Types of Web Applications ..............................4 2.2.1 Traditional Web Applications . .4 2.2.2 Single Page Applications . .5 2.2.3 Progressive Web Applications . .5 2.3 Rendering Approaches ................................6 2.3.1 Static Server-side Rendering . .7 2.3.2 Server-side Rendering . .8 2.3.3 Client-side Rendering . .8 2.3.4 Combining the Approaches . .9 2.4 Modern JavaScript Frameworks ........................... 11 2.4.1 Angular . 11 2.4.2 React . 17 2.4.3 Vue . 19 2.5 Summary ....................................... 20 3 Environment 21 3.1 Organizational Context ................................ 21 3.1.1 CSIRT-MU . 21 3.1.2 Projects . 21 3.2 Author’s Work ..................................... 23 3.3 Technological Environment .............................. 23 3.3.1 Architecture of KYPO . 23 3.3.2 Architecture of Security Dashboard . 26 3.3.3 Development Technologies . 27 3.4 Motivation for Development of Unified Framework ................. 29 3.5 Functional Requirements of the Framework ..................... 30 3.6 Non-functional Requirements of the Framework ................... 30 4 Analysis and Design 31 4.1 Micro Frontends ................................... 31 4.2 Micro Frontends in Angular ............................. 34 4.3 Angular Libraries ................................... 35 4.4 Architecture of an Agenda .............................. 37 4.5 Smart-dumb Components ............................... 39 vii 4.6 Application State ................................... 40 4.7 Anatomy of CSIRT-MU Applications ........................ 41 4.8 API Code Generation ................................. 43 4.9 Build Once, Deploy Many .............................. 44 5 Sentinel Framework 47 5.1 Sentinel Common ................................... 47 5.2 Sentinel Layout .................................... 48 5.2.1 Breadcrumbs . 49 5.2.2 Notifications . 50 5.2.3 Schematics . 51 5.3 Sentinel Auth ..................................... 51 5.4 Sentinel Components ................................. 53 5.4.1 Bug Reporting . 54 5.4.2 Control Panel . 55 5.4.3 Confirmation Dialog . 55 5.4.4 Error Directive . 55 5.4.5 Infinite Scroll . 55 5.4.6 Infinite List . 56 5.4.7 Code Viewer . 56 5.4.8 Loading Component . 56 5.4.9 Markdown Editor . 56 5.4.10 Resource Selector . 57 5.4.11 Stepper . 57 5.4.12 Free Form . 57 5.4.13 Table . 59 5.4.14 Tour Guide . 60 5.4.15 User Assignment . 60 5.5 Agendas ........................................ 62 5.6 Dynamic Environments ............................... 64 6 Application of the Sentinel Framework 67 6.1 The KYPO GUI .................................... 67 6.2 The Security Dashboard GUI ............................. 70 7 Testing 73 7.1 General Principles .................................. 73 7.2 Testing in Angular .................................. 74 7.2.1 Karma . 74 7.2.2 Unit and Integration Testing . 75 viii 7.2.3 End-to-end Testing . 77 8 Conclusion 79 8.1 Future Work ...................................... 79 A Sentinel Framework 81 B KYPO CRP 83 Bibliography 85 ix 1 Introduction Over the last couple of years, a rise in the popularity of complex full-fledged web appli- cations can be observed. In our minds, writing a document, media playback, or even pro- gramming is no longer an activity strictly associated with desktop applications. Increasing performance of desktop and mobile devices, expansion of high-speed internet connection availability, and capabilities of modern web browsers allow us to conduct most of these activities directly in the browser. The increase of capabilities and amount of features, present in today’s web applications, projects into the complexity and costs of frontend development. Today’s frontend develop- ment often handles complex business and rendering logic. The goal of this thesis is to analyze the current state of development of user interfaces in the context of CSIRT-MU organization, design and apply architectural patterns, and pro- vide essential building blocks such as base components, to increase the efficiency of devel- opment of new user interfaces. After this introductory chapter, the thesis discusses the current state of modern fron- tend development in chapter 2. The chapter briefly introduces languages and standards of today’s web development, continued by a distinction of types of web applications and rendering approaches, and introduction of modern JavaScript frameworks. Chapter 3 describes the environment in which the thesis originated, puts the work in the context of CSIRT-MU from an organizational and technological point of view. It also states requirements on the architectural patterns and development framework. Chapter 4 analyzes modern architectural and design patterns used in frontend devel- opment and its suitability for the CSIRT-MU environment. It starts with the high-level ar- chitecture of web applications in the context of complex systems and continues to analyze patterns on lower levels, covering patterns for the decomposition of an application, state management, and best practices for component architecture. A framework developed to provide an implementation of the proposed architectural patterns as well as essential reusable building blocks for web applications is described in chapter 5. Next, chapter 6 demonstrates the application of the patterns and shared building blocks in two existing projects. Chapter 7 discusses approaches and possibilities of testing in frontend environment and specifically in the Angular framework. It also introduces and compares several libraries for testing. The last chapter summarizes the thesis, states its practical outputs, and proposes possi- bilities of further improvements and extension. 1 2 Modern Frontend Development Web development is a dynamic and ever-changing environment with a large and active open-source community. Standards, languages, and tooling are continually evolving. This chapter briefly introduces web development basics in section 2.1, followed by an overview of types of web applications in section 2.2. Section 2.3 covers current approaches application rendering and associated challenges related to performance, search engine visibility, and user experience. The last section 2.4 introduces Angular, React, and Vue, the three most popular JavaScript frameworks for building modern web applications. 2.1 The Basics HTML - Hyper Text Markup Language HTML is still the basic building block of the web. It gives structure and meaning to a simple text, in a way understood by a web browser. The HTML consists of elements. Attributes can modify the elements, and user interactions can be detected by listening to events [1]. When rendering a website, the web browser fetches an HTML file from a server, parses the HTML code, and constructs a hierarchical tree structure called Document Object Model (DOM) [2]. CSS - Cascading Style Sheets CSS is a style sheet language describing the presentation and layout of web documents. CSS consists of rules and selectors. Numerous predefined rules supported by web browsers can be used to alter the presentation of a DOM element. The element which should be affected by the rules is determined by matching a pattern described by a selector [3].Asthe DOM is being built, the web browser parses the CSS and creates a render tree, containing information on how should the HTML and its styles be displayed in a browser window [4]. JavaScript JavaScript is an interpreted programming language, mostly known and used for running
Recommended publications
  • Extending Basic Block Versioning with Typed Object Shapes
    Extending Basic Block Versioning with Typed Object Shapes Maxime Chevalier-Boisvert Marc Feeley DIRO, Universite´ de Montreal,´ Quebec, Canada DIRO, Universite´ de Montreal,´ Quebec, Canada [email protected] [email protected] Categories and Subject Descriptors D.3.4 [Programming Lan- Basic Block Versioning (BBV) [7] is a Just-In-Time (JIT) com- guages]: Processors—compilers, optimization, code generation, pilation strategy which allows rapid and effective generation of run-time environments type-specialized machine code without a separate type analy- sis pass or complex speculative optimization and deoptimization Keywords Just-In-Time Compilation, Dynamic Language, Opti- strategies (Section 2.4). However, BBV, as previously introduced, mization, Object Oriented, JavaScript is inefficient in its handling of object property types. The first contribution of this paper is the extension of BBV with Abstract typed object shapes (Section 3.1), object descriptors which encode type information about object properties. Type meta-information Typical JavaScript (JS) programs feature a large number of object associated with object properties then becomes available at prop- property accesses. Hence, fast property reads and writes are cru- erty reads. This allows eliminating run-time type tests dependent on cial for good performance. Unfortunately, many (often redundant) object property accesses. The target of method calls is also known dynamic checks are implied in each property access and the seman- in most cases. tic complexity of JS makes it difficult to optimize away these tests The second contribution of this paper is a further extension through program analysis. of BBV with shape propagation (Section 3.3), the propagation We introduce two techniques to effectively eliminate a large and specialization of code based on object shapes.
    [Show full text]
  • Onclick Event-Handler
    App Dev Stefano Balietti Center for European Social Science Research at Mannheim University (MZES) Alfred-Weber Institute of Economics at Heidelberg University @balietti | stefanobalietti.com | @nodegameorg | nodegame.org Building Digital Skills: 5-14 May 2021, University of Luzern Goals of the Seminar: 1. Writing and understanding asynchronous code: event- listeners, remote functions invocation. 2. Basic front-end development: HTML, JavaScript, CSS, debugging front-end code. 3. Introduction to front-end frameworks: jQuery and Bootstrap 4. Introduction to back-end development: NodeJS Express server, RESTful API, Heroku cloud. Outputs of the Seminar: 1. Web app: in NodeJS/Express. 2. Chrome extensions: architecture and examples. 3. Behavioral experiment/survey: nodeGame framework. 4. Mobile development: hybrid apps with Apache Cordova, intro to Ionic Framework, progressive apps (PWA). Your Instructor: Stefano Balietti http://stefanobalietti.com Currently • Fellow in Sociology Mannheim Center for European Social Research (MZES) • Postdoc at the Alfred Weber Institute of Economics at Heidelberg University Previously o Microsoft Research - Computational Social Science New York City o Postdoc Network Science Institute, Northeastern University o Fellow IQSS, Harvard University o PhD, Postdoc, Computational Social Science, ETH Zurich My Methodology Interface of computer science, sociology, and economics Agent- Social Network Based Analysis Models Machine Learning for Optimal Experimental Experimental Methods Design Building Platforms Patterns
    [Show full text]
  • Download Ebook ^ Javascript: Ajax, Cross-Site Scripting, Couchdb
    W5CAMG0U1NWQ < PDF ^ JavaScript: Ajax, Cross-Site Scripting, CouchDB, WebKit, JQuery, Dojo Toolkit, Bookmarklet, ActionScript, V8,... JavaScript: A jax, Cross-Site Scripting, Couch DB, W ebKit, JQuery, Dojo Toolkit, Bookmarklet, A ctionScript, V 8, SpiderMonkey, Qooxdoo, Ext JS Filesize: 7.09 MB Reviews It becomes an amazing book which i actually have at any time study. It is actually loaded with wisdom and knowledge You wont sense monotony at at any time of your respective time (that's what catalogues are for regarding should you request me). (Rosina Schowalter V) DISCLAIMER | DMCA EUQW6UIGSWMD > Kindle « JavaScript: Ajax, Cross-Site Scripting, CouchDB, WebKit, JQuery, Dojo Toolkit, Bookmarklet, ActionScript, V8,... JAVASCRIPT: AJAX, CROSS-SITE SCRIPTING, COUCHDB, WEBKIT, JQUERY, DOJO TOOLKIT, BOOKMARKLET, ACTIONSCRIPT, V8, SPIDERMONKEY, QOOXDOO, EXT JS Books LLC, Wiki Series, 2011. Condition: New. This item is printed on demand for shipment within 3 working days. Read JavaScript: Ajax, Cross-Site Scripting, CouchDB, WebKit, JQuery, Dojo Toolkit, Bookmarklet, ActionScript, V8, SpiderMonkey, Qooxdoo, Ext JS Online Download PDF JavaScript: Ajax, Cross-Site Scripting, CouchDB, WebKit, JQuery, Dojo Toolkit, Bookmarklet, ActionScript, V8, SpiderMonkey, Qooxdoo, Ext JS R6UOTKQRMAXT « PDF \ JavaScript: Ajax, Cross-Site Scripting, CouchDB, WebKit, JQuery, Dojo Toolkit, Bookmarklet, ActionScript, V8,... See Also A Smarter Way to Learn JavaScript: The New Approach That Uses Technology to Cut Your Effort in Half Createspace, United States, 2014. Paperback. Book Condition: New. 251 x 178 mm. Language: English . Brand New Book ***** Print on Demand *****.The ultimate learn-by-doing approachWritten for beginners, useful for experienced developers who want to... Read PDF » Why We Hate Us: American Discontent in the New Millennium Random House USA Inc, United States, 2009.
    [Show full text]
  • Comparing Javascript Engines
    Comparing Javascript Engines Xiang Pan, Shaker Islam, Connor Schnaith Background: Drive-by Downloads 1. Visiting a malicious website 2. Executing malicious javascript 3. Spraying the heap 4. Exploiting a certain vulnerability 5. Downloading malware 6. Executing malware Background: Drive-by Downloads 1. Visiting a malicious website 2. Executing malicious javascript 3. Spraying the heap 4. Exploiting a certain vulnerability 5. Downloading malware 6. Executing malware Background: Drive-by Downloads Background: Drive-by Downloads Setup: Making the prototype null while in the prototype creates a pointer to something random in the heap. Background: Drive-by Downloads Environment: gc( ) is a function call specific to Firefox, so the attacker would want to spray the heap with an exploit specific to firefox. Background: Drive-by Downloads Obfuscation: If the browser executing the javascript it firefox,the code will proceed to the return statement. Any other browser will exit with an error due to an unrecognized call to gc( ). Background: Drive-by Downloads Download: The return will be to a random location in the heap and due to heap-spraying it will cause shell code to be executed. Background: Goal of Our Project ● The goal is to decode obfuscated scripts by triggering javascript events ● The problem is when triggering events, some errors, resulting from disparity of different engines or some other reasons, may occur and terminate the progress ● We need to find ways to eliminate the errors and Ex 1therefore generate more de-obfuscated scripts <script> function f(){ //some codes gc(); var x=unescape(‘%u4149%u1982%u90 […]’)); eval(x); } </script> Ex 2 <script type="text/javascript" src="/includes/jquery/jquery.js"></script> Project Overview - Part One ● Modify WebKit engine so that it can generate error informations.
    [Show full text]
  • Demystifying V8 and Javascript Performance Twitter @Thlorenz | Github @Thlorenz | Irc Thlorenz Data Types
    Demystifying v8 and JavaScript Performance twitter @thlorenz | github @thlorenz | irc thlorenz Data Types ECMA defines data types v8 maps them to optimized data types Primitive Types Boolean Number String Null Undefined ! • Reference Types Object Array Typed Array Number ECMA double-precision 64-bit binary format IEEE 754 value v8 32-bit numbers to represent all values • ECMAScript standard: • number between -(2^53 -1) and 2^53 -1 • no specific type for integers • can represent floating-point numbers • three symbolic values: +Infinity, -Infinity, and NaN Tagging 32 bit signed integer (SMI) object pointer Tagging 31 bit signed integer (SMI) 0 object pointer 1 • numbers bigger than 31 bits are boxed • stored inside an object referenced via a pointer • adds extra overhead (at a minimum an extra lookup) • prefer SMIs for numeric values whenever possible • Objects Object Fixed Array Fixed Array Map Map Map Extra Properties Length Length Elements Property “poo” Property “0” Property “foo” Property “baz” Property “1” Property “bar” • above shows most common optimized representation • all blocks have a Map property describing their structure • most objects contain all their properties in single block of memory "foo", “bar" • object is a collection of properties aka key-value pairs • named properties that don't fit are stored in overflow array "poo", "baz" • numbered properties are stored in a separate contiguous array "1", “2" Objects Object Map Extra Properties Elements Property “foo” Property “bar” • property names are always strings • any name
    [Show full text]
  • Comparison of Javascript Frontend Frameworks and Web API Services Samarth Maganahalli1, Prof
    International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 07 Issue: 06 | June 2020 www.irjet.net p-ISSN: 2395-0072 Comparison of JavaScript Frontend Frameworks and Web API Services Samarth Maganahalli1, Prof. Rashmi R2 1Information Science and Engineering Dept., R. V. College of Engineering, Bengaluru, India 2Assistant Professor, Information Science and Engineering Dept., R. V. College of Engineering, Bengaluru, India ---------------------------------------------------------------------***--------------------------------------------------------------------- Abstract - In this era of constant innovation and technology may not always have prior knowledge of web services before developments, some tools have stayed for long while many they actually use it, therefore Web Services are platform others have faded or have been dominated by newer independent and loosely coupled. There are two major types technologies. However, we would all be able to concur that the of web services being used – SOAP principles based, and JavaScript programming language will be staying for a very REST principles based. In the following sections, a long term. This astounding bit of technology is cherished by comparison is drawn between the two and why RESTful web millions for its adaptability — it very well may be deployed on services have better performance. both the server side and customer side, utilized for mobile 2. LITERATURE SURVEY applications as well as desktop. Hence, in this period, picking a tech stack has become a tedious task. Each factor - project Detailed study of the background, the internal structure and objectives, resources, time, app size, end-users and budget thorough analysis was carried out of each of the 3 front-end need to be considered.
    [Show full text]
  • Git Services
    Git Services Wakanda includes Git features that will help you manage the evolution of your solutions and files. These features are designed to share code as well as to handle multi‐developer projects and solutions. Note: Git is a distributed revision control and source code management system. For more information about Git, please refer to the Git page on Wikipedia or go to the Git official website. Overview Why Use Git? As explained on the Git official website, Git is a distributed revision control and source code management system. Integrated in Wakanda, it basically addresses three main issues regarding project management: Revision control (or source control): Using Git, you can track and take control over changes to your source code. This means that you can go back in your version change‐history, check and revert modifications, merge different versions, and so on. Remote development: Using Git, you can work on a solution locally and deliver it at any time to your remote Wakanda production server. Multi‐user development: Using Git, several developers can work on the same project and share modifications through smart push and pull commands. Potentiel conflicts are handled through advanced features that allow you to merge, edit or ignore modifications. Git Main Features Git implementation in Wakanda provides you with the following main features, mainly available through the Git button menu in the Wakanda Studio toolbar: Commit locally: This is the basic Git feature. Commiting means taking an instant picture of your application files and thus being able to compare, revert or push them to remote locations.
    [Show full text]
  • A Little on V8 and Webassembly
    A Little on V8 and WebAssembly An V8 Engine Perspective Ben L. Titzer WebAssembly Runtime TLM Background ● A bit about me ● A bit about V8 and JavaScript ● A bit about virtual machines Some history ● JavaScript ⇒ asm.js (2013) ● asm.js ⇒ wasm prototypes (2014-2015) ● prototypes ⇒ production (2015-2017) This talk mostly ● production ⇒ maturity (2017- ) ● maturity ⇒ future (2019- ) WebAssembly in a nutshell ● Low-level bytecode designed to be fast to verify and compile ○ Explicit non-goal: fast to interpret ● Static types, argument counts, direct/indirect calls, no overloaded operations ● Unit of code is a module ○ Globals, data initialization, functions ○ Imports, exports WebAssembly module example header: 8 magic bytes types: TypeDecl[] ● Binary format imports: ImportDecl[] ● Type declarations funcdecl: FuncDecl[] ● Imports: tables: TableDecl[] ○ Types memories: MemoryDecl[] ○ Functions globals: GlobalVar[] ○ Globals exports: ExportDecl[] ○ Memory ○ Tables code: FunctionBody[] ● Tables, memories data: Data[] ● Global variables ● Exports ● Function bodies (bytecode) WebAssembly bytecode example func: (i32, i32)->i32 get_local[0] ● Typed if[i32] ● Stack machine get_local[0] ● Structured control flow i32.load_mem[8] ● One large flat memory else ● Low-level memory operations get_local[1] ● Low-level arithmetic i32.load_mem[12] end i32.const[42] i32.add end Anatomy of a Wasm engine ● Load and validate wasm bytecode ● Allocate internal data structures ● Execute: compile or interpret wasm bytecode ● JavaScript API integration ● Memory management
    [Show full text]
  • Approaches to Optimizing V8 Javascript Engine
    Дмитрий Бочарников. Подходы к оптимизации движка JavaScript V8. Труды ИСП РАН, том 27, вып. 6, 2015 г., Dmitry Botcharnikov. Approaches to Optimizing V8 JavaScript Engine. Trudy ISP RAN /Proc. ISP RAS, vol. 27, issue с.21-32 6, 2015, pp. 21-32 To speed up execution of JavaScript programs there were developed several optimization techniques in recent years. One example of modern high-performing JavaScript engine is a V8 engine [2] used in Google Chrome browser and node.js web server among others. This is an open source project which implemented some advanced optimization methods including Just-in-Time compilation [3], Approaches to Optimizing V8 JavaScript Polymorphic Inline Caches [4], optimized recompilation of hot code regions, On Engine Stack Replacement [5] &c. In previous year we were involved in project of optimizing performance of V8 JavaScript engine on major benchmark suites including Octane [6], SunSpider [7] Dmitry Botcharnikov <[email protected]> and Kraken [8]. The project was quite time limited, however we achieved about LLC Samsung R&D Institute Rus, 12, ul. Dvintsev, housing 1, office #1500, 10% total performance improvement compared to open source version. Moscow, 127018, Russian Federation The rest of paper is organized as follow: in Section 2 there is an architectural overview of V8, in Section 3 we enumerate and reason our approaches with more Abstract . JavaScript is one of the most popular programming languages in the world. Started detailed discussion in Sections 4, 5, and 6. We conclude in Section 7. as a simple scripting language for web browsers it now becomes language of choice for millions of engineers in the web, mobile and server-side development.
    [Show full text]
  • Webkit and Blink: Open Development Powering the HTML5 Revolution
    WebKit and Blink: Open Development Powering the HTML5 Revolution Juan J. Sánchez LinuxCon 2013, New Orleans Myself, Igalia and WebKit Co-founder, member of the WebKit/Blink/Browsers team Igalia is an open source consultancy founded in 2001 Igalia is Top 5 contributor to upstream WebKit/Blink Working with many industry actors: tablets, phones, smart tv, set-top boxes, IVI and home automation. WebKit and Blink Juan J. Sánchez Outline The WebKit technology: goals, features, architecture, code structure, ports, webkit2, ongoing work The WebKit community: contributors, committers, reviewers, tools, events How to contribute to WebKit: bugfixing, features, new ports Blink: history, motivations for the fork, differences, status and impact in the WebKit community WebKit and Blink Juan J. Sánchez WebKit: The technology WebKit and Blink Juan J. Sánchez The WebKit project Web rendering engine (HTML, JavaScript, CSS...) The engine is the product Started as a fork of KHTML and KJS in 2001 Open Source since 2005 Among other things, it’s useful for: Web browsers Using web technologies for UI development WebKit and Blink Juan J. Sánchez Goals of the project Web Content Engine: HTML, CSS, JavaScript, DOM Open Source: BSD-style and LGPL licenses Compatibility: regression testing Standards Compliance Stability Performance Security Portability: desktop, mobile, embedded... Usability Hackability WebKit and Blink Juan J. Sánchez Goals of the project NON-goals: “It’s an engine, not a browser” “It’s an engineering project not a science project” “It’s not a bundle of maximally general and reusable code” “It’s not the solution to every problem” http://www.webkit.org/projects/goals.html WebKit and Blink Juan J.
    [Show full text]
  • A Fully In-Browser Client and Server Web Application Debug and Test Environment
    LIBERATED: A fully in-browser client and server web application debug and test environment Derrell Lipman University of Massachusetts Lowell Abstract ging and testing the entire application, both frontend and backend, within the browser environment. Once the ap- Traditional web-based client-server application devel- plication is tested, the backend portion of the code can opment has been accomplished in two separate pieces: be moved to the production server where it operates with the frontend portion which runs on the client machine has little, if any, additional debugging. been written in HTML and JavaScript; and the backend portion which runs on the server machine has been writ- 1.1 Typical web application development ten in PHP, ASP.net, or some other “server-side” lan- guage which typically interfaces to a database. The skill There are many skill sets required to implement a sets required for these two pieces are different. modern web application. On the client side, initially, the In this paper, I demonstrate a new methodology user interface must be defined. A visual designer, in con- for web-based client-server application development, in junction with a human-factors engineer, may determine which a simulated server is built into the browser envi- what features should appear in the interface, and how to ronment to run the backend code. This allows the fron- best organize them for ease of use and an attractive de- tend to issue requests to the backend, and the developer sign. to step, using a debugger, directly from frontend code into The language used to write the user interface code is backend code, and to debug and test both the frontend most typically JavaScript [6].
    [Show full text]
  • Javascript About
    JavaScript About A light discussion of JavaScript in FreeSWITCH™. V8 Supersedes SpiderMonkey FreeSWITCH originally used the Mozilla SpiderMonkey JavaScript (ECMAScript) engine. It supports all the standard JavaScript language elements, for example 'for' and 'while' loops, regexps, etc. In addition there are things that are specific to FreeSWITCH which are listed below. You need to have mod_v8 compiled and installed to take advantage of these functions. Each of those sections is documented below. From commit b76233266931ca0b53f3bcc589277b972d714216 (January 14'th 2014) in git master, FreeSWITCH has support for the Google V8 JavaScript (ECMAScript) engine. This is provided from the module mod_v8. In current git master mod_v8 is the default JavaScript engine. mod_v8 is a drop-in replacement for mod_spidermonkey, so the old scripts should work as before. There are two differences though, the SpiderMonkey engine has support for built in classes XML and File; these classes are not available in the V8 engine. mod_v8 provides a different XML interface, you can read more about it here: Javascript XML. mod_v8 will publish similar functions as the File class, but this is still work in progress so check the status of that functionality. Build and Install mod_v8 is now built and installed by default. If for some reason it's not, do the following: Uncomment languages/mod_v8 in modules.conf in your src directory (make it always build and install v8) Run 'make mod_v8-install' to make and install just the v8 module Edit conf/autoload_configs/modules.conf.xml in your FreeSWITCH™ install directory to load mod_v8 Restart freeswitch Execution of a script There are two methods for script execution, via an API call jsrun and via an application javascript.
    [Show full text]