V
V
Viktor Vsk2014-12-16 19:25:36
Design patterns
Viktor Vsk, 2014-12-16 19:25:36

Should the code be stored in the database or an analogue of the Strategy pattern?

What to do if there are certain algorithms (download, process, notify, for example) - like examples, parsing, downloading files via http / ftp, via a direct link, via a password in the parameters, with authorization, etc. - and in them all the steps are the same, except for one (different markup of the file during parsing or a different sequence of actions for downloading files). And there can be a lot of entities (sites, download sources) and they are constantly being added.
How often is design applied at all when pieces of code are stored somewhere separately? And is it a huge crutch? Of the examples, I only remember a story from some book about rails, where the validation code was stored in the database on some large e-commerce portal.
And what is the best solution in such situations - writing your own DSL?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question