Book Image

Mastering Node.js

By : Sandro Pasquali
Book Image

Mastering Node.js

By: Sandro Pasquali

Overview of this book

Node.js is a modern development stack focused on providing an easy way to build scalable network software. Backed by a growing number of large companies and a rapidly increasing developer base, Node is revolutionizing the way that software is being built today. Powered by Google's V8 engine and built out of C++ modules, this is a JavaScript environment for the enterprise.Mastering Node.js will take the reader deep into this exciting development environment. Beginning with a comprehensive breakdown of its innovative non-blocking evented design, Node's structure is explained in detail, laying out how its blazingly fast I/O performance simplifies the creation of fast servers, scalable architectures, and responsive web applications.Mastering Node.js takes you through a concise yet thorough tour of Node's innovative evented non-blocking design, showing you how to build professional applications with the help of detailed examples.Learn how to integrate your applications with Facebook and Twitter, Amazon and Google, creating social apps and programs reaching thousands of collaborators on the cloud. See how the Express and Path frameworks make the creation of professional web applications painless. Set up one, two, or an entire server cluster with just a few lines of code, ready to scale as soon as you're ready to launch. Move data seamlessly between databases and file systems, between clients, and across network protocols, using a beautifully designed, consistent, and predictable set of tools.Mastering Node.js contains all of the examples and explanations you'll need to build applications in a short amount of time and at a low cost, running on a scale and speed that would have been nearly impossible just a few years ago.
Table of Contents (20 chapters)
Mastering Node.js
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Appendix B. Introducing the Path Framework

 

"Great acts are made up of small deeds."

 
 --Lao Tzu

JavaScript is the only language natively installed in browsers. All web-based applications depend on JavaScript to deliver their UI. If you are using a framework built on another language (such as Ruby on Rails), you must merge two completely different development models, one for the client and one for the server. With the arrival of Node and JavaScript on the server, this unfortunate and awkward workflow has been made smooth and elegant.

The Path Framework is a powerful full-stack application development platform that will help you create enterprise-class applications in less time. Unlike Express, which is limited to the server side of an application, and client-side frameworks such as EmberJS that offer no help on building servers, Path unifies your application development process. With its focus on the full stack, Path enables the JavaScript developer to build complete applications using a single language that are scalable, easy to maintain, test, and modify. Of course, Node occupies a central place in the Path design.

Path's goal is to help developers easily build web applications that work like native applications. This means responsive single-page applications with powerful features.

Data is synchronized automatically between client and server when you build an application with Path. No more building complex and error-prone client/server synchronization hooks. Client interfaces are composed out of modules of any number and complexity, easily using an elegant, declarative, and data-centric syntax. Real-time data broadcasts across groups of clients, in both directions, in a snap. Programming route handlers on the server is just as easy as binding a click to a button.

Some of the key features of Path are as follows:

  • Just JavaScript: Context switching is hard. Finally, a unified team speaking a common language, across the stack.

  • Automatic UI refresh: Your UI modules automatically update when the data they are bound to changes. Two-way data binding without the knots.

  • No more CRUD: Move beyond the dirty old CRUD model into an efficient socket-based communication paradigm designed for modern real-time application development.

  • Hot code updates: Change your code on the server and the clients will be updated automatically.

  • Interoperability: Anything that can communicate over WebSockets can communicate with a Path server.

  • Dirt simple module loading: Simple declarative HTML syntax helps you compose UIs in a way that is easy for you to create and easy for others to read.

  • Automatic module caching: It means smart dependency loading.

  • As easy as HTML: Modules are naturally expressed by nesting HTML elements. Loaded modules can themselves create further module dependency trees. Element attributes store options and other component settings. User events are bound to server actions without using any JavaScript.

  • Embeddable: Use as much or as little of Path as you'd like. Path is here to help, not hinder. Other frameworks can even share your Path server.

  • Out-of-the-box productivity: Path comes packed with prebuilt applications you can get started with right away.

Tip

To get started, clone the Path repository from https://github.com/sandro-pasquali/pathjs.git, and follow the instructions on that page.