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

Paul Jones:
Atlas: a persistence-model data mapper
Dec 30, 2015 @ 09: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 @ 15: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 @ 15: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: