Noob questions: GIS / API / BDD / Bootstrap 4 vs CSS Grid

Hello all, first time posting and looking forward to being a fellow positive, contributing member here.

I am completely new, not only to Elixir, but to programming in general so apologies in advance if questions aren’t phrased in the most “logical” way. I am trying to set up a website to help artists and musicians and have the following concerns/questions:

  1. Are there any special issues relating to using either Bootstrap 4 or CSS Grid with html in Elixir?

  2. I would like to incorporate either GIS data (or JSON file from some GIS type entity like a city or county) to list real time map info on site to show address locations. I’ve been told that GIS data is usually in Python or R. Will doing this in Elixir be a problem? Or is this done via an API which would then be language agnostic?

  3. Any special considerations when implementing an API in Elixir?

  4. Lastly, big reason I chose to learn Elixir to invest time to learn was the concepts taught by Uncle Bob Martin and Rob Martin with their Youtube videos on benefits of functional programming/TDD/BDD. Am I correct in assuming that many issues are avoided automatically by using Elixir since we’re using FP or do I still need to be doing testing on regular basis?

Thanks in advance!
Synth

Welcome!! ^.^

No issues whatsoever. Phoenix is the back-end, html/css/bootstrap/whatever is all front-end, entirely distinct. :slight_smile:

If you use PostgreSQL as your database it has a FANTASTIC GIS extention pre-included, it could probably do your queries faster than about anything else. And postgresql is the default supported database in a new phoenix project too. :slight_smile:

Functional Programming just means putting functions first, they are first-class values and can be passed around like anything else. The big thing that helps prevent ‘issues’ in my opinion is immutability (Elixir is) and static strong type system (Dialyzer helps here, I always recommend using it via the Dialyxir plugin). Testing is always good to do regardless, and Elixir makes testing a wonderful breeze with integrated doctests. :slight_smile:

5 Likes

Thanks OvermindDL1 !!

Much appreciated! You’ve given me a lot more peace of mind.

Thank you especially for the PostgreSQL extension tip as I was worried that since most GIS is in Python, somehow the two wouldn’t work well with each other.

2 more questions please if you don’t mind?

You mentioned PostgreSQL. Is there a reason that Phoenix default database isn’t a NoSQL database? Isn’t a big part of the reason Elixir is so powerful because of the distribution of power or am I getting different technologies mixed up?

Lastly, any special considerations for APIs in general in relation to Elixir?

(sorry, I guess that’s 3 questions)

Thanks again OvermindDL1!

PS Will also check out Dialyzer, thanks

The fact is that PostgreSQL is probably the most advanced database out, including not just SQL but also NoSQL’s in various styles, a very powerful search database functionality, many many extensions, FDW’s (Foreign Data Wrappers that let you access ‘another’ database from inside PostgreSQL all through the same interface) and much much more, in addition to it is entirely free, open source, blazing fast, and included in every linux distribution in existence’s repo’s as well as being trivial to install on Windows while being one of the most ANSI SQL compliant databases out. :slight_smile:

That all depends on what you are making, how it will be accessed, etc… Biggest word of note, keep your functions that ‘do’ stuff in their own modules, do not mix up ‘doing’ stuff in your web-related modules, makes it hard to refactor and/or pull apart or interact with in other ways later. :slight_smile:

2 Likes

KNOWLEDGE BOMB!

Thanks! I owe you a beer at next Elixir shindig.

Appreciate the help

Heh, sadly I never get to go to them, too far away and too expensive… ^.^;

But definitely stick around, there are a LOT of helpful people here. :slight_smile:

Lonestar is closeby and only one month away. I am sure many of the countless people you’ve helped over the past year and a half will be there ready to buy you beers. Hoping you are going to finally make it to your first dev conference!