June 20, 2010

viniciustinti viniciustinti
Lab Rat
1 posts

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:

Att,
Tinti

5 replies

June 25, 2010

Chris Roland Chris Roland
Lab Rat
5 posts

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 [en.wikipedia.org] 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 [techbase.kde.org] ? 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

June 25, 2010

viniciustinti viniciustinti
Lab Rat
1 posts

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.

August 22, 2010

declanmcgrath declanmcgrath
Lab Rat
2 posts

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

August 23, 2010

Tobias Hunger Tobias Hunger
Robot Herder
3387 posts

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:-)

August 26, 2010

declanmcgrath declanmcgrath
Lab Rat
2 posts

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

 
  ‹‹ cast to (void) type      Reading from a file realized with Qt/MinGW is slower than in Delphi 7 ››

You must log in to post a reply. Not a member yet? Register here!