This document discusses Node.js functions, modules, and exporting modules. It covers defining functions, parameters, and return values. It also covers the different types of modules in Node.js including core modules, local modules, and third party modules. Finally, it discusses how to export variables, functions, objects, and classes from modules using module.exports.
Selenium Grid allows running automated tests across different browsers, operating systems, and machines. It works on a master-slave architecture with a hub that distributes tests to node machines. This allows reducing test execution time by running tests in parallel on multiple machines. Selenium Grid supports cross-browser testing and running tests with different data sets on multiple browser instances simultaneously. Setting up a hub is done by running a Java command, and nodes register with the hub using a URL from the hub terminal output. Jenkins can also be configured as a hub to integrate Selenium Grid into a CI/CD pipeline.
The Node.js movement has transformed the landscape of UI development. In this session we'll look at how Node.js can be leveraged on multiple layers of the web application development lifecycle. Attendees will learn how incorporating Node.js into your front-end build process can optimize code, allow you to use use new and upcoming JavaScript features in your code today, and to improve your asset delivery pipeline. This session will also cover how Node is changing the template rendering landscape, allowing developers to write "isomorphic" code that runs on the client and server. Lastly we'll look into using Node to achieve developer zen by keeping the codebase clean and limiting the risk of changes to the code causing unknown errors.
Node.js is an introduction to the Node.js platform for developing server-side JavaScript applications. It discusses Node.js background and architecture, JavaScript basics, installing Node.js and setting up a development environment. It then demonstrates building a simple web application using Express and connecting it to MongoDB. The document provides an overview of Node.js advantages like asynchronous non-blocking I/O and event-driven model that make it well-suited for real-time applications and APIs.
This is an introduction to NodeJS which is an open-source, cross-platform run-time environment for developing server-side Web Applications. It also discusses the implications of NodeJS in Internet of Things (IoT).
This document summarizes new features in Java 9 including Jshell for interactive coding, private methods in interfaces, factory methods for immutable collections, enhancements to try-with-resources, the Java Platform Module System (JPMS), Jlink for creating custom runtime images, and updates to the HTTP client and Process APIs. Key areas covered include modularization of the JDK, creating custom runtimes, improved resource management, and support for HTTP/2.
The document discusses key features of ECMAScript 6 (ES6), including:
- Default parameters, template literals, multi-line strings, spread operator, and enhanced object literals which add concise syntaxes.
- Arrow functions which provide a shorter syntax for writing anonymous functions.
- Block-scoped constructs like let and const that add block scoping to variables and constants.
- Classes which provide a cleaner way to define constructor functions and objects.
- Hoisting differences between function declarations and class declarations.
- Using ES6 today by compiling it to ES5 using a tool like Babel.
A11Y? I18N? L10N? UTF8? WTF? Understanding the connections between: accessib...mtoppa
This document discusses accessibility, internationalization, localization, and character sets. It begins by defining each term and explaining their connections. It emphasizes that accessibility is important for many users, not just those with disabilities. It provides guidelines for making content accessible and discusses tools for internationalization and localization in WordPress like loading text domains and generating POT files to enable translations.
This document discusses Node.js functions, modules, and exporting modules. It covers defining functions, parameters, and return values. It also covers the different types of modules in Node.js including core modules, local modules, and third party modules. Finally, it discusses how to export variables, functions, objects, and classes from modules using module.exports.
Selenium Grid allows running automated tests across different browsers, operating systems, and machines. It works on a master-slave architecture with a hub that distributes tests to node machines. This allows reducing test execution time by running tests in parallel on multiple machines. Selenium Grid supports cross-browser testing and running tests with different data sets on multiple browser instances simultaneously. Setting up a hub is done by running a Java command, and nodes register with the hub using a URL from the hub terminal output. Jenkins can also be configured as a hub to integrate Selenium Grid into a CI/CD pipeline.
The Node.js movement has transformed the landscape of UI development. In this session we'll look at how Node.js can be leveraged on multiple layers of the web application development lifecycle. Attendees will learn how incorporating Node.js into your front-end build process can optimize code, allow you to use use new and upcoming JavaScript features in your code today, and to improve your asset delivery pipeline. This session will also cover how Node is changing the template rendering landscape, allowing developers to write "isomorphic" code that runs on the client and server. Lastly we'll look into using Node to achieve developer zen by keeping the codebase clean and limiting the risk of changes to the code causing unknown errors.
Node.js is an introduction to the Node.js platform for developing server-side JavaScript applications. It discusses Node.js background and architecture, JavaScript basics, installing Node.js and setting up a development environment. It then demonstrates building a simple web application using Express and connecting it to MongoDB. The document provides an overview of Node.js advantages like asynchronous non-blocking I/O and event-driven model that make it well-suited for real-time applications and APIs.
This is an introduction to NodeJS which is an open-source, cross-platform run-time environment for developing server-side Web Applications. It also discusses the implications of NodeJS in Internet of Things (IoT).
This document summarizes new features in Java 9 including Jshell for interactive coding, private methods in interfaces, factory methods for immutable collections, enhancements to try-with-resources, the Java Platform Module System (JPMS), Jlink for creating custom runtime images, and updates to the HTTP client and Process APIs. Key areas covered include modularization of the JDK, creating custom runtimes, improved resource management, and support for HTTP/2.
The document discusses key features of ECMAScript 6 (ES6), including:
- Default parameters, template literals, multi-line strings, spread operator, and enhanced object literals which add concise syntaxes.
- Arrow functions which provide a shorter syntax for writing anonymous functions.
- Block-scoped constructs like let and const that add block scoping to variables and constants.
- Classes which provide a cleaner way to define constructor functions and objects.
- Hoisting differences between function declarations and class declarations.
- Using ES6 today by compiling it to ES5 using a tool like Babel.
A11Y? I18N? L10N? UTF8? WTF? Understanding the connections between: accessib...mtoppa
This document discusses accessibility, internationalization, localization, and character sets. It begins by defining each term and explaining their connections. It emphasizes that accessibility is important for many users, not just those with disabilities. It provides guidelines for making content accessible and discusses tools for internationalization and localization in WordPress like loading text domains and generating POT files to enable translations.
This document provides an introduction to Node.js. It discusses why JavaScript can be strange, but explains that JavaScript is relevant as the language of the web. It then discusses what Node.js is and its event-driven, non-blocking architecture. Popular Node.js applications like HTTP servers, REST APIs, and web sockets are mentioned. Examples are provided of building a simple web app with Express and Jade, a REST API with Restify, and using web sockets with Socket.io. The document also discusses using Mongoose with MongoDB for data modeling.
(** Selenium Training:
https://www.edureka.co/testing-with-selenium-webdriver **)
This Edureka PPT on Xpath Tutorial talks about Xpath fundamentals and steps involved in writing a Xpath Script. It also gives a brief idea on types of Xpath, Xpath Functions along with an example.
Following topics are covered in this tutorial:
Introduction to Xpath
XML DocumentX
Xpath Syntax
Types of Xpath
Xpath Functions
Selenium playlist: https://goo.gl/NmuzXE
The document outlines the agenda for a presentation on Node.js, which includes defining what Node.js is, how it works, examples of its use, how to learn Node.js, and what problems it is well-suited to solve. Key points are that Node.js is a JavaScript runtime built on Chrome's V8 engine, uses non-blocking I/O, and is well-suited for building microservices and real-time applications that require high throughput and scalability. Recommended resources for learning more include nodeschool.io, codewars.com, and nodeup.com.
The document discusses various Java concurrency concepts including threads, locks, semaphores, and concurrent collections. It provides examples to illustrate thread synchronization issues like race conditions and deadlocks. It also demonstrates how to use various concurrency utilities from java.util.concurrent package like CountDownLatch, Exchanger, PriorityBlockingQueue to synchronize thread execution and communication between threads. The examples aim to help developers write correct concurrent programs by avoiding common pitfalls in multithreaded programming.
This document provides an introduction to Node.js, including what it is, its advantages, and how its process model works. Node.js is an open-source JavaScript runtime environment that uses asynchronous programming and non-blocking I/O. It allows building highly scalable server-side applications using JavaScript. Unlike traditional web servers which use threads, Node.js runs in a single process with a single thread and handles I/O asynchronously so it can handle multiple requests concurrently without blocking. This increases performance and scalability compared to traditional threaded servers.
.NET Core is a new framework inside .NET Ecosystem. It helps developers to the new challenges of a Cloud First World, and it is not a replacement for the .NET Framework.
Docker allows packaging applications and dependencies into containers to ensure applications work seamlessly across environments. Docker images are blueprints used to create containers, which are runnable instances of images. Dockerization is useful for standardizing environments and ensuring applications run the same on different machines through containerization. The document demonstrates creating an MSSQL server Linux container using Docker by running a command to specify environment variables and port mapping.
Presentation Abstract:
Are your applications running on Java 8? Thinking about switching your application to run on Java 11 and wondering about where to start? Come to this session to learn about the most impactful changes that went into Java 11 and what you will need to do to move your application to run on Java 11. Topics will include the removal of APIs (such as Java EE packages) and behavior changes resulting from moving an application from running on Java 8 to running on Java 11. We will also go over tools to use that will help you identify potential issues within your application and how to resolve them.
ROS - an open-source Robot Operating Systemabirpahlwan
A presentation based on
"ROS - an open-source Robot Operating System" by Willow Garage.
Available at http://www.willowgarage.com/sites/default/files/icraoss09-ROS.pdf
Decoupling Drupal mit dem Lupus Nuxt.js Drupal Stacknuppla
This document summarizes a presentation about decoupling Drupal with the Lupus Nuxt.js stack using custom elements. It discusses:
1. The goals of decoupling the frontend for independent development and reusable components.
2. Using custom elements to render Drupal content on the frontend while still utilizing Drupal features like routing, authentication, and caching.
3. The architecture involves a Nuxt.js frontend that communicates with a Drupal backend via custom elements, allowing both parallel development and server-side rendering or static sites.
This document provides an overview of Spring Boot, including:
- Comparisons between Spring Boot, Spring, and Spring MVC.
- The advantages of Spring Boot like auto-configuration and ease of use.
- How to get started with Spring Boot using start.spring.io and key annotations.
- How Spring Boot handles dependencies, logging, exceptions, and databases.
- References additional resources on Spring Boot.
How To Achieve Single Pane of Glass Performance Management: A Road Map to Uni...eG Innovations
Achieving a single pane of glass for performance management has been an elusive goal, as organizations are faced with an increasingly complex mix of legacy, virtual and cloud technologies, as well as emerging operating models and evolving roles/skillsets.
But, monitoring the performance of digital business services demands more than visibility to just the end user experience, applications, or the underlying infrastructure. It requires an ability to automatically anticipate and isolate performance issues across a heterogeneous mix of technologies, devices and suppliers.
Digital business services are how end users experience IT, and that is how IT services must be managed. Achieving unified performance management will continue to be elusive until all stakeholders are aligned with this approach.
Watch this presentation by John Worthington, Director of Product Marketing at eG innovations, where he details some best practices for achieving the single pane of glass vision.
In this webinar, you will:
• Learn how monitoring can be leveraged in continuous improvement and other transformative change programs
• See how converged APM/IPM can accelerate achievement of a single point of glass for performance monitoring
• Identify some best practices you can apply for achieving unified monitoring and improving organizational transparency
This presentation shows what are JSON Web Tokens, explaining about the structure, signature, encryption and how we can integrate this with Authentication/Authorization together with Spring Security.
The link for the project in Github is:
https://github.com/BHRother/spring-boot-security-jwt
The example implements JWT + Spring Security in a Spring-Boot project.
Node.js is a server-side JavaScript platform built on Google's V8 engine. It is non-blocking and asynchronous, making it suitable for data-intensive real-time applications. The document discusses how to install Node.js and its dependencies on Ubuntu, introduces key Node.js concepts like events and the event loop, and provides examples of popular Node.js packages and use cases.
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript. It is an update to AngularJS with a focus on mobile and typesafety. Major versions include Angular 1.x, 2.x, 4.x and 5.x. Angular uses components, services and modules to build applications with templates and styles. It is compiled to JavaScript using transpilation and supports AOT and JIT compilation. Common tools used with Angular include the Angular CLI, Webpack and Zone.js.
Ben McCormick gave a presentation on how to save time by testing with Jest. He began with an introduction and explained that Jest is a JavaScript testing framework developed by Facebook that aims to solve common testing problems. He then demonstrated how Jest saves time through fast setup, writing tests quickly using familiar syntax and APIs, running tests in parallel and with a smart watch mode, and providing clear errors to fix tests fast. He concluded with a demo of Jest's features and took questions.
The document discusses React patterns and hooks. It covers topics like inheritance, composition, mixins, render props, higher order components (HOCs), and React hooks. Some key points:
- Inheritance and composition are approaches to code reuse in object-oriented programming. React uses composition over inheritance.
- Mixins were introduced in 2015 for code reuse but are now deprecated due to issues. Render props and HOCs are preferred patterns.
- Render props and HOCs allow code and state to be shared across components. Render props have fewer levels of nesting while HOCs are better for applying multiple concerns.
- Hooks were introduced to overcome class component limitations and support functional components with local state and lif
Co nowego w VS 2013 dla programistów ASP.NET?Bartlomiej Zass
Sesja z konferencji Microsoft Technology Summit 2013 na temat nowości, które pojawiły się w ASP.NET 4.5.1 oraz Visual Studio 2013 dla web deweloperów. Poruszane zagadnienia to m.in.: zmiany w IDE / Web Essentials, Web Forms, ASP.NET MVC 5, OWIN, SignalR, Web API 2
This document provides an introduction to Node.js. It discusses why JavaScript can be strange, but explains that JavaScript is relevant as the language of the web. It then discusses what Node.js is and its event-driven, non-blocking architecture. Popular Node.js applications like HTTP servers, REST APIs, and web sockets are mentioned. Examples are provided of building a simple web app with Express and Jade, a REST API with Restify, and using web sockets with Socket.io. The document also discusses using Mongoose with MongoDB for data modeling.
(** Selenium Training:
https://www.edureka.co/testing-with-selenium-webdriver **)
This Edureka PPT on Xpath Tutorial talks about Xpath fundamentals and steps involved in writing a Xpath Script. It also gives a brief idea on types of Xpath, Xpath Functions along with an example.
Following topics are covered in this tutorial:
Introduction to Xpath
XML DocumentX
Xpath Syntax
Types of Xpath
Xpath Functions
Selenium playlist: https://goo.gl/NmuzXE
The document outlines the agenda for a presentation on Node.js, which includes defining what Node.js is, how it works, examples of its use, how to learn Node.js, and what problems it is well-suited to solve. Key points are that Node.js is a JavaScript runtime built on Chrome's V8 engine, uses non-blocking I/O, and is well-suited for building microservices and real-time applications that require high throughput and scalability. Recommended resources for learning more include nodeschool.io, codewars.com, and nodeup.com.
The document discusses various Java concurrency concepts including threads, locks, semaphores, and concurrent collections. It provides examples to illustrate thread synchronization issues like race conditions and deadlocks. It also demonstrates how to use various concurrency utilities from java.util.concurrent package like CountDownLatch, Exchanger, PriorityBlockingQueue to synchronize thread execution and communication between threads. The examples aim to help developers write correct concurrent programs by avoiding common pitfalls in multithreaded programming.
This document provides an introduction to Node.js, including what it is, its advantages, and how its process model works. Node.js is an open-source JavaScript runtime environment that uses asynchronous programming and non-blocking I/O. It allows building highly scalable server-side applications using JavaScript. Unlike traditional web servers which use threads, Node.js runs in a single process with a single thread and handles I/O asynchronously so it can handle multiple requests concurrently without blocking. This increases performance and scalability compared to traditional threaded servers.
.NET Core is a new framework inside .NET Ecosystem. It helps developers to the new challenges of a Cloud First World, and it is not a replacement for the .NET Framework.
Docker allows packaging applications and dependencies into containers to ensure applications work seamlessly across environments. Docker images are blueprints used to create containers, which are runnable instances of images. Dockerization is useful for standardizing environments and ensuring applications run the same on different machines through containerization. The document demonstrates creating an MSSQL server Linux container using Docker by running a command to specify environment variables and port mapping.
Presentation Abstract:
Are your applications running on Java 8? Thinking about switching your application to run on Java 11 and wondering about where to start? Come to this session to learn about the most impactful changes that went into Java 11 and what you will need to do to move your application to run on Java 11. Topics will include the removal of APIs (such as Java EE packages) and behavior changes resulting from moving an application from running on Java 8 to running on Java 11. We will also go over tools to use that will help you identify potential issues within your application and how to resolve them.
ROS - an open-source Robot Operating Systemabirpahlwan
A presentation based on
"ROS - an open-source Robot Operating System" by Willow Garage.
Available at http://www.willowgarage.com/sites/default/files/icraoss09-ROS.pdf
Decoupling Drupal mit dem Lupus Nuxt.js Drupal Stacknuppla
This document summarizes a presentation about decoupling Drupal with the Lupus Nuxt.js stack using custom elements. It discusses:
1. The goals of decoupling the frontend for independent development and reusable components.
2. Using custom elements to render Drupal content on the frontend while still utilizing Drupal features like routing, authentication, and caching.
3. The architecture involves a Nuxt.js frontend that communicates with a Drupal backend via custom elements, allowing both parallel development and server-side rendering or static sites.
This document provides an overview of Spring Boot, including:
- Comparisons between Spring Boot, Spring, and Spring MVC.
- The advantages of Spring Boot like auto-configuration and ease of use.
- How to get started with Spring Boot using start.spring.io and key annotations.
- How Spring Boot handles dependencies, logging, exceptions, and databases.
- References additional resources on Spring Boot.
How To Achieve Single Pane of Glass Performance Management: A Road Map to Uni...eG Innovations
Achieving a single pane of glass for performance management has been an elusive goal, as organizations are faced with an increasingly complex mix of legacy, virtual and cloud technologies, as well as emerging operating models and evolving roles/skillsets.
But, monitoring the performance of digital business services demands more than visibility to just the end user experience, applications, or the underlying infrastructure. It requires an ability to automatically anticipate and isolate performance issues across a heterogeneous mix of technologies, devices and suppliers.
Digital business services are how end users experience IT, and that is how IT services must be managed. Achieving unified performance management will continue to be elusive until all stakeholders are aligned with this approach.
Watch this presentation by John Worthington, Director of Product Marketing at eG innovations, where he details some best practices for achieving the single pane of glass vision.
In this webinar, you will:
• Learn how monitoring can be leveraged in continuous improvement and other transformative change programs
• See how converged APM/IPM can accelerate achievement of a single point of glass for performance monitoring
• Identify some best practices you can apply for achieving unified monitoring and improving organizational transparency
This presentation shows what are JSON Web Tokens, explaining about the structure, signature, encryption and how we can integrate this with Authentication/Authorization together with Spring Security.
The link for the project in Github is:
https://github.com/BHRother/spring-boot-security-jwt
The example implements JWT + Spring Security in a Spring-Boot project.
Node.js is a server-side JavaScript platform built on Google's V8 engine. It is non-blocking and asynchronous, making it suitable for data-intensive real-time applications. The document discusses how to install Node.js and its dependencies on Ubuntu, introduces key Node.js concepts like events and the event loop, and provides examples of popular Node.js packages and use cases.
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript. It is an update to AngularJS with a focus on mobile and typesafety. Major versions include Angular 1.x, 2.x, 4.x and 5.x. Angular uses components, services and modules to build applications with templates and styles. It is compiled to JavaScript using transpilation and supports AOT and JIT compilation. Common tools used with Angular include the Angular CLI, Webpack and Zone.js.
Ben McCormick gave a presentation on how to save time by testing with Jest. He began with an introduction and explained that Jest is a JavaScript testing framework developed by Facebook that aims to solve common testing problems. He then demonstrated how Jest saves time through fast setup, writing tests quickly using familiar syntax and APIs, running tests in parallel and with a smart watch mode, and providing clear errors to fix tests fast. He concluded with a demo of Jest's features and took questions.
The document discusses React patterns and hooks. It covers topics like inheritance, composition, mixins, render props, higher order components (HOCs), and React hooks. Some key points:
- Inheritance and composition are approaches to code reuse in object-oriented programming. React uses composition over inheritance.
- Mixins were introduced in 2015 for code reuse but are now deprecated due to issues. Render props and HOCs are preferred patterns.
- Render props and HOCs allow code and state to be shared across components. Render props have fewer levels of nesting while HOCs are better for applying multiple concerns.
- Hooks were introduced to overcome class component limitations and support functional components with local state and lif
Co nowego w VS 2013 dla programistów ASP.NET?Bartlomiej Zass
Sesja z konferencji Microsoft Technology Summit 2013 na temat nowości, które pojawiły się w ASP.NET 4.5.1 oraz Visual Studio 2013 dla web deweloperów. Poruszane zagadnienia to m.in.: zmiany w IDE / Web Essentials, Web Forms, ASP.NET MVC 5, OWIN, SignalR, Web API 2
Jak zbudować aplikacje z wykorzystaniem funkcjonalności windows server 2016...Lukasz Kaluzny
Zagadnienia:
Nowe funkcjonalności Microsoft Windows Server 2016 w kontekście budowy aplikacji typu cloud-native:
Zastosowanie Nano Servera, czyli odchudzonej wersji Windows Server 2016, oszczędniej korzystającej z zasobów IT.
Uruchamianie na Nano Serwerach WS2016 aplikacji napisanych w .NET, Javie, Pythonie (Django) czy JavaScript (Node.js).
Migracja - bez konieczności zmiany kodu - istniejących aplikacji do architektury opartej o kontenery. Kontenery to rozwiązania oparte na szybkiej wirtualizacji na poziomie procesów. Nie tworzą dodatkowych instancji jądra systemu operacyjnego. Na tym samym hoście można uruchomić większą ilość kontenerów niż maszyn wirtualnych. Uruchamianie i zamykanie kontenera jest też znacznie szybsze, niż uruchamianie i zamykanie maszyny wirtualnej.
Wspólna praca developerów i administratorów nad produktem, czyli DevOps z wykorzystaniem Windows Server 2016 i Visual Studio Team Services w chmurze Azure. Automatyczne budowanie obrazów kontenerów dla każdego nowego kodu i wdrażania ich w różne środowiska
Łatwiejsze zarządzanie obciążeniami aplikacji pomiędzy zasobami we własnej infrastrukturze i w chmurze Azure dzięki WS2016 oraz Azure Service Fabric.
Funkcjonalności Windows Server 2016 powstałe z myślą o wygodzie administratorów:
Nowa wersja PowerShell 5.0 - przynosząca lepsze funkcjonowanie powłoki linii poleceń oraz udoskonalony język skryptowy,
Azure Remote Server Management Tools – zdalne zarządzanie Nano i Windows Server 2016 z Azure,
PowerShell Direct,
Nested Virtualization jako wsparcie ułatwienia nauki i testów.
Jak oszczędzać czas zespołu w środowisku mikroserwisów, czyli efektywny flow ...Mateusz Paprocki, PMP
Każdy zespół pracujący w środowisku mikroserwisów boryka się z podobnymi problemami: jak dbać o jakość kodu, organizować feature branche, testować zmiany, budować kolejne wersje aplikacji, zarządzać środowiskami, czy, finalnie, doprowadzić do automatycznych release’ów. W prezentacji przygotowanej przez trójmiejski software house Neoteric zobaczymy jedną z koncepcji rozwiązania problemów. Przygotujcie się na solidną dawkę Jenkinsa, Dockera, GitFlow oraz Sonara!
LocalStack to framework udostępniający łatwe w użyciu mocki usług stosu AWS. Podczas prezentacji Maciej skorzystał z serwisu zbudowanego z użyciem serverlessowego Boilerplate autorstwa The Software House oraz skorzystał z takich usług AWS jak API Gateway, DynamoDB, Lambda, StepFunctions czy SQS. Następnie omówił podejście do testowania rozwiązania. Dzięki prezentacji możecie poznać wady i zalety LocalStack. A na koniec Maciej pokazuje przepływ testowy w GitHub Actions, który zwiększy pewność przyszłych zmian.
Vicodein - Krystian Knapik o tym jak .NET Core wspomaga budowę nowoczesnych, wydajnych i świetnych pod względem User Experience aplikacji SPA. Także o tym co oferuje framework i dlaczego jest odpowiednim wyborem. Idzie nowe!
Vicodein - Krystian Knapik o tym jak .NET Core wspomaga budowę nowoczesnych, wydajnych i świetnych pod względem User Experience aplikacji SPA. Także o tym co oferuje framework i dlaczego jest odpowiednim wyborem. Idzie nowe!
O tworzeniu rozwiązań mobilnych z punktu widzenia front-end dewelopera. Omówienie istniejących rozwiązań oraz głębsza analiza biblioteki NativeScript wraz z demem.
Demo #1: https://github.com/pawelkondraciuk/nativescript-hello-world-demo-1
Demo #2: https://github.com/pawelkondraciuk/sample-groceries-demo-2
2. Agenda
1. Poznajemy Node.js
2. Architektura Node.js
3. Instalujemy Node.js
4. System modułów w Node.js
5. NPM w pigułce
6. Asynchroniczne programowanie
4. Tworzymy prosty serwer HTTP
5. Poznajemy framework Express
6. Narzędzia do przeładowywania kodu
7. Debugujemy serwer HTTP
8. Deploy na Heroku / Azure
3. Node.js to wieloplatformowe środowisko uruchomieniowe JavaScript na licencji open-
source, które umożliwia użycie kodu JavaScript bezpośrednio na komputerze, bez
wykorzystania przeglądarki.
Node.js używa modelu sterowanego zdarzeniami oraz wykorzystuje w sposób
asynchroniczny, nieblokujący operacje wejścia/wyjścia (I/O) umożliwiając tym samym
tworzenie wydajnych, skalowalnych aplikacji.
Podstawą działania Node.js jest silnik V8, który został stworzony przez firmę Google na
potrzeby przeglądarki Chrome, do obsługi skryptów napisanych w języku JavaScript.
https://nodejs.org/
4. Historia Node.js
Node.js został opracowany przez Ryan Dahl w 2009 roku, na początku tylko dla Linuxa.
Sponsorowany przez firmę Joyent.
Czerwiec 2011, firma Microsoft współpracowała z firmą Joyent, aby pomóc w utworzeniu
oryginalnej wersji Node.js dla systemu Windows.
Od 2015 projektem zarządza niezależna fundacja Node.js będąca częścią fundacji Linux.
Historia Node.js
Członkowie Fundacji Node.js
5. • Asynchroniczność i sterowanie zdarzeniami
• Szybkość działania
• Wysoka skalowalność
• npm
• Społeczność
• JavaScript
• LTS (Long Term Support)
Główne funkcje/korzyści Node.js
7. Ale nie tylko, Node.js znajdziemy wszędzie!
● Narzędzia dla programistów m.in.: Babel, Eslint, Typescript, Webpack
● Tworzenie aplikacji mobilnych, m.in: Ionic, React native, NativeScript
● Aplikacje desktopowe: Electron
● Internet rzeczy - Johny five http://johnny-five.io/
● Usługi chmurowe (AWS, Microsoft Azure, Google Cloud Platfrom),
np: Usługi Azure dla Node.js pozwalają na:
- Tworzenia aplikacji Node.js
- Tworzenie funkcji Node.js (serverless)
- Budowanie aplikacji w stosie MEAN z bazą CosmosDB
https://docs.microsoft.com/en-us/javascript/azure/?view=azure-node-latest
8.
9. Zadania wymagające obliczeń mogą spowodować, że Twoja aplikacja stanie się
niedostępna albo powolna, następujące sytuacje mogą powodować problemy
wydajnościowe:
• synchroniczne I/O
• skomplikowane szablony do renderowania
• parsowanie dużych obiektów JSON (JSON.parse)
• wyrażenia regularne
• obliczenia kryptograficzne
Problemy związane z Node.js
15. Node.js posiada prosty system ładowania modułów oparty na standardzie CommonJs. W
pliku Node.js pliki i moduły są w korespondencji jeden-do-jednego (każdy plik
traktowany jest jako oddzielny moduł).
Chcąc załadować jakiś moduł w Node.js używamy funkcji require(‘nazwa modułu’).
Każdy moduł używa obiektu module.exports aby udostępnić swoje API dla innych
modułów.
Obiekt module.exports każdego modułu jest wynikiem wywołania funkcji require.
Moduły w Node.js
16. Kroki, przez jakie przechodzi Node.js w momencie wywołania funkcji require :
• Resolving – szukanie absolutnej ścieżki do modułu
• Loading – ustalenie typu ładowanego pliku
• Wrapping – utworzenie prywatnego zasięgu dla modułu poprzez „owinięcie”
go we funkcje wrapera
• Evaluating – Wykonanie kodu przez VM (V8 Virtual Machine)
• Caching – Cachowanie rezultatu, dzięki czemu przy kolejnym żądaniu
modułu nie będzie trzeba przechodzić przez wszystkie poprzednie kroki
Jak działa require?
17. Node.js i moduły EcmaScript 2015 (ES6)
Standard EcmaScript (ES) 2015 wprowadził długo oczekiwaną składnię modułów
w JavaScript.
Moduły ES6 wprowadziły dwa słowa kluczowe:
● import - służy do zaimportowania modułu
● export - służy do wyeksportowania wartości z modułu
Node.js od wersji 8.5.0 ma eksperymentalne wsparcie dla modułów ES6 które
możemy włączyć przy pomocy flagi --experimental-modules a sam plik
używając składni ES6 musi mieć rozszerzenie .mjs.
node --experimental-modules index.mjs
19. NPM to menadżer pakietów używany przez aplikacje Node.js.
Rejestr npm obsługuje ponad 640,000 pakietów.
NPM jest tym czym Maven dla Java czy Composer dla PHP.
Podczas pracy z NPM korzystamy głównie ze strony NPM (https://npmjs.com) oraz z
narzędzia linii poleceń NPM.
Strona WWW oraz domyślnie narzędzie linii poleceń używają tego samego rejestru do
pokazywania i wyszukiwania pakietów.
Menedżer NPM instalowany jest podczas instalacji Node.js, ale warto go zaktualizować do
najnowszej wersji, komendą
npm install –g npm
Poznajemy npm