Create a Discovery app with yii framework

In This tutorial we will code a simple discovery website . For example, a user may want to know what restaurants are near a particular location or what public services or public transportation options are near a particular job the user is interested in. With the help of third-party location APIs, we can inform the user what is near a given point of interest. For our second application, we develop a web application that shows the user what is near a particular point of interest using information from the Google Places API

So our app will be performing these tasks

Searching nearby locations

The core component of this application is its ability to find other locations near an existing location. The easiest way to find this information is to take advantage of a third-party API. For this application, we’ll be using the Google Places API, a web API that can provide nearby locations from given latitude and longitude coordinates.

Showing locations

Rather than simply telling our users what locations are near a given point of interest, we can enhance user experience by showing them the points of interest and nearby locations on a map. Many different mapping sources exist to show a map. For this application, we’ll take advantage of another Google API, the Google Maps API.

Storing locations

To show the user the locations that are available for them to search nearby, we need to store these locations first. For storing these locations, we’ll need a database that we can store imported locations into.we’ll use SQLite as our primary database again.

Importing locations

Finally, we’re going to need a command-line tool to import locations from a data feed. To accomplish this, we’re going to create a console task that can be run from the command line. This task will fetch information from the provided JSON feed and import it into our database. By making this a command-line task, we can automate and schedule the import via scheduled tasks on Windows or a Unix crontab.

About the author

Deven Rathore

Deven Rathore

I'm Deven Rathore, a multidisciplinary & self-taught designer with 3 years of experience. I'm passionate about technology, music, coffee, traveling and everything visually stimulating. Constantly learning and experiencing new things.

  • Björn

    it’s yii1 and not yii2.

Pin It on Pinterest

Shares