As the Cigano has already listed very well the points of your question and responded to the height, I will only suggest some links and make some suggestions of technologies to be used.
Since you are using ASP.NET MVC
, make sure that all your Action
s are marked with async Task<>
return.
So where do you find it:.
public class MyController : Controller
{
public ActionResult MyAction(int id)
{
var model = db.Colecao.Find(id);
return View(model);
}
}
change to.:
public class MyController : Controller
{
public async Task<ActionResult> MyAction(int id)
{
var model = await db.Colecao.FindAsync(id);
return View(model);
}
}
The same goes for WebAPI, so find yourself.:
public class MyController : ApiController
{
public Entidade MyAction(int id)
{
var model = db.Colecao.Find(id);
return model;
}
}
change to.:
public class MyController : ApiController
{
public async Task<Entidade> MyAction(int id)
{
var model = await db.Colecao.FindAsync(id);
return model;
}
}
With this, you make your Asynchronous Actions, with this simple change your system can support thousands of requests per minute, as you can see in the following Artigo/Benchmarking - Node.js vs. IIS + WebAPI async – Performance Test
Now regarding Banco de Dados
, you can and should use Entity Framework
to speed up its development, just remember to use asynchronous methods whenever they are available: such as FindAsync
, ToListAsync
, ToDictionaryAsync
, FirstOrDefaultAsync
, AnyAsync
, MeuMetodoAsync
.
But remember, Entity Framework
is just a tool, nothing prevents you from using another in conjunction with it, such as Dapper
, I recommend that you use Dapper
whenever you have a more critical query for the system, either because it is very requested or if you need to write your own SQL
, in any case, do not forget to use Async
methods, like QueryAsync
. Here is a link to justify this tip: Dapper vs Entity Framework vs ADO.NET Performance Benchmarking
As for your front-end
, as I do not know your team's knowledge of JavaScript, I would advise you to set aside jQuery
and use VueJS
, even if you decide to% / p>
Template
public class Entidade
{
public Int32 EntidadeID { get; set; }
public String Descricao { get; set; }
}
Controller
public class MyController : Controller
{
public async Task<ActionResult> MyAction(int id)
{
var model = await db.Colecao.FindAsync(id);
return View(model);
}
}
Controller
@model Entidade
<div id="conteudo">
<input type="hidden" id="EntidadeID" name="EntidadeID" v-model="EntidadeID">
<label>
Descrição:
<input type="text" id="Descricao" name="Descricao" v-model="Descricao">
</label>
</div>
@section scripts {
<script type="text/javascript">
var model = @(Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model)));
new Vue({
el: '#conteudo',
data: model
});
</script>
}
At first glance it looks like a bad trade-off (% w / w% w / w% w / w), but remember, you're transferring responsibility for rendering the page to Multiple Page Application
, and it will be much simpler to refresh the page after requests Razor
(due to Vue
created by Cliente
).
To learn more, visit the links: AJAX
, bind bi-direcional
and VueJS
.
Remembering that VueJS
can be incremental, you do not need to rewrite your entire application before you can start using it.
Of course, you can make a Vue JS Brasil
application, using Vue.js is easier to learn than jQuery
and VueJS
of your preference, such as SPA
, Async WebAPI
or Framework JavaScript
itself, follow a link of tutorial Angular