123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|724|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> PHP Alternatives

Sat, 30 Jun 2012, 19:21
JL235
I'm moving back to Java.

There are a lot of reasons why. First I know Java inside out, even down to the order in which things happen class loading occurs, and internal details you can use to do tricks.

I also miss the static completion you get in NetBeans. It's not just about types, it's about the fact that I can alter a method signature, or a method name, and all places that touch it will now be pointed out in real-time as errors. So much stuff is verified at compile time. It means the only errors you are left with are algorithmic errors, with no type errors.

Another factor is performance. Not just at runtime, but mostly at setup time. With PHP loading a large framework is real expense, even with file caching. With Java it's setup once and kept in memory, until the page is rarely used, when Tomcat will unload it. This means it's ok for me to spend a lot of time setting up a website, or load a tonne of code, and that only effects the first request.

Another factor is how much work PHP requires to really be good. You have loads of debugging, unless you turn errors up in development. Errors are difficult to debug, unless you add in error logging to make it similar (such as getting stack traces for errors, which isn't the default). PHP is great if you want a low barrier to entry, but that's not what I want to do, I want to build large websites. For that I need something designed for building large websites, and that's Java.

Finally I'm just sick of the syntax, and sick of the hackish behaviour of PHP. In many ways Java is *more* flexible than PHP, because it has package private (allowing you to make code local for a framework), has final (making try blocks similar), whilst PHP has very few advantages for shorter code.

There was something I wrote recently on Reddit, about how if you wrote a problem in JavaScript, Haskell, Ruby, Java or many other languages; you'd see the ideology of the language beating back at you in the result. With PHP you don't, because there is no real direction, and it's really starting to show.
Mon, 02 Jul 2012, 13:59
dna
Thanks for sharing your opinion on the language.
I've been undecided between the two, never going into either of them much at all not knowing or reading about the differences in them.

Your explanation of the syntax and usage differences does make a difference in the learning curve when programming.

Thanks. You made me want to go back into using Java again.



-=-=-
DNA
Mon, 02 Jul 2012, 14:56
Stealth
Java is the most distressing thing to happen to computing since MS-DOS. -- Alan Kay

-=-=-
Quit posting and try Google.