473,549 Members | 2,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP vs. Java

bb
I'm not a Perl programmer nor a Linux adherent. What are the advantages of
LAMP vs.the Java model for building data-driven websites? I do a fair amount
of
development using Tomcat/JSP/Servlets with Struts for clients. I see more
and more ads for
LAMP/PHP developers. What are the advantages and tradeoffs? All opinions
welcomed....


Jul 16 '05 #1
20 11631
RG

"bb" <bi***********@ verizon.net> wrote in message
news:9d******** ******@nwrdny03 .gnilink.net...
I'm not a Perl programmer nor a Linux adherent. What are the advantages of
LAMP vs.the Java model for building data-driven websites? I do a fair amount of
development using Tomcat/JSP/Servlets with Struts for clients. I see more
and more ads for
LAMP/PHP developers. What are the advantages and tradeoffs? All opinions
welcomed....


PHP is easier to learn, it actually reads like english.
Nearly all Linux servers are offering PHP and MySQL which means cheaper
prices for shared space.
This is of course my biased opinion because I have never even looked into
servlets.
RG
Jul 16 '05 #2
> Struts and similar systems are purported to separate the tasks of
programming and designing web pages. I really don't think such
separation can ever be complete. I think you come up with better UI if
you don't try to create such separation. The UI should be a natural
extension of what the user does with the data.


And that's why using a MVC(2) system is best. Because you can keep the
same back-end, and use it with different front-ends. The coding can be
complete. We have a completely separated system and it's completely
written in PHP making use of our own Struts-Like application, Smarty, and
many of the PEAR modules. Read up on Struts and MVC(2) systems, you'll
see the light. Putting your logic and control inside of a page that
contains HTML is horrible to pick up and understand. At the very least
the separation makes things easier.

~ Metnetsky
Jul 16 '05 #3
On Tue, 08 Jul 2003 12:46:44 -0700, RG wrote:

"bb" <bi***********@ verizon.net> wrote in message
news:9d******** ******@nwrdny03 .gnilink.net...
I'm not a Perl programmer nor a Linux adherent. What are the advantages of
LAMP vs.the Java model for building data-driven websites? I do a fair

amount
of
development using Tomcat/JSP/Servlets with Struts for clients. I see more
and more ads for
LAMP/PHP developers. What are the advantages and tradeoffs? All opinions
welcomed....


PHP is easier to learn, it actually reads like english.
Nearly all Linux servers are offering PHP and MySQL which means cheaper
prices for shared space.
This is of course my biased opinion because I have never even looked into
servlets.
RG


PHP is generally easier. But with PHP5 it's going to become the
Java-Scripting-Language as it's a near replicate minus variable types. I
love PHP and I love Java. Each have their points. Generally PHP can
handle everything from small to mid-size without a problem. It can even
handle some huge sites (at work we're developing a massive community based
system in pure PHP - but we're knocking on the walls pretty hard). For
high-end systems I would suggest Java. It REQUIRES that you truly think
throw your entire systems model and forces you to have everything in place
before you begin and realize you're screwed. Most PHP applications are
hacks, for better or worse (depends on who you ask). And if you ask most
the PHP's creators they'll tell you that PHP should just control template
logic and all control/model patterns should be written as PHP modules in
C. My point is simply this, everyone has an opinion and they're all right
and wrong.

Personally I like the design patterns that most Java applications make use
of. That just happens to be my cup of coffee. But if you like coding
directly in the pages, use PHP, it's far easier than pure JSP.
Jul 16 '05 #4
"Metnetsky" <mi******@syr.e du> writes:
The UI should be a natural
extension of what the user does with the data.


And that's why using a MVC(2) system is best.


With a feature-complete databse like PostgreSQL, all business logic can
be at the database level. The database is the back end. Put as many
light-weight front ends on as you wish. The only logic that needs to be
embedded in web pages is UI logic.

--
"Notwithstandin g fervent argument that patent protection is essential
for the growth of the software industry, commentators have noted
that `this industry is growing by leaps and bounds without it.'"
-- US Supreme Court Justice John Paul Stevens, March 3, 1981.
I rarely read mail sent to br*****@yahoo.c om
Jul 16 '05 #5
"bb" <bi***********@ verizon.net> wrote
in message news:<9d******* *******@nwrdny0 3.gnilink.net>. ..

I'm not a Perl programmer nor a Linux adherent. What are
the advantages of LAMP vs.the Java model for building
data-driven websites? I do a fair amount of development
using Tomcat/JSP/Servlets with Struts for clients. I see
more and more ads for LAMP/PHP developers. What are the
advantages and tradeoffs?


One person's advantage may well be another person's drawback.
For example, I like that PHP does not force the developer into
an object-oriented development paradigm. I tend to think that
Web development is quite often better done with old-fashioned
procedural programming. So I like having an option to steer
clear from OOP when I think OOP is inappropriate for the task
at hand. For you, with your Java background, this may sound
like the ultimate heresy.

Cheers,
NC
Jul 16 '05 #6
On Tue, 08 Jul 2003 12:39:00 -0400, Bruce Lewis wrote:
"Metnetsky" <mi******@syr.e du> writes:
> The UI should be a natural
> extension of what the user does with the data.


And that's why using a MVC(2) system is best.


With a feature-complete databse like PostgreSQL, all business logic can
be at the database level. The database is the back end. Put as many
light-weight front ends on as you wish. The only logic that needs to be
embedded in web pages is UI logic.


Not to start a flame-fest, but no database is smart enough to handle half
of the business logic that any medium size website has. Does your code
only do simple CRUD statements? And the best part about an MVC system is
that you can CHANGE your view (HTML/XML/SOAP/etc) without having to change
your control or business logic.
Jul 16 '05 #7
On Tue, 08 Jul 2003 22:28:04 +0000, James wrote:
On Tue, 08 Jul 2003 11:40:42 -0400, "Metnetsky" <mi******@syr.e du>
scrawled:
On Tue, 08 Jul 2003 12:46:44 -0700, RG wrote:

"bb" <bi***********@ verizon.net> wrote in message
news:9d******** ******@nwrdny03 .gnilink.net...
I'm not a Perl programmer nor a Linux adherent. What are the
advantages of LAMP vs.the Java model for building data-driven
websites? I do a fair
amount
of
development using Tomcat/JSP/Servlets with Struts for clients. I see
more and more ads for
LAMP/PHP developers. What are the advantages and tradeoffs? All
opinions welcomed....

PHP is easier to learn, it actually reads like english. Nearly all
Linux servers are offering PHP and MySQL which means cheaper prices
for shared space.
This is of course my biased opinion because I have never even looked
into servlets.
RG


PHP is generally easier. But with PHP5 it's going to become the
Java-Scripting-Language as it's a near replicate minus variable types.
I love PHP and I love Java. Each have their points. Generally PHP can


But what about the memory limitations of Java 1.4.1 which requires a
minimum of 256Mb to simply run! As usual Sun has shot Java in the foot,
in the fact that it takes up too much space to allow multiple processes
to run....
handle everything from small to mid-size without a problem. It can even
handle some huge sites (at work we're developing a massive community
based system in pure PHP - but we're knocking on the walls pretty hard).
For high-end systems I would suggest Java. It REQUIRES that you truly
think


For hi-end systems I wouldn't even contemplate Java - unless you can
afford an order of magnitude spend on hardware to cope with the demand
for services
throw your entire systems model and forces you to have everything in
place before you begin and realize you're screwed. Most PHP
application s are hacks, for better or worse (depends on who you ask).
And if you ask most


I agree with this - BUT you can write good PHP - just you can write bad
PHP and it works - but you can't really write bad Java and get it to
work (it is only the memory problems which are bad with Java)
the PHP's creators they'll tell you that PHP should just control
template logic and all control/model patterns should be written as PHP
modules in C. My point is simply this, everyone has an opinion and
they're all right and wrong.

Personally I like the design patterns that most Java applications make
use of. That just happens to be my cup of coffee. But if you like
coding directly in the pages, use PHP, it's far easier than pure JSP.


I can't even imaging getting most of my programmes working in Java and
coping with the peak server load that we have on the servers I use.

I use either mod_perl or PHP....


http://www.onjava.com/pub/a/onjava/2.../04/nukes.html
Jul 16 '05 #8
"Metnetsky" <mi******@syr.e du> wrote in message
news:<pa******* *************** ******@syr.edu> ...
NC> I like that PHP does not force the developer into an
NC> object-oriented development paradigm.
Have you seen PHP5?


No, but from what I hear and read, I am not going to like it... :)

Cheers,
NC
Jul 16 '05 #9
"Metnetsky" <mi******@syr.e du> writes:
Not to start a flame-fest, but no database is smart enough to handle half
of the business logic that any medium size website has.


I guess the easy way to avoid a flame fest would be to post an example
of business logic that cannot be handled by a database. That would shut
up all the flamers, wouldn't it?

Go ahead. I'm waiting.

--
"Notwithstandin g fervent argument that patent protection is essential
for the growth of the software industry, commentators have noted
that `this industry is growing by leaps and bounds without it.'"
-- US Supreme Court Justice John Paul Stevens, March 3, 1981.
Jul 16 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
6792
by: Ravi Tallury | last post by:
Hi We are having issues with our application, certain portions of it stop responding while the rest of the application is fine. I am attaching the Java Core dump. If someone can let me know what the issue is. Thanks Ravi
1
6906
by: ptaz | last post by:
Hi I'm trying to run a web page but I get the following error. Ca anyone please tell me a solution to this. Thanks Ptaz HTTP Status 500 - type Exception report
11
9218
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in C++. I find my self sometimes, trying Object app = Object(); Object *app = Object(); Object app = new Object();
0
5642
by: mailkhurana | last post by:
Hii , I am trying to use a type 2 driver to connect to DB2 0n AIX 5 I have a small java test to class to establish a conneciton with the db .. I am NOT using WAS or any appserver When I try to connect to the DB I get the following exception at java.lang.ClassLoader$NativeLibrary.load(Native Method) at...
1
9599
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the...
12
5896
by: Mark Fink | last post by:
I wrote a Jython class that inherits from a Java class and (thats the plan) overrides one method. Everything should stay the same. If I run this nothing happens whereas if I run the Java class it says: usage: java fit.FitServer host port socketTicket -v verbose I think this is because I do not understand the jython mechanism for...
0
3258
by: jaywak | last post by:
Just tried running some code on Linux (2.4.21-32.0.1.EL and Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)) and Windows XPSP2 (with Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)) and in both cases, get the following list returned from calling getDeclaredFields() on java.lang.ClassLoader via this code...
1
4290
by: jaimemartin | last post by:
hello, I want to validate an xml by means of a schema (xsd). To do that first of all I´m using a SchemaFactory. The problem is that if I run the code in Windows all works fine, but If I run it in Linux there is an error. The code that fails is the following: SchemaFactory factory = ...
0
3242
oll3i
by: oll3i | last post by:
package library.common; import java.sql.ResultSet; public interface LibraryInterface { public ResultSet getBookByAuthor(String author); public ResultSet getBookByName(String name);
0
7518
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7444
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7954
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6039
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3497
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1932
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1054
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
755
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.