That service is responsible for validating and escaping data. Push all your logic out to the client and it is fair game for hackers and exploits.
Service-Oriented Architecture has a well-deserved reputation amongst Ruby and Rails developers as a solid approach to easing painful growth by extracting concerns from large applications.
For example, installing the base class in the Gem for more details).
When someone asks you to describe the data in your organization, a given system, or a particular database, how often do you answer in terms of storage size, growth rate, the number of tables, or the number of rows?
This kind of system manages and protects data so that the database is safe and secure.
If you’ve never seen Protocol Buffers before, you can check out some more information here, but don’t worry - I’ll give you a brief introduction to using them in Ruby before listing the reasons why you should consider choosing Protocol Buffers over JSON for your next service. The docs say: above), and fields are numbered, which aids in backward compatibility, which I’ll cover in more detail below.Do you have data coming in from systems with mismatched system clocks?That's not a problem either; Wonderware Historian preserves the correct data sequence automatically.I don't think SQL injections have anything to do with moving most of your logic to the client-side.Even if you move data processing to the client-side, you still need some sort of server-side service which would actually run SQL queries (unless you want to make your database username and password public).