Can I use Moq with subsonic3? - subsonic

I'd like to use a mocking framework as well as an IOC framework with my latest project, based on subsonic 3 (ActiveRecord) and ASP.NET MVC.
I'd like to use Moq for mocking and Castle-Windsor for IOC.
Anyone got any advice or recommendations based on these choices? Any bumps in the road I should be aware of?
Chris

I would definitely look into the Castle Windsor controller factory in MVC Contrib if you're using Castle for IOC with a ASP.NET MVC app.
Since Moq is completely separated from the app itself in the testing part of the code, I can see no reason that there would be any bumps in the road. I've been using Moq with a couple ASP.NET MVC apps with Castle Windsor IoC and on a app where I used Subsonic (though not in an ASP.NET MVC app) and have no complaints.

Related

Is it possible to combine DevExpress MVC Extensions with DexExtreme components in standard MVC application?

We should make a decision in our company what architecture to use in new web project. We've already successfully used DevExpress' WPF components and thinking of buying their web products, but don't have enough experience with them. So, the next question is for people who have some experience with DevExpress' web components.
Could we start the solution as standard MVC project built in VS 2013 and then add DevExpress' MVC extensions such as data grid etc. and DevExtreme components (jQuery or AngularJS) as well? If we can do that, could you explain, please, what could be possible difficulties?
I think it isn't a good idea to mix up server-side DevExpress Mvc Extensions and client-side DevExtreme Widgets. If you are comfortable with asp.net mvc and want to use client-side javascript technologies, look at DevExtreme Mvc Wrappers.
It supports a convenient razor syntax to configure widgets. And you can use javascript to handle events, implement client-side templates etc.
To see how it works in action, refer DevExtreme demos.

Using MVC .Net Core Tag Helpers in MVC 5

Tag Helpers are a nice substitute for HTML Helpers in ASP.NET. Code is much easier to read when they're employed. To my knowledge, they're available in ASP.NET Core MVC.
Is it possible to use tag helpers in ASP.NET 4.x MVC 5? If so, then how do I go about doing it?
If not, is there a way to write code to create your own tag helpers for ASP.NET 4.x MVC 5?
This is a duplicated of this question. See the answer below.
No, tag helpers are only supported in ASP.NET Core, not in the older ASP.NET (based on the classic .NET Framework, rather than the newer .NET Core). But instead you can use HTML Helpers which do a lot of the same things.

OWIN Katana, Webapi, MVC all in separate projects

I have a project that currently is using MVC5, WebApi2 and OWIN. It has become quite a bit larger than I anticipated and I am looking into splitting it up into separate projects. I will move the business logic and data access into a new project but then I was thinking about splitting the webapi and mvc into 2 more projects.
Really, there is very little MVC. Basically just the /index.cshtml and the /Help page. Everything else is Durandal. I was thinking if I were to move that out of the main project then then I would have some flexibility with hosting. It just seems that the MVC part of the application is heavy and not needed.
I would then make a webapi project, which is really where everything is happening anyway.
I have been considering using the OWIN pipeline and wrapping the webapi as middleware and the mvc project as middleware. Then I could have multiple startup classes that could be used for different configurations. One thing that I like about this idea is the webapi and the mcv app could be used individually or together. In either case, because of the nature of OWIN, it can be self hosted or run through IIS.
Now my question is...
Does this really make sense? There are potential cases for running the webapi service on its own. Are there any potential losses I will have to take in a setup like this?
Thanks.
#mnfact :- I would refer you to create two separate solutions one with the WebApi2,OWIN and another with the MVC5. It would be the good designing. Kindly go through the link :- " MVC & Web Api projects within same Solution "
I think there are can be issues while providing authentication to the WebApi and MNV5 project separately. Same for the datacontext you have to solve the Dependency between the controllers.
Hope this help you!

BreezeJS with ServiceStack?

I was wondering whether or not BreezeJS is compatible when using other technologies other than Web API and/or Entity Framework? As I'm currently in development of a SPA using Service Stack to retrieve data and ORMLite?
So I am curious how BreezeJS handle's this as I know it uses it's own API Controller usually with an extension of the DbContext class which Entity Framework uses. Thanks.
There is currently a sample called NoDb in the samples zip available on the breeze website. This sample does not use EF, but it does use WebApi. So I'd start by looking there. ( additional documentation on this sample should be added within a day or two as well).
In terms of using ServiceStack instead of WebApi, breeze supports the concept of a "dataServiceAdapter" and currently ships with two, an OData adapter and a WebApi adapter. It is certainly possible to write a ServiceStack adapter that breeze could use but this is not trivial. Please add this as a feature request ( and vote for it) on the breeze User Voice. We take these requests seriously.

RIA base DomainService implementation for Subsonic 3?

So i'm fairly new to both SubSonic and RIA Services. I've done the RIA walkthrough for the HR app and it all looks good, but I'm not quite about creating a DomainService base class for Subsonic.
The samples here describe creating a custom base class for your DAL but I wondering if there was already anything out in the wild that did this for Subsonic 3 SimpleRepository?
Additionally how should one handle generating all the DomainService classes that correspond to each class in the DAL? T4 templates?
Well I have since solved this problem. I thought it was related to how I was implementing my domain service, but since the November beta release of RIA Services I've realised it was probably related to bugs in the previous July version.

Resources