Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
A First Look at Atlas – the ORM That Delivers
Oct 17, 2016 @ 20:16:33

The SitePoint PHP blog has posted a new tutorial focusing on the Atlas ORM, a recent addition to the wide range of database ORMs in the PHP ecosystem, focusing on being a mapping of your persistence model.

By definition, a Data Mapper moves data between objects and a database and isolates them from one another. With a Data Mapper, the in memory objects don’t even need to know that a database exists. It does not need to know the SQL interface or database schema; it doesn’t even need the domain layer to know it exists!

This might lead us to thinking that, in Atlas, the persistence layer is totally disconnected from the database, but that is not quite what happens. [...] An Atlas Record is passive; not an active record. Unlike most ORMs, its objects represent the persistence model, not the domain model. Think of it as representing how the data is stored and not as real world representations.

The tutorial goes on to talk about some of the background behind the package being developed and some of its core principles. They then walk you through the installation of the package, doing a bit of related database setup and the code to perform some basic CRUD (create, read, update, delete) operations on the tables. This is followed by a few more practical examples and a few caveats for the library's use.

tagged: atlas orm database tutorial example crud operation

Link: https://www.sitepoint.com/a-first-look-at-atlas-the-orm-that-delivers/

Paul Jones:
Atlas: a persistence-model data mapper
Dec 30, 2015 @ 15:48:50

Paul Jones has a new post to his site about a library he's worked up to provide "persistence-model data mapper" functionality for you to use in your PHP applications in accessing your database.

Atlas is a data mapper implementation for your persistence model (not your domain model).

As such, Atlas uses the term "record" to indicate that its objects are not domain entities. Note that an Atlas record is a passive record, not an active record; it is disconnected from the database. Use Atlas records indirectly to populate your domain entities, or directly for simple data source interactions.

The library is mostly an experiment on his part to create a tool that allows switching from the Active Record pattern to Data Mapper pattern for accessing your database without much hassle. The README on the library shows some of the basic usage of the tool, including the usual CRUD (create, read, write, execute) functionality.

tagged: atlas persistence model datamapper activerecord designpattern database library

Link: http://paul-m-jones.com/archives/6210

Shanku Niyogi's Blog:
Using Atlas with PHP
Apr 05, 2006 @ 20:37:52

Since its announcement, Microsoft's Atlas framework has slowly been filtering into the web development community. Using their framework is possible on more than just Microsoft's servers of their ASP.NET language. As this post from Shanku Niyogi illustrates, it can work with PHP as well.

The Atlas framework has two distinct elements - a client script framework, and a set of server extensions that integrate Atlas with ASP.NET. The client script framework is 100% Javascript, and works with any modern browser. But it is also completely server-agnostic, and works with any web server.

Well, not quite. If you're just doing a client-side app, Atlas client script is all you need. But if you want to connect to the server, you'll want to write server-side code to talk to the Atlas client. At the MIX conference a couple of weeks ago, I showed how you can use Atlas with PHP. To do this, I wrote some PHP code providing the server end of the Atlas web services stack, including a base class for implementing REST web services, a class for generating Javascript proxies from these services, and a serializer built on the excellent open-source PHP-JSON serializer.

The PHP example is available for download and they've included a complete walk-through. The simple illustration they show involves working with a web service to grab a series of words from the server.

tagged: atlas microsoft web service json serialize atlas microsoft web service json serialize

Link:

Shanku Niyogi's Blog:
Using Atlas with PHP
Apr 05, 2006 @ 20:37:52

Since its announcement, Microsoft's Atlas framework has slowly been filtering into the web development community. Using their framework is possible on more than just Microsoft's servers of their ASP.NET language. As this post from Shanku Niyogi illustrates, it can work with PHP as well.

The Atlas framework has two distinct elements - a client script framework, and a set of server extensions that integrate Atlas with ASP.NET. The client script framework is 100% Javascript, and works with any modern browser. But it is also completely server-agnostic, and works with any web server.

Well, not quite. If you're just doing a client-side app, Atlas client script is all you need. But if you want to connect to the server, you'll want to write server-side code to talk to the Atlas client. At the MIX conference a couple of weeks ago, I showed how you can use Atlas with PHP. To do this, I wrote some PHP code providing the server end of the Atlas web services stack, including a base class for implementing REST web services, a class for generating Javascript proxies from these services, and a serializer built on the excellent open-source PHP-JSON serializer.

The PHP example is available for download and they've included a complete walk-through. The simple illustration they show involves working with a web service to grab a series of words from the server.

tagged: atlas microsoft web service json serialize atlas microsoft web service json serialize

Link:


Trending Topics: