D
D
darked2011-11-09 11:16:21
Delphi
darked, 2011-11-09 11:16:21

Application design in delphi?

Good day to all!
Sobsna question - how to correctly design an application, taking into account the capabilities of the Delphi environment?
For example:
The task is to enter a list of programs with their description into the database, a tree structure with sections is possible.
Reflections - let's say we work with the firebird database, for this delphi has excellent components + on the "Data controls" tab we have components for displaying information directly from datasets.
The question is where to describe the logic of the program? Directly in the form to write all the logic, it seems, as it were, not according to Feng Shui, which says that it is necessary to separate the presentation and logic. Putting everything into a separate unit, then it becomes not very convenient to work with the database if you describe all the dataset settings manually. You can, of course, do it on the Data Module, but it seems to me that there is a more elegant way ... or not?
Share your thoughts who builds applications? What patterns or techniques does it use.

Answer the question

In order to leave comments, you need to log in

8 answer(s)
Y
YourChief, 2011-11-09
@YourChief

when the classes used by the logic of the program are sewn through its face, the normal OOP style is already lost. this is partly why delphi and c++ builder are not used for large and serious projects. you can either develop an application quickly by doing everything right in the form, or create instances of these controls in a separate module (yes, this is also possible). the second, of course, would be more correct, but I would not bother too much.

K
korvindest, 2011-11-09
@korvindest

The very minimum that should be this:
1. The layer of work with the base representing the data of tables as objects. (Read/Write/Change/Delete)
2. Business logic layer working with these objects.
3. A layer of form handlers that pulls the business logic.
4. Mold.
In addition, business logic can still be pulled by various schedulers that perform operations on a schedule.
But by implementing all this in Delphi, you doom yourself to the absence of nice frameworks and you will have to reinvent many things yourself.
The advantages of easy work with the base and fast riveting of molds have long been available not only for Delphi, but also for many others (for example, Java and C #).
So I recommend considering the option of switching to more popular and supported languages.

M
Max_D, 2011-11-10
@Max_D

I don’t know how good FireBird is in this regard, but sometimes it’s a good approach to shift business logic into SQL server handlers and executable procedures. Then all the logic sits on the server, and applications simply work with the database through query tables. This is useful if you plan to use alternative clients (mobile, PHP web, etc.).

P
Pyatochkin, 2011-11-11
@Pyatochkin

as I see it, there was no real discussion of architectural issues... which is a pity... okay, once again I would like to remind the author of the question that Delphi has a lot of opportunities for writing concise and maintainable code with a normal architecture. on software architecture (usually this is what is meant by “designing an application”) in all languages, the ideas are almost the same;) - here reading literature on software development saves (patterns are not everything ...), then we try to apply what we read, repeat the previous ones 2 action before reaching enlightenment :)

P
Pyatochkin, 2011-11-14
@Pyatochkin

did something that I could not decide for a long time;) - I sketched an example for an article about MVC in delphi. in principle, the idea with frames should be clear ... the topic about the hierarchy of forms has not been disclosed, but if there is interest, we can continue.

L
luis, 2014-06-04
@luis

Solve problems with tools designed for this purpose.
FB has great triggers and stored procedures, Delphi has the speed of GUI design and the capabilities of long-proven frameworks for various applications. For your case - classical tree structures are in no way connected with the programming language and database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question