Warning: Constant ABSPATH already defined, this will be an error in PHP 9 in /home/killerph/public_html/wp-config.php on line 19

Warning: Cannot modify header information - headers already sent by (output started at /home/killerph/public_html/wp-config.php:19) in /home/killerph/public_html/wp-includes/feed-rss2-comments.php on line 8
Comments on: PHP vs. Perl vs. Java – a student's question. https://www.killerphp.com/articles/php-vs-perl-vs-java-a-students-question/ Thu, 09 Dec 2021 20:55:00 +0000 hourly 1 https://wordpress.org/?v=6.4.13 By: Stefan Mischook https://www.killerphp.com/articles/php-vs-perl-vs-java-a-students-question/#comment-770 Tue, 19 Jan 2010 15:45:36 +0000 http://www.killerphp.com/articles/?p=207#comment-770 PHP strength has never been in the elegance of it’s syntax – not that bothers me personally.

]]>
By: Paolo https://www.killerphp.com/articles/php-vs-perl-vs-java-a-students-question/#comment-769 Tue, 19 Jan 2010 15:40:45 +0000 http://www.killerphp.com/articles/?p=207#comment-769 If we only could do without that $this->attribute thing in PHP. OO languages usually let you access attributes by name and you use this or self (depends on the language) only to resolve ambiguity. PHP programs would be easier to write and to read if we weren’t forced to use $this-> almost on every single line. It becomes noise instead of information.

]]>
By: A dude https://www.killerphp.com/articles/php-vs-perl-vs-java-a-students-question/#comment-768 Fri, 13 Nov 2009 17:37:33 +0000 http://www.killerphp.com/articles/?p=207#comment-768 I’ve recently started a blog, the information you provide on this site has helped me tremendously. Thank you for all of your time & work.

]]>
By: Michael Kimsal https://www.killerphp.com/articles/php-vs-perl-vs-java-a-students-question/#comment-767 Wed, 02 Sep 2009 16:33:30 +0000 http://www.killerphp.com/articles/?p=207#comment-767 Speaking as someone who has been doing PHP since 1996, and made a decent living at it, Java has strengths PHP may never have. Java as a language itself it terribly verbose, and has a slower startup speed, and many other drawbacks. But, using a framework on top of Java – specifically Grails (in my view) makes a lot of web development much much easier than with any PHP code (raw or with any framework).

I can’t explain the entirety of why I prefer Grails over any PHP framework, but here’s a few:

GORM – the ORM tool with Grails – makes it easy to express relationships and queries programmatically. Having ‘typed’ class properties allows the framework to infer much more about how to operate than the simple “public/protected/private” which PHP forces on you.

Private by default – all class properties are private by default, unless otherwise specified. getters and setters are created during compilation, but can be overridden with manually-written code. This saves a tremendous amount of boilerplate code that people used to write in Java (and now most PHP frameworks emulate, because the PHP language itself doesn’t support any other approach).

Domain-driven design – data models are created in ‘domain’ classes, which are inspected and DB models are created automatically, including relationships, timestamp columns, and automatic ids. Plugins exist for audit logging for any data changes. This allows me to simply design my data objects and run the app – the creation and management of the database (whichever one I want, and Java supports many DBs) is handled for me. Yes, I can override it’s behaviour and decisions if I want to, but I rarely want to do that. Additionally, coming preconfigured with an in-memory database allows for rapid sketching out of ideas without even needing a ‘real’ database to start with.

Scaffolding – some PHP frameworks offer this as well, so it’s not a total win just for Grails, but it is something which allows people to be pretty productive very rapidly.

Yes, this is a PHP website, and yes, I still use PHP on a regular basis. I would still encourage people to look outside of the PHP world to learn from other camps, and take time to study those ideas and implementations. You will look at PHP differently, and likely be a better developer for it in the long run.

]]>
By: amedj https://www.killerphp.com/articles/php-vs-perl-vs-java-a-students-question/#comment-766 Fri, 28 Aug 2009 16:22:54 +0000 http://www.killerphp.com/articles/?p=207#comment-766 You should also look into the library support for each programming language. IF you intend to use MYSQL as your database layer, PHP would be the ideal choice since it offers many functions to do just that.
I would also say that PHP is written primearely for the web application, where as java is for both web and desktop application. Thus, if your application requires integration of both web and desktop application, Java would be a suitable choice..

]]>
By: Alexandr Ciornii https://www.killerphp.com/articles/php-vs-perl-vs-java-a-students-question/#comment-765 Tue, 18 Aug 2009 07:46:47 +0000 http://www.killerphp.com/articles/?p=207#comment-765 In Perl you need to use such tools as Perl::Critic, perltidy, Moose.

]]>