controllerless | Properly designed applications do n't need | Application Framework library
kandi X-RAY | controllerless Summary
kandi X-RAY | controllerless Summary
Properly designed applications don't need controllers. Remove the cruft; become controllerless.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of controllerless
controllerless Key Features
controllerless Examples and Code Snippets
Community Discussions
Trending Discussions on controllerless
QUESTION
Right now we have a lot of dummy MVC controllers that return simple views with web components (vuejs). I'm trying to refactor this to see if we can use the controllerless razor plugin but I don't want to execute the actual service logic when the route is requested by the browser because the component already does this. An example:
/account/edit/1
is a standard MVC controller -> is associated to a view that has something like this that makes an ajax call to
/api/account/get/1
. I want to add the Service Stack Razor engine so that we can just use:
/api/account/get/1
(we would remove the api part or add the alternate route) and this would not execute the logic but would execute the security attributes so we can remove the standard MVC controllers that aren't be used. I know we can add different services for this to get it to work but I would prefer to use the same endpoint and just not execute it but return the razor.
Any ideas?
Not the answer I wanted to hear but essentially we can't do what we want, instead we'll create some dummy service stack services to return the correct views which still eliminates the controllers.
...ANSWER
Answered 2017-Jun-02 at 17:13In order to use ServiceStack.Razor's No Ceremony Option where you can return dynamic Razor Views without needing a ServiceStack Service your route needs to match up with the razor page so you wouldn't have a route like:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install controllerless
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page