Java and PHP
Tags: ,
Written by: kamasheto

I’m not going to argue which is best - they aren’t comparable, I still believe. In fact, I think I meant “desktop and web development”. It’s just that there’s this “conflict” between both that’s been bugging me for quite some time I need to tell it out loud.

I’ve been developing web applications for quite a long time. A very long time actually. For those of you who don’t have a “thing” they’re constantly doing I’ll have to tell you that when you do, it becomes a habit more than just a thing you do. It’s just like being addicted to coffee. It starts as means to making you stay up longer and then, even when it no longer makes a difference, you keep on drinking coffee just because you got used to it - a habit.

Now the thing with development is that it’s more than just a thing you constantly do. It’s a concept you adapt to. A routine to solve your problems, a method to trace errors and fix them etc. Web development is quite a strange concept if you ask me - especially when it’s focused around PHP. Every time you access a web page it takes you through a series of functions that are only accessible through that specific condition - the URL, the user you are, the browser you use (in some cases), etc. You’ll need to test more things because not only do you have regular users anymore, but you have administrators that have privileged access and more controls/options, and you have guests - you sometimes even have the specific troublemaking group, namely “banned” - each with their own set of functions, things they can do, all varying according to “where” you are, hence, what you want to do/access.

I’m making it sound like a nightmare when it’s not. Don’t get me wrong, web development is the easiest out of all if you know what you’re doing and how to get things done (and you know all the most commonly used functions). It’s very straightforward and you can see (hopefully, more) output on very short time intervals. To be fair about it, it’ll only become a nightmare when you’ve been developing web applications, only, for this long and all of a sudden you start learning a desktop development programming language - in this case, Java.

Java on its own is very straight forward - well, to the average developer. The classes/objects make total sense since once again it’s mainly plain English and how you get things done isn’t that hard even when compared to a lightweight programming language (sometimes called a scripting language) like PHP. Again, you’ll only feel the problem when being on either ends of the development globe and jumping all of a sudden into the other end. After having to “program” your brain to think in a certain way you can’t help but mix techniques used during your past experience(s).

So what kind of problems did I face? LOTS! Knowing that desktop applications are, by definition, dynamic inside out, it’s extremely difficult to not think AJAX the entire time. We didn’t yet encounter serious problems that require us to be “that” dynamic, but I was trying to get a voluntarily application done last night and well, let us just say it didn’t work out quite well. The only time I managed to get a few things done with the application was when, surprisingly, I decided to forget all about how “programming” is done. Methods and classes, even inheritance. Everything sounds familiar to me but seems I was dealing with classes and objects in a very wrong manner - the uses are extremely different, more sophisticated, and complicated.

Programming using Java doesn’t match how I used to program using PHP. I know I’ll have to meet JSP sometime but until then Java and PHP are totally different worlds for me. You don’t think of users anymore, it’s only one person now, and the variation comes from what he wants to get done. The application is just “one” application. Everything has to compile, has to exist, because you never know what he’ll be doing - mostly everything has to be done. You’ll know what I mean if you’ve been doing both.

Anyway, I know both techniques combined always produce exceptional applications as well as developers but until then, I’ll have to face the “how, how, HOW!” and “errors, errors, ERRORS!” phases for quite some time.

  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati

About this entry