3 ms·
Thanks for the links. For me the problem with MVC thinking is that I am used to my own system of MVC that I programmed for my personal PHP toolkit. My version
by NathanKP 16y ago
Thanks for the links.
For me the problem with MVC thinking is that I am used to my own system of MVC that I programmed for my personal PHP toolkit.
My version of MVC allows me to just write something like:
<form>
<?php databaseInput("tablename",$id,"keyName"); ?>
<?php databaseInput("tablename",$id,"keyName2"); ?>
</form>
It is very simple and works great with key value databases. My code system is designed to automatically detect the type of the key and output the appropriate control, even building dynamic AJAX controls such as input fields with attached google maps if the key is an address key.
After getting used to my own incredible easy to use MVC style system Ruby feels complex. I can use the generate script to build scaffolds, but then the generate script does so much that I can't really grasp all the connections.
For that matter I don't even see if it is possible to create a model with key value storage. The Rails generate scripts don't seem to have an option for that.
Perhaps you are correct that Rails might not be the thing for me, but I do really like Heroku, and want to be able to use it to enjoy the ease of scaling a web app by just dragging the slider upward. That means I need to build in Rails.
In addition, I feel that it will probably be better in the long-term to understand Rails thoroughly.
Edit:
I just wanted to add that I have read _why's poignant guide and found it very useful, if a little less formal than I am normally used to. ;) I think that I have enough of a grasp on Ruby itself, and I have already developed a few standalone scripts. What I don't understand is all the things going on behind the scenes in the Rails code, and that is my stumbling block.
- jackowayed 16y agoYou may find some comfort in things like form_assistant[1] or formtastic[2]. In Rails 2, you can't have a model backed by a key-value store. Rails 3, which has a release candidate out, should make that doable. Sinatra (with and without Padrino) also make it easy to use a k-v store. I think there's a good Redis library out there. I've used rufus-tokyo, which is a ruby library for Tokyo Cabinet, and it's solid. Though now there's Kyoto Cabinet. I'm not sure what the libraries are like for it. 1: http://github.com/rpheath/form_assistant http://github.com/rpheath/form_assistant 2: http://github.com/justinfrench/formtastic http://github.com/justinfrench/formtastic
- NathanKP 16y agoOkay, it sounds like I'll have to try Rails 3. I'll check out the other github links that you gave me as well.