Format strings
If you were building an app that had to display user data of various formats (numerical, date, string, etc), apart from the localization settings, how would you provide formatting settngs? Would you offer a number of the most common formats or would you put effort into providing a custom formatting model?
Philo
Philo
January 30th, 2006 4:56pm
On a piece of software I wrote at my old company, we did a custom formatting model.
Jacob
January 30th, 2006 4:57pm
I think the .net formatting strings are pretty good, and nothing leaps to mind so far as improving them.
Finding the format specifications in the online help, OTOH, desperatly needs improving. I usually start with ToString() and muddle my way about until I find them.
example
January 30th, 2006 5:04pm
ROFL! Yeah, I agree on finding them in the help. Gotta go submit a bug on that.
Here's the thing - in two products now I've tripped across situations where the product team offered a handful of formatting options (and of course they didn't meet my needs). I can't figure out why you wouldn't just offer ad-hoc capabilities every time. But then I always overengineer stuff.
Philo
Philo
January 30th, 2006 5:11pm
>> I've tripped across situations where the product team offered a handful of formatting options (and of course they didn't meet my needs). <<
Could be a "just ship it - we'll fix that in the next release" situation.
Or maybe: "No one with any sense would want to format it that way!"
So, if these were .net based products, why wouldn't they just extend/wrapper the built-in functionality?
example
January 30th, 2006 6:15pm
In in-house products they would work, but users at large trip over the stuff like [%artist% - ]$if2(%title%,$filepart(%filename%)) found in Winamp.
Mr. Powers
January 30th, 2006 7:14pm
You can offer preformatted settings - just need to expose the damn formatter for custom strings.
Philo
Philo
January 30th, 2006 7:20pm
Hilarious about the format of the, err, format. I, too, go to ToString and start searching around, eventually getting to it.