0

Hi I have warm up myself with ember.js and I am a ASP.NET Web developer. by reading more and more about ember.js I found that I can build a page with MVC pattern in javascript.

Seems foolish question but anyway is it logical to this :

1)Create a aspx page which contains some methods like this :

//Shop.aspx
[WebMethod]
public static object GetCustomers(){
 var db = new entities();
 return from c in db.Custmers select c;
}
[WebMethod]
public static object AddCustomer(string fullname,string phone){
 var db = new entities();
 Customer c = new Customer(fullname,phone);
 db.Customers.Add(c);
 db.SubmitChanges();
}

2) Now I will create a app.js and by ember.js I will do something like this:

 //for example : 
 //define new controller to get Customers from server aspx page;
 //define new controller to save a customer to server;

3) post my html page with ember libs near the aspx page on server

4) share my website.

So with ember js I had show my total database tables in Ember.Model , so anyone can understand my database scheme. and Hackers can see my web methods. can they call my web methods ? if the can they had hacked me.

At last but not least , does this way of programming safe ?

thanks in advance.

1 Answer 1

1

All the ember code is accessible even though in production environment its uglified and very painful to read and its hard to work with it. You have to make sure that the important data is loaded from the server with proper authentication. Even though having accessible app logic and code may seem weird, its actually mostly just sensitive data what really matters.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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.