views:

78

answers:

7

I'm a .net developer by trade but I'm looking to expand to PHP. I really like what I've seen PHP can do. However I have been somewhat spoiled with data access in .net (such as LINQ) and how easy it is to make strongly type datasets. Are there such ways to do the same (or similar ) thinks for data access in PHP? A framework I'm unaware of perhaps?

I'm currently planning using a PHP Framework such as CodeIgnitor, jQuery for JavaScript, and possibly a CSS Framework for my next project. I'm very excited to learn something new but when I think of data access in PHP I hit a wall.

Thanks for your input!

A: 

I am also a .NET Developer spoiled with LINQ, I've been using CodeIgniter for a small project and I've been very pleased.

You can take a look at Active Record on Code Igniter

http://codeigniter.com/user_guide/database/active_record.html

GerManson
Thank you! This is exactly what I was looking for. Thanks for this input.
drpcken
can you mark my answer as accepted?
GerManson
A: 

Most frameworks you come across are going to have some kind of data pattern - DAO, Active Record, etc. So that should suit your needs if you plan on adopting one from the start.

I am not entirely familiar with .NET and LINQ. But PHP does have some native DB libraries as well as PEAR libraries (PDO) that serve as good wrappers.

Jason McCreary
A: 

Pattern and Practice yourself with MVC for PHP ... this will give you the closest adaptation to ASP.NET C# DataSet - Also, be wary of the classes/object handling in PHP as they are definately not the same.

Joe Garrett
A: 

The Doctrine ORM is hugely popular, and is integrated my favorite PHP framework Symfony.

camomileCase
A: 

PHP doesn't have the same kind of type safety that you've come to enjoy with .NET -- and there is not, as far as I know of, anything that works quite like LINQ available for PHP (a little searching pointed me to PHPLINQ, but it doesn't do everything LINQ does). There are however, several good ORMs available for PHP that will give you object-oriented access to your database tables.

Sean Vieira
A: 

Axon ORM is bundled with the PHP Fat-Free Framework.

stillstanding