![]() |
![]() |
![]() |
patterns for file import? is the Abstract Factory design pattern the best pattern for importing different types of files?
Patrick
Patterns are a waste of time. Just write the damn import code and be done with it.
Right, don't bother with trying to come up with a good/maintainable design, just write the goddam spaghetti code and be done with it. Let the next developer with the crap code you write.
Patterns?! We don't need no stinkin' patterns
Let the next developer deal with the crap code you write.
Patterns?! We don't need no stinkin' patterns
BS. The OP is reading to far into the problem as most people do. Encapsulate the functionality in a class according the file type and your done. Maybe make a base class to handle file i/o but it doesn't require anything fancy. Don't give me this"if you don't use patterns you're writing spagetti code" BS.
Also, if you use patterns, you are obfuscating the problem even further.
Also, I'll be the one getting the work done while you're still mulling over what pattern to use. I'll be getting the raises and the promotions... Pretty soon I'll be your manager and guess what... You'll be out of a job.
>> just write the goddam spaghetti code and be done with it. Let the next developer with the crap code you write.
Tom Smykowski
And also, I'll be the one laughing, with my red stapler in hand, as your "old" place of employment burns to the ground...hehehe...
anon-y-mous cow-ard
> Also, if you use patterns, you are obfuscating the problem even further.
Tony Chang
how can you *not* use a pattern? even 'giant pile of spaghetti' is a pattern, just not always the most appropriate one.
mb
A pattern is just a known good solution to a particular problem. If you feel comfortable reinventing the wheel, feel free. Meanwhile I'll use the patterns so I can get done faster, have better confidence in my solution, and go home to the wife and kid. :-)
Chris Tavares
"what else is there?"
Hank
If the file is XML or a non-trivial grammar, you need libraries to parse the file. Otherwise, it's easy enough to write the code from scratch.
Julian
Patterns are for making complexity manageable. Start writing the code and REFACTOR to patterns as the need arrises. The really interesting thing about patterns, is not that they are known solutions to problems: They are what good code of tends to converge to over time when complexity increases.
Daren Thomas
To the OP:
Herr Herr
Daren - yeah, that's how I tend to work unless it is something whch drops straight into a pattern I already know well fits the problem. In this case I might well switch/case it and then refactor to factory/state machine.
I did an image library once. I think many many people have.
i like i
thanks Chris and a few others. Any others have any meaningful advice regarding a pattern to use for file import?
Patrick
use an Anti-Pattern
Yo
I've never found a useful pattern for importing. Honestly, the goal of a pattern is to reuse analysis, like a component's goal is to reuse development. Each import processor seems to be unique enough that there hasn't been anything standard behind it, sometimes not even the parser. Or maybe no one has written the "compiler" pattern.
Peter
Always keep patterns and anti-patterns separated with a magnetic field.
Giordi
But quadraphasic emissions from patterns and anti-patterns are considered dangerous and will overload the warp core.
"Trip" Tucker
|