ASP.NET Core or Phoenix

Another problem with go is that go is not declarative, but very imperative. You have to write ton of code for simple solutions when in Elixir your code can be very concise. And I’m yet to see any concise piece of code :wink: I won’t say there’s none, but I have never seen one yet.

1 Like

The real question is : are your operation, sysadmin and tooling ready for Elixir ? Is your team ready for that?

If yes, go with it.

If not. Then go with what is supported in your environment. Elixir will be ok when you have a project that can accept that cost.

1 Like

I agree that Elxir is more pleasure to work :), but all depends what is you target. Go is mostly cloud, networking and sysadmin language.

PS
Nice project written in go

1 Like

Elixir/Phoenix is a fantastic fit for this, particularly if you your projects are going to need to scale at some point - that’s probably one of the biggest reasons why people are drawn to the language in the first place :slight_smile:

Have a look at this thread to see other things people love about Elixir:

2 Likes

I think the best way is to make hands dirty and play with some sample code http://www.todobackend.com/ :slight_smile: You can compare .Net vs Elxir

1 Like

For ASP.NET Core you said great IDE is a plus, well here you wont need an IDE. Now if you want to see how an elixir & webapp looks like take a good look at Programming Phoenix. I’m not kidding, go and take a look.

1 Like

I went through “Programming in Phoenix” last weekend. Excellent book and it has not made my interest any less for the framework :slight_smile:

And I agree that the tooling is already good for Elixir and Phoenix.
But the deep integrations that some IDE’s offer for .NET is, in my opinion, far superior.

1 Like

What exact tools/features do you need for Elixir that are missing? I’m just curious. Because as much as I love good IDE, I feel comfortable enough with Atom or Spacemacs when writing Elixir,

1 Like

I also really like the current tooling. I have tried Atom and Vim / Emacs with Alchemist, it works great!

My main concern about not having a strong IDE, with refactoring / good code completion etc, is that maybe not all of our developers would feel comfortable in the current tooling.

They are used to Visual Studio and IntelliJ with are both pretty strong at what they do.

Also C# is static language compared to Elixir dynamic language. You will always get better refactoring tools with static languages in my opinion.

I don’t understand why a mature developer would not feel comfortable with using a simple editor such as Atom.

It has lots of great built in features (such as language support for a lot of programming languages) and a bunch of packages which can be installed in less than 5 minutes.

By the way, what is the different between atom and intellj plugin?

Maturity has nothing to do with it. You either want a ALl help from IDE to write bug free and readable software, and debug it with proper advanced debugger, or you don’t, and you rather rely on compiler or interpreter and runtime errors only. I for once don’t feel comfortable writing ruby or Python code without proper IDE support, but it does not mean I can’t write in a notepad. It’s like difference between using pair of wrenches to fix your car, when you have vauge idea of what’s broken or going to specialized service center.

@mofus when it goes to code completion I think atom plugin has best built-in and library completion, but intelij plugin has superior local functions completion. I think that @KronicDeth, author of intelij plugin is working on good standard library code completion.

I miss refactoring tools too, but haven’t found nothing in that matter yet, but global project find&replace in functional languages is OK…Ish for me so far.

1 Like

Not quite sure about Elixir Intelij Plugin

  • IDE parse code as Abstract Syntax Tree, operate on this tree instead of text files
  • Simple text editor -> operate on files
  • Elxir Alchemist Server -> Text editor connects to server to perform some operations , this how atom, emacs, vim elixir plugins works

https://elixirforum.com/t/which-code-editor-or-ide-do-you-use/

I agree.
Although I find IDEs being way too “heavy” in comparison to Atom or Vim.

Ok, I agree if I need to edit 2 lines I can use nano or vi. But most of the time on my work machine I don’t ever turn off my IDE of choice for given language, and the start up time is the only thing that makes IDE “heavy”, other than that I see no advantages of editors over IDE.

Y’know what? I will give IntelliJ another spin, with Elixir this time, and see how it feels.
Any tips?

I encourage you to do it :slight_smile: Tips? Don’t give up after few minutes, but as of now, sadly, there is no fully fledged elixir, and it’s very hard to write one due to the multiprocessed nature of elixir/erlang.

Anyway it’s all off topic.

If I was to choose ASP,NET Core vs Phoenix I’d probably look at long time perspectives.

How scalable my App will need to be?
Elixir/Phoenix is much more easy to scale both vertically and horizontally, but that’s not always what we really need. Sometimes few instances with load balancer is more than enough. As is writing sequential code, without relying on erlang processes.

How many developers will I need, and how many can I find in given technology?
Still it’s much easier to find C# people, and probably will be for a long time.

Do I have time for the developers to learn new language/tools?
If so, you can find very good software developers in other languages, that will join your team solely on the opportunity to write Elixir code, and their experience in other fields/languages could be very helpful.

What about fault tolerance, do I really need what erlang/elixir and otp offers me or is it just “nice to have”?
In elixir/erlang you can write apps that will not have to be taken down even when deploy new versions, they will just work, unlit hardware physically won’t break down under them :slight_smile:

But more then often you don’t need that at all, and if one node breaks down you just spin up another instance, and few hour long system maintenance is something natural and not uncommon.

Will my app will grow and grow, and do I want a monolith or microservices architecture? I’m not biased here, those both are still valid options, and both have advantages and disadvantages.

Well If you write Elixir code, on some level it’s hard not to think in microservices terms (actually erlang/elixir processes). So you naturally start to write code that is easy to spread over many machines if need arise. And another advantage is that you can have a monolith like app with all those “microservices” kept under one umbrella app, and moving them from and to other physical machines (from and to the umbrella app) without too much hassle.

I may be wrong, because I don’t think I’m experienced enough, but I’ve never heard about any company story that was like “we tried language X but it didn’t scale enough for us”, or “we switched from Elixir/Erlang to language X” for whatever reason. Maybe it’s because Elixir is still young (on the other hand Erlang is not :wink: ). or maybe it’s because Elixir/Phoenix solves all the problems we have with apps that needs to scale ie. web apps.

4 Likes

Hi @kostonstyle

My name is Alisina. i am (was) a .Net framework developer, i used .Net for about 7 years. i developed ASP.net websites from WebForms to ASP.NET MVC
.NET is good and pretty powerful. it has one of largest communities in compare to others. ASP.NET is a pretty powerful and platform for web development, with a snap of “new project” click you have your own web project with pretty much less work to do for making it run for your own purpose. its like the swiss army knife for web development in my opinion.

Phoenix (or plug) is a pretty powerful tool to make web apps too. but since its developed on top of Elixir(erlang) which is a strong, fault tolerant, concurrent programming language, the question is irrelevant.

Its like comparing an airplane with a space shuttle. they are for different purposes.

Use Elixir/Phoenix when you really care about your app’s stability and scalability. it has no deployment downtime and because of erlang’s nature, SUPER ROBUST.

if you don’t care about these you can use ASP.NET (or ASP.NET Core) but if you know elixir and like it a bit, it can be a very pleasing experience developing apps with it.

i personally migrated from .Net to elixir and very happy about my choice so far :smiley:

TL; DR:
Use Elixir/Phoenix when you really care about your app’s stability and scalability. it has no deployment downtime and because of erlang’s nature, SUPER ROBUST.

5 Likes

Very good insights here, thanks!