See It in Action

These demos use Nymph, and all querying is done entirely on the client side with subscriptions. Try opening the same one in two windows, and see one window react to changes in the other.

ToDo App See the Demo See the Source
Sudoku Game See the Demo See the Source
Simple Clicker See the Demo See the Source

Why Nymph

Why would you want to use Nymph when it's so different than what you've been doing for years?

The pain of binding your models to your HTML was relieved with frontend libraries like Angular. But developers so often still have to go through the pain of creating many endpoints to communicate your actual models to the frontend. Then there's the additional code required to query your database, translate the results, and relay that to the frontend. Where Angular left off, Nymph comes in. Nymph provides the models to build complex MVC applications simply. Querying logic can be entirely (or partially) handled on the frontend, with never a single line of SQL. This means less context switching between frontend and backend, and far less time to develop complex, functional apps. Unlike most other ORMs, Nymph is designed to let you put your business logic wherever you see fit.

Nymph also frees you from lots of database maintenance. There's no need to run a migration script every time you add a property to one of your objects. Nymph is flexible and automatic with object data. Never switching out of an Object Oriented context makes coding a lot easier and a lot more fun. Less time spent crafting databases means more time spent building useful applications.

I like to think of Nymph's query language as a BTSQL (Better Than SQL) language, but you can decide for yourself:

Nymph Query from Frontend

No need for a specific endpoint here. Nymph uses the same endpoint for all client side queries.

Equivalent SQL Query from Frontend

Without Nymph, every time you want a new type of query available on the frontend, you're going to need to either modify this endpoint or create a new one.

Feature Packed in a Small Size

At less than 250KB, Nymph provides a ton of features, giving you powerful queries and fast data access.

Out of the box features are best in class, at a fraction of the size of other ORMs

  • PubSub makes real time, collaborative apps easy.
  • On demand loading keeps database queries to a minimum.
  • Easy, object oriented query syntax.
  • Equivalent PHP and JavaScript API for backend and frontend.
  • RequireJS and RequirePHP for dependency injection and service location.
  • Horizontally scalable, for enormous databases.

Easy to Integrate

Nymph is very easy to integrate into Angular apps. The Angular demo Todo app has been recreated and improved to demonstrate how easy it is. It's located in the "examples" directory of the repository.

Angular and Nymph, a Love Story

Nymph's easy querying on the client end makes it perfect for building complex Angular apps. And because you don't ever have to write any SQL, almost all of your logic code can be on the client side. That means fewer round trips, fewer page loads, more responsive interfaces, and happier customers.

Creating a new type of entity is simple in Nymph. You can code your logic on the PHP or JS side, and access it all the same. With the power of Nymph, you can code full Angular apps in half the time it takes with a regular framework. And if you're already invested in a framework, Nymph's REST endpoint library makes it a breeze to integrate anywhere in your app.

Angular isn't the only library perfectly matched with Nymph. Nymph will integrate cleanly into most front end libraries, and all PHP backend frameworks. Nymph is designed to be flexible, and fit any sort of problem at hand. If you need any help integrating Nymph, you can contact the developers, whose info is located in the readme.