PHP Server-Side or Client-Side ?

There are client-side methods and server-side methods to accomplish many tasks. When sending e-mail, for example, the client-side way is to open up the mail client software a preaddressed blank e-mail massage after the user clicks a MAILTO link. The server-side method is to make the user fill out a form, and the content are formatted as an email that  is sent via a simple Mail Transfer protocol (SMTP) server (which very well could be send machine that the server-side script is executing on). You can also choose between client method and server methods of browser-sniffing, from validation, drop-down lists, and arithmetic calculation, Sometimes you see subtle but meaningful differences in functionality (server-side drop-downs can be assembled dynamically, client-side cannot) but not always.
How to choose? know your audience. Server-side methods are generally a bit slower at runtime because of the extra transits they must make, but they don't assume anything about your visitor's browser capabilities and take less developer time to maintain.  

No comments:

Post a Comment

Python in AI: Getting Started with TensorFlow & PyTorch

  Artificial Intelligence (AI) is no longer just a buzzword. It powers recommendation systems, chatbots, self-driving cars, and more. At the...