Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

I worked with Java for four years, slowly moving to PHP as version 4 came about. Why? Rising demand.

As with any programming language, the best way to get started (in my opinion) is just to build something. A blog, a guestbook: something functional and useful. In the process you'll become familiar with the language fundamentals. I recommend that you at first build something using no framework (to get an idea of what sort of security measures you need to take, handling DB transactions, etc) and then followup with the framework of your choice.

I used vim/Eclipse for Java, and still use the same for PHP. There is an Eclipse build specifically for PHP, called "Eclipse PDT." There are several others out there (Komodo, Zend Studio) but PDT is free and therefore easier to try out.

I use CakePHP as a framework and find it to meet most of my needs. I have also tried symphony and the Zend framework, but neither of them were flexible enough for me. I have not tried CodeIgniter, but I have heard good things about it. There are some articles on IBM DeveloperWorks that are a good introduction to CakePHP.



I've been told that JavaServer Pages is greater than any framework out there that PHP has mustered up, I'm wondering if you've ever given this a whirl and how it compares? I don't have a enough experience in Java, which is why I wonder.


I've used both, and while I'm no fan of PHP I think it's absurd to even compare the two. Quite simply, JSP is an exercise in masochism. These days JSPs are only used for the view layer and most of the work is done in a servlet or a controller in whatever framework you're using so they really serve as little more than a templating tool.

Even when used that way they are a royal PITA because of the bean conventions and the fact that many of the classes in the Java API (Collections cough) don't adhere to them. Unless you use a scriptlet you can't directly call a method on an object. You reference properties like myObject.prop1 and in the background it would call the method getProp1(). This convention only works with get, set and is* methods. If you want to get the size of a list (List.size()) you're SOL since lists don't adhere to the bean naming conventions. You either have to write a wrapper class or use a scriptlet. It's some kind of cruel joke.

PHP isn't pretty, but it's got a huge library of functions, it's easy to get it running and it doesn't enforce a bunch of questionable rules in order to protect you from yourself.


I didn't think that JavaServer Pages would be considered a 'framework' in the MVC sense.


Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: