2

I currently work for a company who builds web applications for businesses and entrepreneurs, typically 4-6 projects per year. We currently use Laravel/PHP which allows us to build apps relatively quickly with reasonable scalability, maintainability, security, etc.

I dislike PHP as a language and since I have a strong influence on the direction of the company, I've made it clear to my boss that we should eventually move away from PHP on new projects and adopt a better language/framework (which he has agreed to).

My suggestion was ASP.NET Core which my boss was OK with. I started developing our latest project on the platform but after a week and a couple of hurdles that were slowing down development, I decided to go back to PHP in order to make deadlines.

I was following a fairly standard layered architecture in the .NET world (MVC, Service layer, Repository layer) which obviously adds time because each entity now requires several components for each layer (and multiple view models) where as Laravel you can just pass arbitrary data to the view and read arbitrary data from the request. We don't use any sort of service/repository layers and just work with the ORM at the controller level which works for our purpose.

My initial thought it to just dial back on the layered architecture (afterall, we don't even do that on PHP/Laravel), but my concern is that .NET Core is simply not suitable for rapid development due to the verbosity required by a statically typed language. It seems like Ruby/Rails, Python/Django, JS/Node are more suitable for rapid prototyping and you don't often hear (if ever) of ASP in that mix.

Is .NET ASP MVC core suitable for rapid development and prototyping? Is it feasible to build apps in .NET Core that don't follow a layered approach or will it quickly become unmanageable faster than something like one of the aforementioned languages/frameworks?

  • 3
    Laravel sounds more like ASP.NET Webforms than it does ASP.NET MVC, so you may be comparing apples to oranges. You also benefit from familiarity with your existing framework; there will be a learning curve for any new technology you choose. While it is true that statically-typed languages are a bit more verbose, this is moderated by things like type inference, and offset by the benefits you get by using static typing. – Robert Harvey May 22 '18 at 1:59
  • How much C# / .net experience did you and your team have before you decided to make the switch? – richzilla May 23 '18 at 10:24
  • If the answer is substantially less than for PHP and Laravel, how much extra time have you allowed for you and your team to answer all of the questions you already know how to answer in PHP? – richzilla May 23 '18 at 10:32
  • About being fast, for me a crutial point is having the right tooling to feel confortable and over control of the language. Using plain Visual Studio for me is not enough. I like either using Visual Studio + ReSharper or Rider from JetBrains (the company that develops ReSharper). When I was working with Ruby-On-Rails in the past, I found it slow and difficult because I had not had any good editor; then I discovered RubyMine from JetBrains. The same for PHP when I discovered PhpStorm. So, make sure you have found the best IDE that makes you confortable and fast. – Reuel Ribeiro Jan 11 at 2:40
  • @ReuelRibeiro Agreed. I don't think I could ever code without ReSharper again. Being able to fly through things like refactoring makes things so much faster – Brad Jan 11 at 15:39
5

Yes .Net Core although still very new, is suitable for rapid web development.

Caveat #1 : Asp.Net MVC/WebApi is the more mature technology. You may find it more compatible if you are doing lower level type operations.

Caveat #2 : You are always faster programming in the way you know.

It sounds to me like you were making too big a jump on a project with tight deadlines

which obviously adds time because each entity now requires several components for each layer (and multiple view models)

Normally you would only need a view model per view, and the time taken to write it would be a couple of minutes max

where as Laravel you can just pass arbitrary data to the view and read arbitrary data from the request

You can program this way in .net, but obviously you lose the strong type benefits, which lead to faster development and less bugs once you are used to them.

We don't use any sort of service/repository layers and just work with the ORM at the controller level which works for our purpose.

Again, you can go straight to the DB in your controllers in .net. It's not recommended.

I would say that its not so much the language which is causing your slow down, its trying to on board a whole chunk of best practices all at the same time.

Strong Typing, Separation of Layers, Dependency Injection, Unit and Integration Testing DO make you faster overall.

The extra typing isn't a problem once you are used to it, but the benefits only really become apparent when you are picking up bugs early due compile time checking and unit tests.

Start with a smaller, less important project and take it a step at a time.

  • 1
    A good addition would be to talk about the main difference between .NET and Laravel, Laravel provides both an ORM and Dependency Injection system out of the box. Both are available within .NET but you have to install separate Nuget packages and alter your workflow to use them. And you have to learn them separately as a result. The problem shifts from being a language problem to being adapting a new workflow problem. – Tich May 22 '18 at 9:43
  • 1
    Just want to mention (6 months later from asking the question) that ASP .NET Core is absolutely suitable for rapid development. It takes some to build some boilerplate that Laravel has out of the box, but afterwards you can fire up relatively sizable applications pretty quickly – Brad Jan 11 at 15:40
  • @Brad thanks for coming back to report on your experience :) – hlfrmn Apr 24 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.