P
DifferencesThere is a difference between languages, each has its point of reach and thus can do specific things.For example in JavaScript because it is a Client-Side language you could not make a connection with the database securely because your JavaScript is public, and everyone could observe your database server credentials. This is the responsibility of the Server-Side language.On the server-side, the client has no access to the code, all that is there is sigilous, all its business logic, its accesses, credentials, and etc. Imagine if Google develops all the algorithmic and business logic in JavaScript, everyone would know the big secret, right?Server-Side basically is:PHP, ASP.NET, etc.Business logic.Access to the database.Request and rendering.Languages Server-side act at the beginning of the Request until the rendering of the page HTML, already the Client-Side languages act after rendering, basically:Mouse interactions, keyboard.Animations, drag in drop, sliders.Requirements ajax.Validations of dynamic forms (you can validate the fields without having to make a new request).Note: It is worth remembering that JavaScript language is not exclusive and is not limited only to
Client-Side, although the vast majority of its use is in this regard. Today the same
is also used as Server-Side language, see the example of
http://nodejs.org , and even for some applications.Follow a great http://tableless.com.br/camadas-de-desenvolvimento-client-side/ from Diego Here http://tableless.com.br/ commenting on the Client-Side layers for web.A complete language of the other and vice versa that neither beans with rice. http://pt.wikipedia.org/wiki/Linguagem_server-side Server language, or Server-side scripting, is the language that
will run " behind the cloths", providing the main logic of
application. Works as follows: whenever the user does one
HTTP request (enter a page, click a link, etc), the request is
sent to the server. The server-side language receives the requirement
(Request) and do processing. Then it turns the end result
in an XHTML and sends to the browser. It is the server-side language that
will check if the user is logged in, get information in
database etc.How server-side language processes
requests before sending to the browser, this means that a
Once the page has been sent to the user browser, there is nothing else
that the server-side language can do until a new "Request" wants
sent. That is, it is not possible to use these languages to manipulate
the user page in real time. For the user, the language
server-side doesn't matter, and it doesn't even have a way to find out which language
is being used. (Wikipedia) http://pt.wikipedia.org/wiki/Linguagem_client-side The client language, or client-side scripting, is the language that is executed on the client side, i.e. on the user's own computer, and is therefore used in situations where the server-side language has no reach. Among the client-side languages, there is JavaScript, which is the only language that actually runs in the user's browser. Through JavaScript it is possible to manipulate the user page directly, doing dynamic things ranging from changing the value of a form field to creating a resized area that can be dragged through the page.As all JavaScript code is in the browser itself, the user
can see the code and can also by using some
programs, manipulate the code. This makes languages
client-side are insecure to do things like accessing a bank
data. Together, the server-side and client-side languages
complement. (Wikipedia)