I had to do some hardcore PHP development recently. �ֱٿ� �Ϻ� �ϵ� �ھ� php �����ؾ߸��մϴ�. I got a new perspective on PHP during this time. ������ �ð� ���� ���ο� ������ ��� ������ �����մϴ�. This post is a summarization of my understanding. �� �Խù��� ���� ���ظ� ����մϴ�.

In this article I will be making few generalizations. �� �������� ���� �� �Ϲ�ȭ�� ��ǥ�� �����Դϴ�. Each of them can a topic by itself, if described in full. �׵��� ��ü������ ������ �׸��� �� �־��� ��� ��ü�� ����Ǿ��ֽ��ϴ�.
If you want to know more about any topic, let me know. � ������ ���� �� �˰� �ʹٸ�, �˷��ּ���.

PHP is geared towards making the life of a developer easy. php�� �غ�Ǿ��ֽ��ϴ��� ����� ����� �����ڰ� �����մϴ�. It has several functions which makes writing code a pleasure. �װ��� ���� ���� ������ϴ� �ڵ带 �ۼ� ��ſ� �����մϴ�. If I want to read a file, I can do it in a single statement. ���� ������ �о�� �;�, �� �ϳ��� ���� �ȿ� �� ���ֽ��ϴ�. If I want to read it as an array of string I just call file(). ���� �迭�� �о�� �;� ���ڿ��� �׳� ��ȭ�� ������ ()�մϴ�.

Java on the other hand is more focussed (API wise) towards minimizing resource consumption. �ݸ鿡 �ڹٰ� �� ���� (API�� ����)������ �ڿ� �Һ� �ּ�ȭ�մϴ�. Resource could be memory, processing power or hard disk. �ڿ� ���� �޸�, ���μ��� �Ŀ� �Ǵ� �ϵ� ��ũ�մϴ�.

For example most of Java I/O API is based on stream processing paradigm. ���� ��� ��κ��� �ڹ� ���� / �Ǵ� API�� ��������� �з������� ��Ʈ���� ó���մϴ�. While stream processing ensures optimum usage of resources, it makes simple mundane jobs harder. ������ �ڿ� ����� ���� ��Ʈ���� ó���ϴ� ����, �׷� �͵��� ����� ������ �ϻ����� �۾��մϴ�. Try reading a file as an array of string. ���ڿ��� �迭�� �д� ������ �õ��մϴ�. After catching IOException and reading in BUF_SIZE at a time or using readLine on BufferedReader, you are tired. ioexception �� �б⸦ ��� buf_size �� �Ǵ� ��� ��ü�� �� �� bufferedreader, ����� �ǰ��մϴ�.
By contrast in PHP I just call file(). ����� php �׳� ��ȭ�� ������ ()�մϴ�. Why doesn't core Java have these functions? �ٽ� �ڹٴ� �̷��� ��� �ʴ� ������ �����Դϱ�? They are very simple to provide. �׵��� ���� ���ܸ� �����մϴ�.
I think it is because Java think-tank wants to encourage programming with resource constraints in mind. - ��ũ�� �� ������ ���� ���ϰ��ִ� �ڹ� ���α׷��ְ� ���ҽ� ���� ������ ���� ����� ����մϴ�. remember Java had an Oak background, a language targeted for limited resource devices. ��� �ڹٴ� ����� ���, �� ������� ���ѵ� �ڿ� ��ġ���մϴ�.

The sad part is that most Java developers get bogged down by such trivialities and cannot see the forest for trees. ���� �κ��� �ӵ��� ���������ϴ� ��κ��� �ڹ� �����ڸ����� �̷��� ������ ���� ���� �� ������ϴ�. I know, I know you are an exception. �˾�, �� ����� ���ܸ� �� �˰��ֽ��ϴ�.

Pages: 1 ������ : 1 2 �� 3 �� 4 �� 5 ��