I have currently developed an application using (hibernate/spring MVC) now I want to use grails controllers and views for the application how do I fix this top layer on top of the base application.
I have already put the hibernate cfg & hbm's in the grails-app/conf/hibernate directory so all that works. I want to integrate the service layer also. The Controller and View is the only part I need to do in grails. How?
Related
Hi I am Trying to separate Views , controller and model in 3 different solutions
And trying to access views from a shared directory means trying to access views in C drive and my solution is in D drive.
This is for a multi tenant application
You can separate models and controllers into another project. Your views need to be part of the main mvc application. Just make sure you add mvc using nuget to each and keep things together with namespaces and it should be fine.
As I understand one of the benefits of the MVC pattern is being able to substitute other Views without having to change the Model or Controller.
Since the Razor view engine compiles the views, how can I change or tweak the views after they have been deployed without having to re-deploy the application?
Razor views are compiled dynamically at runtime when they are requested by the ASP.NET runtime. You could replace your .cshtml/.vbhtml files directly on your webserver and the changes will be automatically picked up.
Currently I have a website built with Umbraco 4.9.
What are the options to have a sub application (pure MVC 4 preferably) running under Umbraco infrastructure?
The idea is to have a custom app with custom database and custom logic. The only integration points would be:
common user base (authentication)
access to Umbraco's dictionaries from custom app
share same session, that is if user is navigating through pages in
custom app his session should not expire for website
have custom app
under same domain (www.mysite.com for website and www.mysite.com/app
for app)
Thanks in advance
I'm not too familiar with v4.0.9, but I imagine its somewhat similar to 4.7. If that's the case, you should be fine to place your sub application inside the folder structure of your existing umrbaco instance. In IIS, you will need to convert the subfolder into an application. Within the web.config of your umbraco instance, you will need to add the path to your sub app in the umbracoReservedPaths app setting.
I'm not sure how session would here. I believe the asp.net membership should work fine. By adding references to the Umbraco dll's in your mvc project you should be able to access the Umbraco dictionaries fine.
Initial sidenote: I'm working on a hybrid WebForms+MVC application that started as a WebForms application hence I've added project GUIDs that converted it to MVC. This means that I'm getting context menus directly on Controllers and Views folder in application root. That works.
I was wondering whether it's possible to convince Visual Studio (and Asp.net MVC tooling) to add Add controller... and Add View... context menu items to other folders not just those default ones that are on the project root?
The reason is that I'm working on an Asp.net WebForms application that is now a hybrid with MVC. And since it already has quite a few folders in root I would rather separate the new MVC part and contain it altogether within mvc folder, so all MVC related files would be inside that particular folder.
But right clicking on mvc\Controllers doesn't give me the wizard, nor does the mvc\Views... Also navigation from controller code to views isn't working...
Is there any way to customize this in Visual Studio? Do Asp.net MVC tools for VS have some sort of configuration file where this can be configured? Or in registry maybe?
If you wish to separate the MVC stuff from the rest of the application you might want to put it in a separate Area.
You'd have the context menu and separation from the existing mess.
I am desiging the architecture of an application which will have many sub applications in it. Those sub-applications will be a developed by us but on a later stage.
I want to create those sub-applications as installable plugin / module which might have multiple pages (.aspx pages) which should be able to interact with the Main Core Application and consume its shared data also.
I strictly need The Plugins/Modules to be installable by manipulating the configuration or adding a folder of files or a DLL.
My Application will be an ASP.net web application. If ASP.net MVC solves the purpose then I can also look up for that also.
My Application will make use of URLs to Identify the Module to be loaded. Following are some Examples of some URLs which I wish to have my application.
e.g.
http://www.myCoreApp.com/Module1/
http://www.myCoreApp.com/crm/
www.myCoreApp.com will host my Core Application in which my Modules will be installed.
Module1, crm, accounting and xyz are installed modules on My Core App.
You should take look at MEF (Managed Extensibility Framework). It makes no difference if your app is ASP.NET web forms or MVC, or even if is Winforms
I would go for MVC.
One could auto-discover the modules --- probably by convention and by checking implementation of a certain initialization type like IModule.
Then you could register your Controllers within a DI container (like Windsor) so all the 'shared' components will be injected by the container.
HTH