Is it wise to run Backbone on both servers (Node.js and Rails) and the client for comprehensive verification?

It is verbose, I apologize if it does not comply with local custom.

I am writing a web replacement for a Windows application used to move firefighters between fire stations to fill in skill requirements, introduce sick leave, take cases out of service, etc. Rails was desirable content, but I quickly realized that I needed the client-side infrastructure and chose Backbone.js.

Only one user will be on it at a time, so I do not need to consider client synchronization.

Ive implemented most of the application and works well. However, I avoided a significant drawback, though: server-side checks. I have various client-side procedures to ensure that invalid updates can be made through the interface; for example, a user cannot move someone who does not work at another station today. But nothing prevents the attacker from creating a record outside the user interface and storing it on the server, therefore, the need to check on the server side.

The client downloads all current relevant records and processes them. When a new record is created, it is sent to the server and processed on the client if it is successfully saved.

The process of determining who works today is complicated: someone can plan work, but went on vacation, but then was called, but then was sent home sick. Unraveling all of this on the server (at every boot ?!) in Ruby / Rails seems like an unsuccessful duplication of business logic. This will also have significant overhead in a particular case, including calculating who should be temporarily promoted to a higher rank based on a lack of stations and union rules, this could mean reloading and processing almost all of today's data again and again for every career advancement.

So, I thought, I have all this Backbone infrastructure that creates an object model and limits which models can be created, why not use it on the server side?

Here is my uncertainty:

Rails Node.js - Backbone ?

Node.js Rails? , Node, Rails Backbone, , .

factory , Rails . Ruby / , , . Rails JSON, CSS, Javascript . Cucumber, , , , ?

! , : , , Rails, Node - ? Rails ( , , ), Node?

.

+3
1

, concurrency , push-, . Ruby, , ? Node push javascript , , . , , , , (). , Node , . , , . , : Node , , javascript . Ruby on Rails , .

0

All Articles