Node.js Design Patterns: Edition 2

Packt Publishing Ltd
Free sample

Get the best out of Node.js by mastering its most powerful components and patterns to create modular and scalable applications with easeAbout This Book
  • Create reusable patterns and modules by leveraging the new features of Node.js .
  • Understand the asynchronous single thread design of node and grasp all its features and patterns to take advantage of various functions.
  • This unique guide will help you get the most out of Node.js and its ecosystem.
Who This Book Is For

The book is meant for developers and software architects with a basic working knowledge of JavaScript who are interested in acquiring a deeper understanding of how to design and develop enterprise-level Node.js applications.

Basic knowledge of Node.js is also helpful to get the most out of this book.

What You Will Learn
  • Design and implement a series of server-side JavaScript patterns so you understand why and when to apply them in different use case scenarios
  • Become comfortable with writing asynchronous code by leveraging constructs such as callbacks, promises, generators and the async-await syntax
  • Identify the most important concerns and apply unique tricks to achieve higher scalability and modularity in your Node.js application
  • Untangle your modules by organizing and connecting them coherently
  • Reuse well-known techniques to solve common design and coding issues
  • Explore the latest trends in Universal JavaScript, learn how to write code that runs on both Node.js and the browser and leverage React and its ecosystem to implement universal applications
In Detail

Node.js is a massively popular software platform that lets you use JavaScript to easily create scalable server-side applications. It allows you to create efficient code, enabling a more sustainable way of writing software made of only one language across the full stack, along with extreme levels of reusability, pragmatism, simplicity, and collaboration. Node.js is revolutionizing the web and the way people and companies create their software.

In this book, we will take you on a journey across various ideas and components, and the challenges you would commonly encounter while designing and developing software using the Node.js platform. You will also discover the "Node.js way" of dealing with design and coding decisions.

The book kicks off by exploring the basics of Node.js describing it's asynchronous single-threaded architecture and the main design patterns. It then shows you how to master the asynchronous control flow patterns,and the stream component and it culminates into a detailed list of Node.js implementations of the most common design patterns as well as some specific design patterns that are exclusive to the Node.js world.Lastly, it dives into more advanced concepts such as Universal Javascript, and scalability' and it's meant to conclude the journey by giving the reader all the necessary concepts to be able to build an enterprise grade application using Node.js.

Style and approach

This book takes its intended readers through a comprehensive explanation to create a scalable and efficient real-time server-side apps.

Read more

About the author

Mario Casciaro is a software engineer and entrepreneur, passionate about technology, science and open source knowledge. Mario graduated with a master's degree in software engineering and started his professional career at IBM where he worked for several years on different enterprise products such as Tivoli Endpoint Manager, Cognos Insight, and SalesConnect. Next, he moved to D4H Technologies, a growing SaaS company, to lead the development of a new bleeding-edge product for managing emergency operations in real time. Currently, Mario is the co-founder and CEO of Sponsorama.com, a platform to help online projects raise funds through corporate sponsorship. Mario is also the author of the first edition of Node.js Design Patterns.

Luciano Mammino is a software engineer born in 1987, the same year that the Nintendo released Super Mario Bros in Europe, which by chance is his favorite video-game. He started coding at the age of 12 using his father's old Intel 386, provided only with the DOS operating system and the qBasic interpreter. After a master's degree in computer science he developed his programming skills mostly as a web developer working mainly as freelancer for companies and startups all around Italy. After a start-up parenthesis of 3 years as CTO and co-founder of Sbaam.com in Italy and in Ireland, he decided to relocate in Dublin to work as senior PHP engineer at Smartbox. He loves developing open source libraries and working with frameworks such as Symfony and Express. He is convinced that the JavaScript fame is still at the very beginning and that this technology will have a huge impact in the future of most of the web-and mobile-related technologies. For this reason, he spends most of his free time improving his knowledge of JavaScript and playing with Node.js.

Read more
Loading...

Additional Information

Publisher
Packt Publishing Ltd
Read more
Published on
Jul 18, 2016
Read more
Pages
526
Read more
ISBN
9781785887383
Read more
Language
English
Read more
Genres
Computers / Databases / Servers
Computers / Programming Languages / JavaScript
Computers / Web / General
Read more
Content Protection
This content is DRM free.
Read more
Read Aloud
Available on Android devices
Read more

Reading information

Smartphones and Tablets

Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.

Laptops and Computers

You can read books purchased on Google Play using your computer's web browser.

eReaders and other devices

To read on e-ink devices like the Sony eReader or Barnes & Noble Nook, you'll need to download a file and transfer it to your device. Please follow the detailed Help center instructions to transfer the files to supported eReaders.
Perfect for end users, analysts,  data scientists, and app developers, this best-selling guide will get you up and running with SQL, the language of databases. You'll find general concepts, practical answers, and clear explanations of what the various SQL statements can do. Hundreds of examples of varied difficulty encourage you to experiment and explore. Full-color SQL code listings help you see the elements and structure of the language. You can download the sample database to follow along with the author's examples.


- Covers Oracle, Microsoft SQL Server, IBM DB2, MySQL, PostgreSQL, and Microsoft Access.

- Learn the core language for standard SQL, and variations for the most widely used database systems.

- Organize your database in terms of the relational model.

- Master tables, columns, rows, and keys.

- Retrieve, sort, and format data.- Filter the data that you don't want to see.

- Convert and manipulate data with SQL's built-in functions and operators.

- Use aggregate functions to summarize data.

- Create complex SQL statements by using joins, subqueries, constraints, conditional logic, and metadata.

- Create, alter, and drop tables, indexes, and views.

- Insert, update, delete, and merge data.

- Execute transactions to maintain the integrity of your data.

- Avoid common pitfalls involving nulls.

- Troubleshoot and optimize queries.

- Plenty of tips, tricks, and timesavers.

- Fully cross-referenced, linked, and searchable.


Contents

Introduction

1. Running SQL Programs

2. The Relational Model

3. SQL Basics

4. Retrieving Data from a Table

5. Operators and Functions

6. Summarizing and Grouping Data

7. Joins

8. Subqueries

9. Set Operations

10. Inserting, Updating, and Deleting Rows

11. Creating, Altering, and Dropping Tables

12. Indexes

13. Views

14. Transactions


Get up to speed fast with SQL, the language of databases. Bestselling author Chris Fehily teaches you just the parts of SQL that you need to know. Quick, learn-by-example lessons start with simple data retrieval and sorting, move on to filtering and grouping, and then build to more-advanced topics, including joins, subqueries, views, and transactions. Whether you're an analyst, developer, data scientist, or Microsoft Office user, you'll find straightforward, practical answers. You can download the sample database to follow along with the examples.


- Covers Oracle, Microsoft SQL Server, IBM DB2, MySQL, PostgreSQL, and Microsoft Access.

- Learn the core language for standard SQL, and variations for the most widely used database systems.

- Organize your database in terms of the relational model.

- Master tables, columns, rows, and keys.

- Retrieve, sort, and format data.

- Filter the data that you don't want to see.

- Convert and manipulate data with SQL's built-in functions and operators.

- Use aggregate functions to summarize data.

- Create complex SQL statements by using joins, subqueries, constraints, conditional logic, and metadata.

- Create, alter, and drop tables, indexes, and views.

- Insert, update, delete, and merge data.

- Execute transactions to maintain the integrity of your data.

- Avoid common pitfalls involving nulls.

- Troubleshoot and optimize queries.

- Plenty of tips, tricks, and timesavers.

- Fully cross-referenced, linked, and searchable.


Contents

1. Introduction

2. Database Basics

3. SQL Basics

4. Retrieving Data from a Table

5. Sorting Rows

6. Filtering Rows

7. Combining and Negating Conditions

8. Pattern Matching

9. More Ways to Filter Rows

10. Operators and Functions

11. Working with Functions

12. Evaluating Conditional Values

13. Summarizing Data

14. Grouping Data

15. Joining Tables

16. Working with Joins

17. Subqueries

18. Combining Queries

19. Inserting Rows

20. Updating and Deleting Rows

21. Creating and Changing Tables

22. Indexes

23. Views

24. Transactions

A. The Sample Database

B. Running SQL Programs

C. Data Types


This cookbook of advanced techniques is for anyone who knows the basics of SQL and wants to move beyond simple SELECT-FROM-WHERE queries. You'll find solutions to problems that analysts, app developers, and database programmers often face, from simple tasks, like picking random rows, to complex operations, like traversing hierarchies. Each recipe includes a discussion of the underlying logic, important concepts, and best practices. Take full advantage of standard (ANSI/ISO) SQL, or use DBMS-specific features that dramatically extend the power of standard SQL. Use the scores of code examples directly in real-world DBMS applications, or as a source of insight for related problems.


- Covers Oracle, Microsoft SQL Server, IBM DB2, MySQL, PostgreSQL, and Microsoft Access.

- Implement cross-platform solutions in standard SQL, or DBMS-specific solutions for your particular system.

- Full-color SQL code listings help you see the elements and structure of the language.

- Download the sample database and code listings to follow along with the author's examples.

- Plenty of tips, tricks, and timesavers.

- Fully cross-referenced, linked, and searchable.


Contents

Introduction

1. Running SQL Programs

2. Calculating Running Statistics

3. Generating Sequences

4. Finding Sequences, Runs, and Regions

5. Limiting the Number of Rows Returned

6. Assigning Ranks

7. Calculating a Trimmed Mean

8. Picking Random Rows

9. Handling Duplicates

10. Creating a Telephone List

11. Retrieving Metadata

12. Working with Dates

13. Calculating a Median

14. Finding Extreme Values

15. Changing Running Statistics Midstream

16. Pivoting Results

17. Working with Hierarchies


Data is getting bigger and more complex by the day, and so are your choices in handling it. Explore some of the most cutting-edge databases available - from a traditional relational database to newer NoSQL approaches - and make informed decisions about challenging data storage problems. This is the only comprehensive guide to the world of NoSQL databases, with in-depth practical and conceptual introductions to seven different technologies: Redis, Neo4J, CouchDB, MongoDB, HBase, Postgres, and DynamoDB. This second edition includes a new chapter on DynamoDB and updated content for each chapter.

While relational databases such as MySQL remain as relevant as ever, the alternative, NoSQL paradigm has opened up new horizons in performance and scalability and changed the way we approach data-centric problems. This book presents the essential concepts behind each database alongside hands-on examples that make each technology come alive.

With each database, tackle a real-world problem that highlights the concepts and features that make it shine. Along the way, explore five database models - relational, key/value, columnar, document, and graph - from the perspective of challenges faced by real applications. Learn how MongoDB and CouchDB are strikingly different, make your applications faster with Redis and more connected with Neo4J, build a cluster of HBase servers using cloud services such as Amazon's Elastic MapReduce, and more. This new edition brings a brand new chapter on DynamoDB, updated code samples and exercises, and a more up-to-date account of each database's feature set.

Whether you're a programmer building the next big thing, a data scientist seeking solutions to thorny problems, or a technology enthusiast venturing into new territory, you will find something to inspire you in this book.

What You Need:

You'll need a *nix shell (Mac OS or Linux preferred, Windows users will need Cygwin), Java 6 (or greater), and Ruby 1.8.7 (or greater). Each chapter will list the downloads required for that database.
©2018 GoogleSite Terms of ServicePrivacyDevelopersArtistsAbout Google|Location: United StatesLanguage: English (United States)
By purchasing this item, you are transacting with Google Payments and agreeing to the Google Payments Terms of Service and Privacy Notice.