DmitryEfimenko / TwitterBootstrapMvc

Fluent implementation of ASP.NET-MVC HTML helpers for Twitter Bootstrap.
Apache License 2.0
223 stars 79 forks source link

MVC 6 #369

Open Ajitweb opened 9 years ago

Ajitweb commented 9 years ago

Hi Dimitry,

Any special instructions for using BMVC on MVC6?

Regards

Ajit

DmitryEfimenko commented 9 years ago

there will be a separate Nuget package for MVC6 once it's released

Ajitweb commented 9 years ago

Thanks for the reply Dmitry. I was trying out MVC6 and all my views are totally dependent on BMVC. I guess, then, I have to wait till MVC6 is released (hopefully in this quarter).

Ajitweb commented 8 years ago

Hi Dimitry. Now that VS2015 is out, is the Nuget package ready?

natiki commented 8 years ago

MVC6 will only be released next year : https://github.com/aspnet/Home/wiki/Roadmap

Ajitweb commented 8 years ago

I should have checked before commenting. Sorry about that. Thanks @natiki

mikestu commented 7 years ago

Any update on this one? Thanks!!

DmitryEfimenko commented 7 years ago

Looks like MVC6 isn't released yet: https://www.nuget.org/packages/Microsoft.AspNet.Mvc/

mikestu commented 7 years ago

In my haste, I was thinking mvc6 came with asp.net core. I guess that's a separate issue, but do you plan on creating a .net core version?

DmitryEfimenko commented 7 years ago

@mikestu I'm not sure I understand. What problem are you running into? Is there a dependency conflict somewhere?

mikestu commented 7 years ago

No, I haven't even tried using this in an ASP.net Core mvc app yet to see if it would work, but I had assumed it would need to be built with .Net Core, in order to be able to use BootstrapMVC in ASP.net Core views.

DmitryEfimenko commented 7 years ago

Give it a quick shot. As long as you use MVC 3, 4, or 5 all should work (I think).

mikestu commented 7 years ago

Nope, it doesn't support a pure ASP.net Core mvc app, since it targets the full .net 4.0 framework:

error: Package TwitterBootstrapMVC5 3.17.5 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package TwitterBootstrapMVC5 3.17.5 supports: net40 (.NETFramework,Version=v4.0) error: Package T4MVCExtensions 3.6.5 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package T4MVCExtensions 3.6.5 supports: net40 (.NETFramework,Version=v4.0) error: One or more packages are incompatible with .NETCoreApp,Version=v1.0.

I am not sure what would be required on your end to support Core, but from other projects I monitor, they usually end up basically doing a rewrite for Core. It's still early to get in on Core, as they are on version 1.1, but it's the next big thing for .net. One benefit for you is that ASP.net Core web apps can run on Mac and Linux as well, so the market is beyond just Windows.

johnwc commented 7 years ago

Any update on this? We have a requirement for .Net Core going forward and we used your extension heavily with our current site.

Also, the link you keep pointing to will never show MVC 6, as MVC 6 has been renamed to ASP.Net Core MVC. https://www.nuget.org/packages/Microsoft.AspNetCore.Mvc/ https://docs.microsoft.com/en-us/aspnet/core/mvc/overview https://forums.asp.net/t/2101133.aspx?What+is+the+difference+between+MVC6+and+ASP+net+Core+

DmitryEfimenko commented 7 years ago

I'm checking what exactly needs to be done. I'll be able to give you a better answer soon.

DmitryEfimenko commented 7 years ago

No good news.

BMVC's input rendering is very tightly coupled with System.Web.Mvc. That worked well between upgrades from MVC 3 -> 4 -> 5 because that namespace and the method names in there stayed the same (even if implementation changed). However, .Net Core moved namespaces around and got rid of a lot of methods used in earlier versions. This makes upgrade be almost a full re-write of BMVC.

In addition, even though you can still create Html Helpers in .Net Core, they push for the use of new templating feature - Tag Helpers, which has a very different approach, so using old style Html Helpers would not be "future-safe".

Finally, in my personal opinion, today, server-side templating just does not fit the bill of highly interactive UX requirements. I think, you'd be better off considering Angular, React, Vue, or any other client-side framework/library. But again, that's my personal opinion.

As a conclusion, at this time I will not be investing in supporting .Net Core.

Ajitweb commented 7 years ago

In the last link posted by @johnwc , @Mikesdotnetting, clearly states that you need MVC6 (aka ASP.Net Core MVC) if you are developing on a non-Windows PC or deploying to a non Windows server. In my case it is not so - and looking at all the tutorials of the new MVC, non of the use case scenarios fits my style of web programming.

So I am sticking with MVC5 on ASP.NET 4.6.x . To ease html coding, instead of BMVC, I am now using knockout custom binding handlers. Also, my app is being developed using Dicky Suryadi's dotnetify which is cool - as all my business logic resides in C# and dotnetify uses SignalR to transport the data in real time between the browser and my server (no post/get or ajax). There are no scripts on the client side for any validation. All validation happens at Server. You almost get a feeling of developing a desktop application :)

Definitely worth checking it out for new projects.

johnwc commented 7 years ago

@Ajitweb that is not the case all the time. A great example of being forced to use ASP.Net Core for a windows deployment is if you will be deploying to IIS in the new Windows Nano server. Nano server only support .Net Core.

Ajitweb commented 7 years ago

@johnwc - I agree with you totally. In the above post, I was giving my scenario - at least for the coming few years.

By the way, dotnetify fully supports Asp.net Core

Cheers.

mikestu commented 7 years ago

It looks like some others have started filling this need, as far as the tag helpers go. Here is one, and appears to have a Creative Commons license: https://github.com/jqwidgets/ASP.NET-Core-MVC-Bootstrap-Tag-Helpers