|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/learn-apis-development-with-prisma-nodejs-and-postgres/
课程评论:没有评论
课程名称:使用Prisma、Nodejs和Postgres学习API开发 课程概述:Prisma是一种下一代对象关系映射(ORM)工具,旨在帮助开发者加快开发速度并减少错误。与传统ORM相比,Prisma采用了一种独特的模式定义语言(SDL),该语言能够自动编写迁移文件并生成类型安全的代码。 为什么选择Prisma?ORM能够促进领域模型的实现,领域模型是一个集成了业务逻辑行为和数据的对象模型。这意味着开发者可以专注于实际的业务概念,而不是数据库结构或SQL语义。ORM可以减少代码量,避免为常见的CRUD(创建、读取、更新、删除)操作重复编写SQL语句,并防止SQL注入等安全漏洞。此外,ORM要求开发者几乎不需要写SQL(根据复杂性,可能仍需写一些原始查询),这对不熟悉SQL的开发者尤为有利。同时,许多ORM会抽象数据库特定的细节,这在理论上使得更换数据库变得更加容易,尽管在实际应用中,应用程序很少会更换使用的数据库。 在本课程中,我们将使用Prisma、Node、Express和Postgres构建REST API。
Prisma is a next-generation object-relational mapper (ORM) that claims to help developers build faster and make fewer errors. Prisma takes a different approach to ORMs compared to traditional ORMs. It uses a custom Schema Definition Language (SDL) that automatically writes migrations and generates type-safe code.Why Prisma?ORMs facilitate implementing the domain model. The domain model is an object model that incorporates the behavior and data of your business logic. In other words, it allows you to focus on real business concepts rather than the database structure or SQL semantics.ORMs help reduce the amount of code. They save you from writing repetitive SQL statements for common CRUD (Create Read Update Delete) operations and escaping user input to prevent vulnerabilities such as SQL injections.ORMs require you to write little to no SQL (depending on your complexity you may still need to write the odd raw query). This is beneficial for developers who are not familiar with SQL but still want to work with a database.Many ORMs abstract database-specific details. In theory, this means that an ORM can make changing from one database to another easier. It should be noted that in practice applications rarely change the database they use.In this course, we are going to build the REST API in Prisma, Node, Express, and Postgres