0

I am working on an application where I have to list on a form select lists all the countries, states and provinces, cities and it's very hard work to add them manually.

My questions are:

Is there any online service that allows me to list all countries, states and provinces, cities and give me the option to integrate them into my form and bring this information dynamically through AJAX?

Is it better to have this information in my database or work with an online service through an API?

Having a site that allows doing this, which are the most recommended and easy to integrate?

j08691
  • 204,283
  • 31
  • 260
  • 272
Learning and sharing
  • 1,378
  • 3
  • 25
  • 45

1 Answers1

1

are you talking about this ?

https://restcountries.eu/

I have not used this service personally.

Adi
  • 158
  • 1
  • 6
  • Like, like this http://jsfiddle.net/bdhacker/eRv2W/, but I want to know whether it is better hacero by an API, or through my database – Learning and sharing Sep 29 '15 at 23:04
  • I would suggest it to be done by your own database. But use these APIs, to bootstrap your database. – Adi Sep 29 '15 at 23:28
  • Ok perfect thank you very much for your suggestion, I will take it into account. – Learning and sharing Oct 08 '15 at 18:55
  • After making all the checks, I leave here my comments based on my experience. If you are working with a relational database, with the third normal form, either built in Workbench or pure code, you should create your table to country, states, cities and provinces, it is a great job, yes, but worth it, in any case for reasons of scalability and performance, Adi suggestion is the most viable option for these issues. – Learning and sharing Nov 03 '15 at 06:36