I would like to know if there is the possibility of making a DDD Design Solution with two View Ports, one for mobile application using Phonegap and the other MVC 5.
There is. To set your project to multiple View Ports, make sure to invoke the DisplayModeProvider
on your system startup, Global.asax.Cs file:
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
...
var displayModes = DisplayModeProvider.Instance.Modes;
...
}
}
Done this, produce your Views to Phonegap using the suffix .Mobile.cshtml
. For example, if you want to customize the layout of the system, differentiating the layout of the View Port main of View Port mobile, create two files:
- /Views/Shared/_Layout.cshtml
- /Views/Shared/_Layout.Mobile.cshtml
This also applies to any and all View your system: not just for Layout.
Your application already has the ability to detect the User Agent (device browser and device type) and will call the View correct for each case.
I would like to make a domain equal for both according to the DDD, but the database I know will be different, using SQL Server and another Javascript database, example Sqlite.
The part of Models your project already follows the DDD. No additional change is required.
It is not necessary to use two database technologies. Only SQL Server is sufficient to produce what you need.
Boy, take it easy. You seem to be asking about things you don’t know and your question seems to be too wide. For starters, MVC only goes up to 2 (you didn’t happen to mean Asp.net-mvc-5 ?)
– wryel
Sorry, this just meant that it was aps.net MVC 5. on the question I do not have same domain of the subject so I asked for help. I’ve done a project in DDD but my leaders want now that this Asp.net MVC 5 works tb for Mobile. I think now I was clear. Sorry.
– Mr Anderson
I’ll leave the answer to someone from. net, but, I think it’s better instead of you using sqlite, take advantage of the database / business rules than is already done and chat via REST.
– wryel
I thought very good this tip would have some example Using Rest for Phonegap, my friend said the same thing I’m researching here if I find something I will post to community. Thank you very much.
– Mr Anderson