Technical Breakdown of the Airport Geo-Location Service

wadusay

Rising Star
BGOL Investor
Technical Breakdown of the Airport Geo-Location Service

airporthub.jpg


Okay, let’s wrap up this Airport Geo-Location Service model that I been talking about for the past couple of days. The important part of this discussion is basically how to show you guys to lay down a reusable platform to build hundreds of hustles from. I’m trying to show you cats how building out this technology stuff is straightforward and a lot easier than some of the BS jobs yall working for way less income.

There is more stuff I’m going to talk about in terms of technology but the geo-location one is straight forward because it takes advantage of an HTML5 feature to determine a person latitude/longitude coordinates. This is also the same platform I intend to use for the invisible pop-up store for the hood model and showing you guys it can be done. So without further blather, let’s just get into it.

Oh, by the way, did you see what Apple released as part of their iOS 6 release? That Passbook feature?

passbook.jpg


Your boarding passes, movie tickets, retail coupons, loyalty cards, and more are now all in one place. With Passbook, you can scan your iPhone or iPod touch to check in for a flight, get into a movie, and redeem a coupon. You can also see when your coupons expire, where your concert seats are, and the balance left on that all-important coffee bar card. Wake your iPhone or iPod touch, and passes appear on your Lock screen at the appropriate time and place — like when you reach the airport or walk into the store to redeem your gift card or coupon. And if your gate changes after you’ve checked in for your flight, Passbook will even alert you to make sure you’re not relaxing in the wrong terminal.

So isn’t that interesting that Apple is releasing several months away a geo-location barcode scanning application but I’m giving you the source code and technique to do this ish right now over the summer. No, I didn’t know anything about Passbook when I first talked about this but that should tell you that not only I’m ahead in the game, but you are now ahead of the game to release geo-location based hustles and you got the early lead to do something.

The Way We Build These Applications Out

The way I build these types of web applications out is in a tiered fashion. I first build out the database, then build out the middle class library then build out the web site. Now, you going to have tech nerds try to come to this blog acting like they got some kind of technology leg up, but tell those cats to go back to their day job. As far as you are concern, just to what works in technology because the real work will be doing the marketing and business part of these types of hustles – don’t forget that.

Database

db_erd.jpg


The database layer is pretty much your objects and what you want to do is basically write down everything that is probably a noun in the hustle. For example, this GeoAirport culture when I write down the requirements such as check airport locations, I need to write down airport locations as the noun and that’s a table in the database diagram called Locations – that’s how you create these database tables.

Locations – this is the reusable geo-location database table that I created a while ago in the first example. See, this is the table that I list all of the airports and their latitude/longitude coordinates. So if you are planning on other hustles like create a real-time food truck tracking application, you list them all in this table. In addition, when I do the invisible pop-up store in the hood, the locations will be in this table.

Culture – this is a reference lookup of all of the languages of the world to do multi-lingual translations. When we brothas and sistas have to do our ish worldwide on the global economic level, we need the language for cats around the world. The thing is we may need to record what language are people using to access your web and from what airport. So you may see something like cats at Narita (Tokyo) using Japanese, Korean, English, Chinese and so on. Now with that knowledge, you focus on making sure you target those most popular languages for that airport.

Vendors – this is a simple list of the airport vendors and other entities like hotels and clubs and whatever who will pay for ads. You want all offers to be traced back to a vendor so they can manage their ads and you can know who is putting up ads and what airport they targeting with their ads. I’m hoping you are smart enough to realize this is reusable to transform into a Black-oriented club/nightspot finder service for Black tourists and other type of geo-location based services. I will reuse this table for the hood merchants who will display offers or items for sale in the invisible pop-up store project.

Offers – this is the offer that the customer will see and take advantage of. One thing you should notice in the table is all of the “id” columns and these are id references to the other tables. This is how you setup references between tables with an id number. You write SQL statements to join the data using the ids. That’s why the tables all have id fields at the very beginning. Also notice the “display code” field – this is the code that the vendor/merchant use for their own cash registers/point of sale system and we create a barcode for them to scan off the mobile device to process the transaction.

Offer Type – this is a category list for the offer in question. It could be an entertainment offer, a lodging offer, a departure or arrival offer for cats at the airport and so on. Again, this is reusable to Mexican food trucks, Korean food trucks, Southern cuisine food trucks and so on.

Media – this is a look up for all of the media files like pictures, videos, barcode and QR code images and so on. However, for this example we are only using one image which is in Offers table. But if I need (and I do need to) upgrade this code to use the barcode images, I will need to create a new table called OfferMedia that has the offer id and the media id in a list to host multiple images and image types.

Now in addition I created stored procedures that should make it easier to run commands against the database.

Geolocation_get_distance – this get the distance between two latitude/longitude points. For example, if I have a fix location in the database and grab the mobile device existing location then I can get back the distance and this is basically a GSP device. I return both miles and kilometers for the distance.

Geolocation_get_nearest – this get the nearest location such as the nearest airport and I have 1000 meters as the default in this code. Basically this code returns the nearest airport if they are in 1000 meters in it. If not, nothing is returned. This is how I can make it specific only for airport locations and specific only for travelers. The same for making offers specific only for the hood locations in the other application we working on.

Geolocation_get_nearest_distance – this is the same code as the get nearest but you can specify the distance so this allow you to get really long distance calculations. Keep in mind that this return more than one item to return a list of the nearest locations. This is the same code can you can use to return the nearest chain store or nearest Pzi Jean store if you are a webmaster and do work for other clients.

Geolocation_refresh_geography – this is no longer needed but it converts the latitude/longitude into a geometry field.

Location_insert – this is allow you to insert the locations by passing in the name, description and longitude and latitude

Media_insert – this is where you enter the filename of the media file and the type such as video or image or whatever. Make sure the media files are all on one folder on the web site to access.

Offers_get_detail – this get the specific offer data for you to display.

Offers_get_location – this is the code that returns offers based on your location. So when we get your location and detect it is an airport, this returns all of the offers for that specific location.

Offers_insert – this allow you to insert your offers. Keep in mind that the reason this isn’t on the web page because I’m expecting the owner to do this manual for their paid clients and prevent this from being hacked over the web.

Vendors_insert – this is where vendors can sign up but again, I didn’t put this on the web. We don’t want anybody just entering in data claiming they have a business. There has to be another way to enter that data because we are dealing with a specific client base of airport/travel/entertainment affiliate cats who want to target airport travelers.

As you see, the overwhelming majority of this whole thing is in the database. This is why I keep saying over and over again – once you master the database, you run this tech ish. You think the other stuff is going to be hard? No, all the other stuff is going to do is call this database and present the data. Again, remember that we can reuse the database structure over and over again for new geolocation hustles.

I want yall to remember one thing – this hustle is worldwide. I don’t give a f*ck if you start up an igloo finder server in Alaska, you can do a whole bunch of worldwide based hustle just from this database code.

But wait a minute – you cannot do anything without the data, right? So guess what, I got the data for the airports and the culture. I got the list of the top 30 most busiest airports in the world and created the SQL for you to run. Then I also did the same thing for the language list. So if you got the SQL Server management studio setup, just run these 3 scripts I’m going to link below.

******THESE ARE THE LINKS TO BUILD THE DATABASE AND INSERT THE DATA*********************
GeoAirport Database Script
Airport Data Script
Culture Language Data Script

Class Library

A class library is basically the code that process data and perform tasks, plain and simple. What we do is create the object that is basically the same make-up as the database tables and we run the same execution functions or methods that is the same as the stored procedure above. Remember, I told you the majority of the code is in the database, everything else that process the data and present the data.

So in ASP.NET there is a folder called App_Code and this is where I store two C# files where one is the reusable Geolocation class and the other is the Offer class. They basically call the store procedures and bring the same data in the stored procedures and that’s it.

Web Pages

The web pages are straight forward and it is just three web pages:

Start – this is the page that determines the language of the mobile user and if it detects the language and we have the translation file (resource file), we present the web site in that language.

Offers – this is the page that detects what airport they are near, return the list of offers and display the offers. If you read the database part, you would know all we doing is calling the database store procedures and basically laying out the data in an HTML file.

Offer – this is the offer in detail, this is where we pass the id in the URL and get the offer from the database and display it. Now, I’m going to hear cats talk about SQL injection and if their dumbass say that, remind them that I’m using a stored procedure and that will shut them up real quick. Notice that this is the page with the barcode and this is the page that the customer display to the merchant/vendor to redeem the offer.

THIS IS THE ZIP FILE WITH BOTH WEB AND DATABASE SCRIPTS WITH INSTRUCTIONS!!!
GeoAirport Zipped File

Multi-Lingual

Doing multi-lingual services is not as bad as you think it is. Let me give you a hint – keep it simple and vanilla. For example, stick to two or three words like “seafood restaurant” or “buy gifts here” and that makes it easy to translate in multiple languages. Now here is the secret to translation and how to hack these systems – don’t tell nobody I told you this sh*t either.

The translation services allow you to upload a document right? So what you do is create a document that has every one that need to be translated for one line. Let me give you a hint on how it should be done:

#1# Welcome
#2# Entertainment
#3# Retrieve Offers

Now you create a list like this of everything in your web site, then you upload the document at the web site and when it transform to Chinese (simplified), it looks like this.

#1#欢迎
#2#娱乐
#3#检索信息

Now here is another secret – if you used “1,Welcome” with a comma, that would have been a way to import the translated fields to a new database table for Chinese and that would have been really quick. That’s how you quickly translate your site and a lot of cats don’t know how to hack it like that and do it the hard way.

Hosting the Site

I’m hosting on GoDaddy and just keeping it simple and not having preferential treatment. GoDaddy is straightforward and does the job necessary, that’s all. My goal is to get you up and running on $5USD/month hosting accounts to try your new business model and see if it works. I’m not telling you to go spend thousands a month like other cats and try to impress some Venture Capital or whatever. By the way, let me shout out all the Venture Capital cats who now looking at Ed Dunn and Dream and Hustle because we covering this geolocation mobile airport SoLoMo stuff – I hope yall VCs realize I’m a brotha so don’t say you wasn’t warned.

So go to GoDaddy, buy the cheapest Windows hosting plan they got that comes with SQL Server. When you do, the first thing you need to setup is the database on SQL Server with the scripts above. Then the second thing you want to do is FTP the web site code. I will have the code zipped up and all you have to do is unzip it and try to transfer it to your web site.

You will need to change the database connection string which is your user/password servername that you got from GoDaddy. Once you do that, then I guess you will need to change the look and feel of the web site and customize it and test it and play with it. I suggest you get the free Visual Web Developer program that is on the Microsoft.com/expression web site to mess with the code if you want but remember, the business and marketing is the real work, not the technology stuff.

Moving On

So I wrote enough articles on this topic. At some point, I’m going to have to develop open source courseware on this next generation stuff but I’m still researching that angle and won’t happen in 2012. What I really want cats to take away from all of this is that fact that technology is overrated and not as hard as you want to believe.

In fact, the technology part is easy – the hard part is getting the word out and getting sales. The other hard part is you guys are sitting on your butts when cats are probably already contacting these airport vendors and trying to set something up while you sit there trying to play games with me. When an opportunity arises, you got to jump on it quick or it will disappear fast or someone else will take over the game.

Ok, I gave you all I think you need for now so have at it and good luck.


http://dreamandhustle.com/2012/06/technical-breakdown-of-the-airport-geo-location-service/
 
Seems like something from this brutha who is keen on technology and spoke on this if I do recall dreamandhustle.com blog

Keep up the good work
 
Back
Top