Question

My boss has big dreams.

He wants to write an application that runs on both the desktop and mobile devices. In addition, he wants it to be occasionally connected (can run without an internet connection). The application will rely heavily on data from a database.

Everyone he talks to keeps pushing HTML5/JavaScript on him for a write-once run-everywhere(ish) solution.

I don't have a lot of experience with this sort of environment--getting data from a database using JavaScript, ORMs for JavaScript and that kind of thing. I may be getting ahead of myself.

What are the kinds of things I should be looking at when trying to wade through a strategy to come as close to his goals as I can? Here are the assumptions and questions I have:

Expectations/Assumptions

  1. I expect that I'll have to use one of the "embedded" or local databases that seem to have sprung up with HTML5 and Local Storage.
  2. I expect that I'll also have to find some way to sync this data with data that's sitting out on a server somewhere.
  3. I expect that the synchronization of this data will have to be homebrewed.
  4. I would like to have some sort of ORM to make working with the data easier.
  5. I expect to run into all sorts of weird things related to the size of the local database.
  6. I expect to have to run all of the application's code on the client-side, since they are supposed to be able to run the application without an internet connection.

Question

What am I doing?

I'm kind of at a loss for even knowing where to start.

To turn this into something that has a chance of having right/wrong answers, here are the things that would be helpful to know:

  1. Does the HTML5/JavaScript approach sound like a good way to go (considering the targets of occasionally connected, mobile, and desktop)?
  2. What sort of frameworks and tools should I be looking at to make the development of the application easiest?
  3. Is he asking for too much?

Thanks in advance for any advice/guidance you might have.

By Request: What does the application do? The application is (more-or-less) a quoting/pricing application for a configurable product. There are a bunch of products (base cabinets, wall cabinets, etc.), a bunch of standard configurable options (wood, finish, door style), and a bunch of (less standard) modifications to them (reduce depth, increase height, etc.).

Depending on the standard configurable options you choose, it changes the base price of each product. You can then add modifications to them (which also come at a price).

The majority of the application exists already (albeit as a WPF application without locally stored data). It was designed so that it could be marketed to different manufacturers who make these configurable items (primarily kitchen cabinets and the like). Every manufacturer has their own rules about what woods/finishes/etc they offer and how they determine the base price of products (which also vary) and how you can mix/match the different woods/finishes etc.

Blah, blah, blah, every manufacturer is very unique.

To solve this problem we created a formula based approach where once you've set up their products/options/etc you can write some formulas to define not only the relationship between them but also how to price them.

In our current model, the application runs on the user's PC and the data is on a web server that the application makes calls to. He wants to turn this whole thing into an occasionally connected, mobile application that we can use on desktops as well.

There is quite a lot of data associated with it, since any manufacturer's data will contain images, descriptions, notes, thousands of products/modifications and lots of information about them (width, height, depth, number of doors, etc).

Was it helpful?

Solution

  1. Does the HTML5/JavaScript approach sound like a good way to go (considering the targets of occasionally connected, mobile, and desktop)?
    • Yes. JavaScript is probably the way to go on this, however it won't be easy if you're not already JavaScript savvy. Large applications are a beast in JavaScript, especially on Mobile devices.
    • I know little about client-side database storage, but keeping the server and client databases in synch will almost certainly require AJAX, and XML or JSON transformations.
    • Consider security and size of the data on the client (should the client have access to all the data stored on their machine?).
  2. What sort of frameworks and tools should I be looking at to make the development of the application easiest?
    • I use jQuery for all DOM manipulation, event hooks, and AJAX. Plus I use many other features/plugins for other thinks. I highly recommend taking a look at it.
    • Firebug (<--must have)
  3. Is he asking for too much?
    • The connectionless aspect may be too much. I wouldn't be surprised if it doubled the coding time.
    • You may want to provide some more information on what the application does. If it's a huge UI heavy CMS this project could take years for a single person. However if it's just a little Nerd Dinner-like app, it shouldn't be too bad.

Edit after question update

I would test the client-side database approach with a mobile device first. You may run into unforeseen limitations (data transmission speed, data size) with the environments (Android browser, Mobile Safari). The when and what to update when you have an internet connection to work with, is also a big determining factor in level-of-effort. These questions may get informed by testing the client-side database limitations.

The rest seems fairly straight-forward to me. Good luck. =)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top