Need advice about which tool to choose?Ask the StackShare community!

Bookshelf.js

6
21
+ 1
3
Doctrine 2

275
206
+ 1
31
Add tool

Doctrine 2 vs Bookshelf.js: What are the differences?

Developers describe Doctrine 2 as "An object-relational mapper (ORM) for PHP 5.3.2+ that provides transparent persistence for PHP objects". Doctrine 2 sits on top of a powerful database abstraction layer (DBAL). One of its key features is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), inspired by Hibernates HQL. On the other hand, Bookshelf.js is detailed as "Aims to provide a simple library for common tasks when querying databases in JavaScript". It stems from the Knex.js, which is a flexible query builder that works with PostgreSQL, MySQL and SQLite3. Bookshelf.js builds on top of this by providing functionality for creating data models, forming relations between these models, and other common tasks needed when querying a database.

Doctrine 2 and Bookshelf.js can be primarily classified as "Object Relational Mapper (ORM)" tools.

Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Bookshelf.js
Pros of Doctrine 2
  • 3
    Uses both promises and callback methods
  • 14
    Great abstraction, easy to use, good docs
  • 10
    Object-Oriented
  • 7
    Easy setup

Sign up to add or upvote prosMake informed product decisions

What is Bookshelf.js?

It stems from the Knex.js, which is a flexible query builder that works with PostgreSQL, MySQL and SQLite3. Bookshelf.js builds on top of this by providing functionality for creating data models, forming relations between these models, and other common tasks needed when querying a database.

What is Doctrine 2?

Doctrine 2 sits on top of a powerful database abstraction layer (DBAL). One of its key features is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), inspired by Hibernates HQL.

Need advice about which tool to choose?Ask the StackShare community!

What companies use Bookshelf.js?
What companies use Doctrine 2?
See which teams inside your own company are using Bookshelf.js or Doctrine 2.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Bookshelf.js?
What tools integrate with Doctrine 2?

Sign up to get full access to all the tool integrationsMake informed product decisions

What are some alternatives to Bookshelf.js and Doctrine 2?
Objection.js
It aims to stay out of your way and make it as easy as possible to use the full power of SQL and the underlying database engine while still making the common stuff easy and enjoyable.
JavaScript
JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
Git
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
GitHub
GitHub is the best place to share code with friends, co-workers, classmates, and complete strangers. Over three million people use GitHub to build amazing things together.
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
See all alternatives