LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-27-2006, 03:20 PM   #1
climbingmerlin
Member
 
Registered: Mar 2004
Location: UK
Distribution: Fedora, OpenSuse
Posts: 91

Rep: Reputation: 15
PHP or JAVA??? Not flamebait honest!


I know that this could be classed as flamebait, but I am looking at developing an application, which is quite complicated and I can't make my mind up on the technology that I will use.

I have developed applications in LAMP over the past year or so, and used Java about 2 years ago when at university, so I have some experiance with both.

The application is basically an online ordering system for the ordering of electrionic data. The data can be ordered or a user can select existing data that can be either downloaded by http or ftp.

The application works like the following:

1. The users registers through the application, and their request is reviewed and an account created on their behalf, with access rights given to the data that they have already, bought the 'rights' to view.

2. The data is in two formats 'preprocessed' or requires processing. If 'Preprocessed' the users can select sections of the data or the entire dataset The application needs to, on the fly create the data file from the selection and add it to a list of files that are then generated into a compressed file either zip or tar.gz. This file is then avaiable to download. If it requires processing the user selects it to be added on an order list and can either be added to an FTP site or stored on another media (DVD/CD/Tape etc.)

3. A history of all selections need to be avaiable for billing and so that if needed the client can re-download their selection, which are regenerated when needed, in zip or tar.gz files.

So in summary it is very much like an ecommerce site however it is expected to do some processing itself on demand.

Hardware is not a problem as I am already looking at a 2-tier system, one database/data processing and the other good old web application server.

Now the loads will vary thoughout the year with peak periods, and loads during this time are expected to be very high. However the system will most likely tick over when not in the 'busy season'.

So from what I have said, which technology would you use? LAMP or Java (JSF/JSP/J2EE)?

I can see the benefits and drawbacks for both and I can't decide! Please help!

Thanks...
 
Old 12-27-2006, 03:32 PM   #2
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
Java and PHP aren't comparable. This sounds like the standard e-store stuff, which is generally done in PHP.
 
Old 12-27-2006, 07:41 PM   #3
MicahCarrick
Member
 
Registered: Jul 2004
Distribution: Fedora
Posts: 241

Rep: Reputation: 31
Yeah, I would got with PHP 5 (to take advantage of the new features and OOP) with PostreSQL or MySQL 5 over a JSP solutionl.

I've been hearing great things about Ruby on rails. Worth looking in to.
 
Old 01-01-2007, 11:21 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by tuxdev
Java and PHP aren't comparable.
Hmm, if they aren't, why are they so often compared ?

As the OP is experienced with both Java and PHP and given the fact each one can certainly be used successfully for this project, the right choice is to use the language/platform he is the most comfortable with.
 
Old 01-03-2007, 06:06 AM   #5
climbingmerlin
Member
 
Registered: Mar 2004
Location: UK
Distribution: Fedora, OpenSuse
Posts: 91

Original Poster
Rep: Reputation: 15
The problem I have is that both have their benefits and drawbacks, both are more than capable to do solve the problem that I have, and both are scaleable, which is another important requirment.

The problem is that even though I look at both, and compare the two, I still can't make my mind up.

The thing is that if there was more than me developing the application then I think that it would be better to come to a conclusion. My boss is happy for me to use either.
 
Old 01-03-2007, 11:38 AM   #6
MicahCarrick
Member
 
Registered: Jul 2004
Distribution: Fedora
Posts: 241

Rep: Reputation: 31
PHP will provide you with a cheaper alternative. Not only in the obvious. If you need to bring on other developers in the future, PHP developers are "a dime a dozen" so to speak. This has the down-side of finding a good one much more difficult--but when you do, they typically don't get paid what Java developers do (at least in my understanding).

I must admit that I am biased though-- I've only done very minimal work in JSP. I started with ASP, then JSP, and now PHP. I haven't found a situation for what I do that PHP hasn't been more then adaquete. For me, the major benefits are GPL and community support.

If you can't decide, and you are the only one developing this project (thus other people coding now and in the future isn't likely), just go with whichever you are more comfortable working in. Heck, pick the one you think looks "prettier" if it's that close of a contenst. Because at that point it's really just preference.

There's my 2 cents.
 
Old 01-03-2007, 02:53 PM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Java technology is open source and (recently) GPLd too.

Community support for Java is huge, I typically find answers to my questions in seconds by googling.

Java has a wider scope. It will eventually, as a platform, include PHP as one of its scripting languages. I would definitely go for Java, with a touch of PHP where and if needed.

Of course, I must admit I'm biased too
 
Old 01-05-2007, 03:54 AM   #8
climbingmerlin
Member
 
Registered: Mar 2004
Location: UK
Distribution: Fedora, OpenSuse
Posts: 91

Original Poster
Rep: Reputation: 15
I think that I am going to have to create a simple prototype in both and find out which is better. I think that is the only way that I am going to really find out which technology route to take.

Ahh the fun of it. Knowing my luck I bet you even after the prototypes I'll still won't be able to make my mind up...
 
Old 01-06-2007, 04:43 AM   #9
juanctes
Member
 
Registered: Dec 2004
Location: Argentina, corrientes (far from buenos aires, to the north)
Distribution: Ubuntu :(
Posts: 74

Rep: Reputation: 15
U can't make your mind up becouse you know more than one alternative. knowing much can be a problem hehe. I would think in terms of cost-benefit.
 
Old 01-06-2007, 06:02 AM   #10
centralb
LQ Newbie
 
Registered: Jan 2007
Distribution: Redhat, Debian, "Custom"
Posts: 27

Rep: Reputation: 15
Cool

<>
From experience with both Java and PHP, here's a firm, decisive recommendation:

It depends.

However, PHP5 will likely be your best bet. In fact, to maximize re-use you can use PHP on the front and back-ends to get up and running sooner. You'll always have the option of "Java-fying" (yep) later if performance or other requirements become evident.

Design-wise, it will clearly make sense to decouple the code-generation from the request/response aspects of this system via some sort of asynchronous/queueing system. Either technology, combined with your database of choice, can handle this.

That said, Java will give more control over load balancing, thread control, and nearing that ...ideal... of a transactional approach. The relative overhead of (designing), developing, and maintaining any java components might be suggested especially if you see the project scaling and potentially requiring coordination or parallelism between multiple backend systems, although (sorry) even this can be done in PHP as well.

As for performance, much can be done to bring the PHP code in line with the Java side, in many contexts even outperforming the Java side. We're seeing some light artillery directed this way and have probably stepped on a few toes already here...it's time to end this post.

(It is/was possible to import/use java classes in PHP. Not recommended in a production environment, but hey, since we're going out on limbs here...).
</>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Be honest with yourself warpeace2006 General 14 05-21-2006 12:02 PM
LXer: What would Linux users do without flamebait? LXer Syndicated Linux News 0 02-12-2006 12:46 PM
Need An Honest Answer Comatose51 Linux - General 3 05-28-2005 02:50 AM
Flamebait: if you want mail use Exim rcs1000 Linux - Software 1 04-24-2004 09:36 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration