Reputation: 5463
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!
Upvotes: 0
Views: 2167
Reputation: 4218
http://en.wikipedia.org/wiki/List_of_object-relational_mapping_software#PHP
Upvotes: 0
Reputation: 159905
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.
Upvotes: 0
Reputation: 1706
The Doctrine ORM is hugely popular, and is integrated my favorite PHP framework Symfony.
Upvotes: 0
Reputation:
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.
Upvotes: 0
Reputation: 72971
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.
Upvotes: 0
Reputation: 4288
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
Upvotes: 1