The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Smart client vs Don't make me think

I have just released the beta of "Safety Stock Calculator"

It's a "smart client" that targets B2B retailers and manufacturers. It performs three async operations
- download inventory data from an ERP
- upload sales data to Lokad
- download forecasts from Lokad

Each operation gets its own button (screenshots at )

Those three operations "retrieve, upload, download" are just mundane tasks. The user has to do them to "refresh" the report, but that's it.

Question: Would you advise to add a windows service to perform those operations in the background?

Pro: less mundane tasks, report is constantly up-to-date
Cons: more complex behavior, more intrusive app.
Joannes Vermorel - Lokad Forecasting Send private email
Thursday, May 01, 2008
Does it make sense for the user to perform each of those operations separately? If the usual (90%) pattern is for someone to start up the application, then immediately press "Retrieve", "Upload", and "Download", in that order, then they probably shouldn't be separate buttons.

Does the whole process take a significant amount of time - more than a few seconds? If not, you just might replace all three buttons with a "refresh report" button.

If the whole process does take some time, then uploading and retrieving on a schedule would probably make sense for many of your customers - if the report is always up to date when they open the application, they won't need to see how long it takes to update.
Mark Bessey Send private email
Thursday, May 01, 2008
If you've got enough experience writing a Windows Service that the user can install and run under Vista that you can reasonably estimate how long it will take you, then you should consider a Windows Service.  Otherwise, you'd probably be better served by using a standalone program with the async operations run via a BackgroundWorker, possibly that you can minimize to the system tray.  There's a lot less to learn.
Robert Rossney Send private email
Thursday, May 01, 2008
How does a service add any value near its cost?

Can't you just use a timer to trigger those background actions?
Thursday, May 01, 2008
A service will run without a user having to be logged into the machine. Some machines run a screen saver that logs out the current user. A service will continue to run logged in user or not. This program sounds like a service to me.
Thursday, May 01, 2008
Thanks for the feedback.
Joannes Vermorel - Lokad Forecasting Send private email
Friday, May 02, 2008
if it were me, i'd be tempted to either have the actions performed when the start/exit the app (or at least give them an option to do so) and give them an exe to it automatically. they can put that exe in the task scheduler if they want to automate it. writing a service app is not particularly hard (i have an example of how to write a service in powerbasic on my web site actually), but i'm not sure it fits the bill here. it doesn't sound like it matters whether or not the download/upload/whatever are run when the user isn't logged in. that ability is the primary thing a service will buy you.

so, give them an .exe that does the job.
have it configurable from your main app (give options run when the computer starts, when the software starts, when the software exits .. whatever makes sense to you).

best regards,
Don Dickinson Send private email
Friday, May 02, 2008
Joannes, if I get you right, there are 2 independent questions you ask.

Q1: There is a common operation which always requires user to click 3 buttons in the right order; should it be replaced with a single button click?

Q2: There is a "report refresh" function which takes some time to complete; should this operation be performed in the background; also, should it use "pull" mode to get updated data ready for user the moment he/she needs it.
    Q2a: if performed in the background, should it be deployed as a windows service (as, opposed to new thread, new process, or whatever)

Anyway, I don't see anything in the questions that requires a separate windows service, but as you put it this way, that means that 3-click operation doesn't have much interaction with the user ;) so the answer to Q1 is "most likely yes".
Friday, May 02, 2008
Gratuitous application components as services: the next greenfield for virus attacks.
Saturday, May 03, 2008
Thanks again for the feedback, still waiting for the full auto-refresh setup, I reduced the 3 buttons to one.

See the blog post:
Joannes Vermorel - Lokad Forecasting Send private email
Sunday, May 04, 2008
Please align that progress bar. It makes my eyes hurt to see stuff like that
get to the point
Tuesday, May 06, 2008
You could also make it just "Refresh"
get to the point
Tuesday, May 06, 2008
>  Please align that progress bar.

Well, in fact there can be a message displayed below the progress bar. That explain the weird alignment, I will try to fix that. Thanks for the feedback.
Joannes Vermorel - Lokad Forecasting Send private email
Wednesday, May 07, 2008

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz