Application architecture, Services and Activities...

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Application architecture, Services and Activities...

Postby OzLark » Sat Jul 09, 2011 9:18 am

Hi All,

I'm new here and I'm looking for some guidance on the structural architecture of an Android application I am tinkering with.

I'm an experienced developer with 20 years+ experience in various languages on various platforms and I'm just starting to toy with Android development. The first thing I've noticed that the typical application architecture is somewhat different than I'm used, uses a different nomenclature, and, well is just different that the frameworks I'm used to working with...

I'm not sure which section this really belongs in, so please move this thread if it's misplaced.

Anyway, onto my questions.. I'm building myself an application to provide me with live stock market data (ASX) - I don't want to use any that are available as they don't seem to fit my requirements. Anyway, I'm wanting to know what's the best way to structure the application - with respect to services, activities, intents and filters.

I envisage that It'd be best to use a service for the data collection and storage - this will be updating data for particular stocks every few minutes (or seconds, depending on how it's configured) and storing the data in a SQL database (is that a good approach?). I also want the service to be able to generate alerts when certain events occur. I want to have the application (or full screen widget if possible) display a list of selected stocks, I expect this will be an activity and a set of views. That's the general idea anyway. I'll list the features I'm looking for and where I think they sit:

Server:
  • Collect and maintain a list of available securities (stocks that the user can select to track)
  • Periodically (automatically) collect and maintain the current data for each selected security (current price, volume, etc)
  • Generate alerts when certain conditions are met (stock falls below a price, a new announcement is released, etc)
  • Accept requests from activities for current data (for display to the user)
  • Collect and maintain announcements (typically PDF files) - store these in SQL db? File system? ??

UI (Activity/Activities)
  • Display a list of selected securities with a summary of their current data
  • Allow display of charts for a selected security (from the list in the previous point)
  • Allow selection of securities from the master list of all securities
  • And many more features - but this will do for the basic architecture

So that's the general idea, now am I right in where I've placed the various bits of functionality?
I know that intents, intent filters and URIs are used to pass data between the various process elements, but I'm still not exactly sure on how this is best done. For instance, the master list of available securities is very large (in UI list terms) so I'm not sure how that list would be passed from service to activity/view or even if it should be. What's the typical approach here?

Also, I'm going to need to store my trading account username and password somewhere for the service to use - what's the standard secure method for this? (just encrypt it and slap it in the DB?)

Anyway, I'm looking for any guidance, hints, tips, best practises etc for this type of application.

Cheers,
Lark
OzLark
Junior Developer
Junior Developer
 
Posts: 23
Joined: Sat Jul 09, 2011 7:26 am

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 7 guests