Do you know about any MVC framework for Web in which I can program in Delphi? Especially with view engine (for HTML templates) like ASP.NET MVC's Razor or equivalent and of course routing system for matching controllers/actions to web requests and also model binding (translating from POST data to data structures) would be nice. I know I can use Delphi Prism with ASP.NET but wonder if there is any other solution to implement Web MVC architecture in Delphi.
4 Answers
DelphiMVCFramework has been released as Open Source https://github.com/danieleteti/delphimvcframework
It works (read: "production code use it") from XE3 to Delphi 10.2 Tokyo (also on linux)
DMVCFramework features
- RESTful (RMM Level 3) compliant
- Simple to use
- IDE Expert to easily start new projects (contrib by Nick Hodges)
- Powerful renders to render Object (PODO), Objects, Strings
- Fancy URL with parameter mappings
- Strongly Typed Actions with automatic parameter mapping
- Can be used in load balanced environment using Redis
- Integrated RESTClient
- Trainings are available (class and remote)
- Support Apache module (Windows and Linux), ISAPI extension and stand alone servers (It supports what WebBroker supports in your Delphi version)
I'm the lead developer but contributors comes from all over the world.
UPDATE
DMVCFramework is now the most popular project for Delphi on github. Is also available the official guide as e-bbok and hard copy. The official guide is trandlated in 2 more languages over english. https://leanpub.com/delphimvcframework
Delphi on rails is one
-
-
1I don't use but Henri Gourvest make many very good components I use and I never have problem with. Mar 24, 2012 at 17:56
-
-
After evaluating hosting price I am forced to use another technology for this particular project but I hope I could use DoR in future!– PolMar 25, 2012 at 11:06
-
I'm not commenting on Delphi on rails, but I couldn't resist to say that I agree with Hugues, Henri Gourvest is one of the most prominent open source Delphi developers on earth! Apr 14, 2013 at 3:36
There is Delphi MVC Web - MVC Web Framework for Delphi - available from http://code.google.com/p/delphimvcweb/
Note: I haven't used, just heard of it.
-
Is the project empty except a few issues, or is code.google.com having trouble reading the hg repository? Mar 26, 2012 at 16:10
-
In the "Browse" tab, it throws an error messaging regarding access to the Hg repository. Mar 26, 2012 at 17:12
I've created a Delphi+Web solution that starts one level deeper into the system. You could create an MVC platform on-top of it just fine, but I haven't looked in to that (yet!):
Much like early PHP, Cold Fusion and ASP, I wanted the HTML and Delphi code in the same source-files, and have them (re)compile by hitting refresh in my browser. The several xxm handlers serve as thin layers between IIS, Apache, CGI or plain HTTP so you can choose freely how to host the resulting library.