Page 2 - Discuss Ruby Section in the Ruby Programming forum on Dev Shed. Ruby Section Ruby and Ruby on Rails programming forum covering Ruby Tips and Tricks, Best Practices, and agile development with Ruby on Rails.
View Poll Results: Should DevShed add a Ruby/Rails section?
Posts: 2,537
Time spent in forums: 1 Week 2 Days 18 h 17 m 47 sec
Reputation Power: 68
I'd like to clarify this: just because the model is handled outside of the system (or handled for you) doesn’t mean that it's not part of the design. RoR fits with MVC, end of story .
By your definition Cocoa apps may not be MVC because of bindings and such — yet MVC is mentioned to some degree in every Cocoa book and Intro that I've read. You have utils to handle the model for you, and you may choose some existing models. It just works.
The claim seems very far-fetched and has nothing to do with the nature of design patterns as I understand them. What’s important is that a system is composed in a certain way. Not that you have to do something manually or internally.
Think separation.
Take care ,
Mark.
__________________
programming language development: www.netytan.com– Hula
Last edited by netytan : April 21st, 2006 at 07:21 PM.
Posts: 596
Time spent in forums: 2 Days 3 h 56 m 23 sec
Reputation Power: 22
Quote:
Originally Posted by LinuxPenguin
I just want to clarify here.
Rails is NOT MVC
M = Model. Database Model. And you don't model your database in RoR, you make it and ActiveRecord figures it out dynamically.
Learn to program in ruby and you're forever spoiled in richness
the model isn't necessarily anything to do with a RDBMS, it's just wherever the data is stored, which in this case is a bunch of ruby objects. The fact that the data originally comes from a database and will be going back there sometime is the layer below.
Posts: 5,538
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 30 m 28 sec
Reputation Power: 1050
Yeah, but it's still modelling how it will be stored (whatever lies underneath it, be it Postgres or CSV, or even flatfile). Rails isn't really mvc since you skip the modelling stage and entrust activerecord to build an internal structure for you (I believe this is what you were calling a model, Mark). I suppose it comes down to personal preference as to whether you regard that as a model. personally, unless it was manually modelled, i wouldn't.
Posts: 2,537
Time spent in forums: 1 Week 2 Days 18 h 17 m 47 sec
Reputation Power: 68
I don't see how you can skip the Model stage by doing it elsewhere. In the same way that you're still creating a View if you choose to use something like Interface Builder* .
Modeling data within a system has about as much to do with MVC as classes have to do with OOP — that is to say not a lot .
I think it really comes down to what a design pattern is, and by extension what MVC is. The only reason to call anything MVC is because it uses this design pattern.
I'll reiterate: a system doesn't have to work the way you want for it to be MVC, the separation is there. Automation is another abstraction entirely.
Rails fits the bill, so it is MVC *shug*. It's really a mood point to claim otherwise don't you think .
Take care,
Mark.
* Interface builder will also create a usable Model for you. In fact it often amazed me how much you can actually do without moving into Xcode.
Last edited by netytan : April 27th, 2006 at 01:48 PM.
Posts: 1,759
Time spent in forums: 1 Month 2 Weeks 2 Days 3 h 38 m 3 sec
Reputation Power: 1568
While I think it's probably a bit early for it, I don't see a problem with adding a Ruby section. While it's true there hasn't been a huge amount of discussion of it yet in OPL, there certainly has been more than for many other languages. Also, citing the lack of activity on OPL for a given language as a reason not to have a separate group for it can become a self-fullfilling prophecy (no, not one made by Jecel Assumpcao about prototype-based OOP languages , I mean one that leads to it's own predicted results), as readers who might be interested in the language might get discouraged by the apparent lack of interest in it here. Conversely, having a a group for the language might jump-start interest in it on this board - just look at the how simply having the OPL group has spurred activity in several languages which were almost unknown here a short while ago.
Besides, I've been sadly lax in following up on Ruby myself, and it would give me an excuse to learn more about it
I can't see how anyone who has used more than a handful of languages could say that they are all the same; if that were the case, no one would have ever used anything except Assembler in the first place. The language being used can have a tremendous impact on how you approach a problem; you would not write in, say, Java, the same way you would in C, nor would you write in Haskell the same way you would in Smalltalk. The viewpoints different languages give you can be radically different - but at the same time, they can also clarify the perspectives you hold in other languages. Also, some languages support or facilitate approaches which might be cumbersome or impractical in others - try using Continuation Passing Style in C, for example, or conversely, directly accessing a memory-mapped device in Scheme or Java, to see what I mean.
I know that I'm seen as a bit of a kook by some folks for the whole 'Scheme is the Red Pill' thing, but that's because it comes across to most people as language advocacy. While I won't deny that this is one part of it, is not the main point I'm trying to make. The real advantage in learning Scheme - or other unconventional languages like Self or FORTH or APL - is in how they open up your perspective, not only in those languages but in the ones you use for day to day programing as well. In other words, as Eric Raymond once said, learning Lisp doesn't just make you a Lisp programer, it can also make you a better C programmer. And while (In my decidely biased and arrogant opinion) the Lisp languages are particularly valuable in this way, it is still just as true of other unconventional notations. Free Your Mind.
FOR SALE: One ShapeSystem 2300 CMD, extensively modified for human use. Includes s/w for anthro, transgender, sex-appeal enhance, & Gillian Anderson and Jason D. Poit clone forms. Some wear. $4500 obo. tverres@et.ins.gov
Last edited by Schol-R-LEA : April 27th, 2006 at 06:37 PM.
Posts: 596
Time spent in forums: 2 Days 3 h 56 m 23 sec
Reputation Power: 22
Quote:
Originally Posted by Schol-R-LEA
... having a a group for the language might jump-start interest in it on this board - just look at the how simply having the OPL group has spurred activity in several languages which were almost unknown here a short while ago.
....
OK, why not start a group for haskell then - maybe it would kick start interest in my own current favourite...
IMO ruby will need a group when this one is mainly questions about ruby.