For books I would recommend Programming Phoenix
Many other resources can be found in this thread.
Start building your app!
This is definitely a good fit for Phoenix. I don’t think you will need much concurrency or distributed systems for this app until you get to a serious scale (that the vast majority of projects never make it to).
Similar to the last question I don’t think you’ll need to worry very much about OTP until you start having a need to scale your app.
Overall I think you are on the right path, especially if your goal is to learn as well as to build this app. The stack that you mentioned looks good as well.
A rewritten version (C++ and Perl) just launched in Jan. However,
- The reason they rewrote it was entirely that the current engineers didn’t understand Lisp and were too afraid to learn it.
- The resulting program is a new world’s record case of Greenspun’s Tenth Rule. The Yahoo Store Editor called compile at runtime on s-expressions made on the fly. To translate this into C++ they literally had to write a Lisp interpreter.
- Even then, they had to drop some features (involving advanced uses of closures).
However the opposite happens as well: Outlyer moved from Python/NodeJS to Erlang.
Younes, you won’t need to fiddle too much with OTP-specific things in order to implement this scope for sure. You can get progressively into the more hardcore stuff, willingly
You started with a great book! What I’d suggest to you next is the phoenix docs
I learned elixir by creating a site that pretty much has most of your list. I still mess around on it a bit and you can ask me about any part of the experience. Https://smileys.pub
Imo it is more ready for prod than any other framework but I need to go back and do a better job with several aspects of my site
Elixir and Phoenix are fine for your application.
I run a consulting company that builds applications for early stage companies (Cogini). When I first saw Elixir, we had been developing standard websites (CRUD, e-commerce, etc) with Ruby on Rails, Python, and PHP. We were using Erlang for the “tricky bits”, e.g. IoT and real time web, and liked it a lot. 10 years ago, we tried to use Erlang for web development, but the web development stack was not mature, and basic productivity was lacking.
When I saw Chris McCord’s post comparing Rails and Phoenix three years ago, I was really excited. The metaprogramming capabilities of Elixir let them build a web framework that combines the power of Erlang with the ease of use of Rails.
I wanted to make sure that it would be ok to bet the company on Elixir and Phoenix. The basic productivity was great, and the the Elixir and Phoenix teams focus a lot on developer experience and getting started. So I knew we would be able to deliver custom development projects without too much work.
My next question was whether we would have the libraries we need for various project requirements, e.g. interfacing with credit card payment systems. It is fine to develop a few things, but it’s hard for a startup project budget and timeline to cover development of basic libraries. As a safety valve, I looked at calling Python and Ruby from Elixir using tools like Elixir Snake and Erlport. They worked fine, and I knew that I would be ok. In practice, we haven’t needed to do that much, all the libraries we have needed have been available or we could write them. We mainly use it for things like Pandas for data analysis.
In addition to standard web development tasks, Elixir and Phoenix support the next-generation “stateful web” applications like chat that are really hard to build any way else. One thing that I really like is that a single platform can do it all, i.e. public web, back end CRUD for admin, mobile APIs, interfaces to 3rd party APIs, and real time messaging. It actually simplifies development a lot, because we don’t need to use multiple languages, multiple servers, background job queues, etc.
In the last three years, we have done all our new projects in Elixir, and it’s worked fine. You don’t have to worry about OTP at this point, you can build apps with just Phenix. You will want to learn it in the future, though, as it is where the platform gets a lot of its power. As for difficulty finding developers, we haven’t found it hard for devs to get up to speed on Elixir and Phoenix. Within two weeks they are fully productive, particularly if they have experienced people available to help.
There is some learning curve associated with functional development. It’s similar to learning object oriented programming. You can be programming immediately, but it takes six months before you are really thinking functionally. Then you find it difficult to use barbaric languages with mutation and miss pattern matching dearly .
Developer presence in Northwest (US/Canada)
I agree 100%.
@younes-alouani because you ask wrong questions. Title is about elixir’s stability. But your questions are not releated about that. I can advice all resources you need in ruby because there alot tutorials exactly what u need piece piece. But in elixir first you have to learn how web works. Which questions releated about front-end or backend or database. After you get how web works you will realise all of your questions same thing. For example in reality user and post whole different thing but for a programmer they are just data with different aspect.
So first read phoenix doc, apply some tutorials. Learn router, model, controller, view idea. But i can say you are in hard way if u just want to build that webapp. But if u want to build more projects you are in right way. Because u will learn wep programing with less magic
No one answer your question because your title is just inviting for broader debate on production.
1 - Authentications and Authorizations (Admins, Moderators, Normal users, Premium users);
You need to learn token based authentication if You plan to use SPA with Vue. PhoenixToken can do this. Authorization is more complex. You can look at https://github.com/riverrun/phauxth/wiki/Authorization.
2 - Publish, Edit and Delete posts ;
This is basic CRUD… with ownership. Usually, after a login, You can assign the current_user into conn.assigns, so You know that each protected route will contain a current_user, or fail.
3 - Search Box for posts and profils + filters ;
I just found recently…
Of course postgres can do queries. To me it is a much better alternative than mysql. It includes full text search, postgis extensions, windowing functions etc. The only reason I would not use it would be the need of a special database, such as Riak, or Neo4j.
On the frontend, search box is a perfect use case for rxjs.
4 - Ranking and Rating of Profils ;
Do You mean a like system?
5 - Download and Upload Files ;
And for reference http://phoenixframework.org/blog/file-uploads
6 - Reply to the posts (messages + attached documents) ;
You can define something like Post has_many Reply
What is fun is the way You reply… by web, by mail, my sms?
I am coupling mobile phone to phoenix backend. And use twilio to send sms from phoenix.
By email, there is bamboo.
By web it is simple CRUD.
7 - Classify posts into categories and by targeted localisation (Country / City).
Add Postgis extension to Postgres and You will be able to do queries based on latitude/longitude, and much more.
While not that complicate, a CMS might be hard to build the first time. Also note You need to be fluent in a lot of different technologies to become good at web.
You can use Phoenix for this. But a CMS does not highlight Phoenix real quality. In fact, You could do it with anything (Django/Python, ROR, Php), as long as You find solution for all the points You mention.
But Phoenix comes also with
- A stateful web
- Soft real time
- Scalability, Fiability, Concurrency
As long as You don’t need them, it is fine to do a blog with whatever language You feel the most productive with.
And for your question, Phoenix can solve all the 7 points, as many other frameworks. But It add that supplement bonus that make it growing in popularity.
@dokuzbir You’re right. I knew I’m going the hard way, because this web app would have been easy to implement using something like rails. The problem is that, in rails every thing is hidden you have to follow conventions without knowing what happens behind the scenes.
I’m basically a chemical engineer working in nuclear energy but I tried programming using Elixir and I fall in love with it. Wonderful syntax, clear methodology because you’re using functions that are easy to debugg etc.
So you know already that it will be easy too in Phoenix, because when you know Elixir Phoenix is just quite like Ruby on Rails.
I don’t hear about many people taking the path from Elixir to Erlang. How’s that going for you? (seriously. would be interested in your impressions)
I wanted to try Erlang out long before Elixir, Elixir’s streamlined experience helped me to get some real work done quickly (yes it’s totally production ready) and added to my interest in Erlang/OTP.
I went through the e-book version of http://learnyousomeerlang.com/ which helps to learn Erlang as well as better unterstand Elixir under the hood. So the path from Elixir to Erlang seems natural to me, unless it’s about abandoning Elixir for Erlang.
@crabonature Actually, no there is a difference in complexity to build an app :
- using Elixir : U need to learn Elixir, Phoenix, Erlang, OTP.
- using Ruby : U need to learn Ruby and Rails only.
Of course, if your project goes mainstream, the efforts (money and knowledge) required to scale your web app using Elixir will be small compared to when using Ruby.
You can do fine with only learning Elixir and Phoenix. You might want to learn Erlang and OTP but it’s not strictly required to be able to build stuff with Phoenix.
It’s just not true, to be fair you should write it that way:
- using Elixir : U need to learn Elixir, Phoenix, Erlang, C, OTP etc.
- using Ruby : U need to learn Ruby, Ruby on Rails, C, Linux processes/POSIX threads etc.
With Phoenix you will not write any line of Erlang code, just like in Rails C code. (but sometimes you have to in both technologies).
Just like in Rails you don’t have to use processes/pthreads, the same goes for Phoenix about some OTP stuff.
@younes-alouani i mean hard way because there are less libraries and tutorials. Phoenix is easy and productive as other mature framewoks.
Most of elixir programmers already know more than one programing language. They call themself newbie or noob but they are really experienced programmers. I am the only programmer noob in here
Elixir is not pure functional programing. We got some power from OOP desings. Never limit yourself. Because there alot informations written for OOP for improve your skills.I started learning programing with ruby. Ruby opened me to elixir doors. Elixir will open rust door. Rust is currently big bicycle for me i still need some magics. Yo u dont need write to OOP but learn to understand OOP codes.
Unfortunately it’s not ready for production. When we migrated our entire platform from Meteor to Phoenix, our server costs went down 3000%. Definitely not ready!
Our 600 tests run in 9 seconds. Ugh I can barely have enough time to get my coffee!
Our pattern matched functions mean less code being written daily, which is bad for productivity.
My comment is not about right tool. Even i was learning ruby i couldnt find documentation for some of my needs. I read PHP documents. I cant code PHP but i understand. That is what i mean, OOP is like a english for web.
I think you can write a crappy Phoenix-based project without knowing anything about OTP and certainly without knowing any Erlang. We just happen to be conscious, as a community, of the fact that you won’t know what you’re doing and you’re just going to be writing Ruby (on Rails) in Elixir if you do that…
Yes, languages of a certain paradigm are alike. That’s why they’re grouped together. People become enlightened about Haskell every day from using Elm, etc., I’m not sure that’s a point against or for one language or technology as much as it is a fact of how programming has evolved.