DELPHI MVC (ECB)

Asked

Viewed 849 times

3

I would like to know if anyone knows how to implement Pattern MVC (ECB) in Delphi. Usage Delphixe5 And I would like to make it as scalable as possible, and I know that one of the solutions is to make it an MVC application. Any suggestions? Source ? Example?

Thank you!

  • Scalable in what sense? MVC is just the rule division into layers of visualization, business and persistence. Not necessarily scalable. Will the application be made using Datasnap? REST?

  • Scalable in the sense that in the future you can add new modules, inheriting or not from classes that have already been implemented without difficulties to add this module. It has not yet been defined if we will use Datasnap or REST, I’m just doing some research to try to find the best ways to develop our product.

3 answers

3

Well I particularly never developed on Mvc with Delphi, but I found this example on the web Apostille Delphi Mvc, To develop in Mvc basically is more the separation of objects in layers so the whole project will have to be oriented to object Manipulating and returning objects as any other language until then normal, the only thing that way to create, inherit, Delphi overload is a little different so many get scared by it.

2

The MVC model is intended to construct interfaces (http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) and not the entire application architecture. Other models may also arrive at the same result and the arguments put forward by you will not necessarily be reached solely by making use of this model.

Issues relating to business rules and persistence are not covered by MVC, since its main purpose is to build user interaction objects that allow the use of unit tests during their implementation.

It is considered a mistake to implement business rules in a controller as much as it would be wrong to implement them in a form and for the same reasons.

The implementation of business rules can be located in several parts of the application depending on the architectural model chosen. For example, if you are going to make use of Domain-Driven Design (DDD) then business rules will be implemented in domain classes and service classes, while persistence will be managed by repositories, whether or not using an automatic persistence system.

There is a product in https://code.google.com/p/delphimvcframework/

-1

View the Mvcbr model - a Delphi/MVC framework. http://www.tireideletra.com.br through a set of wizards show how to apply the app concept in practice in the MVC standard.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.