2 Replies - 4538 Views - Last Post: 11 July 2012 - 04:09 AM

#1 RedRabbit  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 71
  • Joined: 09-May 10

Planning a phongap Mobile app

Posted 07 July 2012 - 03:28 AM

I want to create my first mobile app and since I know web programming I thought let me try doing it with phonegap and jquery mobile. Instead of wasting time learning I started right away and now I have a working interface. I struggled getting the app working with a local sql lite database and this has hindered my progress some 3 weeks or so cause I decided to do other stuff.

I started doing some reading last night on local storage and web sql, and it was only then that I understood these two were totally different technologies. The documentation I found is not the best and it seems like the technologies will not be supported for long.

The app Im creating is a simple directory that lists shops, restaurants, government buildings etc. After reading the stuff about local storage and web sql I realized if I was making the app this way I wont be able to insert new listings without having to release a new version of the app.

If I create a database that is hosted on a server somewhere I can get the app to query the online database and return the results. Whats nice about this is I can update the db on a daily basis introducing new listings as I get them and the app will work on most of the phones. But obviously this introduces new risks.

My question is to anyone that has been down this path before me, obviously I dove in head first without much planning and Iam struggling now. What approach did you take? How did it work out? and would you do it another way if you had to start over?

I want to release this app and I must admit I feel a bit biased against sqllite because Im having a hard time bending my head around it. The app is already half done so I need to make a push to release it.

Any help advice is much appreciated. Apologies for the long post!

Is This A Good Question/Topic? 0
  • +

Replies To: Planning a phongap Mobile app

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5537
  • View blog
  • Posts: 11,868
  • Joined: 02-June 10

Re: Planning a phongap Mobile app

Posted 07 July 2012 - 08:11 AM

I think this question applies to all programming, not just mobile.

In short you're saying "I started banging on the keyboard without any plan or understanding of what I was doing. Would you recommend programming that way?" In a word: 'no'.

In many places we advice rookies to learn first and try to build much later.

Header from my 'Resources' post:

Quote

Stop trying to architect a program while you are still learning the basics of C#. It just never works. Its like saying you are going to learn home architecting WHILE you hammer boards together without a blueprint, and try to learn both new skills at the same time.

First learn the language. Do a couple hundred tutorial projects where you build what you're told to build, the way you are told to build it WITH AN EXPLANATION OF WHY so you can learn.

Then later you can start architecting your own simple stuff. Build a calculator. Build a DVD library program. Etc. Stuff that doesn't involve the complexity of a game.

Then move up to games.



There are three routes people seem to take when learning programming.
  • Just start trying to create programs
  • Start taking apart other programs and try to figure out the language by reverse engineering
  • Follow a guided learning course (school or self-teaching books)


For the life of me I can't figure out why people try 1 & 2. I strongly suggest taking the guided learning approach. Those book authors go in a certain order for a reason: They know what they're doing and they know the best order to learn the materials.

Quote

Where do I start?


You start by learning a coding language FIRST.
Learn to plan before you type.
THEN you start designing software with a purpose.


If this sounds like you

Newbie/Rookie said:

I have a little programming experience but I need to write ...
read this section
Spoiler


I've written articles about planning first:
90% or more of the problems we see here are because rookies don't stop and plan nor block out their code into logical segments.
This article should help you see a way to block out your code by stubbing out the methods and logic, then filling in each method as you research it:
This is the 'Help me with my homework' article you wanted.


We tell people to plan first all the time

Quote

Personal opinion
This project suffers from the same flaw as most student projects: A lack of planning before typing.

It looks very much like you read the instructions, starred at the ceiling for 10 second to plan, the started banging away at the keyboard. This is the worst habit you can ever get in to. STOP IT NOW.

I don't care if it is a cocktail napkin or a whiteboard... the simplest project or the most complex... But spend a lot of time planning it before you ever start typing. You have to see the different needs and write individual methods for each one. Input, calculation and display of results are three different purposes so they get three different methods. Main() should just be the traffic cop of the methods.


Every tutorial I write I stress how important it is to plan before building.
Spoiler


I bet I say this 20 times a week:

Quote

How can you build if you have no blueprint? You don't go to archeture school then say to yourself in the first week 'I'm going to build a house to learn how to make blueprints' and start cutting wood and hammering together boards without a plan because you are still learning how to make the plan.



Quote

The app is already half done so I need to make a push to release it.

Why? Why must you release it? If you are already so doubtful about this app that you are posting this thread then you know releasing it is a bad idea. You're saying you can't wrap your head around the underlying sqllite but you still want to push to put it in the world? Are you a masochist? Are you looking to ruin your reputation as a developer before you even get started? Do you want to be so busy responding to lots of complaint emails that you don't have time to write a second program?

This is your first app, you said it yourself. There is no way it is releasable. You need to go build 100 more before even considering it. Take this app and build a v2 and learn from that. Then build a v3 and learn from that. Go on-line and find a few open-source projects to take part in so you can learn from more experienced people. Find some fully finished applications that supply all the code (CodeProject.com is good for that), and tear them apart: Dissect them and learn from them.
Was This Post Helpful? 0
  • +
  • -

#3 RedRabbit  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 71
  • Joined: 09-May 10

Re: Planning a phongap Mobile app

Posted 11 July 2012 - 04:09 AM

I've actually been learning for quite a while (since december last year) doing what you said, create small apps and test them out, its just I never got into too much detail with the storage api. I played around with almost all of Phonegaps apis but not the local storage.

I know Im ready to release this app, it's just the poor planning for storing and retrieving info that caused all the confusion. I have it figured out now, Im building a site for the app where the information will be stored and the app will just get info from that db.

Thanks for the tips. My problem is not with poor planning its over planning that is why I want to release this, I spend too much time planning it never sees the light of day. I have to make this! Ive been going over and over this for a while on how to implement it, I want to just do it now.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1