Qt with a Rails like MVC
-
Hello,
Does anyone have ever seen Ruby on Rails in action? It's just amazing, I was thinking about in something similar for Qt. Like just a script to do what "scaffold" does. I really want to discuss about implement it, I believe that it will help a lot in some cases. At least, I want to implement "active record" pattern.
Examples:
- http://media.rubyonrails.org/video/rails_blog_2.mov
- http://en.wikipedia.org/wiki/Active_record_pattern
Att,
Tinti -
Hey Tinti,
I think using MVC for Qt is an interesting idea. I posted not long ago about using Domain Driven Design with Qt and even though they are a little different, they both are striving to reach the same goal. To use current application development practices with Qt and to make life happier.
I've created simple apps using the active record pattern, but I think with the capabilities Qt gives you, a "Model View ViewModel(Model View ViewModel)":http://en.wikipedia.org/wiki/Model_View_ViewModel with DDD might be a better mix. I know MVVM is used primarily with .NET development :), but I see it as a perfect match with Qt. I'm actually going to work on a simple app using this approach, so I'll see if it really fits.
I think extending qmake to do what rake does would also be interesting. I wonder if it already has features that can be used to create a scaffold like environment.
If all else fails, have you tried out "QtRuby(QtRuby)":http://techbase.kde.org/Development/Languages/Ruby ? I've seen several blog and forum posts where people use ActiveRecord without rails and use QtRuby instead. Cool thing is you are still able to use rake.
Chris
-
Hi,
Thanks for the answer. I have never tried QtRuby, it seams to be good. However, I believe that Qt should have his own tools for that. Even in a separated project or library for a while, if it gets popular it after could be build-in like another frameworks. I will read about MVVM, currently I use MVC, might be a good choice.
Regards,
Tinti. -
Hi Tinti,
I've been working on a project, Qt on Rails, which combines Qt with a Rails back end (through the QtRuby bindings which Chris mentioned). The end result is that you can develop your Qt app's in Ruby, harness the libraries of Rails and there's support for scaffolding on apps as well.
It's still a 'Work In Progress' but the current latest version at http://github.com/theirishpenguin/qtonrails will certainly give a flavour of where the project is headed. Contributors and feedback is most welcome and detailed blog post is available at http://www.theirishpenguin.com/2010/06/21/qt-on-rails-v0-1-released-but-is-this-ruby-based-qt-and-kde-app-framework-doomed
All the best,
Declan -
What kind of scaffolding would you like to have? If you can propose a good structure we might be able to incorporate such a scaffolding into creator or some other tool:-)
-
That scaffolding in Qt on Rails would, given a Rails app, take that app and generate a Ruby-based Qt app. The command would look something like
./script/generate qtify Model1 Model2
... where Model1 and Model2 are models in your Rails app that would like to be ported to Qt app.
It's an area I must do some work on - particularly with Rails 3 on horizon!
All the best,
Declan
-
I am developing a framework that works similar like rails in Qt:
https://github.com/cybercatalyst/qtwebserver