Node.js - Introduction - Tutorialspoint

文章推薦指數: 80 %
投票人數:10人

Node.js is a platform built on Chrome's JavaScript runtime for easily building fast and scalable network applications. Node.js uses an event-driven, non- ... Home CodingGround Jobs Whiteboard Tools Business Teachwithus Node.jsTutorial Node.js-Home Node.js-Introduction Node.js-EnvironmentSetup Node.js-FirstApplication Node.js-REPLTerminal Node.js-PackageManager(NPM) Node.js-CallbacksConcept Node.js-EventLoop Node.js-EventEmitter Node.js-Buffers Node.js-Streams Node.js-FileSystem Node.js-GlobalObjects Node.js-UtilityModules Node.js-WebModule Node.js-ExpressFramework Node.js-RESTFulAPI Node.js-ScalingApplication Node.js-Packaging Node.jsUsefulResources Node.js-QuickGuide Node.js-UsefulResources Node.js-Dicussion SelectedReading UPSCIASExamsNotes Developer'sBestPractices QuestionsandAnswers EffectiveResumeWriting HRInterviewQuestions ComputerGlossary WhoisWho Node.js-Introduction Advertisements PreviousPage NextPage  ServerlessDevelopmentwithAWSLambdaandNodeJS 44Lectures 7.5hours EduonixLearningSolutions MoreDetail LearnNodejsbybuilding10projects MostPopular 88Lectures 17hours EduonixLearningSolutions MoreDetail UnitTestingandTestDrivenDevelopmentinNodeJS 32Lectures 1.5hours RichardWells MoreDetail WhatisNode.js? Node.jsisaserver-sideplatformbuiltonGoogleChrome'sJavaScriptEngine(V8Engine).Node.jswasdevelopedbyRyanDahlin2009anditslatestversionisv0.10.36.ThedefinitionofNode.jsassuppliedbyitsofficialdocumentationisasfollows− Node.jsisaplatformbuiltonChrome'sJavaScriptruntimeforeasilybuildingfastandscalablenetworkapplications.Node.jsusesanevent-driven,non-blockingI/Omodelthatmakesitlightweightandefficient,perfectfordata-intensivereal-timeapplicationsthatrunacrossdistributeddevices. Node.jsisanopensource,cross-platformruntimeenvironmentfordevelopingserver-sideandnetworkingapplications.Node.jsapplicationsarewritteninJavaScript,andcanberunwithintheNode.jsruntimeonOSX,MicrosoftWindows,andLinux. Node.jsalsoprovidesarichlibraryofvariousJavaScriptmoduleswhichsimplifiesthedevelopmentofwebapplicationsusingNode.jstoagreatextent. Node.js=RuntimeEnvironment+JavaScriptLibrary FeaturesofNode.js FollowingaresomeoftheimportantfeaturesthatmakeNode.jsthefirstchoiceofsoftwarearchitects. AsynchronousandEventDriven−AllAPIsofNode.jslibraryareasynchronous,thatis,non-blocking.ItessentiallymeansaNode.jsbasedserverneverwaitsforanAPItoreturndata.TheservermovestothenextAPIaftercallingitandanotificationmechanismofEventsofNode.jshelpstheservertogetaresponsefromthepreviousAPIcall. VeryFast−BeingbuiltonGoogleChrome'sV8JavaScriptEngine,Node.jslibraryisveryfastincodeexecution. SingleThreadedbutHighlyScalable−Node.jsusesasinglethreadedmodelwitheventlooping.Eventmechanismhelpstheservertorespondinanon-blockingwayandmakestheserverhighlyscalableasopposedtotraditionalserverswhichcreatelimitedthreadstohandlerequests.Node.jsusesasinglethreadedprogramandthesameprogramcanprovideservicetoamuchlargernumberofrequeststhantraditionalserverslikeApacheHTTPServer. NoBuffering−Node.jsapplicationsneverbufferanydata.Theseapplicationssimplyoutputthedatainchunks. License−Node.jsisreleasedundertheMITlicense. WhoUsesNode.js? Followingisthelinkongithubwikicontaininganexhaustivelistofprojects,applicationandcompanieswhichareusingNode.js.ThislistincludeseBay,GeneralElectric,GoDaddy,Microsoft,PayPal,Uber,Wikipins,Yahoo!,andYammertonameafew. Projects,Applications,andCompaniesUsingNode Concepts ThefollowingdiagramdepictssomeimportantpartsofNode.jswhichwewilldiscussindetailinthesubsequentchapters. WheretoUseNode.js? FollowingaretheareaswhereNode.jsisprovingitselfasaperfecttechnologypartner. I/OboundApplications DataStreamingApplications DataIntensiveReal-timeApplications(DIRT) JSONAPIsbasedApplications SinglePageApplications WhereNottoUseNode.js? ItisnotadvisabletouseNode.jsforCPUintensiveapplications. PreviousPage PrintPage NextPage  Advertisements



請為這篇文章評分?