Displaying 20 results from an estimated 3000 matches similar to: "MVC Design"
2006 Mar 20
22
Applicationwide BusinessObject/Hash
Hello,
I''m a total newbie, so please forgive my ignorance.
I am trying to port an application from java to ruby. In order to do that, I
need to put the object containing all the business logic into something like
application scope.
The nicest solution would be just to have an application wide hash, where I can
put all kinds in of objects.
Where and how would I instantiate such an
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
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 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 pagination (which definitely
2006 Apr 23
8
Shattered, the rails-based MVC game development framework
if( you_want_to_make_a_game_with_ruby ) {
http://shattered.hastilymade.com/shattered_ruby.png
http://shattered.hastilymade.com/shattered_ruby.png
http://shattered.hastilymade.com/shattered_ruby.png
Shattered 0.3 has just been released! Inspired by Ruby on Rails, Shattered
is doing for game development what rails has done for web development.
Get it here !
We''ve made this
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
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
Hi,
I want to creat a GUI accessible via the web with ruby to interface some
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
2006 Oct 20
7
MVC and modules. Views telling models to behave
I was thinking today, it would be nice if a view could tell a model how to
format it''s data for that particular view.
Kind of like, the view is bestowing instant, and temporary knowledge on the
model for the duration of the views run.
It seemed to me that this would be more objecty than say a helper that
formats a string
format_my_string( my_string )
Instead, in my view. Lets assume I
2006 Jan 17
30
MVC design good/bad
I am curious what you find is good and bad MVC design.
Let''s use the find and find_by_sql methods as examples.
Currently I have these spread out all over the place...
View: here I have some find methods when I am for example populating a
select list with choices in a form.
Controller: here I have the simpler find methods.
Model: here I have the more complicated find methods (usually
2005 Dec 20
12
How to model "Expense Report" in Rails MVC
1st: I am a newbie to Rails & to pure OO.
Q: I want to use rails for creating a "master-detail" form. page layout
will allow users to type in an "expense report header" and as many
"expense report lines" as they need to. I understand how to wrap the
final submit action using "transaction" to ensure the inserts to the
database happen within the same
2006 Jul 31
5
can someone explain RoR MVC from a C++ or Java perspective?
is a model similiar to a class? and active record is similiar to how
Java classes inherit from Object?
View is nothing more than an output of a model with HTML?
Controller is basically the Main part of the program?
--
Posted via http://www.ruby-forum.com/.
2006 May 30
3
act_as_dom_tree
im thinking about extracting this into a plugin, but it currently relies
a couple gems and another rails plugin. is there a dependency management
feature with ./script/plugin? i never could get it to check anything out
of SVN let alone install dependent stuff...
--
Posted via http://www.ruby-forum.com/.
2006 Oct 13
6
If I stub do I have to mock as well?
Hi, I''m new to mocha and stubba but eager to learn. I have a rails
functional test in which I would like to stub an instance method of
particular class to always return true. I tried the following:
def test_post_checkout
Order.any_instance.stubs(:successful?).returns(true)
post :checkout
assert_response :redirect
assert_equal "Checkout was successful.",
2006 Apr 07
2
Functional testing Pretty Urls
Anyone know how to how to test pretty urls (set through routes.rb)? I want
to don''t use get :action, because the routing changes how a certain action
is requested. How does one go about testing this?
Thanks,
Tim Case
tim@karmacrash.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jun 21
0
rails MVC
Bonjour a tous,
voila j''ai quelque soucie a comprendre comment s''enchaine les appels de
la vue/controleur/model dans Rails :(
j''ai une classe qui me permet de faire la liaison entre ruby et c++ (ca
marche parfaitement) que j''ai mis ds le repertoire model (je ne l''ai pas
cree avec generate parce que je ne veux pas de BD! et j''avais
2007 Nov 05
0
Scruffy > MVC architecture?
Hi,
I am a newby in rails...and i have read that scruffy is a great tool to
create/display images.
Now i find the code below for example...
graph = Scruffy::Graph.new
graph.title = "Comparative Agent Performance"
graph.value_formatter = Scruffy::Formatters::Percentage.new(:precision
=> 0)
graph.add :stacked do |stacked|
stacked.add :bar, ''Jack'', [30, 60, 49, 29,
2006 Apr 04
4
Freezing Architecture-Dependent Gems such as Rmagick, Ferret, Unicode
A lot has been made recently about the need to freeze your gems for
production deployment on a shared server so your application can depend on
it''s own gem version instead of being subjected to whatever gem is installed
on the server, but does this rule of thumb come with an exception?
Architecture dependent gems such as RMagick, Ferret and Unicode have
dependencies that cannot be
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.jaiku.com/
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