Node.js is an exciting platform that has been increasing in popularity for the past few years. It offers a server side JavaScript programming model ideal for building highly scalable and performant network applications whether on premise or in the cloud. In this talk we will take a look at various options for building and deploying Node applications on Microsoft Azure. This session is how to useAzure SQL Databse and Azure Storage with Node.js
Node.js is a server-side JavaScript environment that uses an asynchronous event-driven model. Here you will find 8 best time-tested Node.js file system tools, which are amply used by Node.js developers. You’ve come to the right place if you are going to streamline routine tasks related to a file system.
Bringing Interactivity to Your Drupal Site with Node.js IntegrationAcquia
Drupal is a powerful, flexible platform for building applications, but not something that handles realtime notifications easily. Node.js is a breath of fresh air in the Open Source web server landscape. It makes writing applications that handle thousands of open connections at the same time easily.
The Nodejs module integrates Drupal with Node.js, allowing for the best of both worlds. Realtime chat, push notifications and help desk functionality can all be easily added to your Drupal site via the Nodejs module, without the usual scalability and performance issues associated with these technologies on the LAMP stack.
In this article, I’d like to tell you about 7 Node JS project ideas that will help you train your skills, build an impressive portfolio, and get hired.
For some time, I’m publishing the lists of projects that you can use to practice the coding skills that you’ve just learned. I was focusing mostly on frontend technologies, but today I decided to jump to the Javascript backend framework called Node JS.
Node.js is a server-side JavaScript environment that uses an asynchronous event-driven model. Here you will find 8 best time-tested Node.js file system tools, which are amply used by Node.js developers. You’ve come to the right place if you are going to streamline routine tasks related to a file system.
Bringing Interactivity to Your Drupal Site with Node.js IntegrationAcquia
Drupal is a powerful, flexible platform for building applications, but not something that handles realtime notifications easily. Node.js is a breath of fresh air in the Open Source web server landscape. It makes writing applications that handle thousands of open connections at the same time easily.
The Nodejs module integrates Drupal with Node.js, allowing for the best of both worlds. Realtime chat, push notifications and help desk functionality can all be easily added to your Drupal site via the Nodejs module, without the usual scalability and performance issues associated with these technologies on the LAMP stack.
In this article, I’d like to tell you about 7 Node JS project ideas that will help you train your skills, build an impressive portfolio, and get hired.
For some time, I’m publishing the lists of projects that you can use to practice the coding skills that you’ve just learned. I was focusing mostly on frontend technologies, but today I decided to jump to the Javascript backend framework called Node JS.
An overview and start with Node.js.
Node.js Timeline
Why Node.js
Synchronous vs. Asynchronous
Advantages
Handles A File Request
Node.js File
Practical Task
IDE
Download and Install
Hello World
Demo Tasks
Create A Module
Books References
Web References
Why You Should Use MERN Stack for Startup Apps?Pixel Crayons
If you have no idea what MERN stands for, check out my explanation in this article first! This insightful guide will help you learn about the benefits of using the MERN stack and why it’s perfect for your next web application project.
In a nutshell, The MERN Stack refers to four technologies: MongoDB, ExpressJS, ReactJS, and Node.js. MongoDB is a document-oriented DBMS that allows you to store data in JSON-like format.
Konferencija Javantura Zagreb 2014 by HUJAK
Vaadin - thinking of U and I - by Peter Lehto
Vaadin (vaadin.com) je Java framework za rapidni razvoj visoko interaktivnih HTML5 web aplikacija na poslužitelju. On sakriva tehnologije prijenosa dokumenata i stanja (DOM, AJAX, JSON) i omogućuje da web aplikacije budu razvijene u Javi prema metafori desktop aplikacija. Vaadin iskorištava svu moć GWT-a, Java-to-JavaScript prevoditelja, pa je moguće razviti cijeli stog web aplikacija i nove komponente na strani klijenta bez napuštanja Java okruženja. Brzi razvoj olakšava veliki izbor komponenata i trenutni deployment na poslužitelj. Vaadin aplikacije koje se izvode na poslužitelju pružaju veliko povećanje sigurnosti, kao i povezivanje Vaadin sučelja na bilo koji postojeći backend sustav. U predavanju bit će prikazan pregled Vaadin 7.1 mogučnosti, pogled na Vaadin arhitekturu i što se zapravo događa iza kulisa frameworka, a bit će raspravljene i značajke koje donosi Vaadin 7.2.
Liberty: The Right Fit for Micro Profile?Dev_Events
Kevin Sutter, Senior Technical Staff Member, IBM @kwsutter
Alasdair Nottingham, Websphere Runtime Architect, IBM @notatibm
The move to microservices is well under way, but has enterprise Java adapted to these new realities? Although some argue that enterprise Java is irrelevant, many of its tried-and-proven APIs are highly applicable to microservice architectures. And the need for new APIs to address challenges inherent in highly distributed microservices is clear. The recent announcement of the Micro Profile initiative (microprofile.io) to define new application server portable APIs means that these needs will be addressed. This session explores what Micro Profile is, how it can help with microservices, and how WebSphere Liberty’s à la carte approach to Java EE can help enable microservices by using the new Micro Profile and ldemo Liberty plus the microProfile-1.0 feature.
NoSQL for SQL Server Developers using CouchbaseBrant Burnett
Moving from the world of relational databasing to NoSQL can be a daunting task. The move from flat tables with transactions to document storage with eventual consistency is a big mental paradigm shift.
We'll discuss the pros and cons of making the leap to NoSQL, helping you understand the kinds of projects it's right for. We'll also briefly cover some of the various NoSQL options for a .NET developer, including MongoDB and Couchbase.
Next, we'll go through a SQL Server to Couchbase mindmap, comparing how various concepts we're used to in the SQL Server world map to Couchbase concepts and JSON documents. This will include N1QL, Couchbase's ANSI SQL-based query language and how it enables you to query your JSON documents quickly and easily.
Presented at DevIntesection / Anglebrackets 2014. In this session we showed how to code for the cloud with node.js and Windows Azure. We started with an introduction to the node.js Developer Center for Windows Azure, the Azure SDK for Java , and other tools and materials we’ve developed to make life easier for node developers. Included were lots of working examples showing tips and tricks for building, deploying, connecting, and maintaining node applications and multi-tier Web applications that access data, servers and services on Windows Azure.
An overview and start with Node.js.
Node.js Timeline
Why Node.js
Synchronous vs. Asynchronous
Advantages
Handles A File Request
Node.js File
Practical Task
IDE
Download and Install
Hello World
Demo Tasks
Create A Module
Books References
Web References
Why You Should Use MERN Stack for Startup Apps?Pixel Crayons
If you have no idea what MERN stands for, check out my explanation in this article first! This insightful guide will help you learn about the benefits of using the MERN stack and why it’s perfect for your next web application project.
In a nutshell, The MERN Stack refers to four technologies: MongoDB, ExpressJS, ReactJS, and Node.js. MongoDB is a document-oriented DBMS that allows you to store data in JSON-like format.
Konferencija Javantura Zagreb 2014 by HUJAK
Vaadin - thinking of U and I - by Peter Lehto
Vaadin (vaadin.com) je Java framework za rapidni razvoj visoko interaktivnih HTML5 web aplikacija na poslužitelju. On sakriva tehnologije prijenosa dokumenata i stanja (DOM, AJAX, JSON) i omogućuje da web aplikacije budu razvijene u Javi prema metafori desktop aplikacija. Vaadin iskorištava svu moć GWT-a, Java-to-JavaScript prevoditelja, pa je moguće razviti cijeli stog web aplikacija i nove komponente na strani klijenta bez napuštanja Java okruženja. Brzi razvoj olakšava veliki izbor komponenata i trenutni deployment na poslužitelj. Vaadin aplikacije koje se izvode na poslužitelju pružaju veliko povećanje sigurnosti, kao i povezivanje Vaadin sučelja na bilo koji postojeći backend sustav. U predavanju bit će prikazan pregled Vaadin 7.1 mogučnosti, pogled na Vaadin arhitekturu i što se zapravo događa iza kulisa frameworka, a bit će raspravljene i značajke koje donosi Vaadin 7.2.
Liberty: The Right Fit for Micro Profile?Dev_Events
Kevin Sutter, Senior Technical Staff Member, IBM @kwsutter
Alasdair Nottingham, Websphere Runtime Architect, IBM @notatibm
The move to microservices is well under way, but has enterprise Java adapted to these new realities? Although some argue that enterprise Java is irrelevant, many of its tried-and-proven APIs are highly applicable to microservice architectures. And the need for new APIs to address challenges inherent in highly distributed microservices is clear. The recent announcement of the Micro Profile initiative (microprofile.io) to define new application server portable APIs means that these needs will be addressed. This session explores what Micro Profile is, how it can help with microservices, and how WebSphere Liberty’s à la carte approach to Java EE can help enable microservices by using the new Micro Profile and ldemo Liberty plus the microProfile-1.0 feature.
NoSQL for SQL Server Developers using CouchbaseBrant Burnett
Moving from the world of relational databasing to NoSQL can be a daunting task. The move from flat tables with transactions to document storage with eventual consistency is a big mental paradigm shift.
We'll discuss the pros and cons of making the leap to NoSQL, helping you understand the kinds of projects it's right for. We'll also briefly cover some of the various NoSQL options for a .NET developer, including MongoDB and Couchbase.
Next, we'll go through a SQL Server to Couchbase mindmap, comparing how various concepts we're used to in the SQL Server world map to Couchbase concepts and JSON documents. This will include N1QL, Couchbase's ANSI SQL-based query language and how it enables you to query your JSON documents quickly and easily.
Presented at DevIntesection / Anglebrackets 2014. In this session we showed how to code for the cloud with node.js and Windows Azure. We started with an introduction to the node.js Developer Center for Windows Azure, the Azure SDK for Java , and other tools and materials we’ve developed to make life easier for node developers. Included were lots of working examples showing tips and tricks for building, deploying, connecting, and maintaining node applications and multi-tier Web applications that access data, servers and services on Windows Azure.
JavaScript, Meet Cloud: Node.js on Windows AzureSasha Goldshtein
Slides from a talk at the North Toronto .NET User Group. An introduction to Node.js and Express followed by a tour of Windows Azure and various hosting options for Node applications, including Windows Azure Web Sites, Windows Azure Mobile Services, and Windows Azure Virtual Machines.
Node.js Build, Deploy and Scale Webinarjguerrero999
Topics covered in this webinar:
Automating builds directly from GitHub
Scaling processes horizontally and vertically
Working with Nginix load-balancer
Managing Node.js processes with Docker containers
Microservices deployment and Docker orchestration
Develop & Deploy Node.js app on Windows AzureAndri Yadi
It's the keynote on Telkom Bandung Digital Valley's TechThursday. I talked about developing and deploying Node.js application on Windows Azure.
Attented by 20 web developers around Bandung city.
To try the code I demoed, here's the repo:
https://github.com/andriyadi/NodeAzureStorageSocketIO
Since 1960 and throughout the 90's education has witnessed incremental changes in public policy that has ranged from improved practices to big government presidential initiatives starting with Johnston, Regan, Clinton, Bush, and Obama. What may be missing in these incremental changes to improve education are the disruptive technology innovations that have occurred over time when education policy makers were conversing on the ideas of accountability through federal support structures. These were the disruptive innovations that were occurring within society; the technology innovations responsible for the first transistor radio, home computer, and internet. The same disruptive innovations creating a global telecommunication network that encouraged imagination and began to customize individual learning from Web 1.0 (read and write web) to the construction of Web 2.0 (social networks) of share and share alike resources.
Surprising Data Around How We Work [Infographic]Citrix
A surprising 9 out of 10 full-time U.S. employees believe their boss trusts them to get their job done regardless of where and when they do their work. And, while additional data indicates employees have become upbeat about their increasingly flexible workplaces, inefficiencies abound in how workers use technology and communicate, and there is a lack of training and infrastructure available to support flexible work.
These are among the key findings from a national probability telephone survey commissioned by Flex+Strategy Group/Work+Life Fit, Inc and co-sponsored by Citrix.
Learn more: http://www.citrix.com/
Building Your First Node.js App and Publishing to AzureSarah Sexton
In my presentation, you are going to learn how to build your very first Node.js app and publish it online directly from Azure through GitHub. You will follow me on my personal journey from when I first heard about Node.js, to learning what it was, downloading the appropriate tools, building something with it, and finally publishing it to Azure. You’ll leave with some basic knowledge about Node.js, how to get started building your first Node app, and how to share it with the rest of the world.
Its a presentation about node.js. Here I have covered the basic things of node.js. Like what is node.js how it can be used. and explanation about some node.js frameworks
An Introduction to Node.js Development with Windows AzureTroy Miles
Node.js has taken off in popularity. Find out why major internet companies like Yammer, CouchOne, DocumentCloud, and LinkedIn are using Node to power their servers. And why Microsoft added support for it to Azure. In this session we will build a simple yet functional web server using Node, enhance it using plugins known as Modules, and hopefully explain why Node is such a powerful new web server paradigm.
As per the trends captured in the job market from the year and the technology popularity , the usage of node.js is set to take off this year to a whole new level. This blog is an insight into understanding node.js. Touch points from ground up covering the basics of the platform to advanced use cases will be covered. The key features across the different facets around building enterprise application with node.js will be covered. Interesting use cases will be discussed on how this powerful technology is being used across the globe. The targeted audience can range from intermediate to advanced developers who would like to learn and employ the technology, architects to use it effectively for solutioning and sales team who can leverage the advantages of the technology in proposing quicker time to market like never before.
Web development is changing and becoming increasingly popular in the development sector annually with new trends, frames, languages, tools, etc. Today, we are focusing on Node.js vs. .NET and which are the best technologies for web development.
Over the past few years, the developer’s community has been debating the two leading server-side languages -.NET and Node.js. Although .NET has played a good part among companies, the Node.js features offer stiff competition.
Node.js and Enterprise Web Apps: Know all About itFibonalabs
Ever since it was released in 2009, Node.js has been used extensively as a backend to build web applications. Its architecture of asynchronous input/output increases its performance and as it is based on JavaScript, makes it developer-friendly. Using it, we can serve more clients in less time with either the same or fewer resources as compared to a traditional Java-based application.
Since its first appearance in 2009, NodeJS has come a long way. Many frameworks have been developed on top of it. These all make our task easy and quick. It is us who need to decide which one to choose? So, here is the list of top 10 NodeJS frameworks that will help you build an awesome application.
Node.js is a compelling platform that is quickly spreading from startups to the enterprise. Node.js strategically unites developers of all backgrounds through the common language of JavaScript. Why should you learn Node.js and where do you start? You will come away from this talk with the evidence to support Node.js, and tools you need to be productive. We will walk through a typical workflow of creating and debugging a web application. You will learn how easy it is to deploy, including Microsoft Azure. We'll also look at popular frameworks and modules, and other learning resources to give you the best start.
The server side the back-end app development of your product is arguably its most important part. Among all likely back-end app development skills to select from, Node.js is one of the basics. It involves the vast majority of modern business fields and real cases. Many smaller business and startups survey their lead and leverage the technology in developing web development.
Building Node.js Together | Radu VunvuleaRadu Vunvulea
JavaScript's simplicity, ubiquity, and event-driven paradigm, and its high performance runtimes like Microsoft's Chakra and Google's V8, have led it to spread beyond web pages and browsers to servers and clouds, IoT devices, mobile apps, and more via the Node.js platform. For years Microsoft has worked closely with industry and community partners to build and improve Node.js to meet developers' needs, from contributing Node's main system library years ago to driving better diagnostics today. In this session, learn a bit about the history of Node.js, why developers are so interested in it, and what's coming next from Microsoft and the open source project to address Node developers' needs.
Node.js and .NET Core are the two most popular enterprise mobile app
developers platforms preferred by the app developers around the world
for their superior performance and unparalleled scalability.
Dot net platform and dotnet core fundamentalsLalit Kale
This is the presentation deck, I did for LimerickDotNet-Azure User group.
Event Url: https://www.meetup.com/Limerick-DotNet/events/240897689/
Session Details:
This session represented .NET journey of almost 17 years. Through this slid-deck, I narrated .NET platform progression till .NET Standards 2.0.
This session was accompanied by a small demo of running small dotnet program on alpine linux with docker container.
CosmosDB service is a NoSQL is a globally distributed, multi-model database database service designed for scalable and high performance modern applications. CosmosDB is delivered as a fully managed service with an enterprise grade SLA. It supports querying of documents using a familiar SQL over hierarchical JSON documents. Azure Cosmos DB is a superset of the DocumentDB service. It allows you to store and query noSQL data, regardless of schema. In this presentation, you will learn: • How to get started with DocumentDB you provision a new database account. • How to index documents • How to create applications using CosmosDb (using REST API or programming libraries for several popular language) • Best practices designing applications with CosmosDB • Best practices creating queries.
Spatial Data is very important for the new applications, related with Data Visualization and BI. Microsoft Azure offers possibility to use advantages of spatial data suing cloud computing. In this lecture will talk about the use of spatial data in the Microsoft Azure - loading data from Windows Azure SQL Database Spatial, optimizing Windows Azure applications and their use of different types of customers: WEB based, WPF, WP. We will learn how to import spatial data in different formats in Microsoft Azure SQL Database Spatial and will create a several demo applications, that use this data. We will also discuss the specifics, when you need to create and deploy claus applications like Azure Web Sites, Azure Cloud Services using spatial data.
1. Cherno More Hotel
12 July 2014
Boris Simandoff, Product Manager @ Chaos Group
Mihail Mateev, Senior Technical Evangelist, TL @ Infragistics Inc.
Node.js and Open Source Software Development
on Microsoft Azure
2. How this talk has started….
Боби, хайде да направим
една презентация за
Microsoft Azure
3. How this talk has started….
Ами… щом е за облачни
технолологии
няма да откажа…
но нека да е с Node.js
4. How this talk has started….
А защо да не е за
open source
технологии в
Microsoft Azure ?
Да включим и други
технологии ?
5. How this talk has started….
Ето така се
правят
презентации…
6. How this talk has started….
Момчета, това е
една интересна
тема за Varna Conf
7. Mihail Mateev
• About…
Mihail Mateev is a Senior Technical Evangelist, Team
Lead at Infragistics Inc., Community Lead for Europe,
Microsoft Azure MVP
Mihail works in various areas related to Microsoft
technologies : Silverlight, WPF, WP, LightSwitch, WCF,
ASP.Net MVC, MS SQL Server and Microsoft Azure
8. Contents
• Why Node.js
• Comparing Node.js to .NET
• Introduction to Node.js on Windows
• Using Azure SQL Database with Node.js
• Accessing Azure Storage with Node.js
• Building a Web Site with Node.js
• Deploying a Node.js Application
• Node.js & Edge.js
• Microsoft Azure Mobile Services and Node.js
• Resources
9. What is Node.js
• Node.js is a simple but powerful tool for asynchronous
network programming
• By utilizing your existing knowledge of JavaScript, you can get
up and running Apps quickly
• Node.js is based on V8 JS engine
10. What is Node.js
• Practically no installation required
• Very lightweight (one 7MB static exe)
• Node.js encourages good software practices out of the box
like async programming and inversion of control
11. Why Node.js?
• Node.js uses JavaScript syntax.
• There are more than 100 000 000 WEB developers!
• The realistic reason:
Cross platform applications with JS will be faster and easier
12. Why Node.js?
• The good parts of JavaScript are really awesome
•
• One language for the browser and the server
• Async by default
• Over 1M concurrent requests
13. Node.js Timeline
2009 2010 2011 2012 2013 2014
Jan 2009
Created
Ryan Dahl
April 2010
Heroku
launches
node
support
Nov 2011
Windows Azure
support
EBay releases API
built on node
Cloud9IDE azure
support
Oct 2011
node.js
overtakes Ruby
as most popular
repo on gitHub
Walmart
Launch mobile
site on node.js
Feb 2012
App
Harbour
support
July 2011
LinkedIn adopts
node for mobile
platform
port to Windows
IISNode
July 2010
Yammer
adopts
node.js
Nov
2010
Cloud9I
DE
launches
April 2014
Visual Studio
support
Node.js for
VS 2012 & 2013
Beta 1.0
Nov 2013
Visual Studio
support
Node.js for
VS 2012 & 2013
Alpha 1.0
14. Comparing Node.js to .NET
• Traditional Web Server Model
Client Server
Request
Response
Dedicated Thread
to service request
15. Comparing Node.js to .NET
• Traditional Web Server Model
Request 1
thread 1 processes the request
and blocks till completion
Response 1
thread 1000 processes the request
and blocks till completion
Web Server (with 1000 threads)
Request 1000
Response 1000
Request 1001
Request 1002
Request 1003
Requests queue up
as blocked threads
wait on server
16. Comparing Node.js to .NET
• Async Web Server Model
Client Server
Request
Response
Thread is free to
service other requests
Return from Async
Do Async Work
Once event or async
operation is complete
thread completes the
request
17. Comparing Node.js to .NET
• Async Web Server Model
Web Server
Request 1
Request 99999 Single threaded
event Loop
• Listen for requests
• Starts any I/O operations by
specifying a call back to execute
on completion
• Continue to listen for requests
Response 5
Response 1
“With node.js everything runs in parallel
Except your code ! ”
Response 99999
18. Comparing Node.js to .NET
• Mapping the Nomenclature
IIS Node.js
C# / VB JavaScript
EF / SQL Server Mongoose/MongoDB or other
Database
ASP.NET Web Forms Express + EJS
ASP.NET MVC/Razor Express + Jade/Razor
ASP.NET Web API Express/Hapi
SignalR WS / Socket.IO
AngularJS / KnockoutJS AngularJS / KnockoutJS
22. Introduction to Node.js on Windows
• How Node.js works?
• Asynchronous I/O
• Event Loop with Pool of Threads
• Dead-Lock Free (no concurrency issues)
24. Introduction to Node.js on Windows
• Why Node.js
• The good parts of JavaScript are really awesome
• One language for the browser and the server
• Async by default
• Over 1M concurrent requests
25. Introduction to Node.js on Windows
• Enabling a Node.js Server-Side App on Microsoft
Azure (PaaS)
• Web Role - all requests are received by
Microsoft IIS 7 and passed to a native IIS module
called iisnode
• Worker roles are much more like the basic node
application in that they directly run node.exe for
Server.js when the role instance starts.
26. Introduction to Node.js on Windows
• Enabling a Node.js Server-Side App on Windows
Azure (PaaS)
27. Introduction to Node.js on Windows
• Node.js in Azure Websites
• The architecture for running Node.js within Azure Websites
is identical to that used when hosting within a Web role
28. Introduction to Node.js on Windows
• Integrating Node with IIS / Benefits of using IISNode:
• Run your Node application across multiple CPU cores
• Serve static content from IIS, dynamic content from node
• Integrated, browser-based debugging with node-inspector
• Monitor the node executable plus changes to your code
• Configuration flexibility with XML + YAML overrides
• View console logs from the browser
• All the other existing IIS benefits, including output caching
29. MS SQLServer and Node.js
• Node.js Modules for SQLServer
#N % Node.js Module
#1 20.7% node-sqlserver
Microsoft Driver for Node.js for SQL Server
#2 18.0% tedious
A TDS driver, for connecting to MS SQLServer databases
#3 12.3% tds
TDS client for connecting to Microsoft SQL Server
#4 1.5% mssqlhelper
Microsoft SQL Server database helper
#5 0.4% mssqlx
NodeJs Microsoft SQL Server Command Line Interface
#6 0.2% msnodesql
Microsoft Driver for Node.js for SQL Server
#7 N/A node-sqlserver-unofficial
Microsoft Driver for Node.js for SQL Server – unofficial distribution
30. MS SQLServer and Node.js
• node-sqlserver & msnodesql
• Microsoft Driver for Node.js for SQL Server
and Azure SQL Database: Node.js module,
based on SQL Server Native Client 11.0 -
available as Microsoft SQL Server 2012
Native Client found in the
SQL Server 2012 Feature Pack
• The same repository, different npm
packages
31. MS SQLServer and Node.js
• node-sqlserver-unofficial
This is an unofficial binary distribution of that driver.
• No need to compile from source (which requires
Visual Studio and totally confuses people).
• It runs on both x86 and x64 and with node versions
0.8 and 0.10.
• No workarounds needed to run on Azure web sites.
node-sqlserver-unofficial npm page
32. MS SQLServer and Node.js
• node-sqlserver-unofficial
This is an unofficial binary distribution of that driver.
• No need to compile from source (which requires
Visual Studio and totally confuses people).
• It runs on both x86 and x64 and with node versions
0.8 and 0.10.
• No workarounds needed to run on Azure web sites.
node-sqlserver-unofficial npm page
33. MS SQLServer and Node.js
• tedious
• A TDS driver, for connecting to MS SQLServer databases.
• Tedious is an implementation of the TDS protocol, which
is used to interact with instances of Microsoft's SQL
Server. It is intended to be a fairly slim implementation of
the protocol, with not too much additional functionality.
• Tedious is implemented only with JavaScript
34. MS SQLServer and Node.js
• node-tds
• This is a module that allows you to access Microsoft SQL
Server 2005 and later.
• It is a pure JS implementation of the TDS protocol hosted
on GitHub.
• node-tds is similar to tedious
35. MS SQLServer and Node.js
• node-tds mssqlhelper
• Microsoft SQL Server Helper nodejs
• mssqlx
• NodeJs Microsoft SQL Server Command Line Interface
36. MS SQLServer and Node.js
• Pros and Cons
driver pros cons
tedious,
tds
Lightweight ,
JS implementation,
no dependencies
Limited functionalities,
Cannot use integrated
authentication
msnodesql,
node-sqlserver
More features Many dependencies,
No actual builds
Require custom build
node-sqlserver-
unofficial
Same like msnodesql, node-sqlserver,
fixed issues with the official distributions
No official support
Ende.js and Edge-sql can run any SQL expression, can connect
using integrated security
Requires .Net 4.5
Can run only on Windows
37. MS SQLServer and Node.js
• JSON to SQL Type Mappings
JSON Value T-SQL Type
Numeric values (integer,
decimal, floating point)
Float(53)
Boolean Bit
DateTime DateTimeOffset(3)
String Nvarchar(max)
38. Microsoft Azure and Node.js
• Using Azure SQL Database with Node.js
• Default Microsoft Driver for Node.JS for SQL Server
• Open First – hosted on Github
https://github.com/Azure/node-sqlserver
• Simplicity by Design – keeps the simple API
• Use in Windows Azure Web Sites
39. Azure SQL Database with Node.js
• Using Azure SQL Database with Node.js
• Connecting to SQL Server Database with Node.JS – node-
sqlserver
var sql = require('node-sqlserver');
var conn_str =
"Driver={SQL Server Native Client 11.0};" +
"Server=tcp:[databasename].database.windows.net,1433;" +
"Database=TaskList;Uid=[username];" +
"Pwd=[password];Encrypt=yes;Connection Timeout=30“
40. Azure SQL Database with Node.js
• Connecting to SQL Server Database with Node.JS
sql.open(conn_str, function (err, conn) {
err && throw err;
conn.queryRaw(query, function (err, results) {
err && throw err;
for (var i = 0; i < results.rows.length; i++) {
res.write( "Description: " + results.rows[i][0] + "n");
}
res.end();
});
}); // sql.open
41. Azure SQL Database with Node.js
• Using Azure SQL Database with Node.js
• Connecting to SQL Server Database with Node.JS + tedious
var Connection = require('tedious').Connection;
var Request = require('tedious').Request;
var config = {
server: 'ic509d6puu.database.windows.net',
userName: '[user]@[db-server].database.windows.net',
password: [password],
database: ' [database] ' ,
encrypt: true // for Azure users
}
42. Azure SQL Database with Node.js
• Using Azure SQL Database with Node.js
• Connecting to SQL Server Database with Node.JS + tedious
function executeStatement() {
request = new Request( "select 42,
'hello world'", function(err, rowCount) {
if (err) {
console.log(err);
} else {
console.log(rowCount + ' rows');
}
connection.close();
});
request.on('done',
function(rowCount, more) {
console.log(rowCount +
' rows returned‘ );
});
connection.execSql(request);
}
43. Azure SQL Database with Node.js
• Using Azure SQL Database with Node.js
• Connecting to SQL Server Database with Node.JS + tedious
var connection = new Connection(config);
connection.on('connect' , function(err) {
// If no error, then good to go...
executeStatement();
}
);
44. Azure SQL Database with Node.js
• Using Azure SQL Database with Node.js
• Connecting to SQL Server Database with Node.JS + tedious
– Insert Query
connection.on('connect', function(err){
var request = new Request("INSERT INTO MyTable (uniqueIdCol, intCol,
nVarCharCol) VALUES (@uniqueIdVal, @intVal, @nVarCharVal)",
function(err){
if(err){
console.log(err);
};
});
request.addParameter('uniqueIdVal',
TYPES.UniqueIdentifierN,'ba46b824-487b-4e7d-8fb9-703acdf954e5');
request.addParameter('intVal', TYPES.Int, 435);
request.addParameter('nVarCharVal', TYPES.NVarChar, 'hello world');
connection.execSql(request);
});
45. Azure SQL Database with Node.js
• Using Azure SQL Database with Node.js
• Connecting to SQL Server Database with Node.JS +
node-sqlserver-unofficial
var sql = require('node-sqlserver-unofficial');
sql.query(conn_str, "SELECT TOP 10 FirstName, LastName FROM Person.Person", function (err, results) {
if (err) {
res.writeHead(500, { 'Content-Type': 'text/plain' });
res.write( "Got error :-( " + err);
res.end( "" );
return;
}
res.writeHead(200, { 'Content-Type': 'text/plain' });
for (var i = 0; i < results.length; i++) {
res.write( "FirstName: " + results[i].FirstName + " LastName: " + results[i].LastName );
}
res.end( "; Done." );
});
49. Building a Web Site with Node.js
• Node Options in the Gallery
50. Building a Web Site with Node.js
• DEMO
• Creating Azure Web Site with Node.js, tedious and
Azure SQL Database
• Creating Azure Web Site with Node.js, node-
sqlserver-unofficial and Azure SQL Database
• Creating Web App with Edge and Azure SQL
Database
51. Building a Web Site with Node.js
• DEMO
• Creating Azure Web Site with Node.js,
azure-table-node and Azure Table Storage
• Creating Azure Web Site with Node.js,
azure and Azure Blob Storage
53. Node.js and C# with Edge.js
• Edge.js
• Native binding to .Net world
var edge = require('edge')
var hello = edge.func(function() {/*
async (input) => {
return ".NET welcomes " + input.ToString();
}
*/})
hello('Node.js', function(error, result) {
error && throw error
console.log(result)
})
54. Node.js and C# with Edge.js
• Edge.js and SQL Server / Azure SQL Database
• The Edge.js module for Node.js allows in-process interop beween
Node.js and .NET code
• The Edge-sql extension of Edge.js enables executing T-SQL scripts
embedded within a Node.js application using asynchronous ADO.NET
running in-process with Node.js code.
• The Edge-sql extension currently supports the four basic CRUD
operations: select, insert, update, and delete.
55. Node.js and C# with Edge.js
• Edge.js and SQL Server / Azure SQL Database
• Connection string / using environment variables
SETX EDGE_SQL_CONNECTION_STRING "Data Source=localhost;Initial
Catalog=node-test;Integrated Security=True "
56. Node.js and C# with Edge.js
• Edge.js and SQL Server / Azure SQL Database
• Query SQL Server directly using Edge.js
var getTopUsers = edge.func('sql', function () { /*
SELECT TOP 5 * FROM SampleUsers ORDER BY CreateDate DESC
*/ });
57. Node.js and C# with Edge.js
• Edge.js, Edge-sql and SQL Server / Azure SQL Database
• Query SQL Server directly using Edge.js /
code to set the ConnectionString in node.js
var params = {
connectionString: "Data Source=IGBGSOFEV06SQLEXPRESS;Initial
Catalog=NodeJS;Integrated Security=True“ ,
source: "SELECT TOP 5 * FROM SampleUsers ORDER BY CreateDate DESC"
};
var getTopUsers = edge.func( 'sql‘ , params);
58. Node.js and C# with Edge.js
• Edge.js , Edge-sql and SQL Server / Azure SQL Database
• Query SQL Server directly using Edge.js
getTopUsers(null, function (error, result) {
if (error) { logError(error, res); return; }
if (result) {
res.write( "<ul>" );
result.forEach(function(user) {
res.write( "<li>" + user.FirstName + " " +
user.LastName + ": " + user.Email + "</li>" );
});
res.end( "</ul>" );
}
else {
}
});
59. Node.js and C# with Edge.js
• Edge.js , Edge-sql and SQL Server / Azure SQL Database
• Execute .NET code to query SQL Server
• Create a .NET class library
• Import the .Net assembly and use it’s API in Node.js +
Edge application
60. Node.js and C# with Edge.js
• Edge.js , Edge-sql and SQL Server / Azure SQL Database
• Create a .Net Class Library
public class Sample1
{
public async Task<object> Invoke(object input)
{
....
}
public async Task<List<SampleUser>> QueryUsers(int
pageNumber, int pageSize)
{
....
}
}
61. Node.js and C# with Edge.js
• Edge.js , Edge-sql and SQL Server / Azure SQL Database
• Create a .Net Class Library
public class SampleUser
{
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
public DateTime CreateDate { get; set; }
}
62. Node.js and C# with Edge.js
• Edge.js , Edge-sql and SQL Server / Azure SQL Database
• Using a .Net Library from Node.js + Edje.js app
// Set up the assembly to call from Node.js
var querySample = edge.func({
assemblyFile: 'EdgeSampleLibrary.dll',
typeName: 'EdgeSampleLibrary.Sample1',
methodName: 'Invoke'
});
63. Node.js and C# with Edge.js
• Edge.js , Edge-sql and SQL Server / Azure SQL Database
• Using a .Net Library from Node.js + Edje.js app
// This is the data we will pass to .NET
var data = { pageNumber: 2, pageSize: 3 }
// Invoke the .NET function
querySample(data, function (error, result) {
....
});
64. Node.js and C# with Edge.js
• Edge.js, Edge-sql and SQL Server / Azure SQL Database
• DEMO
65. Mobile Services & Node.js
• Azure Mobile Services Review
Data Authentication Notifications Scripts & Svcs
66. Mobile Services & Node.js
• Microsoft Azure Mobile Services Architecture
72. Mobile Services & Node.js
• Push Notifications
Insert, Update, Delete, Read on a Table
Automatic or Manual Server Script
An Event
Script Runs in the Azure Mobile Service
Windows
Phone 8
iOS AndroidWindows 8
73. Mobile Services & Node.js
• Node Modules
• Extensibility through numerous included modules
75. Resources:
• Node.js - http://nodejs.org/
• Node.js for Visual Studio - https://nodejstools.codeplex.com/
• Scott Hanselman blog - http://www.hanselman.com/blog/
• Microsoft Azure – Node.js Developer Center -
http://azure.microsoft.com/en-us/develop/nodejs/
• Azure SDK for Node.js in GitHub -
https://github.com/Azure/azure-sdk-for-node