locked
Api-centric architecture RRS feed

  • Question

  • User-803397181 posted

    hi all,

    want to create an enterprise application based on api-centric architecture. in this application we want a control panel (web base) for sys users and web client for end users.

    also we want to have mobile clients as well.

    here is my questions:

    1) i want to know how split projects? is better to separate projects at all? (my mean is one project for web api, one for control panel, one for anonymous users and one for mobile users)

    2) if i should separate projects, is it better to have a one web base client for both sys users and end users or two  separate project one for control panel users and one for end users?

    3) is it ok to use a mvc project as a web client in api-centric architecture?

    because mvc architecture itself is client-server and each request should go up to mvc controller and then mvc controller send request to web api. (extra cost)

    or better is that use pure client side implementation.

    4) is it better to have web api and mvc in one project? (its mean api provider and web clients should be in one project)

    explain it for me please. 

    thank for your help.

    Tuesday, June 21, 2016 7:05 AM

All replies

  • User-821857111 posted

    1) i want to know how split projects? is better to separate projects at all? (my mean is one project for web api, one for control panel, one for anonymous users and one for mobile users)

    2) if i should separate projects, is it better to have a one web base client for both sys users and end users or two  separate project one for control panel users and one for end users?

    You need to make those kinds of decisions based on the project requirements. The reasons for dividing things up into separate projects is to facilitate code reuse and to make it easier for team work. 
    3) is it ok to use a mvc project as a web client in api-centric architecture?
    MVC is a presentation architecture. If your project requires a GUI, MVC is a good choice. However, requests to an HTTP API do not need to go through an MVC controller.

    Tuesday, June 21, 2016 8:40 AM
  • User-803397181 posted

    thanks, can you explain it with an example please.

    i enjoy your answers always.

    Tuesday, June 21, 2016 10:12 AM
  • User-821857111 posted

    An example of what?

    Tuesday, June 21, 2016 10:14 AM
  • User-803397181 posted

    a real world scenario that help me understand it better. 

    please check this link because it is similar to my questions.

    if you have any reference or book that can help me

    http://stackoverflow.com/questions/12905566/web-api-in-mvc-solution-in-separate-project

    here is another example that use mvc and web api in one project. 

    https://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-rest-service-aspnet-api-sql-database/

    if we separate web api and mvc projects into two project. how we can deploy tham?. my mean is that api project must be local to mvc project or not? (performance is important to me)

    thanks for replay and excuse me for many questions :(

    Tuesday, June 21, 2016 4:05 PM