Introduction of Sails.js
Sails.js makes professional web development a breeze. This instantly familiar MVC framework automatically handles the tedious application boilerplate, so you can concentrate on developing features and creating business value. You get powerful tools for rapid API development, task automation, an ORM, and easy integration with any web, mobile, or IoT frontend. And because you’re using Node.js, it’s JavaScript all the way down.
Too often, backend programming is put on a pedestal, where only highly trained and disciplined experts are worthy. That’s baloney. Backend programming isn’t rocket science—but that doesn’t mean it’s easy. It means that for those new to it, you just need a healthy curiosity and a powerful framework like Sails to get started. If you already have experience with backend programming in a language other than JavaScript, the transition can also be frustrating. Shifting from synchronous to asynchronous patterns can take some time to master. Whether you’re new or experienced, Sails will make this transition much easier.
Prerequisites for Sails.js
- JavaScript Proficiency: Strong understanding of JavaScript, including ES6 features.
- Node.js Knowledge: Familiarity with Node.js and its asynchronous programming model.
- Understanding of MVC: Basic knowledge of the MVC architecture for organizing application structure.
- Database Basics: Familiarity with databases (SQL and NoSQL) and data modeling concepts.
- Version Control: Experience with Git for managing code changes.
- Web Development Fundamentals: Knowledge of HTML, CSS, and RESTful APIs for building web applications.
TABLE OF CONTENT
- Getting Started
1.1 What is Sails?
1.2 What Can You Build with Sails?
1.3 So Why Sails?
1.4 Fundamental Concepts of a Web Application
1.5 Understanding Databases
1.6 Putting It All Together in a Back-End API
1.7 Our Back-End Design Philosophy
1.8 Delivering Front-End Assets
1.9 Front-End vs. Back-End Validations
1.10 Realtime (Web Sockets)
1.11 Asynchronous Programming
1.12 Meet Chad
- First Steps
2.1 Tools of the Trade
2.2 How Code Is Organized in Node.js
2.3 Online Resources for This Book
2.4 Documentation and Community Support
- Using Static Assets
3.1 Introduction to Static Routing
3.2 The Asset Pipeline
3.3 Managing Scripts and Stylesheets
3.4 Front-End First API Design
3.5 Using Sails with jQuery
3.6 Using Sails with Angular
- Using the Blueprint API
4.1 Prototyping with Blueprints
4.2 Shortcut Blueprint Routes
4.3 Connecting the Front-End to Our New API
4.4 Exploring the REST of the Blueprint API
4.5 Upgrading to Web Sockets
- Custom Back-End Code
5.1 Chad Has a New Investor
5.2 Running Code on Lift
5.3 A Deeper Understanding of Model Methods
5.4 Introducing Machine Packs
5.5 Creating Multiple Records
- Using Models
6.1 Understanding Sails Models
6.2 Managing User Data
6.3 Creating a New Model
6.4 Demystifying Databases
6.5 Understanding Model Methods
- Custom Actions
7.1 Demystifying Routes and Actions
7.2 Identifying the Requirements for Our Custom Actions
7.3 Handling a Signup Form
7.4 Providing Data for a User Profile Page
7.5 Restoring User Accounts
7.6 Editing User Profiles
7.7 Administrative Actions
- Server-Rendered Views
8.1 Page Navigation
8.2 Personalizing Web Pages
- Authentication and Sessions
9.1 What is Authentication?
9.2 The Login Process
9.3 Personalizing Page Content for Logged-In Users
9.4 Implementing the Back-End Application Flow
- Policies and Access Control
10.1 A Farewell to Blueprints
10.2 Policies
- Refactoring
11.1 Maintaining Your Sanity When Requirements Change
11.2 Custom Routing and Error Pages
11.3 Adjusting Access Control Rules
11.4 Patterns and Best Practices
11.5 In Depth: Adding a Password Recovery Flow
- Embedded Data and Associations
12.1 Obtaining the Example Materials for This Chapter
12.2 Understanding Relationships Between Data
12.3 Associating Data Using Embedded JSON
12.4 Understanding Sails Associations
12.5 Using Services
- Ratings, Followers, and Search
13.1 Obtaining the Example Materials for This Chapter
13.2 Incorporating Ratings
13.3 Implementing Videos
13.4 Implementing Support for Followers
13.5 Search
- Real Time with Web Sockets
14.1 Obtaining the Example Materials for This Chapter
14.2 Understanding Web Sockets
14.3 Implementing Chat
14.4 Sending “Typing” and “StoppedTyping” Notifications
14.5 Understanding Resourceful Pub Sub (RPS)
14.6 Understanding How the Blueprint API Uses RPS Methods
- Deployment, Testing, and Security
15.1 Obtaining the Example Materials for This Chapter
15.2 Deploying Your Sails App
15.3 Using Environment Variables with Sails
15.4 Runtime Environments
15.5 Configuring Sessions and Sockets for Production
15.6 Testing
15.7 Security
Conclusion
Sails.js provides a robust framework for developing real-time web applications and APIs, streamlining the development process with its MVC architecture and built-in WebSocket support. By mastering Sails.js the prerequisites, developers can leverage Sails.js to create scalable and maintainable applications efficiently.
If you are looking for customized info, Please contact us here
Reference |
Reviews
There are no reviews yet.