0

I'm developing a application based on two technologies: ASP.net (SharePoint) and JavaScript.

I use server-side code for retrieve data from database and manipulate it whereas I use client-side code for build front-end(I'm using JSON format).

I have very problem with this "architecture" because ASP.net is strong-type whereas JavaScript is less-type. My data "jumps" from front-end to back-and and vice versa.

How can I have my model class in client-side code too?

gnat
20.5k29 gold badges117 silver badges308 bronze badges
asked May 8, 2014 at 8:25
1

1 Answer 1

0

As of today there are many (much many if that's the case) javascript frameworks that allow you to model on the client. Among all the features they offer you can validate/calculate the data is correct before sending it to the server.

However when the data gets into the server, it is your responsability to make sure everything is ok. You should never trust 100% on client side validations, because some skilled user might change that logic for you.

I would suggest to dive into KnockoutJs framework and play with it until you got the point. Later move to AngularJs which is more powerful but more complex also.

answered May 8, 2014 at 15:02

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.