Brandon Black ha scritto:
On 6/29/06, Nilson Santos Figueiredo Junior [EMAIL PROTECTED] wrote:
On 6/29/06, Brandon Black [EMAIL PROTECTED] wrote:
If you find yourself putting code in your View templates that isn't
directly related to rendering this specific flavour of output, it
probably
Marcello Romani ha scritto:
Brandon Black ha scritto:
On 6/29/06, Nilson Santos Figueiredo Junior [EMAIL PROTECTED] wrote:
On 6/29/06, Brandon Black [EMAIL PROTECTED] wrote:
If you find yourself putting code in your View templates that isn't
directly related to rendering this specific flavour
I dont' agree with the statement that all the application logic should go into the Controller. In my opinion in the Controller you should have only the code that is directly web related - all the rest should go into the Model. This way you can call your business logic from a cron script without
This response is probably OFFTOPIC at this point, but maybes it's a good type of discussion for our community to have, if we can all be civil about it. Personally I think there are several points of view with the best way to do MVC. MVC, like quite a few programming paradigms offers a simple idea
On 6/28/06, Eduardo Oliveros [EMAIL PROTECTED] wrote:
I know is difficult in practice to separate both worlds (logic from
the presentation) but that is the false promise of the MVC pattern :).
Not really, no, the MVC pattern is actually just a specialized Adapter
pattern so you can program
I really don't see much ambiguity myself. I'm not really a theorist
on this stuff, so what follows is my practical definitions based on
working with it:
Model(s) - Data source abstraction. You put things like access to
RDBMSes, Files (collections of images?), and even remote data sources
served
Anyway, the question is just what is the best practice to program the
logic and test it before link the logic with the web application?.
(using the classes generated by the Class::DBI or whatever plugin).
I'd stick to the fundamental OO Pattern theory: program to interfaces
not
On 6/29/06, John Napiorkowski [EMAIL PROTECTED] wrote:
writing monolythic cgi type applications. Personally I put all the logic
having to do with manipulating the database into my model class. So things
like adding/removing users or very common searches I put there. Anything
that more than
On 6/29/06, Brandon Black [EMAIL PROTECTED] wrote:
If you find yourself putting code in your View templates that isn't
directly related to rendering this specific flavour of output, it
probably needs to be moved to the Controller. Good code in views:
iterating an arrayref to generate a ul
On 6/29/06, Nilson Santos Figueiredo Junior [EMAIL PROTECTED] wrote:
On 6/29/06, Brandon Black [EMAIL PROTECTED] wrote:
If you find yourself putting code in your View templates that isn't
directly related to rendering this specific flavour of output, it
probably needs to be moved to the
Hi,
Regarding the generic controller stuff you might look at the
Catalyst::Example::Controller::InstantCRUD - you can use it as a base
class for your controllers to get the basic CRUD + paging and sort
stuff for free. It's still rather experimental though.
--
ZbyszekOn 6/29/06, Brandon Black
On 6/29/06, Brandon Black [EMAIL PROTECTED] wrote:
The approach I'm attempting lately (and I haven't gotten it all
working right yet...) is to make Controller base-classes that
implement generic concepts for things like paging and sorting tables
of data (complete with handling form args like
Nilson Santos Figueiredo Junior wrote:
On 6/29/06, Brandon Black [EMAIL PROTECTED] wrote:
The approach I'm attempting lately (and I haven't gotten it all
working right yet...) is to make Controller base-classes that
implement generic concepts for things like paging and sorting tables
of data
On 6/29/06, Matt S Trout [EMAIL PROTECTED] wrote:
Nilson Santos Figueiredo Junior wrote:
That involves doing bad things such as using c.param() from the View
but it really was the only practical way (i.e. DRY) I could think of.
So, any suggestions are welcome. ;-)
No, it's the best
Nilson Santos Figueiredo Junior wrote:
On 6/29/06, Matt S Trout [EMAIL PROTECTED] wrote:
Nilson Santos Figueiredo Junior wrote:
That involves doing bad things such as using c.param() from the View
but it really was the only practical way (i.e. DRY) I could think of.
So, any suggestions are
Brandon Black a écrit :
[...]
Controller(s) - This is the glue that binds Models and Views together.
It accepts user input, possibly makes modifications to Model data,
possibly retreives some Model data, and then displays a View at the
user who gave the input. This is where the business
On 6/29/06, Matthieu Codron [EMAIL PROTECTED] wrote:
This does not matter much in most cases except big projects where
business logic elements are reused in various situations around the
application.
Then you put that logic in external regular Perl modules and make your
controllers just use
Matthieu Codron wrote:
Brandon Black a écrit :
In J2EE projects, the layer model is more like MSCV-I, for Model --
Service -- Controller -- View, the I standing for Integration layer
(Spring for example, or Catalyst in Perl)
What is missing in Catalyst is that Service layer. But it's not
to worry about designers messing up the TT code. --john
- Original Message
From: Matt S Trout [EMAIL PROTECTED]
To: The elegant MVC web framework catalyst@lists.rawmode.org
Sent: Friday, June 30, 2006 7:29:13 AM
Subject: Re: [Catalyst] Program the logic
Matthieu Codron wrote:
Brandon
Hello all,
I'm planning to program the logic of the application (the Model in
MVC) previously to start with web page and the presentation.
What is the best way to do it?
(some philosophical remarks :))
What I see is that what Catalyst calls Model is just the Objects that
map
On 6/28/06, Eduardo Oliveros [EMAIL PROTECTED] wrote:
I'm planning to program the logic of the application (the Model in
MVC) previously to start with web page and the presentation.
Actually, the Controller is what is supposed to drive the logic of the
application. The model is really just
That leads to a new question:
Is possible to call actions in the Controller without using a web browser?
Thanks,
--edu
PD: I'll use DBIx::Class, sounds promising.
2006/6/28, Nilson Santos Figueiredo Junior [EMAIL PROTECTED]:
On 6/28/06, Eduardo Oliveros [EMAIL PROTECTED] wrote:
I'm planning
, 2006 5:11:27 PM
Subject: Re: [Catalyst] Program the logic
That leads to a new question:
Is possible to call actions in the Controller without using a web browser?
Thanks,
--edu
PD: I'll use DBIx::Class, sounds promising.
2006/6/28, Nilson Santos Figueiredo Junior [EMAIL PROTECTED]:
On 6/28/06
@lists.rawmode.org
Sent: Wednesday, June 28, 2006 5:11:27 PM
Subject: Re: [Catalyst] Program the logic
That leads to a new question:
Is possible to call actions in the Controller without using a web browser?
Thanks,
--edu
PD: I'll use DBIx::Class, sounds promising.
2006/6/28, Nilson Santos
On 6/28/06, Eduardo Oliveros [EMAIL PROTECTED] wrote:
When you create a Catalyst application some tests are created also.
I thought calling the Controller actions could be performed by the
testing framework... (without using a browser)...
I guess I was wrong :)
Yes, it can be performed
25 matches
Mail list logo