Sunday, August 23, 2015

Getting Started with Angular Web Apps the Easy Way

You're in a rush to build a single-page web app.

So, you picked Angular. Excellent choice! It's just that getting started with Angular can be a bit of a daunting task.

Most people point out that the learning curve is quite steep for you to get to a point where you can do something useful with Angular.

I'll point out a better way for you to get started, especially if you aren't here simply to learn but rather because you need to build your web app.

The concept is to pick up just a basic understanding of the parts that make up Angular and how they come together, and follow it up with a Bootstrap+Angular template that can do most of the work for you.

Most of your road blocks and time sinks will go away if you:

1) have a very basic understanding of Angular, and
2) couple it with a Bootstrap+Angular template that can provide these necessary items:

a) good level of design (allows you to skip the CSS work)
b) typical UI components, beyond what html provides (and even page layouts: landing page, log-in page, etc.)
c) usage of Grunt for automation, optimization, and various other tasks

So start with a full-working web app demoing every piece of the template, then you can just copy-and-paste to build what you need instead of trying to build things from scratch.

This is the approach I've taken in the past with great results, which is why I'm recommending it to you now.

Check out the template I worked with in the past. Here's why it works really well:

- it uses Bootstrap and Angular
- it provides all the typical UI components (both from Bootstrap and things they built themselves)
- it has a great level of design so that your web app doesn't look embarrassing
- it comes with a Grunt config that includes live reload for development and packaging and optimizations for deployment: css and javascript file concatenation, minification, less compilation, etc. This is all stuff that would take a lot of time to set up and configure properly, so huge time saver!

Lastly, if you're looking for a great place to host your web app at a great price, Webfaction has you covered: awesome servers, great price, and attentive customer service.

PS: Need a web app built? Hire me. I provide web development consulting services with a focus on data analytics and visualization. You can read more about and contact me on LinkedIn: https://linkedin.com/in/heliodor. If you want to email me instead, "heliodorj" is my username at Gmail.

Tuesday, September 13, 2011

Google App Engine: Easy Bulk Download and Upload Tutorial

After wasting much time figuring out how to do a bulk download from appspot.com and upload to locahost, here's what I figured out so you don't have to waste as much time as I did on something that should be made trivial.

Google's doc is here: http://code.google.com/appengine/docs/python/tools/uploadingdata.html. The doc is straightforward except for the part on what command line options to pass to appcfg.py to make it download and upload data to appspot or localhost.

Step 1: Configure the app.yaml file

builtins:
- remote_api: on

Step 2: Create the bulk loader yaml file

appcfg.py create_bulkloader_config --filename=bulkloader.yaml 

Open the file and search for "TODO". Add the word csv to tell it to use csv format. Each connector line should read like this:
connector: csv
Of course, you can use another data format if csv doesn't cut it for you.

If you use ListProperty models, you'll need to add a transformation to the bulkloader.yaml file. At the top, add something like


- import: my_app.db.list_property_transform

then add this line to every ListProperty you have


    - property: some_list
      external_name: some_list
      # Type: String Stats: 95 properties of this type in this kind.
      import_transform: list_property_transform.ListPropertyTransform

Also, create the file that would match the my_app.db.list_property_transform import. It's contents look like this:

For the local dev environment:
def ListPropertyTransform(x):
return len(x) > 0 and eval(x) or None


For the prod environment:
def ListPropertyTransform(x):
return len(x) > 0 and eval(x) or []

Read more about this transform for lists here: http://www.pressthered.com/importing_a_list_with_bulkloader.

Now let's transfer some data!

Step 3: Download data from appspot.com

First, use the "Make symlinks..." menu in the Goole App Engine application to create the necessary script shortcuts if you don't have them set up.

Here I have a User database entity.

I ran the following command at the command line to download my production data:

appcfg.py download_data --config_file=bulk_loader_remote.yaml --url=http://your_app_id.appspot.com/_ah/remote_api --filename=dump_User.csv --kind=User

Now, I upload it to localhost:

appcfg.py upload_data --config_file=bulk_loader_local.yaml --kind=User --filename=dump_User.csv --url=http://localhost:8080/_ah/remote_api --num_thread=1

It will ask you for your email, but just leave it blank and it will happily continue.

That's it for a basic use case. We'll see if things get dicier as I continue with my project.

By the way, if you like fantasy football, check out my project that's causing me all these Google App Engine-related headaches. It helps you figure out your line-up each week: http://www.footballverdict.com.

Done!

Sunday, April 3, 2011

Fifteen Seconds of Internet Fame Thanks to Google

Usually I write about things that help you, my dear readers. This time around, you'll have to excuse me as I'd like to point out my fifteen seconds of Internet nerd fame. A few days ago I got a mention on Google's Android blog.

For about two weeks in March, Google hosted a contest to give out free Google I/O tickets to developers. Each day, they had a competition based on a specific Google technology. I entered the Android competition, given how it's my area of expertise. I don't usually enter contests because the odds are pretty slim. However, I looked over the way Google structured the contest and figured the odds are pretty good given my strong experience in the domain. I passed the qualifier round by answering a handful of questions and I received an email with the details for the main round: build an app similar to this count-down clock. To avoid people copying Google's web code, the app had to be a native app.

I didn't have the foresight to take a day off work to focus on this contest, so I got home at 9pm and got cracking on it. I kept going until 6am, when I submitted my entry and called it a night, even though the entry wasn't due for another six hours. I slept three hours and went to work.

Well, it looks like that sleepless night paid off because I finished in the top three of the ten winners and got mentioned on Google's Android blog. My biggest nerd dream has come true: I'm going to Google I/O!

If you're reading this and you're going to be at Google I/O, reach out. I'd love to meet you!

Saturday, December 25, 2010

Bokeh Circles Live Wallpaper

Bokeh Circles Live Wallpaper is a live wallpaper for Android that features translucent morphing colored circles as the home screen background. This full version is fully configurable for all tastes from psychedelic to subtle! See the screenshots for some examples. More circles will appear where you swipe your finger across the screen.

Click here or scan this bar code with your phone to download the app in the Market:



Here are some screenshots:














Wednesday, June 9, 2010

Scott Heiferman Destroys an iPad with a Sledgehammer at NY Tech Meetup

Scott Heiferman, founder of meetup.com, destroyed a shiny new iPad with a sledgehammer to promote the new meetup anywhere concept. Seeing how Huffington Post is using it to turn journalism from passive to active, this could be as revolutionary as Apple's 1984 commercial (which played in the background) and as revolutionary as the destruction of this iPad!


Monday, May 10, 2010

QR Code Generator for Business Cards (and more)

I was designing the business cards recently at work. I couldn't find a single QR code generator website that allows you to create a code with your contact info that can accommodate more than one email, or more than one phone number. So I created one. Give it a spin! Business cards with QR bar codes are neat. Make your own! Here's how the website looks:

Wednesday, April 28, 2010

LIRR Android App

I have released an app for Android that allows you to quickly access the Long Island Rail Road schedules. You can drill down by branch or alphabetically, or you can pick a station from the map. It also lets you pick the last viewed station, with the direction of travel and day of week.

NOTICE: I AM NOT AFFILIATED WITH THE MTA (METROPOLITAN TRANSPORTATION AUTHORITY), WHICH OPERATES THE LONG ISLAND RAIL ROAD.

Click here or scan this bar code with your phone to see the app in the Market:



Here are two screenshots: