How to use AJAX in many Layers?

Asked

Viewed 54 times

0

I’m studying DDD I have an application with 4 layers being them

  • Presentation
  • Applying
  • Domain
  • Infra

In the presentation layer I look for data via Ajax No DB, but I have a question about how to do. I need to make the ajax go through all the layers ? What I have noticed is a loss of performance in the application... If not, what’s the best way to do it ?

1 answer

0


Most of the time it is not necessary, nor recommended to use this architecture with . On the contrary. Often you are just complicating a simple thing without need. This has been commented here a few times, as in the questions/answers below:

But if you still want to continue with this structure, you should do it exactly this way.

The requisition Ajax will call an Action in your controller and it will pass the data to the other layers.

Regarding the loss of performance, it is probably not only the structure, but something in its code.

  • To indicate a form but performative, there are numerous forms, but for this it is necessary to know its context or how it is doing, to verify where "has errors".

Browser other questions tagged

You are not signed in. Login or sign up in order to post.