• 0

Java or php?


Question

I'm planning to learn either java or php. Which language do you think will give better employment opportunity? 

Link to comment
Share on other sites

Recommended Posts

  • 0

Neither.

 

If absolutely one or the other; Java.

 

PHP is just one big templating engine that got steroid-ed up to fit use cases and to keep relevant. It's an inconsistent mess. The internet is filled with poor, unsecured PHP scripts. If your intent is to learn to develop it will teach you decently bad habits. Stay away from PHP regardless of all the "facebook" examples people give you. It's crap. Absolute crap. You've been warned.

 

Java is fast, very fast; but too verbose. It has a generally negative opinion from many uninformed people due to the web plugin being ridiculously and humorously insecure. It can be considered a bit "boilerplatey". It's a decent language with slightly old paradigms and supported by a terrible company. It's not a bad learning language and teaches you the fundamentals of OOP decently well. You can transfer knowledge gained from Java to other sane languages with little effort; like C# for example (the better Java).

 

 

What do I use, you ask?

I use Python (for home) and C# (for work).

 

Python is excellent for hobby projects where you are a lone wolf or a small team. It forces excellent programming structure (which some people hate). It's decently fast but nowhere like Java. Python+CherryPy+Jinja2 is an excellent starting point to get something running relatively quickly. Remember that Python can be somewhat of a catalyst to developing sloppy code (regardless of the forced structure). Also, it can become quite inconsistent if you don't follow PEP guides. The most important thing is to have a style and flippin' stickin' to it. I actually find development quite fun when I'm use Python and it's my go to for many, many things outside of web development and work.

 

C# is excellent for large team-based projects. I use it for work. It's fast, powerful, and has amazing features. It's as close to a perfectly designed language that I can think of. It can be a lot more difficult to understand C# web development if you're new to programming. If you're experienced and have the money than I'd highly suggest C# for pretty much everything.

 

 

Other potential languages of which I have no experience but hear great things:

Ruby (on rails) and NodeJS.

 

 

DIsclaimer: This is the opinion of someone who has been doing this professionally for only 5 years and as a hobby for about 12 years. I have extensive experience with PHP, Python and C# and have created many, many things with them. Although I surely maintain a bias I feel this information is accurate and from a reliable source; me.

  • Like 2
Link to comment
Share on other sites

  • 0
7 hours ago, Above The Gods said:

Startups aren't failing because of the underlying technologies they use. The fail rate would be the same had they used Java regardless. Also, I don't know why you said "nobody... cares what 'startups' are doing"; how would you know that? Perhaps you don't care. It is the startup culture which specifically utilizes the newest technologies, newer approaches, and are constantly seeking improvement. Netflix, Uber, PayPal, LinkedIn, etc, all switched to Node.Js. Why don't they use Java and Oracle DB? If the OP wants to work for the government or a subway system, then he should use technologies from the previous millennium. If not, then it simply wouldn't make sense when better tech stacks are available.

Using the word "better" pretty much shows the subjectivity which is only human. Using some nebulous idea that something called startups has any meaning is just weird at best and at worst some misguided attempt to convince human beings that choosing a technology for a business is done by following trendy hipster fashion world from Paris type thinking ("startup culture" lol) instead of careful scientific analysis. (Seriously? Startup Culture? That collection of "me too" clowns on HN hoping to get 30 seconds with a VC?)

 

Your language is emotionally charged to urge people away from Java since they will be forever personally branded with government work or heaven forbid, forced to work on subway systems down in some hole with the TMNT.

 

Twitter is hugely successful scaling out thousands of servers with Docker swarms all running Oracle's "Java for Subway Systems" JVM compiled from Scala. But they can't know what they are doing since they don't use whatever your favorite tech might be.

 

There are NO better tech than Java. There might be more appropriate tech for particular organizations depending on their requirements and the best way to decide that is to perform a careful analysis by qualified people that don't have a bias (or at least can be aware of their bias and put it on a shelf for the duration of the study)

 

I personally don't like Java very much and I like Javascript even less. I start every possible technology choice with C# and see if it can do the job required and that is remarkably almost always a big "Yes" with the giant reach, cross-platform and huge maturity and depth of the technology. However, I would be the first to say you can't run Hadoop on .NET so there are lots of cases where specific technologies and requirements make the choice for you. There are rich ecosystems that might sway a language choice to C# or Java or Python or C++. The weird choice is Javascript for which the argument is usually a miss-guided idea that there is a vast pool of developers that "know" Javascript so your manpower costs will be reduced. The vast pool vanishes if a realistic assessment of complicated server-side development is considered.

 

You can't treat these things like your favorite football team that you root for. Express is probably the first npm that gets installed on a node server and the inventor of Express has abandoned node because he felt it just wasn't appropriate for what he wanted to achieve. I personally don't agree with his reasons but I understand the Agony of Async which probably needs a leap ahead in programming technology such as applying Machine Learning to code generation to further abstract the machine so we can all be more productive.

 

Until then, Samsung, the new owner of Node.js will need to evaluate its options and see what they could do to provide alternative programming models. Node.js is a C++ server which actually could host other languages besides Javascript. Samsung could also study the C# TPL Dataflow for insight on other approaches to the situation.

 

Whatever technology is chosen, when the metal and silicon gets fired up and gets real world load, it all becomes complex. There is no "better" solutions, just stuff people have dreamed up that all fail in unique ways. There is no magic solution on making these choices and drawing in the mythology of the Fashion World to sway choice by say a technology is "too old" helps nobody navigate these waters. Java is NOT too old. It is the #3 web technology after PHP and C# and it runs on a billion Android devices. It doesn't matter what Oracle thinks and it doesn't matter what you think, Java will be around for a long time as the main tech of many companies, as the heart of Android and maybe even the next great startup if that matters to anyone... Just because you won't be using it and I won't be using it, won't change the reality of it.

 

Link to comment
Share on other sites

  • 0
11 hours ago, DevTech said:

Using the word "better" pretty much shows the subjectivity which is only human. Using some nebulous idea that something called startups has any meaning is just weird at best and at worst some misguided attempt to convince human beings that choosing a technology for a business is done by following trendy hipster fashion world from Paris type thinking ("startup culture" lol) instead of careful scientific analysis. (Seriously? Startup Culture? That collection of "me too" clowns on HN hoping to get 30 seconds with a VC?)

 

Your language is emotionally charged to urge people away from Java since they will be forever personally branded with government work or heaven forbid, forced to work on subway systems down in some hole with the TMNT.

 

Twitter is hugely successful scaling out thousands of servers with Docker swarms all running Oracle's "Java for Subway Systems" JVM compiled from Scala. But they can't know what they are doing since they don't use whatever your favorite tech might be.

 

There are NO better tech than Java. There might be more appropriate tech for particular organizations depending on their requirements and the best way to decide that is to perform a careful analysis by qualified people that don't have a bias (or at least can be aware of their bias and put it on a shelf for the duration of the study)

 

I personally don't like Java very much and I like Javascript even less. I start every possible technology choice with C# and see if it can do the job required and that is remarkably almost always a big "Yes" with the giant reach, cross-platform and huge maturity and depth of the technology. However, I would be the first to say you can't run Hadoop on .NET so there are lots of cases where specific technologies and requirements make the choice for you. There are rich ecosystems that might sway a language choice to C# or Java or Python or C++. The weird choice is Javascript for which the argument is usually a miss-guided idea that there is a vast pool of developers that "know" Javascript so your manpower costs will be reduced. The vast pool vanishes if a realistic assessment of complicated server-side development is considered.

 

You can't treat these things like your favorite football team that you root for. Express is probably the first npm that gets installed on a node server and the inventor of Express has abandoned node because he felt it just wasn't appropriate for what he wanted to achieve. I personally don't agree with his reasons but I understand the Agony of Async which probably needs a leap ahead in programming technology such as applying Machine Learning to code generation to further abstract the machine so we can all be more productive.

 

Until then, Samsung, the new owner of Node.js will need to evaluate its options and see what they could do to provide alternative programming models. Node.js is a C++ server which actually could host other languages besides Javascript. Samsung could also study the C# TPL Dataflow for insight on other approaches to the situation.

 

Whatever technology is chosen, when the metal and silicon gets fired up and gets real world load, it all becomes complex. There is no "better" solutions, just stuff people have dreamed up that all fail in unique ways. There is no magic solution on making these choices and drawing in the mythology of the Fashion World to sway choice by say a technology is "too old" helps nobody navigate these waters. Java is NOT too old. It is the #3 web technology after PHP and C# and it runs on a billion Android devices. It doesn't matter what Oracle thinks and it doesn't matter what you think, Java will be around for a long time as the main tech of many companies, as the heart of Android and maybe even the next great startup if that matters to anyone... Just because you won't be using it and I won't be using it, won't change the reality of it.

 

My use of the word "better" as being subjective is just as legitimate as your statement that "nobody... cares what 'startups' are doing". Look inward and apply your own reasoning to yourself. Nonetheless, I agree with astrophed recommendations in the reply above yours.

Link to comment
Share on other sites

  • 0
On 22/09/2016 at 10:23 PM, astropheed said:

C# is excellent for large team-based projects. I use it for work. It's fast, powerful, and has amazing features. It's as close to a perfectly designed language that I can think of. It can be a lot more difficult to understand C# web development if you're new to programming. If you're experienced and have the money than I'd highly suggest C# for pretty much everything.

I used to think this until I learned F#, and now I could hardly imagine choosing a language without sum types, that encourages mutable entities over immutable values, has null everywhere and very limited type inference. But C# certainly remains a well-designed language compared to many, many others.

Link to comment
Share on other sites

  • 0
On 30/11/2016 at 1:55 AM, bernardLewis said:

But the projects that are build in JAVA are sold on higher prices as compared  to the projects that are developed using PHP or .NET 

Source?

Link to comment
Share on other sites

  • 0

Well coming from someone who is currently going through a degree in computer science, i will say that we had to do both, but the way we were taught is first we had to learn javascript, and corresponding popular libraries like node.js, bootstrap.js, jquery.js, etc

 

We then had to learn HTML5, with CSS 3 then use all the above in various scenarios until competent then we had to then do all of it again, but in PHP.

 

We where then taught how to do MVC frameworks in PHP, then web services in PHP, consumption and deployment.

 

after this we then had to start learning Java, and basically doing everything above in JSP and natural Java application development, web service consumption was consuming php web services and java web services and vice versa and later C#.

 

We then had to start with C# while still doing Java and doing the above in .net, converting all our java projects to C# and then doing MVC in ASP and currently doing cloud at the moment. I think the way these are laid out makes it easier to move from one to the other, like how similar C# is to java made it all the sweeter.

 

But i did find somethings easier to do in one language then the other, but as a programmer, i guess this is a hurdle we all have to go through and something one programmer may find tedious and another challenging and enjoyable.

 

I know i loved moving from Java to C# and from netbeans to visual studio.

Link to comment
Share on other sites

  • 0
1 hour ago, Dermot said:

Well coming from someone who is currently going through a degree in computer science, i will say that we had to do both, but the way we were taught is first we had to learn javascript, and corresponding popular libraries like node.js, bootstrap.js, jquery.js, etc

 

We then had to learn HTML5, with CSS 3 then use all the above in various scenarios until competent then we had to then do all of it again, but in PHP.

 

We where then taught how to do MVC frameworks in PHP, then web services in PHP, consumption and deployment.

 

after this we then had to start learning Java, and basically doing everything above in JSP and natural Java application development, web service consumption was consuming php web services and java web services and vice versa and later C#.

 

We then had to start with C# while still doing Java and doing the above in .net, converting all our java projects to C# and then doing MVC in ASP and currently doing cloud at the moment. I think the way these are laid out makes it easier to move from one to the other, like how similar C# is to java made it all the sweeter.

 

But i did find somethings easier to do in one language then the other, but as a programmer, i guess this is a hurdle we all have to go through and something one programmer may find tedious and another challenging and enjoyable.

 

I know i loved moving from Java to C# and from netbeans to visual studio.

That doesn't *sound* like a computer science degree. Where did you obtain it from?

Link to comment
Share on other sites

  • 0
12 hours ago, adrynalyne said:

That doesn't *sound* like a computer science degree. Where did you obtain it from?

I am *Currently* in my 3rd year of it, and i only listed the parts surrounding the programming aspect, not the software engineering part, the database management part, the web development part, the mathematics part, the computer architecture part, the operating systems, digital systems, data analysis, project management etc etc.

Link to comment
Share on other sites

  • 0
4 minutes ago, Dermot said:

I am *Currently* in my 3rd year of it, and i only listed the parts surrounding the programming aspect, not the software engineering part, the database management part, the web development part, the mathematics part, the computer architecture part, the operating systems, digital systems, data analysis, project management etc etc.

Much of that  also doesn't sound like a computer science degree. Where are you attending?

 

They don't teach half of that here at traditional universities. I'm not knocking you, I am just surprised. 

 

Link to comment
Share on other sites

  • 0
Just now, adrynalyne said:

Much of that  also doesn't sound like a computer science degree. Where are you attending?

 

They don't teach half of that here at traditional universities. I'm not knocking you, I am just surprised. 

 

I am attending DKIT, Dundalk Institute of Technology, our Course is brand new Actually, we're the first doing it, so you could say we're the lab monkeys if you will of the future science degrees in computing and computer science in the campus.

 

http://www.dkit.ie

 

 

Link to comment
Share on other sites

  • 0
5 minutes ago, Dermot said:

I am attending DKIT, Dundalk Institute of Technology, our Course is brand new Actually, we're the first doing it, so you could say we're the lab monkeys if you will of the future science degrees in computing and computer science in the campus.

 

http://www.dkit.ie

 

 

Nice!  It's is good to see institutes of higher learning teaching useful subjects that aren't 20 years old for once  :)

 

Link to comment
Share on other sites

  • 0
Just now, adrynalyne said:

Nice!  It's is good to see higher learning teaching useful subjects that aren't 20 years old for once  :)

 

I think they had no choice but to change, the language of choice before we started was vb, that in itself had to change.

 

I'm sure they may be doing some stuff wrong, but then the students after us will benefit from the changes and mistakes and things we do right from it.

 

I might teach the first years at some stage, well i hope to so it will be nice to pass on the good parts.

Link to comment
Share on other sites

  • 0
On 12/6/2016 at 5:59 AM, bernardLewis said:

My friend is a .net developer and his client  hired java developers to create the same project that is build in .NET. But he is paying the java developers double amount. Java based projects are always expensive then PHP and .NET. That is why developers mostly switch to java programming to increase their salaries.

any java programmer or c# programmer should be able to jump between the 2 as they're almost identical.

Link to comment
Share on other sites

  • 0
56 minutes ago, Dermot said:

any java programmer or c# programmer should be able to jump between the 2 as they're almost identical.

Only at a basic level. They aren't hard to switch between either way, but are by no means  almost identical once you really dive in to either. 

 

Source: I work with both. 

Link to comment
Share on other sites

  • 0
1 hour ago, adrynalyne said:

Only at a basic level. They aren't hard to switch between either way, but are by no means  almost identical once you really dive in to either. 

 

Source: I work with both. 

yeah, hence the almost lol But i guess it depends on which version you look at these days, core could change a lot of things, our lecturer wants us to start using core as soon as after xmas.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.