search for: mvc

Displaying 20 results from an estimated 378 matches for "mvc".

Did you mean: mic
2006 Aug 11
3
General architechture / MVC question
Hi all, A newbie with Ruby on Rails - and programming in general - I''m working on a few Flash and PHP projects as well. Partly to make my work more efficient, partly to gain a better understanding of system architecture / design patterns, I''ve been trying to use the MVC pattern in database-backed Flash / Actionscript development as well. I think / hope that I''m beginning to grasp the concept of patterns - and of the MVC one. One question however; if starting out designing a new MVC application, how do I identify the Model classes - will it always be...
2006 Mar 02
7
The no-framework PHP MVC framework
"The no-framework PHP MVC framework" http://toys.lerdorf.com/index.php?url=archives/38-The-no-framework-PHP-MVC-framework.html Yuck! What spaghetti code. I can''t ever imagine preferring that to Rails. Joe -- Posted via http://www.ruby-forum.com/.
2006 Apr 23
8
Shattered, the rails-based MVC game development framework
...on Rails, Shattered is doing for game development what rails has done for web development. Get it here ! We''ve made this release more accessible than ever by focusing on documentation. Wiki! Tutorials! API documentation! Forums! Act now! Supplies ARE limited. Shattered is a MVC game development framework built around the same two principles rails is: 1. Convention before configuration - those things that are common should be easy. 2. DRY - Don''t repeat yourself - We shouldn''t need to type any more than is necessary to get something to work. Shatt...
2006 Mar 26
7
MVC Design
Hello I have been using LAMP for the last 6 years and i am now finally making the choice to move over to RoR. This MVC stuff is all very new to me. As i have no trouble understanding ruby code... or any code for that matter.. my challange comes in getting my head around the MVC stuff. Is there any demos articles that you guys have seen that takes a site or a business breif and explains where to use controllers...
2006 Jun 08
3
MVC and Pagination
Just wondering how to best integrate with pagination and still stick to MVC... Say I have a Post model that has a published attribute. I want to show all the recent published posts on a page. My first instinct is to create a method in the Post model called recent that does the find with proper conditions and order, but the problem I have is how do I use that with pagina...
2010 Jun 21
14
Controllers, what? why?
Hi, I am starting to learn rails and I went through the guide and a couple of tutorials. Even though I understand controllers or at least I can use them I can''t see yet the whole picture. Why do you need several controllers for a single application? If a controller is just a class whose methods interface with models and views, why not have a single controller for the whole application?
2007 May 10
6
Where put buissness logic?
I''ve always think that it belongs to controller but I''ve read few articles that it should be done by model and controller should be thin glue betwean model and view. Where should I put it? Regards -- I''ve probably left my head... somewhere. Please wait untill I find it. Homepage (pl_PL): http://uzytkownik.jogger.pl/ (GNU/)Linux User: #425935 (see
2006 Aug 01
5
MVC question
Should I create a separate controller for each model or should I use 1 controller for all models? Having 1 "admin" controller for all backend stuff seems logic to me, but when I scaffold it rather makes 1 controller per model. I''m fairly new to the MVC pattern, so what''s the prefered way of doing it? I''m also wondering if the API is up to date? When scaffolding, the rhtml''s make use of "mymodel.send(column.name)". I tried to lookup the send() function in the API(ActiveRecord::Base) but it was nowhere to be...
2005 Jan 13
10
Program logic behind Ruby On Rails
...that is something that is not obvious on how each one of them ties together. Is there a flowchart that shows how the inner working of Ruby on Rails? In another words, let''s suppose we consider the following simple scenarios to recreate the logic behind Ruby on Rails, Scenario 1: Using MVC to display different words from commandline" Purpose : IMO, this exercise will show how to put Model, View, and Controller in concert to take input from commandline, massage the data, and then view it on the screen. Goal: To exercise the mindset/design-meth...
2008 Oct 14
2
best-practice for programmatically using rxml generated from controller/view? (or 'how can I view a view from a model')
Hey Guys, Here''s the scenario: I''ve got vendor-specific XML I need to create and then POST it somewhere. It sounds easy enough, but I''m running into issues when it comes time to actually use the XML. Trying hard to stay within the MVC pattern I: 1) Create a controller which loads the models I''m about to turn into XML 2) Create an rxml view which renders the XML I need perfectly Now I need to actually *use* this XML in a "model" and POST it to the webservice endpoint. Now, I am not asking "how can I rend...
2006 Jun 21
0
rails MVC
...ur le moment j''ai juste une vue avec un lien :action qui pointe sur une fonction de mon controleur ! mais j''ai l''impression que cette action ne cherche qu''une autre page ds vues !!! bon en fait je comprends pas comment s''enhaine les appels (je connais MVC j''en ai fait en JAVA mais la j''ai tellement pas l''impression que ca marche pareil que je suis perdu :() merci de votre aide, Jerome -- Posted via http://www.ruby-forum.com/.
2007 Nov 05
0
Scruffy > MVC architecture?
...ll'', [10, 10, 90, 20, 40, 10] end graph.point_markers = [''Jan'', ''Feb'', ''Mar'', ''Apr'', ''May'', ''Jun''] graph.render(:width => 800, :as => ‘JPG’) But how must i place this in the MVC architecture?? Grtz..remco -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA...
2006 Feb 06
4
Basic MVC in RoR question
Ok, Here''s my controller: def create trainingplan = Trainingplan.createplan(@params[:startdate], @params[:enddate], @params[:hoursperweek], @params[:programtype]) end My model is: class Trainingplan <ActiveRecord::Base def self.createplan(stardate, enddate, hoursperweek, programtype) stardate = startdate enddate = enddate hoursperweek = hoursperweek programtype
2006 Jun 22
2
MVC architecture
...e matlab implementation ... so I extended Ruby with C++ and then matlab :) that works perfectly: I have finaly a Ruby class I can call whenever I want to lunch my matlab algorithm ;) the point is now I have to make the GUI in HTML with Rubby on rails and Damn! I don''t get how works the MVC architecture in Ruby (I already used a PAC architecture with JAVA) but with rails ... I don''t get when I can call my function :( I create a model (where my Ruby/matlab class is called) but how I am supposed to call this functin from the view as far I don''t have any controler...
2006 May 08
3
MVC newbie question
All, Is it possible for a view to call back to a controller method? If so, what is the syntax? === details I have a list view that I want to filter out inactive rows based on several table fields being zero, old, etc. It would seem I should create a "filtered" method in the controller (which I have done). Then invoke if from the view like: for row in @rows continue if row.filtered
2006 May 22
1
MVC and cron jobs
I have a cronjob that runs "ruby script/runner ''Channel.preload''". Channel is a parent model, Item is the child model (i.e., Channel has_many :items and Item belongs_to :channel). The coupling is minimized, the coherence looks good, but I''m not sure the model is the right place to put this code. Is there a better place to put this code, e.g., a component (I
2007 Oct 09
0
[Slightly OT] MS MVC taking slight hints from Merb
http://www.hanselman.com/blog/ScottGuMVCPresentationAndScottHaScreencastFromALTNETConference.aspx In Scott Guthrie''s talk (about 43:30) he mentions requiring the render call as a convention. Interesting to see Merb influence Microsoft. :) -- Cheers, Kevin Williams http://kevwil.com/ http://www.almostserio.us/ http://kevwil.j...
2006 Jan 16
15
where''d we come from?
...39;m curious -- how many of us came to Rails from other branches of the OO world -- Java, C# -- and how many of us came from the design or non-OO scripting worlds? Reason I ask is that I''m finding Rails a blast and very productive, but I think one reason is that I already cut my teeth on MVC and ORM during two years of writing apps with J2EE/Struts/Hibernate. And in Javaland, it took me a while -- more than a few months -- to really wrap my head around those. I''m wondering, what''s the learning curve like for someone being exposed to OO/MVC/ORM for the first time thr...
2008 Apr 28
4
Render partial from model?
Hi, I know that this goes against MVC, but is there any way to render a partial from a model? The reason for me wanting to do this is that the caching logic is quite complex and I would like to keep it in the model. Thanks, GiantCranes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ Yo...
2008 Feb 09
0
MVC interplay to query multiple models
I''m trying to track down why I''m getting close to desired output, but not quite. It looks like the webpage sorta-kinda is grabbing the right data. For instance, there are three Login objects which should be showing and it looks like the show is grabbing three objects, so that fits, to a degree. However, it''s just grabbing the hexadecimal object id, and not