This document provides an overview of Git and GitHub. It discusses what Git is, how it works by storing content in trees and commits, and its advantages like efficiency and handling non-linear development. It also covers installing and configuring Git, including common settings. Key Git workflows like staging changes and committing are demonstrated. The document explains Git's three-tree model and inspection tools. It emphasizes the importance of branching in Git and how branches are cheap to create. Merging branches is shown to be powerful in Git.
The document discusses various ways to structure microservices using different technologies like React.js, Clojure, and Golang. It provides examples of Dockerfile configurations to daemonize or run microservices that incorporate a React.js or Clojure frontend with a Golang or Clojure backend. It also briefly mentions tools like Webpack, Swagger, and deploying microservices to Azure.
Git and github - Verson Control for the Modern DeveloperJohn Stevenson
An introduction to Git and Github, tools for distributed version control that give an easy to use and highly collaborative approach to version code and configuration.
This document provides an introduction to Git and GitHub. It begins with an overview of source control and the history of version control systems like SVN and CVS. It then discusses key concepts of Git like its three-tree architecture, branches and merging, and undoing changes. The document concludes with an introduction to GitHub, how to clone and collaborate on repositories, and some tips on reducing merge conflicts.
The document discusses Git and GitHub. It begins with an overview of distributed version control systems (DVCS) like Git and how they differ from centralized version control systems. It then covers the basics of Git, including installing Git, initializing repositories, tracking changes, branching and merging. Finally, it discusses GitHub and how developers can use features like forking, pull requests and wikis to collaborate on projects hosted there. Common Git workflows like Git flow are also introduced.
A Git tutorial for rookies that covers most aspects of basic Git usage for a medium sized project.
This was originally a semestral lecture given at the TU Wien for the course "Software Engineering and Project Management"
Git is a distributed version control system that allows developers to collaborate on projects. It allows developers to create branches to develop features independently and merge them together later. Developers can also rewrite history by rebasing or reverting commits. The document provides tutorials on basic Git commands like init, add, commit, status, log, checkout, branch, merge, and remote repositories. It explains how to set up a local Git repository and share code between remote repositories for collaboration.
This document provides a summary of a mini Git tutorial. It begins with an introduction to version control systems and how they allow users to track changes, revert files, and recover from errors. It then explains the basics of Git, including its three main states (committed, modified, staged), how it stores content addressed by SHA-1 hashes, and the local workflow of modifying, staging, and committing files. The document proceeds to cover installing Git, basic configuration, cloning repositories, recording changes, undoing actions, and working with remote repositories hosted online. It concludes by mentioning how Git stores data as commit snapshots and uses branches to track parallel development lines.
This document provides an introduction to using Git and GitHub for version control of documents and collaboration. It explains the basic workflow of creating, editing, and saving files individually. It then introduces Git as a tool to track changes to documents over time, including who made each change and when. The document outlines setting up Git locally and using basic commands like commit, diff, log, branch, merge, and push/pull to the remote GitHub repository. It highlights key GitHub features like the profile page, repository page, pull requests, and hosting websites for free using GitHub Pages.
Deep dark-side of git: How git works internallySeongJae Park
Describe how git works internally using small and perfect plumbing commands.
The slide have been used at GDG DevFest 2014 and SOSCON 2014.
The slide can be updated later. And, the latest version would always be provided from this page always.
This document provides an outline for a course on learning Git version control. The course covers getting Git setup, the basic concepts and workflow of Git, branching and merging, resolving conflicts, working with remote repositories, and various Git commands. The document lists several modules that will be covered, including getting started, everyday Git usage, branching, merging and rebasing, additional tools and concepts, and advice on applying the skills learned. The goal is to teach participants how to install and use Git for version control on individual, local, and distributed projects.
This document provides an introduction to using Git and GitHub for version control. It begins with an overview and roadmap. It then discusses installing and configuring Git locally, and registering for a GitHub account. It covers basic Git commands and concepts like directories, the command line interface, adding and committing changes. It also discusses creating and cloning repositories on GitHub, as well as pushing and pulling changes between local and remote repositories. Finally, it briefly touches on branches and pull requests in Git.
Git: An introduction of plumbing and porcelain commandsth507
This document provides an introduction to Git and version control systems. It begins with a poll asking about experience with Git, SVN, and git rebase. It then discusses key Git concepts like distributed version control, the working/staging area, and how Git works. It covers the different types of version control systems and compares centralized and distributed models. The document dives deeper into Git objects like blobs, trees, commits and references. It also distinguishes between low-level plumbing commands and higher-level porcelain commands.
This document provides an overview of Docker concepts and tools for beginners. It covers:
1. The differences between virtual machines and containers, and the container lifecycle.
2. Tools in the Docker ecosystem such as Docker Engine, Docker CLI, Docker Hub, Docker Compose, and networking/volume commands.
3. Examples of using Docker Engine, Docker Hub for images, networking, volumes and deploying images to Azure PaaS.
4. How to use Docker Compose to define and run multi-container applications.
Do you know the basics of Git but wonder what all the hype is about? Do you want the ultimate control over your Git history? This tutorial will walk you through the basics of committing changes before diving into the more advanced and "dangerous" Git commands.
Git is an open source, distributed version control system used to track many different projects. You can use it to manage anything from a personal notes directory to a multi-programmer project.
This tutorial provides a short walk through of basic git commands and the Git philosophy to project management. Then we’ll dive into an exploration of the more advanced and “dangerous” Git commands. Watch as we rewrite our repository history, track bugs down to a specific commit, and untangle commits into an LKML-worthy patchset.
This document provides an introduction to GIT. It describes the advantages of GIT over other version control systems like SVN. It explains the basic data model and architecture of GIT including local repositories, branches, and remote repositories. It also covers common GIT commands for configuring, tracking changes, viewing history, sharing changes with others through pushing and pulling. Finally, it provides some tips for using GIT aliases, auto-completion, and external diff/merge tools.
"Git Tutorial" a hands-on session on Git presented at Theoretical Neuroscience Lab, IISER Pune.
Very brief overview of Git commands.
Github: https://github.com/pranavcode/git-tutorial
This document provides a summary of common Git commands for setting up and working with repositories, saving changes, inspecting history, undoing changes, rewriting history, syncing with remote repositories, branching, and merging. It discusses initializing and cloning repositories, adding and committing changes, viewing logs and checking out commits, reverting and resetting changes, amending commits and rebasing, fetching and pushing to remote repositories, branching, and merging branches. It also cautions against amending shared commits or force pushing to avoid overwriting others' work.
This document provides an overview of common Git commands for setting up and working with repositories. It explains how to initialize a new repository with `git init`, clone an existing repository to obtain a local copy with `git clone`, and configure user settings and aliases with `git config`. Key points are that `git init` is usually only run once per project to set up the central repository, while developers typically clone repositories to obtain local copies, and `git config` is used to define author information and customize settings.
This document provides an introduction and overview of Git and GitHub. It covers topics such as why to use Git, how to configure Git, how to create repositories and link them to local projects, common Git commands like add, commit, push and pull, how to work with branches, and collaboration using pull requests. The document is intended to teach someone how to use Git and GitHub from the basics.
This document provides an overview of GitHub and its technical architecture presented by Chris Wanstrath. Some key points:
- GitHub started as a git hosting site but became a social coding platform where users can see friends' activity and leave comments.
- It uses Ruby on Rails for the main codebase, Resque for background jobs, MySQL for the database, and nginx, unicorn, and memcached.
- Git operations are handled by Grit and communicated to file servers via the BERT-RPC based Smoke protocol.
- Caching, asset optimization, and AJAX loading are used extensively to improve performance. Monitoring tools include Nagios, Resque Web, Haystack, and CollectD.
Github - Git Training Slides: FoundationsLee Hanxue
Slide deck with detailed step breakdown that explains how git works, together with simple examples that you can try out yourself. Slides originated from http://teach.github.com/articles/course-slides/
Author: https://twitter.com/matthewmccull
This document provides an introduction to the version control system Git. It defines key Git concepts like the working tree, repository, commit, and HEAD. It explains that Git is a distributed version control system where the full history of a project is available once cloned. The document outlines Git's history, with it being created by Linus Torvalds to replace the commercial BitKeeper tool. It then lists and briefly describes important Git commands for local and collaboration repositories, including config, add, commit, log, diff, status, branch, checkout, merge, remote, clone, push, and pull. Lastly, it covers installing Git and generating SSH keys on Windows for accessing Git repositories.
This document provides an introduction to Docker and containerization. It covers:
1. The differences between virtual machines and containers, and the container lifecycle.
2. An overview of the Docker ecosystem tools.
3. Instructions for installing and using the Docker Engine and Docker CLI to build, run, and manage containers.
4. A demonstration of using Docker Hub to build and store container images.
5. An introduction to Docker networking and volumes.
6. A demonstration of using Docker Compose to define and run multi-container applications.
7. Suggestions for further learning resources about Docker.
Version control systems allow recording changes to files over time and reverting files back to previous states. Git is an open source distributed version control system initially created by Linus Torvalds for Linux kernel development. Git stores project snapshots over time as differences from a base version of files and allows fully local operations without needing network access. Basic Git commands include add, commit, branch, checkout, merge, push and pull to manage changes to a local or remote repository.
Git is a distributed version control system created by Linus Torvalds to manage changes to the Linux kernel. It allows developers to work independently and merge changes later. Git uses local repositories that can act as both clients and servers, avoiding the need to be connected to a central server. The basic Git workflow involves modifying files in the working directory, staging changes, and committing snapshots of the staged changes to the local repository. Common Git commands are used to add, commit, push, pull, branch, merge, and more. Key features of Git include being open source, distributed, providing security and speed, supporting non-linear development with branching and merging, and assuring data integrity.
El documento describe las fases para la presentación de un escrito, incluyendo seleccionar un tema, recopilar información a través de notas, artículos y material gráfico, formular objetivos, redactar un borrador, y escribir una conclusión que resume el contenido esencial. También recomienda crear un esquema y usar el borrador para corregir errores.
This short document promotes creating presentations using Haiku Deck, a tool for making slideshows. It encourages the reader to get started making their own Haiku Deck presentation and sharing it on SlideShare. In just one sentence, it pitches the idea of using Haiku Deck to easily design slideshows.
This document provides an introduction to using Git and GitHub for version control of documents and collaboration. It explains the basic workflow of creating, editing, and saving files individually. It then introduces Git as a tool to track changes to documents over time, including who made each change and when. The document outlines setting up Git locally and using basic commands like commit, diff, log, branch, merge, and push/pull to the remote GitHub repository. It highlights key GitHub features like the profile page, repository page, pull requests, and hosting websites for free using GitHub Pages.
Deep dark-side of git: How git works internallySeongJae Park
Describe how git works internally using small and perfect plumbing commands.
The slide have been used at GDG DevFest 2014 and SOSCON 2014.
The slide can be updated later. And, the latest version would always be provided from this page always.
This document provides an outline for a course on learning Git version control. The course covers getting Git setup, the basic concepts and workflow of Git, branching and merging, resolving conflicts, working with remote repositories, and various Git commands. The document lists several modules that will be covered, including getting started, everyday Git usage, branching, merging and rebasing, additional tools and concepts, and advice on applying the skills learned. The goal is to teach participants how to install and use Git for version control on individual, local, and distributed projects.
This document provides an introduction to using Git and GitHub for version control. It begins with an overview and roadmap. It then discusses installing and configuring Git locally, and registering for a GitHub account. It covers basic Git commands and concepts like directories, the command line interface, adding and committing changes. It also discusses creating and cloning repositories on GitHub, as well as pushing and pulling changes between local and remote repositories. Finally, it briefly touches on branches and pull requests in Git.
Git: An introduction of plumbing and porcelain commandsth507
This document provides an introduction to Git and version control systems. It begins with a poll asking about experience with Git, SVN, and git rebase. It then discusses key Git concepts like distributed version control, the working/staging area, and how Git works. It covers the different types of version control systems and compares centralized and distributed models. The document dives deeper into Git objects like blobs, trees, commits and references. It also distinguishes between low-level plumbing commands and higher-level porcelain commands.
This document provides an overview of Docker concepts and tools for beginners. It covers:
1. The differences between virtual machines and containers, and the container lifecycle.
2. Tools in the Docker ecosystem such as Docker Engine, Docker CLI, Docker Hub, Docker Compose, and networking/volume commands.
3. Examples of using Docker Engine, Docker Hub for images, networking, volumes and deploying images to Azure PaaS.
4. How to use Docker Compose to define and run multi-container applications.
Do you know the basics of Git but wonder what all the hype is about? Do you want the ultimate control over your Git history? This tutorial will walk you through the basics of committing changes before diving into the more advanced and "dangerous" Git commands.
Git is an open source, distributed version control system used to track many different projects. You can use it to manage anything from a personal notes directory to a multi-programmer project.
This tutorial provides a short walk through of basic git commands and the Git philosophy to project management. Then we’ll dive into an exploration of the more advanced and “dangerous” Git commands. Watch as we rewrite our repository history, track bugs down to a specific commit, and untangle commits into an LKML-worthy patchset.
This document provides an introduction to GIT. It describes the advantages of GIT over other version control systems like SVN. It explains the basic data model and architecture of GIT including local repositories, branches, and remote repositories. It also covers common GIT commands for configuring, tracking changes, viewing history, sharing changes with others through pushing and pulling. Finally, it provides some tips for using GIT aliases, auto-completion, and external diff/merge tools.
"Git Tutorial" a hands-on session on Git presented at Theoretical Neuroscience Lab, IISER Pune.
Very brief overview of Git commands.
Github: https://github.com/pranavcode/git-tutorial
This document provides a summary of common Git commands for setting up and working with repositories, saving changes, inspecting history, undoing changes, rewriting history, syncing with remote repositories, branching, and merging. It discusses initializing and cloning repositories, adding and committing changes, viewing logs and checking out commits, reverting and resetting changes, amending commits and rebasing, fetching and pushing to remote repositories, branching, and merging branches. It also cautions against amending shared commits or force pushing to avoid overwriting others' work.
This document provides an overview of common Git commands for setting up and working with repositories. It explains how to initialize a new repository with `git init`, clone an existing repository to obtain a local copy with `git clone`, and configure user settings and aliases with `git config`. Key points are that `git init` is usually only run once per project to set up the central repository, while developers typically clone repositories to obtain local copies, and `git config` is used to define author information and customize settings.
This document provides an introduction and overview of Git and GitHub. It covers topics such as why to use Git, how to configure Git, how to create repositories and link them to local projects, common Git commands like add, commit, push and pull, how to work with branches, and collaboration using pull requests. The document is intended to teach someone how to use Git and GitHub from the basics.
This document provides an overview of GitHub and its technical architecture presented by Chris Wanstrath. Some key points:
- GitHub started as a git hosting site but became a social coding platform where users can see friends' activity and leave comments.
- It uses Ruby on Rails for the main codebase, Resque for background jobs, MySQL for the database, and nginx, unicorn, and memcached.
- Git operations are handled by Grit and communicated to file servers via the BERT-RPC based Smoke protocol.
- Caching, asset optimization, and AJAX loading are used extensively to improve performance. Monitoring tools include Nagios, Resque Web, Haystack, and CollectD.
Github - Git Training Slides: FoundationsLee Hanxue
Slide deck with detailed step breakdown that explains how git works, together with simple examples that you can try out yourself. Slides originated from http://teach.github.com/articles/course-slides/
Author: https://twitter.com/matthewmccull
This document provides an introduction to the version control system Git. It defines key Git concepts like the working tree, repository, commit, and HEAD. It explains that Git is a distributed version control system where the full history of a project is available once cloned. The document outlines Git's history, with it being created by Linus Torvalds to replace the commercial BitKeeper tool. It then lists and briefly describes important Git commands for local and collaboration repositories, including config, add, commit, log, diff, status, branch, checkout, merge, remote, clone, push, and pull. Lastly, it covers installing Git and generating SSH keys on Windows for accessing Git repositories.
This document provides an introduction to Docker and containerization. It covers:
1. The differences between virtual machines and containers, and the container lifecycle.
2. An overview of the Docker ecosystem tools.
3. Instructions for installing and using the Docker Engine and Docker CLI to build, run, and manage containers.
4. A demonstration of using Docker Hub to build and store container images.
5. An introduction to Docker networking and volumes.
6. A demonstration of using Docker Compose to define and run multi-container applications.
7. Suggestions for further learning resources about Docker.
Version control systems allow recording changes to files over time and reverting files back to previous states. Git is an open source distributed version control system initially created by Linus Torvalds for Linux kernel development. Git stores project snapshots over time as differences from a base version of files and allows fully local operations without needing network access. Basic Git commands include add, commit, branch, checkout, merge, push and pull to manage changes to a local or remote repository.
Git is a distributed version control system created by Linus Torvalds to manage changes to the Linux kernel. It allows developers to work independently and merge changes later. Git uses local repositories that can act as both clients and servers, avoiding the need to be connected to a central server. The basic Git workflow involves modifying files in the working directory, staging changes, and committing snapshots of the staged changes to the local repository. Common Git commands are used to add, commit, push, pull, branch, merge, and more. Key features of Git include being open source, distributed, providing security and speed, supporting non-linear development with branching and merging, and assuring data integrity.
El documento describe las fases para la presentación de un escrito, incluyendo seleccionar un tema, recopilar información a través de notas, artículos y material gráfico, formular objetivos, redactar un borrador, y escribir una conclusión que resume el contenido esencial. También recomienda crear un esquema y usar el borrador para corregir errores.
This short document promotes creating presentations using Haiku Deck, a tool for making slideshows. It encourages the reader to get started making their own Haiku Deck presentation and sharing it on SlideShare. In just one sentence, it pitches the idea of using Haiku Deck to easily design slideshows.
Windows 7 es una versión anterior de Microsoft Windows diseñada para uso en PC que ofrece mayor compatibilidad de hardware, velocidad en procesamiento y compatibilidad con nuevas tecnologías. Sin embargo, tiene problemas de seguridad debido a que su kernel puede ser atacado y tiene puertos accesibles desde Internet.
Your dream New Jersey shore vacation starts here Our selection of weekly vacation rentals in Ocean City, Nj offers stunning views and affordable prices
This document contains a summary of the Supreme Court case Riley v. California, which established that police generally need a warrant to search the contents of a cell phone, even during an arrest. The summary lists five cited works about the case, including summaries from Oyez, SCOTUSblog, Wikipedia, and the Electronic Frontier Foundation website.
O documento fornece resumos de fórmulas e conceitos fundamentais da mecânica dos fluidos, incluindo tensão de cisalhamento, viscosidade dinâmica, peso específico, massa específica, viscosidade cinemática e equações de estado. Exemplos numéricos são fornecidos para ilustrar o cálculo destas grandezas nos sistemas MK*S, CGS e SI.
Tree and Binary search tree in data structure.
The complete explanation of working of trees and Binary Search Tree is given. It is discussed such a way that everyone can easily understand it. Trees have great role in the data structures.
This document outlines a group task where students will analyze 15 advertisements they found based on Abraham Maslow's hierarchy of needs. It describes Maslow's theory that human behavior is focused on satisfying basic needs. The document then lists the different needs in Maslow's hierarchy - need to survive, feel safe, have affiliation, nurture, achieve attention, have prominence, dominate, and find meaning. It instructs students to discuss in groups of 3 which needs each of their 15 advertisements appeal to and group them accordingly. They will then provide feedback as a group if there is time.
NCERT and SCERT are the important national and state-level curricular bodies that assist in developing curriculum and educational resources. NCERT develops curriculum, teaching materials, and conducts research at the national level, while SCERT performs similar functions at the state level. Both organizations work to improve the quality of school education and teacher training through curriculum development, research, and providing guidance to other educational institutions.
Ebola is a serious and often fatal illness that affects humans and primates. It spreads through direct contact with infected body fluids or meat from infected animals. To prevent infection, people should avoid eating or hunting bushmeat and traveling to areas with known outbreaks. Symptoms include fever, headache, fatigue, muscle pain, vomiting and stomach pain. Anyone experiencing possible symptoms after risks of exposure should immediately seek medical attention and contact health authorities. Ebola can be transmitted for up to 7 days after infection.
Alzheimer's disease is a chronic neurodegenerative disease that usually starts slowly with memory loss and difficulty recalling recent events. Over time, symptoms worsen and later stages involve problems with daily living. There are three main phases - mild, moderate, and severe - with increasing memory loss, confusion, and dependence on others for care. While exercise may benefit daily living activities, current treatments only temporarily improve symptoms and do not stop or reverse the progression of the disease. Alzheimer's risk increases after age 65 and is caused by a combination of genetic, lifestyle, and environmental factors.
Mathilde Lemée & Romain Maton
La théorie, c’est bien, la pratique … aussi !
Venez nous rejoindre pour découvrir les profondeurs de Node.js !
Nous nous servirons d’un exemple pratique pour vous permettre d’avoir une premiere experience complete autour de Node.js et de vous permettre de vous forger un avis sur ce serveur Javascript qui fait parler de lui !
http://soft-shake.ch/2011/conference/sessions/incubator/2011/09/01/hands-on-nodejs.html
This document provides an overview of Node.js, including what it is, its key features, and how to test a Node.js installation. Node.js is a JavaScript runtime environment that allows building scalable network applications in a single programming language. It uses non-blocking I/O and event-driven architecture, making it suitable for data-intensive real-time applications. The document demonstrates creating an HTTP server in Node.js, using the built-in URL module, and shows how Node.js uses an asynchronous and event-driven platform. It concludes by providing a link to a demo login application built with Node.js on GitHub.
Node.js is an asynchronous event-driven JavaScript runtime that allows JavaScript to be used on the server-side. It uses a non-blocking I/O model that makes it suitable for real-time web applications. WebSockets provide a standardized way for the browser and server to establish two-way communication. However, not all browsers support WebSockets yet. Socket.io addresses this by providing a WebSocket-like experience across all browsers through fallbacks like long-polling. It allows real-time applications to be developed more easily.
This document outlines an agenda for discussing JavaScript at the backend using Node.js. The agenda includes explaining what Node.js is, installing Node.js, writing a simple "Hello World" program, running Node.js applications, exploring core Node.js modules like the file system and HTTP modules, and handling HTTP requests. Key points are installing Node.js from its website, using the file system and HTTP modules to interact with files and create an HTTP server, and using a request handler to return different responses based on the URL. The presenter is introduced as an author who works with JavaScript, Node.js, and related technologies.
Vert.x is a tool for building reactive applications on the JVM. It is polyglot, allowing applications to be written in Java, Groovy, JavaScript and other languages. It uses an asynchronous and non-blocking model with shared-nothing communication between components. Modules communicate through publish/subscribe messaging on an event bus or directly through request-response patterns. Vert.x provides horizontal scaling and allows efficient use of server resources. It can also integrate with SockJS to provide WebSocket-like capabilities in browsers that do not support WebSockets.
Node.js is a server-side JavaScript platform for building scalable network applications. It allows writing code using JavaScript for non-browser environments like servers. Node.js uses an event-driven, asynchronous I/O model that makes it lightweight and efficient. A simple web server can be written in just a few lines of Node.js code. Node.js has a thriving ecosystem of external modules that help build full-stack JavaScript applications.
Save 10% off ANY FITC event with discount code 'slideshare'
See our upcoming events at www.fitc.ca
Node.js: The What, The How and The When
with Richard Nieuwenhuis
This document provides an introduction and overview of a Node.js tutorial presented by Tom Hughes-Croucher. The tutorial covers topics such as building scalable server-side code with JavaScript using Node.js, debugging Node.js applications, using frameworks like Express.js, and best practices for deploying Node.js applications in production environments. The tutorial includes exercises for hands-on learning and demonstrates tools and techniques like Socket.io, clustering, error handling and using Redis with Node.js applications.
Play 2.0 is a web framework for Java and Scala that is designed to be productive, asynchronous, and reactive. Some key features include being full stack, high-productive, asynchronous and reactive, stateless, HTTP-centric, typesafe, scalable, and open source. Play 2.0 aims to be fun and fast to develop with by enabling features like hot code reloading, browser error reporting, and easy deployment to platforms like Heroku. It also focuses on being asynchronous and reactive through support for WebSockets, Comet, HTTP streaming responses, and composable streams.
The document provides an overview of Node.js, a JavaScript runtime environment for building scalable network applications. Some key points covered include:
- Node.js is built on Google's V8 JavaScript engine and is event-driven and non-blocking.
- It is well-suited for data-intensive real-time applications due to its lightweight and efficient nature.
- Node.js differs from other scripting languages by being non-blocking, single-threaded, and having an event-based approach built-in.
The document discusses Node.js and the Express web application framework. It provides a basic "Hello World" example to demonstrate creating a Node.js server file and requiring it in an index file to start the server. It then shows a simple Express app with one route that responds to requests to the homepage with "Hello World!". The document provides an overview of building an application stack in Node.js and introducing the Express framework.
Vert.x is an asynchronous application development framework that allows applications to be written in multiple programming languages including JavaScript, Ruby, Python, Groovy, and Java. It provides a simple and scalable model for concurrency using asynchronous event loops and message passing. Applications can leverage existing Java libraries while avoiding common concurrency issues. A key feature is the distributed event bus that allows communication across server and client components. Vert.x uses a modular system to compose applications from reusable components.
This document provides an overview of Node.js, including its goals, features, and uses. Node.js is a server-side JavaScript platform designed for building scalable network applications. It uses a non-blocking I/O model and single-threaded event loop. Node.js is commonly used for real-time web applications due to its non-blocking architecture. The document also discusses Node.js modules, installation, basic HTTP servers, and blocking vs non-blocking code.
This document discusses asynchronous I/O in Java and Scala using the Play Framework. It describes how LinkedIn uses a service-oriented architecture with hundreds of services making requests to each other. It then covers how Play supports non-blocking I/O using asynchronous code, promises, and futures to allow parallel requests without blocking threads. Key points covered include using map and flatMap to transform promises and futures, handling errors and timeouts, and the benefits of non-blocking I/O for scalability.
Node.js is an extremely light weight framework for rapidly developing and deploying next generation web and mobile apps. It enables developers to have full stack development. Not only does it save lines of code, but also saves a lot of time in writing those critical code.
Node.js is built on open source Chrome V8 engine. Its built on top of C++ layer. JS code is compiles into machine code for blazing execution on your machine or server.
This slide gives a jump start and a sneak peak for node.js.
About Parth:
Parth Joshi is a Tech - Entrepreneur and a Corporate Trainer. He has been part of two internet startups and has been lead technical architect and project manager. He has zeal for exploring new technology and how innovation solves problems of people at large. He currently acts as consultant for various startups. He also trains tech teams to make them startup ready. For more information about how Parth can train your team visit: www.parthjoshi.in/Training
Follow him on
Twitter: twitter.com/joshiparthin
Connect with him on LinkedIN : linkedin.com/in/joshiparthin
This document discusses techniques for improving frontend performance. It recommends making fewer HTTP requests, using a content delivery network, adding expiration headers, gzipping components, optimizing stylesheet and script placement, avoiding redirects and duplicate scripts, and more. It also covers techniques for loading scripts asynchronously without blocking page rendering, such as using script elements, XHR, and iframes. Faster page loads can improve user experience and increase revenue.
Slides from my workshop about node.js which I conducted in Girl Geek Dinner Bangalore. More details at http://sudarmuthu.com/blog/introduction-to-node-js-at-yahoo-girl-geek-dinner
Node.js and MongoDB are a good fit as MongoDB provides a high-fidelity data store for Node.js applications. To get started quickly, use Nave to manage Node.js versions, npm to manage packages, Express as a web framework, Mongoose as an ODM, and EJS for templating. Key steps include setting up Bootstrap, adding authentication with Mongoose-Auth, and defining schemas like a Link schema for data.
1. The document introduces binary trees, including common tree terminology like nodes, edges, root, parent, child, leaf, and subtree.
2. It explains different ways to traverse a binary tree, including in-order, pre-order, and post-order traversal.
3. It also covers level order traversal using a queue, where nodes are added level by level from left to right.
Exploring Wayland: A Modern Display Server for the FutureICS
Wayland is revolutionizing the way we interact with graphical interfaces, offering a modern alternative to the X Window System. In this webinar, we’ll delve into the architecture and benefits of Wayland, including its streamlined design, enhanced performance, and improved security features.
Join Ajay Sarpal and Miray Vu to learn about key Marketo Engage enhancements. Discover improved in-app Salesforce CRM connector statistics for easy monitoring of sync health and throughput. Explore new Salesforce CRM Synch Dashboards providing up-to-date insights into weekly activity usage, thresholds, and limits with drill-down capabilities. Learn about proactive notifications for both Salesforce CRM sync and product usage overages. Get an update on improved Salesforce CRM synch scale and reliability coming in Q2 2025.
Key Takeaways:
Improved Salesforce CRM User Experience: Learn how self-service visibility enhances satisfaction.
Utilize Salesforce CRM Synch Dashboards: Explore real-time weekly activity data.
Monitor Performance Against Limits: See threshold limits for each product level.
Get Usage Over-Limit Alerts: Receive notifications for exceeding thresholds.
Learn About Improved Salesforce CRM Scale: Understand upcoming cloud-based incremental sync.
F-Secure Freedome VPN 2025 Crack Plus Activation New Versionsaimabibi60507
Copy & Past Link 👉👉
https://dr-up-community.info/
F-Secure Freedome VPN is a virtual private network service developed by F-Secure, a Finnish cybersecurity company. It offers features such as Wi-Fi protection, IP address masking, browsing protection, and a kill switch to enhance online privacy and security .
Discover why Wi-Fi 7 is set to transform wireless networking and how Router Architects is leading the way with next-gen router designs built for speed, reliability, and innovation.
AgentExchange is Salesforce’s latest innovation, expanding upon the foundation of AppExchange by offering a centralized marketplace for AI-powered digital labor. Designed for Agentblazers, developers, and Salesforce admins, this platform enables the rapid development and deployment of AI agents across industries.
Email: [email protected]
Phone: +1(630) 349 2411
Website: https://www.fexle.com/blogs/agentexchange-an-ultimate-guide-for-salesforce-consultants-businesses/?utm_source=slideshare&utm_medium=pptNg
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)Andre Hora
Software testing plays a crucial role in the contribution process of open-source projects. For example, contributions introducing new features are expected to include tests, and contributions with tests are more likely to be accepted. Although most real-world projects require contributors to write tests, the specific testing practices communicated to contributors remain unclear. In this paper, we present an empirical study to understand better how software testing is approached in contribution guidelines. We analyze the guidelines of 200 Python and JavaScript open-source software projects. We find that 78% of the projects include some form of test documentation for contributors. Test documentation is located in multiple sources, including CONTRIBUTING files (58%), external documentation (24%), and README files (8%). Furthermore, test documentation commonly explains how to run tests (83.5%), but less often provides guidance on how to write tests (37%). It frequently covers unit tests (71%), but rarely addresses integration (20.5%) and end-to-end tests (15.5%). Other key testing aspects are also less frequently discussed: test coverage (25.5%) and mocking (9.5%). We conclude by discussing implications and future research.
Solidworks Crack 2025 latest new + license codeaneelaramzan63
Copy & Paste On Google >>> https://dr-up-community.info/
The two main methods for installing standalone licenses of SOLIDWORKS are clean installation and parallel installation (the process is different ...
Disable your internet connection to prevent the software from performing online checks during installation
Download Wondershare Filmora Crack [2025] With Latesttahirabibi60507
Copy & Past Link 👉👉
http://drfiles.net/
Wondershare Filmora is a video editing software and app designed for both beginners and experienced users. It's known for its user-friendly interface, drag-and-drop functionality, and a wide range of tools and features for creating and editing videos. Filmora is available on Windows, macOS, iOS (iPhone/iPad), and Android platforms.
🌍📱👉COPY LINK & PASTE ON GOOGLE http://drfiles.net/ 👈🌍
Adobe Illustrator is a powerful, professional-grade vector graphics software used for creating a wide range of designs, including logos, icons, illustrations, and more. Unlike raster graphics (like photos), which are made of pixels, vector graphics in Illustrator are defined by mathematical equations, allowing them to be scaled up or down infinitely without losing quality.
Here's a more detailed explanation:
Key Features and Capabilities:
Vector-Based Design:
Illustrator's foundation is its use of vector graphics, meaning designs are created using paths, lines, shapes, and curves defined mathematically.
Scalability:
This vector-based approach allows for designs to be resized without any loss of resolution or quality, making it suitable for various print and digital applications.
Design Creation:
Illustrator is used for a wide variety of design purposes, including:
Logos and Brand Identity: Creating logos, icons, and other brand assets.
Illustrations: Designing detailed illustrations for books, magazines, web pages, and more.
Marketing Materials: Creating posters, flyers, banners, and other marketing visuals.
Web Design: Designing web graphics, including icons, buttons, and layouts.
Text Handling:
Illustrator offers sophisticated typography tools for manipulating and designing text within your graphics.
Brushes and Effects:
It provides a range of brushes and effects for adding artistic touches and visual styles to your designs.
Integration with Other Adobe Software:
Illustrator integrates seamlessly with other Adobe Creative Cloud apps like Photoshop, InDesign, and Dreamweaver, facilitating a smooth workflow.
Why Use Illustrator?
Professional-Grade Features:
Illustrator offers a comprehensive set of tools and features for professional design work.
Versatility:
It can be used for a wide range of design tasks and applications, making it a versatile tool for designers.
Industry Standard:
Illustrator is a widely used and recognized software in the graphic design industry.
Creative Freedom:
It empowers designers to create detailed, high-quality graphics with a high degree of control and precision.
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Andre Hora
Exceptions allow developers to handle error cases expected to occur infrequently. Ideally, good test suites should test both normal and exceptional behaviors to catch more bugs and avoid regressions. While current research analyzes exceptions that propagate to tests, it does not explore other exceptions that do not reach the tests. In this paper, we provide an empirical study to explore how frequently exceptional behaviors are tested in real-world systems. We consider both exceptions that propagate to tests and the ones that do not reach the tests. For this purpose, we run an instrumented version of test suites, monitor their execution, and collect information about the exceptions raised at runtime. We analyze the test suites of 25 Python systems, covering 5,372 executed methods, 17.9M calls, and 1.4M raised exceptions. We find that 21.4% of the executed methods do raise exceptions at runtime. In methods that raise exceptions, on the median, 1 in 10 calls exercise exceptional behaviors. Close to 80% of the methods that raise exceptions do so infrequently, but about 20% raise exceptions more frequently. Finally, we provide implications for researchers and practitioners. We suggest developing novel tools to support exercising exceptional behaviors and refactoring expensive try/except blocks. We also call attention to the fact that exception-raising behaviors are not necessarily “abnormal” or rare.
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentShubham Joshi
A secure test infrastructure ensures that the testing process doesn’t become a gateway for vulnerabilities. By protecting test environments, data, and access points, organizations can confidently develop and deploy software without compromising user privacy or system integrity.
Adobe Master Collection CC Crack Advance Version 2025kashifyounis067
🌍📱👉COPY LINK & PASTE ON GOOGLE http://drfiles.net/ 👈🌍
Adobe Master Collection CC (Creative Cloud) is a comprehensive subscription-based package that bundles virtually all of Adobe's creative software applications. It provides access to a wide range of tools for graphic design, video editing, web development, photography, and more. Essentially, it's a one-stop-shop for creatives needing a broad set of professional tools.
Key Features and Benefits:
All-in-one access:
The Master Collection includes apps like Photoshop, Illustrator, InDesign, Premiere Pro, After Effects, Audition, and many others.
Subscription-based:
You pay a recurring fee for access to the latest versions of all the software, including new features and updates.
Comprehensive suite:
It offers tools for a wide variety of creative tasks, from photo editing and illustration to video editing and web development.
Cloud integration:
Creative Cloud provides cloud storage, asset sharing, and collaboration features.
Comparison to CS6:
While Adobe Creative Suite 6 (CS6) was a one-time purchase version of the software, Adobe Creative Cloud (CC) is a subscription service. CC offers access to the latest versions, regular updates, and cloud integration, while CS6 is no longer updated.
Examples of included software:
Adobe Photoshop: For image editing and manipulation.
Adobe Illustrator: For vector graphics and illustration.
Adobe InDesign: For page layout and desktop publishing.
Adobe Premiere Pro: For video editing and post-production.
Adobe After Effects: For visual effects and motion graphics.
Adobe Audition: For audio editing and mixing.
Why Orangescrum Is a Game Changer for Construction Companies in 2025Orangescrum
Orangescrum revolutionizes construction project management in 2025 with real-time collaboration, resource planning, task tracking, and workflow automation, boosting efficiency, transparency, and on-time project delivery.
WinRAR Crack for Windows (100% Working 2025)sh607827
copy and past on google ➤ ➤➤ https://hdlicense.org/ddl/
WinRAR Crack Free Download is a powerful archive manager that provides full support for RAR and ZIP archives and decompresses CAB, ARJ, LZH, TAR, GZ, ACE, UUE, .
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDinusha Kumarasiri
AI is transforming APIs, enabling smarter automation, enhanced decision-making, and seamless integrations. This presentation explores key design principles for AI-infused APIs on Azure, covering performance optimization, security best practices, scalability strategies, and responsible AI governance. Learn how to leverage Azure API Management, machine learning models, and cloud-native architectures to build robust, efficient, and intelligent API solutions
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Versionsaimabibi60507
Copy & Past Link👉👉
https://dr-up-community.info/
Pixologic ZBrush, now developed by Maxon, is a premier digital sculpting and painting software renowned for its ability to create highly detailed 3D models. Utilizing a unique "pixol" technology, ZBrush stores depth, lighting, and material information for each point on the screen, allowing artists to sculpt and paint with remarkable precision .
Avast Premium Security Crack FREE Latest Version 2025mu394968
🌍📱👉COPY LINK & PASTE ON GOOGLE https://dr-kain-geera.info/👈🌍
Avast Premium Security is a paid subscription service that provides comprehensive online security and privacy protection for multiple devices. It includes features like antivirus, firewall, ransomware protection, and website scanning, all designed to safeguard against a wide range of online threats, according to Avast.
Key features of Avast Premium Security:
Antivirus: Protects against viruses, malware, and other malicious software, according to Avast.
Firewall: Controls network traffic and blocks unauthorized access to your devices, as noted by All About Cookies.
Ransomware protection: Helps prevent ransomware attacks, which can encrypt your files and hold them hostage.
Website scanning: Checks websites for malicious content before you visit them, according to Avast.
Email Guardian: Scans your emails for suspicious attachments and phishing attempts.
Multi-device protection: Covers up to 10 devices, including Windows, Mac, Android, and iOS, as stated by 2GO Software.
Privacy features: Helps protect your personal data and online privacy.
In essence, Avast Premium Security provides a robust suite of tools to keep your devices and online activity safe and secure, according to Avast.
2. 개 요
Node.js ?
Server-side framework
useful for building highly scalable and fast
network applications
JavaScript runtime built on Chrome’s V8 JavaScript engine.
It uses an event-driven, non-blocking I/O model that makes
it lightweight and efficient, perfect for data-intensive real-
time applications that run across distributed devices
developed by Ryan Dahl in 2009
3. 개 요
Architecture
node standard library
node bindings
(socket, http, etc.)
V8
thread
pool
(libeio)
event
loop
(libev)
DNS
(c-ares)
crypto
(OpenSSL)
JavaScript C/C++
4. 개 요
Brief History
JavaScript’s Speed revolution has started since 2008.
2008. 9: Google releases Chrome Web browser beta version based on
V8 JavaScript Engine
2009. 1: ServerJS project (currentCommonJS project) started to use
JavaScript in other areas except Web browser.
2009. 11: Node.js was released based on CommonJS standard and V8
JavaScript Engine (for Linux)
2011. 5: npm (Node Package Manager) 1.0 was released
2011. 7: Node.js for Windows was released
2009. 3: Node.js had a name.
5. 개 요
Why Node.js?
<source: modulecounts.com>
Node packages are growing faster
than Ruby, Python, and Java
combined
asynchronous, event-driven
framework
designed for creating scalable
network app.
single-threaded
uses a concurrency model based on
an event loop
non-blocking with callback function:
handle concurrent operations
without multiple thread of execution
no buffering
ideal for I/O bound applications,
but not so great for CPU-heavy
applications
6. 개 요
Event based Asynchronous
<현황>
각 상점에 가서 물건을 구매하기 위해서 대기를 기다려야 함.
한 상점 씩 다니면서 물건을 살 경우 27분이 소요된다.
7. Event based Asynchronous
<해결책>
1. 몸을 복제하여 동시에 여러 가게에 간다. (thread 기반 동기방식)
2. 각 상점에서 대기표를 나누어주는 시스템을 바꾸고 대기표를 받고 기다린다.
(이벤트 기반 비동기 방식)
8. Sync. vs. Async. I/O
fileRead(fileName)
1. 파일 읽기 요청
3. 파일 읽기 완료
2. 파일 읽는 중
Synchronous I/O
9. Sync. vs Async I/O
fileRead(fileName,callback)
1. 파일 읽기 요청
4. 파일 읽기 종료 후
callback 함수 호출
3. 파일 읽는 중
2. 바로 리턴
Asynchronous I/O
12. Installation
Version Check and Start!
1. version check
2. execute node (it shows Node shell.)
3. type simple code to prompt “Hello World” to the console
Node shell 에서 빠져 나오는 방법: Ctrl+d
16. HTTP Server
var http = require(“http”);
http.createServer(function (request, response) {
response.writeHead(200, {“Content-Type”:”text/plain”});
response.write(“Hello World!”);
response.end();
}).listen(8000);
console.log(“Http Server has been started”);
// server.js
// cmd terminal
$ node server.js
// browser
http://localhost:8000
Simple HTTP Server - 1
17. HTTP Server
var http = require(“http”);
function onRequest(request, response) {
console.log(“Request Received”);
response.writeHead(200, {“Content-Type”:”text/plain”});
response.write(“Hello World!”);
response.end();
}
http.createServer(onRequest).listen(8000);
console.log(“Http Server has been started”);
// server1.js
Simple HTTP Server - 2
18. Node.js has a simple module loading system.
module: a single unit of code which encapsulates
related codes into.
When creating a module, this can be interpreted as
moving all related functions into a file.
In Node.js, files and modules are in one-to-one
correspondence (한 파일이 모듈이 하나..).
Assign an expression in a module file, that we want to
become available in other files to the exports object.
making a user module
Module
<ref: https://nodejs.org/api/modules.html#modules_modules>
19. making a user module
Exporting a Module
exports.sayHelloInEnglish = function() {return “HELLO”;};
exports.sayHelloInSpanish = function() {return “Hola”;};
// greetings.js
exports.add = function(a, b) {return a+b;};
exports.sub = function(a, b) {return a-b;};
exports.mul = function(a, b) {return a*b;};
exports.div = function(a, b) {return a/b;};
// calc.js
// circle.js
const PI = Math.PI;
exports.area = (r) => PI *r *r;
exports.circumference = (r) => 2 *PI * r;
<ref: https://nodejs.org/api/modules.html#modules_modules>
<ref: https://www.sitepoint.com/understanding-module-exports-exports-node-js/>
20. (info.) The keyword require is used in Node.js to import modules.
make a user module
Import a Module
var require = function(path){
// …
return module.exports;
}
require module files in your js file.
var greetings = require(“./greetings.js”);
access the publicly available methods of greetings.js
greetings.sayHelloInEnglish();
greetings.sayHelloInSpanish();
<ref: https://www.sitepoint.com/understanding-module-exports-exports-node-js/ >
21. import calc.js
making a user module
Import a Module
import circle.js
var calcObj = require(“./calc.js”);
var circle = require(“./circle.js”);
22. When a file is run directly from Node.js, require.main is
set to its module.
So, developer can determine if a file has been run directly by testing
For a file foo.js,
this will be true when it run via node foo.js.
But, this will be false, then it run by require(“./foo”)
making a user module
Accessing the main module
<ref: https://nodejs.org/api/modules.html#modules_modules>
require.main === module
23. making a user module
http server module
var http = require(“http”);
function start() {
function onRequest(request, response) {
console.log(“Request Received”);
response.writeHead(200, {“Content-Type”:”text/plain”});
response.write(“<h1>Welcome to HTTP Server !</h1>”);
response.write(“<h2>Hello World..</h2>”);
response.end();
}
http.createServer(onRequest).listen(8000);
console.log(“Http Server has been started”);
}
exports.start = start;
// httpServer.js (version 1)
24. making a user module
using http server module
var httpServer = require(“./httpServer”);
httpServer.start();
// index.js (version 1)
// execute index.js
$ node index.js
// browser
index.js
httpServer
start()
25. Http Server는 다양한 사용자 요청에 응답해야 함
조회를 위한 요청, 저장을 위한 요청 등 다양한 요청을 식별하는 routing
기능을 고려
Router
request URL과 GET/POST parameter에 따라 실행할 코드를 결정
Routing: Dependency Injection
Dependency Injection
HTTP 요청에서 URL과 GET/POST Parameter의 추출이 필요
이 정보는 어디에 있을까 ?
28. Routing: url parsing
request url
var http = require(“http”);
var url = require(“url”);
function onRequest(request, response) {
console.log(request.url);
response.writeHead(200, {“Content-Type”:”text/plain”});
response.write(“Hello World!”);
response.end();
}
http.createServer(onRequest).listen(8000);
console.log(“Http Server has been started”);
// httpServer.js (version 1-1)
29. Routing: pathname parsing
pathname parsing
var http = require(“http”);
var url = require(“url”);
function start() {
function onRequest(request, response) {
var pathname = url.parse(request.url).pathname;
console.log(“Request for ” + pathname + “ received.”);
response.writeHead(200, {“Content-Type”:”text/plain”});
response.write(“<h1>Welcome to HTTP Server !<h1>”);
response.write(“<h2>Hello World..<h2>”);
response.end();
}
http.createServer(onRequest).listen(8000);
console.log(“Http Server has been started”);
}
exports.start = start;
//httpServer.js (version 2)
30. Routing: router module
simple router
function route(pathName) {
console.log(“about to route a request for “ + pathName);
}
exports.route = route;
// router.js (version 1)
index.js
httpServer
start()
router
route()inject function
index.js에서 router module을 로딩하고 route()함수를 httpServer에 전달하여 실행하는 구조
Dependency Injection
server 코드 변경없이 router 함수 교체가 가능
31. Routing: router
var httpServer = require(“./httpserver”);
var router = require(“./router”);
httpServer.start(router.route);
// index.js (version 2)
index.js with router
server.js 는 start() 실행 시 route 함수를 전달하여
‘request’ 이벤트가 발생할 때 마다 route() 함수를 호출하여
클라이언트 요청을 식별
32. Routing: router
var http = require(“http”);
var url = require(“url”);
function start(route) {
function onRequest(request, response) {
var pathname = url.parse(request.url).pathname;
console.log(“Request for ” + pathname + “ received.”);
route(pathname); // injected function call
response.writeHead(200, {“Content-Type”:”text/plain”});
response.write(“<h2>Hello World..<h2>”);
response.end();
}
http.createServer(onRequest).listen(8000);
console.log(“Http Server has been started”);
}
exports.start = start;
//httpServer.js (version 3)
httpServer with router
33. Server: receives client’s request
Router: route the client’s request to the request handler
Request Handler: process the client’s specific request
Routing: Request Handler
Request Handler
index.js
httpServer
start()
router
route()
inject function
request
Handler
handle
36. Routing: Request Handler
index.js with request handler
var httpServer = require(“./httpserver”);
var router = require(“./router”);
var requestHandlers = require(“./requestHandlers”);
httpServer.start(router.route, requestHandlers.handle);
// index.js (version 3)
start() 실행 시 route 함수와 handler 객체를 전달하고
‘request’ 이벤트가 발생할 때 마다
handler 객체를 route() 함수에 전달하여 호출하여
클라이언트의 요청을 식별하고 해당 기능 수행
37. Routing: Request Handler
router.js with request handler
function route(handle, pathName) {
console.log(“about to route a request for “ + pathName);
if (typeof handle[pathName] === ‘function’) {
return handle[pathName]();
} else {
console.log(“No request handler found for “ + pathName);
return “404 Not Found”;
}
}
exports.route = route;
// router.js (version 2)
요청(pathName) 별로 다른 함수를 호출
38. Routing: Request Handler
//httpServer.js (version 4)
httpServer with router
var http = require(“http”);
var url = require(“url”);
function start(route, handle) {
function onRequest(request, response) {
var pathname = url.parse(request.url).pathname;
console.log(“Request for ” + pathname + “ received.”);
var content = route(handle, pathname);
response.writeHead(200, {“Content-Type”:”text/plain”});
response.write(content);
response.end();
}
http.createServer(onRequest).listen(8000);
console.log(“Http Server has been started”);
}
exports.start = start;
construct response message with return value
of request handler
39. Routing: Blocking
From request to response
HTTP Server
Router
Request Handlers
request
url forwarding
invoke handler
response
return result
return result
Problem:
Request Handler’s processing time may degrade the performance of HTTP Server.
40. Routing: Blocking
Performance
//requestHandlers.js (version 1-1)
function start() {
console.log(“Request handler ‘start’ was called”);
function sleep(msecs) {
var startTime = new Date().getTime();
while(new Date().getTime() < startTime + msecs);
}
sleep(10000); // 10 sec waiting
return “Welcome Start Page”;
}
Server waits util this function returns.
This makes the response delay of other request.
41. Routing: Non Blocking
From request to response
HTTP Server
Router
Request Handlers
request
pass response object
pass response object
response
Each request handler sends the response message individually.
42. Routing: Non Blocking
httpServer with non-blocking
//httpServer.js (version 5)
var http = require(“http”);
var url = require(“url”);
function start(route, handle) {
function onRequest(request, response) {
var pathname = url.parse(request.url).pathname;
console.log(“Request for ” + pathname + “ received.”);
route(handle, pathname, response);
}
http.createServer(onRequest).listen(8000);
console.log(“Http Server has been started”);
}
exports.start = start;
43. function route(handle, pathName, response) {
console.log(“about to route a request for “ + pathName);
if (typeof handle[pathName] === ‘function’) {
handle[pathName](response);
} else {
console.log(“No request handler found for “ + pathName);
response.writeHead(404, {“Content-Type”:”text/plain”});
response.write(“404 Not Found”);
response.end();
}
}
exports.route = route;
// router.js (version 3)
Non blocking router
44. View Logic
View logic for POST
//start function in requestHandlers.js (version 2)
function start(response) {
console.log(“Request handler ‘start’ was called”);
var body = “<html><head><title>First View</title>”+
“<meta charset=‘UTF-8’></head><body>“ +
“로그인</br>”+
“<form action=‘/hello’ method=‘post’>” +
“id: <input type=‘text’ name=‘id’></input>”+
“ <input type=‘submit’ value=‘login’/></br>”+
“pw: <input type=‘text’ name=‘pw’></input>”+
“</form></body></html>”;
response.writeHead(200, {“Content-Type”:”text/html”});
response.write(body);
response.end();
}
45. POST data receiving
Asynchronous Data receiving
request.addListener(“data”, function(chunk) {
// called when a new chunk of data was received
}
request.addListener(“end”, function() {
// called when all chunks of data has been received
}
46. POST data receiving
httpServer with POST
function onRequest(request, response) {
var postData =“”;
var pathname = url.parse(request.url).pathname;
console.log(“Request for ” + pathname + “ received.”);
request.setEncoding(“utf8”);
request.addListener(“data”, function(chunk) {
postData += chunk;
});
request.addListener(“end”, function() {
route(handle, pathname, response, postData);
});
}
//onRequest function in httpServer.js (version 6)
47. POST data receiving
function route(handle, pathName, response, postData) {
console.log(“about to route a request for “ + pathName);
if (typeof handle[pathName] === ‘function’) {
handle[pathName](response, postData);
} else {
console.log(“No request handler found for “ + pathName);
response.writeHead(404, {“Content-Type”:”text/plain”});
response.write(“404 Not Found”);
response.end();
}
}
exports.route = route;
Router with POST
// router.js (version 4)
48. Pass POST data to the Client
Request handler with POST
function hello(response, postData) {
console.log(“Request handler ‘hello’ was called”);
var out = “To “ + querystring.parse(postData)[“id”];
response.writeHead(200, {“Content-Type”:”text/plain”});
response.write(out);
response.write(“</br> Welcome to this World”);
response.end();
}
//requestHandlers.js (version 3)
49. GET data receiving
httpServer with GET
function onRequest(request, response) {
var getData =“”;
var pathname = url.parse(request.url).pathname;
console.log(“Request for ” + pathname + “ received.”);
getData += url.parse(request.url).query;
route(handle, pathname, response, getData);
}
//onRequest function in httpServer.js (version 7)
50. GET data receiving
function route(handle, pathName, response, getData) {
console.log(“about to route a request for “ + pathName);
if (typeof handle[pathName] === ‘function’) {
handle[pathName](response, getData);
} else {
console.log(“No request handler found for “ + pathName);
response.writeHead(404, {“Content-Type”:”text/plain”});
response.write(“404 Not Found”);
response.end();
}
}
exports.route = route;
Router with GET
// router.js (version 4)
51. View Logic
View logic for GET
//start function in requestHandlers.js (version 3)
function start(response) {
console.log(“Request handler ‘start’ was called”);
var body = “<html><head><title>First View</title>”+
“<meta charset=‘UTF-8’></head><body>“ +
“로그인</br>”+
“<form action=‘/hello’ method=‘get’>” +
“id: <input type=‘text’ name=‘id’></input>”+
“ <input type=‘submit’ value=‘login’></br>”+
“pw: <input type=‘text’ name=‘pw’></input>”+
“</form></body></html>”;
response.writeHead(200, {“Content-Type”:”text/html”});
response.write(body);
response.end();
}
52. Pass GET data to the Client
Request handler with GET
function hello(response, getData) {
console.log(“Request handler ‘hello’ was called”);
var out = “To “ + querystring.parse(getData)[“id”];
response.writeHead(200, {“Content-Type”:”text/plain”});
response.write(out);
response.write(“</br> Welcome to this World”);
response.end();
}
//requestHandlers.js (version 4)
55. Node.js: Hello로 시작하는 Web 애플리케이션
http://www.nextree.co.kr/p8574/
The Node Beginner Book
Simona Clapan, “The MEAN stack - SoCalCodeCamp -
june 29th 2014” from slidehsare
References