newbie
newbie

Reputation: 14950

javascript vs Java EE / PHP / other web development apps

I am wondering in what situations would it be better to use javascript instead of Java EE/PHP/others? Because before I only know javascript, then when I learned Java EE/PHP, I never use javascript anymore because I do everything in Java EE or PHP.

I hope you can enlighten me.

Upvotes: 0

Views: 1448

Answers (2)

Oded
Oded

Reputation: 498904

Javascript tends to be on the client (browser), even though some is starting to appear on the server side (node.js, for instance).

The others (PHP, Java EE, ASP.NET, JSP and more) are server side, mostly used for heavy processing, accessing databases etc... They generate HTML (and sometimes javascript) that is sent to the browser.

Upvotes: 2

tvkanters
tvkanters

Reputation: 3523

JavaScript and stuff like PHP is something completely different. JavaScript is clientside whereas PHP is sererside. Clientside code is executed by the site's viewer while serverside code is executed on the server and sends the results to the client. Serverside is also suited for accessing databases and other stored data.

You should use serverside code to generate your webpage to show the user, and clientside code such as JavaScript to give the users a more interactive experience.

Upvotes: 0

Related Questions