T4MVC alternatives for ASP.NET 5? - asp.net-core

T4MVC is not supported yet or ever in ASP.NET 5. Is there any other similar solution ? I need strongly typed views and controllers names.

Looks like there is a side project called R4MVC but it hasn't been updated in 5 months.
R4MVC is a Roslyn code generator for ASP.NET MVC vnext apps that
creates strongly typed helpers that eliminate the use of literal
strings in many places

As Stafford Williams pointed out, a side project was started a long time ago, but was stalled due to (at the time) breaking changes in the Roslyn compiler.
Luckily, the project was revived, and R4MVC has just released it's first alpha build, with more changes coming soon.
While the project works somewhat differently, and isn't using t4 templates, the end result is the same, and we're working to achieve feature parity with T4MVC in the near future.

Related

Preview Templates of Asp.Net 5

I just installed VS2015 and I'm wondering if I should use the Asp.Net 5 preview template (this is the only option I currently have in VS2015) for my new website. Does anyone know if this preview is some sort of a beta version which might be unstable? If not, why is this version called a preview version?
I didn't find much information about this preview thing in Google so I'll be happy to get some relevant information or links to explanations about this preview version.
Thanks.
ASP.NET 5 is still in beta, and is not yet released as a finished product nor recommended for production applications. It's marked as preview because of this, as it may (and will) continue to change how it does things until it reaches the RTM version.
If you are happy with the above, and want to tinker around, while understanding that updates in the coming months may break your code, then go for it! If you'd rather only write your code once and not have it break with updates, then stick with the previous ASP.NET project types like MVC 5.
Here's the roadmap/schedule for ASP.NET 5 which notes that RTM is expected to be available in Q1 2016.

Migration JGraph to Graphx

We know all that JGraph is a very powerful graphic library and now we are in version 6 (JGraphx).
Me I have an application (by the way I am newbye in JGraph) coded in JGraph 5 and I want to migrate it to Graphx.
Is there any tut to know what is the main differences between these two versions?
That migration, is it easy to do (in general)?
JGraph (the last version of which was version 5) and JGraphX (which was originally going to be called JGraph 6) are completely different code-bases. JGraphX was a complete rewrite from scratch, which is why we made the naming change to avoid the idea you could upgrade from 5 to 6.
So no, there is no migration route, you'd need to re-write your part of the application that interfaces with JGraph(X).

Is it possible to use Razor as a standalone library (without any asp.net business) on OSX (via Mono)

I would like to write a proof of concept MonoMac app which renders html "Views" using c# and Razor.
Is this possible?
If not, does anyone recommend any other Templating engines that compare to the simplicity of Razor. I don't mind writing it in Objective-C if I have to, but Mono would be simpler.
I think you may be interested in this project. You just have to download zip which consists of two DLLs, reference them in your project and examples like these just works. Have in mind that you have to make 4.0 project. I have been testing this on Mono 2.10.5, however OS was Linux, not OS X, because I don't have one. It shouldn't be a problem nevertheless.
Another approach is to do something like mentioned here. Post is quite old and libraries' names has changed but you should be able to use one which are downloadable here. The first approach is cleaner, however I am not sure if it is what you need.
You can also find this project interesting.

Using Sculpture with NHibernate or Entity Framework

I recently ran across this open-source project: http://www.codeplex.com/Sculpture
Sculpture is a code-generator which allows you to design your domain model and then use persistence 'molds' such as NHibernate/EF and probably more to generate repositories. It takes care of all the mapping and Data access generation. It looks like it does a heck of a lot more, but i'm pretty much sold at this point. However, i would like to know if anyone here used this for real-world solutions. If so, how well does it scale? How did the generated DAL work for you?
We have taken this out for a spin on a new project we had. Always wanted to try out nHibernate but the XML hell of the config files always put me off. Tried a number of these type "helpers" this is the easiest to use so we decided to use it.
I like the facts that you can just point at databse and it will create object based on what it sees and will resync on demand. It was also good that you could add custom methods to these objects and has a very well written syntax for the generated code all using LINQ-To-NHibernate.
It also generated a respository project over the top to allow you to use this design pattern which we did (again another personal goal).
It all worked out very well, created a social (facebook like) site for people with a medical condition, got everything fully working in 3 weeks with onlt 3 people.
On the whole very happy with this - in fact bought a licence for Sculpture 2.1 Nhibernate mold. (note open source but not for nhibernate mold :-) )
There is room for improvement
Windows 7 64 bit had to run visual studio in admin mode (my pc only) - not sure why
TeamCity continuous integration had some issues with paths to dll files - the two generated project (ORm and Repository) use different paths to base dll's - so needed to work out position of source in filestore to automate the build but worked fine.
Would like to heard any views on this or other product which people think are better ..
Looking to do a project where we will create all the objects in sculture and get it to produce/update the database for us - will be odd as we are db type developers but will be good to see how this works..
Thanks
Simon
I would say that most ORMs are generated in some way at this point. I'm using Linq-to-SQL for a current project, you setup your model and generate code (with attributes from the model).
In short, it's nothing new and there's no reason to rebuff it just because it's generated.
Most ORMs can or do work this way, and they do so well.

Backporting a VB.Net 2008 app to target .Net 1.1

I have a small diagnostic VB.Net application ( 2 forms, 20 subs & functions) written using VB.Net 2008 that targets Framework 2.0 and higher, but now I realize I need to support Framework 1.1. I'm looking for the most efficient way to accomplish this given these constraints:
I don't know which parts of the application are 2.0-specific.
I could reconstruct the forms without too much trouble.
I need to support SharpZipLib
My current idea is to find and install VB.Net 2003, copy over my code and iteratively re-create the tool. Are there better options?
Your app sounds small enough that I would create a fresh project/solution in a separate folder for the 1.1 framework, copy over the necessary files, use the "Add Existing Item" option, and then build. All the problems will bubble up to the surface that way.
A rather "ugly" approach, but it'll show you everything you need to fix up front.
Probably not. If you don't understand which bits are 2.0-specific, you're probably going to have to go the trial-and-error route. However, you can probably save yourself quite a bit of work if you go looking for generics beforehand. In my experience, those are the most numerous 1.1-incompatible bits that tend to make it into my code.
If you can gets your hands on VS 2010, you can (finally) target multiple frameworks. So within one project, you should be able to compile your 2.0 project to 1.1 and see what breaks.