rss

Software Engineering In PHP

Category : Information, PHP

I was wondering if the PHP developers can work exactly like a JAVA developer in the sense the PHP developer has all the tools required for building, deploying & managing the application like a JAVA developer. Here i found a slide from Ralph & Josh who have given a very good details of all the things that you can use while developing a PHP app.

Share

PHP ORM: Doctrine 2

Category : PHP

At the start of my career as a developer, there were almost no ORM for PHP, there existed some classes that enabled you to easily access DB but not ORM.

ORM(Object Relational Mapping) in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. In other words it maps the relational database to the objects in your application. So each table becomes and object.

Doctrine is one of the powerful ORM present for PHP and with Doctrine 2 its has provided more features and ease of accessing database.

Share

Javascript: Ways to iterate over an array

Category : General

for each in:

JAVASCRIPT:

  1. for each (var item in [1, 2, 3]) alert(item);

JavaScript 1.6 added the Array.forEach method:

JAVASCRIPT:

  1. [1, 2, 3].forEach(function(item) { alert(item) });

JavaScript 1.7 added array comprehensions for array initialization:

JAVASCRIPT:

  1. var squares = [item * item for each (item in [1, 2, 3])];

I just realized I can (ab)use comprehensions to iterate arrays with Perl-like syntax by throwing away the result:

JAVASCRIPT:

  1. [alert(item) for each (item in [1, 2, 3])];

I can iterate object properties the same way:

JAVASCRIPT:

  1. var obj = { foo: 1, bar: 2, baz: 3 };
  2. [alert(name + "=" + obj[name]) for (name in obj)];

Edward Lee points out how to use Iterators:

JAVASCRIPT:

  1. [alert(key + "=" + val) for ([key, val] in Iterator({a:1,b:2,c:3}))]
Share

Nice to visit Websites

Category : Design, General

General Resources

PHP Resources

 

Reblog this post [with Zemanta]
Share

Amit Yadav is Stephen Fry proof thanks to caching by WP Super Cache