Click here to Skip to main content
15,891,687 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: PHP4.3 Mod, coloring table rows [solved] Pin
jkirkerx1-Dec-20 9:34
professionaljkirkerx1-Dec-20 9:34 
AnswerRe: PHP4.3 Mod, coloring table rows Pin
Richard Deeming1-Dec-20 21:55
mveRichard Deeming1-Dec-20 21:55 
GeneralRe: PHP4.3 Mod, coloring table rows Pin
jkirkerx2-Dec-20 8:30
professionaljkirkerx2-Dec-20 8:30 
QuestionHow to insert roles in php and mysql? Pin
Nicolas Veloso16-Nov-20 6:04
Nicolas Veloso16-Nov-20 6:04 
SuggestionRe: How to insert roles in php and mysql? Pin
Richard Deeming16-Nov-20 21:51
mveRichard Deeming16-Nov-20 21:51 
QuestionBlazor SPA Pin
Super Lloyd16-Nov-20 1:26
Super Lloyd16-Nov-20 1:26 
QuestionDesign questions about asp.net core website and asp.net core webapi Pin
instantmaker13-Nov-20 9:04
instantmaker13-Nov-20 9:04 
AnswerRe: Design questions about asp.net core website and asp.net core webapi Pin
Afzaal Ahmad Zeeshan14-Nov-20 1:50
professionalAfzaal Ahmad Zeeshan14-Nov-20 1:50 
Quote:
My question is that from design perspective, should I just call into the webapi to get data for my website? or just call into the database to get data directly?
This is a preference-based and a scenario-based question. In my own application that I have, I am redirecting all the database related stuff through API, and this has decreased the attack surface a lot (I can secure the database requests at one place).

Also, if you route all the database traffic to ASP.NET Core Web API, you can develop the frontend independently—in future you can replace ASP.NET Core MVC with something like a React or Angular framework for frontend, and you can easily integrate the application in a mobile application; native, Xamarin or Flutter.
Quote:
It looks like calling the webapi would promote separation of concerns
Correct, like I said earlier.
Quote:
I don't have to expose my database connection strings in multiple places
Yes, and no. You still can prevent exposing the database connection string by using variables on your hosting environment and then reuse that value in all your processes. This part depends entirely on where you are hosting your application.
Quote:
but I am afraid there is a performance hit that will impact the performance of the load time of the website.
No, do not worry about this part.

If you create two applications, you are going to launch them separately and that can add 3-5 seconds of load time, but it would be much easier to scale the applications in the future. This will help you in handling the load like a pro.

Also, load time depends on how many users are you expecting to get? If there will be a lot of users (like thousands of active users) then try caching your website and the queries, so you do not send duplicate queries to the database for at least an hour.

Here are a few more ideas to improve the performance:
  1. Deploy your application as a stateless instance (try to move all the memory and state, e.g. session information to a database)
  2. Add a caching layer to your service
  3. Try to add scaling to your website (depends on the host environment)
    • If you scale a stateless website, you can utilize caching and database to handle more requests and provide service to more users
  4. Keep separating the different domains inside your application to their own services (Microservice pattern)
I hope this helps you understand the bigger picture. Smile | :)
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~

GeneralRe: Design questions about asp.net core website and asp.net core webapi Pin
instantmaker14-Nov-20 2:49
instantmaker14-Nov-20 2:49 
GeneralRe: Design questions about asp.net core website and asp.net core webapi Pin
Afzaal Ahmad Zeeshan14-Nov-20 3:17
professionalAfzaal Ahmad Zeeshan14-Nov-20 3:17 
GeneralRe: Design questions about asp.net core website and asp.net core webapi Pin
instantmaker16-Nov-20 13:03
instantmaker16-Nov-20 13:03 
AnswerRe: Design questions about asp.net core website and asp.net core webapi Pin
Leif Simon Goodwin22-Dec-20 7:17
Leif Simon Goodwin22-Dec-20 7:17 
GeneralRe: Design questions about asp.net core website and asp.net core webapi Pin
instantmaker22-Dec-20 7:34
instantmaker22-Dec-20 7:34 
GeneralRe: Design questions about asp.net core website and asp.net core webapi Pin
Leif Simon Goodwin22-Dec-20 9:07
Leif Simon Goodwin22-Dec-20 9:07 
GeneralRe: Design questions about asp.net core website and asp.net core webapi Pin
instantmaker22-Dec-20 10:39
instantmaker22-Dec-20 10:39 
QuestionDesign question with asp.net core and asp.net core api Pin
instantmaker13-Nov-20 6:18
instantmaker13-Nov-20 6:18 
QuestionI keep getting a “Call to undefined function..” error displaying Pin
IAmSirAskAlot9-Nov-20 18:25
IAmSirAskAlot9-Nov-20 18:25 
QuestionWeb API Deserialization Problem Pin
Kevin Marois9-Nov-20 8:04
professionalKevin Marois9-Nov-20 8:04 
AnswerRe: Web API Deserialization Problem Pin
Richard Deeming9-Nov-20 22:20
mveRichard Deeming9-Nov-20 22:20 
GeneralRe: Web API Deserialization Problem Pin
Kevin Marois10-Nov-20 7:18
professionalKevin Marois10-Nov-20 7:18 
GeneralRe: Web API Deserialization Problem Pin
Richard Deeming10-Nov-20 21:41
mveRichard Deeming10-Nov-20 21:41 
GeneralRe: Web API Deserialization Problem Pin
Kevin Marois11-Nov-20 7:16
professionalKevin Marois11-Nov-20 7:16 
GeneralRe: Web API Deserialization Problem Pin
Kevin Marois11-Nov-20 7:54
professionalKevin Marois11-Nov-20 7:54 
GeneralRe: Web API Deserialization Problem Pin
Richard Deeming11-Nov-20 22:42
mveRichard Deeming11-Nov-20 22:42 
GeneralRe: Web API Deserialization Problem Pin
Kevin Marois12-Nov-20 6:49
professionalKevin Marois12-Nov-20 6:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.