Java web development vs Php web development

fisicx

Moderator
Sep 12, 2006
46,728
8
15,396
Aldershot
www.aerin.co.uk
Why limit yourself to just those two?

There are loads of development tools and languages.
 
Upvote 0

mattk

Free Member
Dec 5, 2005
2,579
974
50
Swindon
Are you building a Web site or a Web based application?

If you want a simple collection of pages with some database connectivity such as logging in or retrieving data, then PHP is more than suitable.

If you are considering building a multi-tier application with complex business logic, then I would be more tempted to use something like Java or .NET.
 
Upvote 0
F

frida_adams

Are you building a Web site or a Web based application?

If you want a simple collection of pages with some database connectivity such as logging in or retrieving data, then PHP is more than suitable.

If you are considering building a multi-tier application with complex business logic, then I would be more tempted to use something like Java or .NET.

Hi @mttk
Acutually I want to develop a portal website, so there will be some web application like shipping calculator, cart and etc. so Php is best or should I go through Java.
 
Upvote 0

Vennweb

Free Member
Apr 27, 2012
57
6
Northwich
Ok for the back end it (ie server side script) it will depend on the sever you are using and what they can host. Apache, Lynux will run PHP (this is an uncompiled scripting language and will not run as fast as a compiled language such as java.

If you are running on a windows server use asp is the equivalent. The compliled (and therefore faster option) is ASP.NET ususally coded in Visual Basic or C# - as these are both compiled languages you can choose either without a problem. I think the compiler was origionally designed aroung the VB language to make use of the ASP (ususally in VB script) already being used by developers at the time.

I use VB for my ASpX as I can also make windows based programs and can transfer between the two. Some of the examples are graphics manipulation server side and integrated realtime web crawlers.

Which is better? Good question.... as others have said what do you want to do and what do you already know.

As for Java injection - this would be javascript injection. This is a predominantly client side scripting language and is easily protected against (ASP 4.0 automatically does this as default). Javascript and Java are two very different things.

hope this helps
 
Upvote 0
F

frida_adams

Ok for the back end it (ie server side script) it will depend on the sever you are using and what they can host. Apache, Lynux will run PHP (this is an uncompiled scripting language and will not run as fast as a compiled language such as java.

If you are running on a windows server use asp is the equivalent. The compliled (and therefore faster option) is ASP.NET ususally coded in Visual Basic or C# - as these are both compiled languages you can choose either without a problem. I think the compiler was origionally designed aroung the VB language to make use of the ASP (ususally in VB script) already being used by developers at the time.

I use VB for my ASpX as I can also make windows based programs and can transfer between the two. Some of the examples are graphics manipulation server side and integrated realtime web crawlers.

Which is better? Good question.... as others have said what do you want to do and what do you already know.

As for Java injection - this would be javascript injection. This is a predominantly client side scripting language and is easily protected against (ASP 4.0 automatically does this as default). Javascript and Java are two very different things.

hope this helps

Thanks for the marvelous answer. I really appreciate your effort. I have finsih my designing process almost.
 
Upvote 0

shopintegrator

Free Member
Apr 22, 2009
379
76
London, UK
It does depend some what as to the extent you are looking to develop a web application in the chosen language as to the value of one language over another, if it is just a web page with a few forms and a database to store the data, then there won't be much between the two.

I personally prefer Java as I feel it is a better Enterprise class solution with a better set of development frameworks and code libraries compared to un-compiled interpreted PHP scripting. Java, through its expansion with the Groovy language also offers a short hand interpreted scripting option as well, if you prefer this type of approach.
 
Upvote 0

ecenica

Free Member
May 26, 2010
656
104
Leeds, United Kingdom
Which development programing is much better for any kind of website?

Question is a little ambiguous since as already mentioned, the languages compliment one another.

Taking the question literally. If I had to choose between PHP or JS for any kind of website then it would be PHP and then sneak some JS in when nobody is looking. (aka Progressive Enhancement)

Have a great weekend!

Rich
 
Upvote 0
M

Mortime Business Software

frida_adams:

Which development programing is much better for any kind of website?

...

Acutually I want to develop a portal website, so there will be some web application like shipping calculator, cart and etc. so Php is best or should I go through Java.

Hello Frida. Rather than asking which language is most suitable, you should be asking which *type* of language is most suitable. When choosing your programming languages for a project, you should be aware of the full spectrum of possible situations. A distributed application could require the utilisation of one or more of the language types I mention below. I realise that you mention only a 'website', but you really sound as though you should learn about the different possible situations that the different *types* of programming language were traditionally designed for.

(1) At one extreme we have many clients, invoking many programs across many websites, on just one server with just one lot of RAM. Use a server side scripting language such as PHP. This type of program (usually referred to as a 'script') is not stored in RAM. Scripts are fetched from disk as required. That is, they use a 'lazy on demand' approach. They are parsed against a language grammar, compiled into machine code, and then executed.

(2) At the other extreme we have few to many clients invoking a single program. This application has a small feature set compared to the collective feature set of the many websites mentioned above. Use a compiled language - for example, C++. An entire compiled program has been parsed and compiled, and is ready and waiting in RAM right next to the processor. This type of program uses an 'eager in advance' approach. Within a given period of time, a single process can serve many more requests than can a set of disk-based scripts provided by a typical website's disk. Furthermore, by virtue of its low level relationship with the OS, a compiled program can be greatly enhanced by utilising facilities such as threading.

(3) Somewhere in between the two extremes discussed above are the 'imtermediate language' programming languages. They are often called compiled languages, but this is conceptually wrong because code compiled from an intermediate language can be thrown out of RAM to make way for functions showing greater recent popularity. Java and C# are examples if intermediate languages. My favourite feature of Java is its dynamic compiler. Using lexers such as ANTLR, the Java compiler object enables you to parse runtime source codes against your very own language grammars - right there within your live applications! By the middle of this century, it will be commonplace for software engineers to be specifying grammars within their application specifications - on this I am quite willing to bet my life (because I'll probably be dead by then anyway! :D).

Please note that I talk about a 'spectrum of situations' because in an arbitrary client-server situation, the number of users and the number of providers are both independently variable, and it is this is that should determine your choice of language for any particular component of your application.

All the best,

Dave
 
Upvote 0

gg12

Free Member
  • Aug 28, 2012
    18
    2
    Thrapston
    If I was on your place I would definitely go with PHP.

    PHP tends to be much quicker to develop in, which will bring your product quicker to the final.

    Moreover, many open source plugins and great help is available online, unlike some of the alternatives.

    Take care.
     
    Upvote 0
    T

    techfellas

    To compare Java to PHP. Since PHP is a server-side scripting language whereas Java is a general-purpose language. In other words, PHP is only used as a server-side language where Java is both for server-side and desktop programming language. Moreover, Java is compiled and strongly-typed language. On other hand, PHP is a dynamic typed language.

    Hence, only for server-side programming, the comparison between Java and PHP makes sense.

    I think PHP is much better for Simple Web Development and JAVA is better for Finance sites where security is main reason

    Thanks
     
    Upvote 0
    T

    tgstechnosis

    No Doubt Developers will prefer PHP than Java for online Web application Development.

    There are lot of consequences for this. One thing is Linux servers are affordable and faster than other servers. got it ? :)

    Howbeit write once run anywhere (Java) is inevitable, which is one of the best language suited for developing Offline & online applications..Now a days it is important for developing Mobile Apps.
     
    Upvote 0
    T

    tgstechnosis

    To compare Java to PHP. Since PHP is a server-side scripting language whereas Java is a general-purpose language. In other words, PHP is only used as a server-side language where Java is both for server-side and desktop programming language. Moreover, Java is compiled and strongly-typed language. On other hand, PHP is a dynamic typed language.

    Hence, only for server-side programming, the comparison between Java and PHP makes sense.

    I think PHP is much better for Simple Web Development and JAVA is better for Finance sites where security is main reason

    Thanks
    Hi techfellas

    I mean Adding security measures will depends upon our programming skill, not behind which language we select. :) May be you are also correct sometimes...
     
    Upvote 0

    Optegris

    Free Member
  • Business Listing
    PHP is the best for web development, there's a huge talent pool as well. Moreover developing with ASP is much more expensive.
    How is it more expensive?
    One thing is Linux servers are affordable and faster than other servers. got it ? :)
    Not neccessarily. Taking away the license fee for Windows which is less than £15/month, there are no additional costs in using a Windows server to host/develop a ASP/.NET site. Plus the server speed has more to do with how it's managed, sloppy PHP code could easily make a Linux server run like a dog and vice versa.

    As for the OP question, neither, learn ColdFusion instead ;)
     
    Upvote 0
    N

    normantyago

    Which development programing is much better for any kind of website?

    If you are a beginner it is better to study C# or VB.Net. If you study C# or vb.net you can do web programming in Asp.Net. C# csharp.net-informations.com or VB.Net is easier to study and both are Object Oriented. You can use C# or VB.Net in your Asp.Net web development as well as in desktop development.

    norman.
     
    Upvote 0

    Latest Articles

    Join UK Business Forums for free business advice