FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PHP vs J2EE





rinujohn
Hi friends i'm a newbie to php......And I would like to ask you which one is more powerfull j2ee or php..is it possible for developing enterprise applications using phpas j2ee does.....i seen the most php sites take few time to display....is it that due to bandwind problem or is it slow to run php
Agent ME
I've never noticed a difference between the loading times of PHP and a similar non-scripted file on the same server (except with scripts that do a heck of a lot of calculations or hi-res image manipulations) - if you're noticing a difference, it's probably just your connection to the server.

PHP is a very powerful language, and even has object oriented parts and ability to include other files, and can support many popular databases - should be able to do whatever you need.
manav
i have noticed some thing which is the other way round to ur observation....

j2ee sites take a lot more time than php

and the reasons are in the way these architectures r built....

php is the godmother of all web programming languages but for enterprise solutions i always recommend java because it has been built for the same....
qscomputing
rinujohn wrote:
it possible for developing enterprise applications using phpas j2ee does

I'm not entirely sure what exactly an "enterprise application" is... a program is a program, surely?

rinujohn wrote:
.....i seen the most php sites take few time to display....is it that due to bandwind problem or is it slow to run php

Well obviously running code is a lot slower than just lifting an HTML file off disk and sending it to the user, but a well-written PHP program shouldn't be noticeably slow, no. J2EE on the other hand, can be quite slow. And good luck finding a cheap/free server to run it on.
Stubru Freak
Depends on what you are trying to do.

For most normal sites I'd suggest PHP/Perl/Python. It can do everything most people and companies will need. For really complicated things, I'd say J2EE would be a good choice, as it allows you to easily integrate your web application with other software.
A practical case where I'd suggest J2EE would be making a website where the employees of a company can get password-protected access to some functions of the company intranet, if the intranet doesn't use HTTP+HTML/XML, but its own communication protocols. If it uses HTTP+HTML, you could just as well do the whole thing in PHP. For most companies J2EE wouldn't be necessary.

But of course that's only my personal opinion. The best reason to use a programming language is of course that your programmers are good at it.
kv
qscomputing wrote:
rinujohn wrote:
it possible for developing enterprise applications using phpas j2ee does

I'm not entirely sure what exactly an "enterprise application" is... a program is a program, surely?


Not really. When you develop a j2ee application, it runs inside a j2ee container. It gives a lot of container services like bean/ejb/transaction management/message queues/connection pooling/{container/bean/user managed}beans/etc. You will have to write only a small piece of code to do a complex thing. Lot of the other usual stuff will be handled by the container.

For ex: if you want to build a library system which stores/retrieves/modifies book info in a database table, in j2ee, you have to create an ejb which represents a row of data. Updating the row is as simple as calling a set method on the ejb. Storing/retrieving and all the associated sql stuff is taken care by container.

It is not appropriate to compare j2ee and php. php can be compared with jsp, which is a web programming scripting language based on java.
lukand
kv: Not really. When you develop a j2ee application, it runs inside a j2ee container. It gives a lot of container services like bean/ejb/transaction management/message queues/connection pooling/{container/bean/user managed}beans/etc. You will have to write only a small piece of code to do a complex thing. Lot of the other usual stuff will be handled by the container.

For ex: if you want to build a library system which stores/retrieves/modifies book info in a database table, in j2ee, you have to create an ejb which represents a row of data. Updating the row is as simple as calling a set method on the ejb. Storing/retrieving and all the associated sql stuff is taken care by container.

It is not appropriate to compare j2ee and php. php can be compared with jsp, which is a web programming scripting language based on java.

PHP is good because is comparative with other best programs languages and with C od Cpp, and PHP is total free
Med365
Stubru Freak wrote:
Depends on what you are trying to do.

For most normal sites I'd suggest PHP/Perl/Python. It can do everything most people and companies will need. For really complicated things, I'd say J2EE would be a good choice, as it allows you to easily integrate your web application with other software.


Please remember that Google, the NASA and others uses a lot Python and less or not J2EE.

Python is a very powerfull language, fast, reliable and it is estimated that to developpe the same app in Python and Java, Python developpement is 10 times faster because Python is easy to learn and have a very clear syntax, you read Python code easier than Java code, Another advantage is that Python is open source and can easily interface with C, Java (Jython), Perl, Tcl, PHP (...) scripts/programs.

But Java is a very powerfull language too but it is harder to use. Wink
kv
lukand wrote:

PHP is good because is comparative with other best programs languages and with C od Cpp, and PHP is total free


So what? You don't compare apples with oranges just because apples are good and you got it free somewhere. I understand comparing java & php. They both are programming languages. But j2ee and php? apples and oranges. php is a programming language and j2ee is a container for enterprise applications based on java and is not a programming language by itself.

It will be more appropriate to compare j2ee and .NET (not c# but .NET).
phpc0d3r
I'm not a huge expert on J2EE. All I know is it's used in enterprise applications. But to all those to say that an enterprise site with thousands of users can't be ran on php, go Digg.com. Not a company site but it does handle thousands of users online everyday, without any load balance issues etc.

As far as the J2EE vs. PHP,
If he is a hobby programmer or is new to programming all together, I would suggest PHP by far.
If he needs a platform for java code and has already learned java, J2EE is the way to go.


A Note To Other Programmers: Choose the right language for the job, Not one language for every job.
akshar
J2EE is used for enterpirse applications such as Banking Systems where robustness is a very scritical issue. Also J2EE can work on clusters and all given great liverage

But J2EE fails miserably when it comes to speed of development. Cost of development maintainance. Existsing communities etc etc.

PHP is wonderful and vey powerful for web development and managing content. J2EE is suited for business applications where not content but the procedure of data flow are moer critical.

When J2EE proponents were busy talking about robustness, Service oriented architecture, Processes and Business Logic development etc etc PHP developers actually went ahead to develop good and useful software.
Stubru Freak
Med365 wrote:
Stubru Freak wrote:
Depends on what you are trying to do.

For most normal sites I'd suggest PHP/Perl/Python. It can do everything most people and companies will need. For really complicated things, I'd say J2EE would be a good choice, as it allows you to easily integrate your web application with other software.


Please remember that Google, the NASA and others uses a lot Python and less or not J2EE.

Python is a very powerfull language, fast, reliable and it is estimated that to developpe the same app in Python and Java, Python developpement is 10 times faster because Python is easy to learn and have a very clear syntax, you read Python code easier than Java code, Another advantage is that Python is open source and can easily interface with C, Java (Jython), Perl, Tcl, PHP (...) scripts/programs.

But Java is a very powerfull language too but it is harder to use. Wink


Of course. There is more than one solution to most problems.
takashiro
That it the first time I heard j2ee script. I think PHP must be more popular and well-known. PHP is fast and easy to learn. It can't be better. Very Happy
AOP Web Development
I heard already on j2EE but i never tried to used it but so far for me PHP is one of the best programming script for WEB aside that it's powerful there a lot of resources that you can get on PHP.
manav
dont find a thing that i want to do and which is not possible in php

common tell me a hosting provider which provides cheaper j2ee hosting than php hosting????
Stubru Freak
manav wrote:
dont find a thing that i want to do and which is not possible in php

common tell me a hosting provider which provides cheaper j2ee hosting than php hosting????


J2EE isn't meant for cheap hosting, it's for businesses. Especially code development is said to be cheaper because of all the libraries, which is useful when you need a lot of specific software for your company.
kv
manav wrote:
dont find a thing that i want to do and which is not possible in php


Will you be able to do database operations (like create row/retrieve/update etc) on a table without writing sql? With j2ee, you can. Just define a container managed bean, and creating an instance of the class creates a row in the database table (one of the container services).

I don't know if there is any message queue and callback mechanism in PHP

Basically, PHP is a programming language. So is Java. J2EE is a framework on top of java which provides lot of services which a programming language does not provide. It is inappropriate to compare a framework with a programming language.
wjybupt
kv wrote:
manav wrote:
dont find a thing that i want to do and which is not possible in php


Will you be able to do database operations (like create row/retrieve/update etc) on a table without writing sql? With j2ee, you can. Just define a container managed bean, and creating an instance of the class creates a row in the database table (one of the container services).

I don't know if there is any message queue and callback mechanism in PHP

Basically, PHP is a programming language. So is Java. J2EE is a framework on top of java which provides lot of services which a programming language does not provide. It is inappropriate to compare a framework with a programming language.



I think when someone try to compare PHP and J2EE.
They want to compare the solution using PHP with the solution using J2EE...
Related topics
Using databases
PHP vs RUBY
PHP VS ASP
Okul Sitesi - script arýyorum..?
CooMedy Msn ßot !
Javascript vs asp/php
¿Vale la pena cambiarse a Linux?
J2ee vs PHP
J2EE , PHP , Python and Web development. Does it have scope?
Oberon - hungarian speaking topic about a MMORPG engine
About to Give up on OpenOffice
PHP vs ASP
server access, PHP vs AJAX
WWW building
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.