Skip to main content

Lessons learned making an app.

When I started creating an app as anybody starting I had to decide on a framework. I discovered Apache Cordova (or also named PhoneGap) which is a platform that just embeds a web-browser and you create your application as an 'single-page' html website.


Interaction with native phone features is then done via an special java-script-based extensions. For the app I intended on developing this matched good with my goals; It was actually so easy just after single-day of playing around with the framework I already had a prototype ready. Just like that I had my app working on my telephone - awesome!

And of course every great phone application also needs it's own website. I made a django based project. It makes making custom websites very trivial. With a few days time I had my first database definitions with django's orm. I made some views and started to focus on the workflow of the website.

Most of  what I started out with was a free administrative template. To decently integrate it you need to take out the folders and place it how it makes sense on your django side. Making a page in django is as simple as defining a view and defining the urls.


def docs_terms_of_cookies(request):
    assert isinstance(request, HttpRequest)
    return render(
        request,
        'app/terms-of-cookies.html',
        {
            'title':'Terms of Service',
            'year':datetime.now().year,
        }
    )

urlpatterns += i18n_patterns(
    url(r'^terms/$', app.views.docs_terms_of_service, name='terms of service'),
    url(r'^terms/cookies$', app.views.docs_terms_of_cookies, name='terms of cookies'),
    url(r'^terms/payment$', app.views.docs_terms_of_payment, name='terms of payment'),
    url(r'^terms/privacy$', app.views.docs_terms_of_privacy, name='terms of privacy'),
)

After that for a long time I had to iterate and iterate until it received the workflow that I liked. I had to go through many review cycles with my friends. While in django you do get certain built-in's like logins; everything else you need to make yourself. I decided to use a mix of web 2.0 and web 1.0 style nagivation (KISS - Keep It Simple System).

Then I had to learn about front-end. Bootstrap is the defacto standard for frameworks these days so let's just use that. Actually to make websites responsive the grid-model bootstrap has is really nice. You can just say col-lg-2, col-md-4 and depending on the screen resolution one of the styles are in effect. Once I figured that out; it was a breeze to make my own responsive website.

I learned that you can use bower to download most of the javascript based dependecies; bower install jquery and voilla jquery is there. And with grunt I made a file that copied the files from bower into django's static folders.  Now I only have to run 'grunt'.

9/10 would recommend to give this book a read if you are more interested in developing apps.  The Apache Cordova Cookbook

Comments

Popular posts from this blog

The 8 Best U.S. Cities to Visit for a Quick Vacation

The best thing about visiting a new city is experiencing the thrill of adventure. From delicious food to rich history, there’s always something new to do. Whether you live close to these cities or you’re planning on making a trip to the USA, here's 8 of the best U.S. cities to visit on your next vacation (in no particular order): 1. Portland, Oregon As Oregon’s largest city, Portland has steadily been on the rise as a hotspot for food and beer connoisseurs. It’s nestled between the Columbia and Willamette Rivers with a stunning view of snowy Mount Hood which only adds to the thriving artistic culture. Portland is also home to beautiful parks, bridges and bike paths, making this city a top choice for outdoor adventurists. If you’re looking for more breathtaking escapades, Portland is nearby to a few national forests including Mount Hood National Forest and Gifford Pinchot National Forest. 2. Nashville, Tennessee Nashville rightfully owns

Getting started with Electron Pt 1.

Electron is a fun and easy way to create desktop application from an mostly web based code. Of course websites aren't the most performance way to create an user-interface ( in terms of technical aspects such as memory, cpu consumption) but it's an extremely powerful experience rich way of doing that.

Roadtrip germany

On our way to a road-trip headed to Germany, Frankfurt amz Main. We had the chance to stop by for one of my favorite foods as a child: Curry-wurst with fries. This brings back so much memories where we'd often go spent the Christmas weeks in Germany, going over the Christmas markets/fairs and enjoying the hot curry-wurst from the stands with snaps or gluhwein. Of course during a road-trip one cannot stop to have a little lunch too, yummie pie and sandwhich