WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

new Mason tutorial

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

new Mason tutorial

by mk27 :: Rate this Message:

| View Threaded | Show Only this Message

It may seem inappropriate that after picking up Mason a month ago I am
now writing tutorials on it.  On the other hand maybe it is perfectly
appropriate: everytime I learn an API or something I always think of
the little potholes in the *available* documentation that I would have
addressed, to help other people doing the same thing later save some
time solving unnecessary mysteries.  I've never actually put my money
where my mouth is until now, since AFAICT there are 0-very few simple
introductory tutorials about mason:

http://www.ozzu.com/perl-tutorials/tutorial-intro-embedded-perl-using-
mason-t98586.html

I'm not affiliated with ozzu.com, by the way, beyond being a member.  
The "tutorial" is intended to be read more or less concurrently to the
first few chapters of The Mason Book.  It builds a small example web
app, "The Mason Internet Zoo".

SO:  The first thing I wanted to do now the tutorial is "complete" and
on-line is invite you people to take a look and give me some criticism;
I believe you can do that at ozzu or (my preference) here.  It would be
nice to have this tutorial adherr to as high a standard as possible,
and for that I need your feedback.  Who knows?  It could even become
something more elaborate...

Thanks in advance!
MK

ps. the demo app is not hosted at ozzu or anywhere else (you have to
download and "install" it if you want to see it, altho probably just
looking at the source code is enough).  But if anyone knows of anywhere
that might be willing to host it (it's very small and presumably would
not see a lot of use), please please let me know!


------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Raymond Wan-2 :: Rate this Message:

| View Threaded | Show Only this Message


Hi,


MK wrote:
> It may seem inappropriate that after picking up Mason a month ago I am
> now writing tutorials on it.  On the other hand maybe it is perfectly
> appropriate: everytime I learn an API or something I always think of


No, sounds like a good idea since it's usually a new person who
remembers what s/he had problems with.  I find some textbooks written by
experts in a field to be on a plane all by themselves.  :-)

One thing I noticed when I learned Mason about 2 years ago was that a
lot of the information out there was out of date.  Lots of documentation
I found was for the previous version of Mason, mod_perl, or Apache.
Actually, I still had that problem recently with mod_perl/Apache --
trying a tip I found through Google which turned out to be for Apache 1.x.

Some simple suggestions -- you might want to make reference to the other
tutorial which I learned from:  the one in the Mason book, which is
available on-line.  And you might want to contact the webmasters of the
Mason HQ (probably on this mailing list already :-) ) and see if they
can host your tutorial.  (I can't recall anyone voluntarily wanting to
write a Mason tutorial...  :-) ).

Will give more sensible comments of the tutorial later :-)  (I did
glance through it a bit).

Ray




------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Hans Dieter Pearcey-2 :: Rate this Message:

| View Threaded | Show Only this Message

On Tue, Jun 30, 2009 at 10:29:03AM +0900, Raymond Wan wrote:
> One thing I noticed when I learned Mason about 2 years ago was that a
> lot of the information out there was out of date.  Lots of documentation
> I found was for the previous version of Mason, mod_perl, or Apache.
> Actually, I still had that problem recently with mod_perl/Apache --
> trying a tip I found through Google which turned out to be for Apache 1.x.

My guess is that a lot of people who got started with Mason have gone on to use
it mainly as e.g. a Catalyst view rather than as a standalone web framework.
This cuts down significantly on the number of people passing around tips for
configuration under mod_perl/Apache.

hdp.

------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Dave Rolsky :: Rate this Message:

| View Threaded | Show Only this Message

On Mon, 29 Jun 2009, Hans Dieter Pearcey wrote:

> On Tue, Jun 30, 2009 at 10:29:03AM +0900, Raymond Wan wrote:
>> One thing I noticed when I learned Mason about 2 years ago was that a
>> lot of the information out there was out of date.  Lots of documentation
>> I found was for the previous version of Mason, mod_perl, or Apache.
>> Actually, I still had that problem recently with mod_perl/Apache --
>> trying a tip I found through Google which turned out to be for Apache 1.x.
>
> My guess is that a lot of people who got started with Mason have gone on to use
> it mainly as e.g. a Catalyst view rather than as a standalone web framework.
> This cuts down significantly on the number of people passing around tips for
> configuration under mod_perl/Apache.

I certainly _hope_ that's what they're doing!

Certainly, that's what I tell everyone who'll listen to me.


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/

------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Raymond Wan-2 :: Rate this Message:

| View Threaded | Show Only this Message


Dave Rolsky wrote:

> On Mon, 29 Jun 2009, Hans Dieter Pearcey wrote:
>> On Tue, Jun 30, 2009 at 10:29:03AM +0900, Raymond Wan wrote:
>> My guess is that a lot of people who got started with Mason have gone on to use
>> it mainly as e.g. a Catalyst view rather than as a standalone web framework.
>> This cuts down significantly on the number of people passing around tips for
>> configuration under mod_perl/Apache.
>
> I certainly _hope_ that's what they're doing!
>
> Certainly, that's what I tell everyone who'll listen to me.


<Hides under table>  Unfortunately, not me...  Any suggestions (or
tutorials :-) ) on how to do this?  Before I looked into Mason, I tried
to get into Catalyst and (for some strange reason), I found it hard to
get into.  If everyone but me is doing it...maybe it's time to look at
it again...  :-)

Ray


------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Dave Rolsky :: Rate this Message:

| View Threaded | Show Only this Message

On Wed, 1 Jul 2009, Raymond Wan wrote:

> <Hides under table>  Unfortunately, not me...  Any suggestions (or
> tutorials :-) ) on how to do this?  Before I looked into Mason, I tried
> to get into Catalyst and (for some strange reason), I found it hard to
> get into.  If everyone but me is doing it...maybe it's time to look at
> it again...  :-)

Catalyst is definitely harder to start with than Mason, as it has more
concepts to grok.

Unfortunately, I think the most apt comparison here is PHP! Mason, like
PHP, makes it easy to start, but _just_ using Mason also leads to the sort
of "all logic in templates as a huge mess" type of programming that PHP
leads to.

It takes more effort to start with Catalyst, but once you do, you have a
lot more options available, in terms of features, environments to run in,
tools, and perhaps most importantly, writing maintainable code.

That doesn't answer your question of where to start, though. I've heard
mixed reviews of the one Catalyst book already out, but another is coming
in a few weeks that I hope will be better.

I also think that that Catalyst Manual has improved since I first looked
(when it wasn't so great), so it's worth checking that out right now -
http://search.cpan.org/dist/Catalyst-Manual/


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/

------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Jonathan Swartz :: Rate this Message:

| View Threaded | Show Only this Message

Raymond - come out from under there! Despite Dave's particular strong  
preference, NOT everyone is using or should be using Catalyst.

First of all, there are other frameworks, such as CGI::Application/
Titanium and Jifty. You should at the very least compare Catalyst with  
these.

Second of all, you don't have to use a framework to avoid "putting  
everything in Mason". There's a huge middle ground in there. The most  
important things are (1) to get complex code out of components into  
modules, and (2) to avail yourself of CPAN's many tools for other web  
functions (models, logging, etc.).

For example, at Hearst where I'm consulting part-time, we serve a  
large number of dynamic sites through Mason and HTML::Template,  
without Catalyst or similar framework. We have a ton of code in  
libraries, we use Rose::DB and Moose for our models, Log4perl for  
logging, CHI for caching, Test::Class for testing, etc., and tie it  
together with a small "framework" that hardly deserves that moniker.

Personally when I've tried to use Catalyst, the MVC stuff has gotten  
in my way more than it has helped me. I actually prefer dispatching  
from inside the view as Mason does (not that this couldn't some major  
modernization). I'm not saying this to start a war - this is all very  
specific to both developer preferences and the kind of site being built.

But YMMV. Give it a try and decide for yourself!

Jon

On Jun 30, 2009, at 8:02 PM, Dave Rolsky wrote:

> On Wed, 1 Jul 2009, Raymond Wan wrote:
>
>> <Hides under table>  Unfortunately, not me...  Any suggestions (or
>> tutorials :-) ) on how to do this?  Before I looked into Mason, I  
>> tried
>> to get into Catalyst and (for some strange reason), I found it hard  
>> to
>> get into.  If everyone but me is doing it...maybe it's time to look  
>> at
>> it again...  :-)
>
> Catalyst is definitely harder to start with than Mason, as it has more
> concepts to grok.
>
> Unfortunately, I think the most apt comparison here is PHP! Mason,  
> like
> PHP, makes it easy to start, but _just_ using Mason also leads to  
> the sort
> of "all logic in templates as a huge mess" type of programming that  
> PHP
> leads to.
>
> It takes more effort to start with Catalyst, but once you do, you  
> have a
> lot more options available, in terms of features, environments to  
> run in,
> tools, and perhaps most importantly, writing maintainable code.
>
> That doesn't answer your question of where to start, though. I've  
> heard
> mixed reviews of the one Catalyst book already out, but another is  
> coming
> in a few weeks that I hope will be better.
>
> I also think that that Catalyst Manual has improved since I first  
> looked
> (when it wasn't so great), so it's worth checking that out right now -
> http://search.cpan.org/dist/Catalyst-Manual/
>
>
> -dave
>
> /*============================================================
> http://VegGuide.org               http://blog.urth.org
> Your guide to all that's veg      House Absolute(ly Pointless)
> ============================================================*/
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Mason-users mailing list
> Mason-users@...
> https://lists.sourceforge.net/lists/listinfo/mason-users


------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Raymond Wan-2 :: Rate this Message:

| View Threaded | Show Only this Message


Hi Jonathan/Dave,


Jonathan Swartz wrote:
> Raymond - come out from under there! Despite Dave's particular strong  
> preference, NOT everyone is using or should be using Catalyst.


Thanks -- it was getting a bit dark under the table.  :-)

You have a point.  I guess there aren't just Amazon web pages and
homepages out there on the Web but a lot of other types in between.  My
site happens to be developed and maintained by just me.  Often, when
confronted with all the choices that CPAN gives (not just for HTML
frameworks), it's often difficult to figure out where to start.

Honestly, one of my reasons for choosing Mason was the Mason book, which
my local library had.  But, I did give Catalyst a try (that was the only
other one I tried before deciding) and it seemed to take a long time to
get the HTML-equivalent of "Hello world" and when I got it, there was a
little of "Ok, now where do I go?".  The tutorial in the Mason book gave
an indication of "Wow, I can do this!" (well, that should be what
tutorials are for...  :-) ).

I somewhat regret not having invested more time into making a decision.
      At the time, quick results was the priority, unfortunately.  Yet
Dave's comparison of Mason to php is somewhat frightening.  :-)

Thanks to this thread, I'll look into other alternatives and hope that
migrating from a Mason system is possible and restarting from scratch
isn't necessary...

Just looking at the link that Dave sent, I'm skimming over the MVC part
and as my system doesn't use an SQL database, I'm wondering if Catalyst
is overkill??  Anyway, I'll look at the on-line documentation some more
and if thinks look better, maybe I can then look into the upcoming
Catalyst book.

Thanks!

Ray






------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Vincent Veselosky :: Rate this Message:

| View Threaded | Show Only this Message

With all respect to Dave and the Catalyst team (Catalyst is a great toolkit and I do recommend it), my group runs a stack of more than 80 web sites, getting tens of millions of hits each month, and they all run on the built-in Mason framework with the help of some custom plugins. For applications that are read-heavy rather than write-heavy, I find Mason's simple dispatch intuitive and more appropriate than more complex frameworks like Catalyst. Nor have I found Mason to be particularly limiting for write-heavy applications, although I admit it doesn't provide much help in that direction either.

I think the comparison to PHP is apt, and not necessarily negative. PHP is wildly popular for good reason, despite its problems. Mason is useful in many of the same cases, and for the same reasons (notably, easy to get started and easy to modify templates).

MK, thanks for your contribution! I agree it can be confusing when starting any project with new tools, and once a person has mastered the tools they lose that "beginner's mind" that allows them to understand the conceptual challenges that beginners face.

If I *ever* get my Webquills redesign off the ground (two scrapped already, third time is the charm, right?), the next thing on my list is to write a series of articles about why I love Mason and how I use it. I hope that series will be particularly useful to beginners. I'll drop a note to the list when I kick that off, for those interested.

--
Vince Veselosky
Web: http://www.webquills.net
Twitter: @veselosky (http://twitter.com/veselosky)

------------------------------------------------------------------------------

_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Vegard Vesterheim :: Rate this Message:

| View Threaded | Show Only this Message

On Wed, 01 Jul 2009 18:35:54 +0900 Raymond Wan <r.wan@...> wrote:

> Hi Jonathan/Dave,
>
>
> Jonathan Swartz wrote:
>> Raymond - come out from under there! Despite Dave's particular strong  
>> preference, NOT everyone is using or should be using Catalyst.
>
>
> Thanks -- it was getting a bit dark under the table.  :-)

It may be comforting for you to know that there are other people with
the same experience. I have been using Mason for years in several
smaller and medium-sized projects, both private and professionally,
and it has served my needs very well. Like you, I have been
contemplating using more 'modern perl-based web frameworks' like
Catalyst, Jifty, or CGI::Application several times, but I still
haven't convinced myself that they are better suited for my needs. I
find that these frameworks contain too much magic, results in
fragmentation of components, and often solves problems that I haven't
faced yet. I keep hearing good things about Catalyst, so I guess there
must be something I am not grasping. Reading the Catalyst book didn't
help, either. I might give Catalyst a new chance when the new book has
arrived.

 - Vegard V - (still using Mason, and proud of it too)

------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Parent Message unknown Re: new Mason tutorial

by mk27 :: Rate this Message:

| View Threaded | Show Only this Message


On 06/29/2009 11:44:14 AM, Paul Vixie wrote:
> nice job.

Thanks all!  I've recieved a few replies now and they all seem
positive, so I guess I didn't screw anything up too badly.  As I said,
there's not that much to go by and I don't want to inadvertanly spread
my inadvertant bad habits to others.

Vis. "mason vs. catalyst", the reason I haven't looked at catalyst is
that I learned the MVC model via Ruby on Rails.  MVC is a good concept
and RonR is very clever, but I wanted to see if I could accomplish what
I want with an awareness of the framework possibilities, but not
necessarily having to deal with a generic frameworking system.  Does
that make sense?

In any case, it's nice to hear that other people have made a go of it
that way on a major scale.  Someone's tip to keep the code in modules
and not in components is probably a good one.  Maybe I will add an
emphasis to that idea in the tutorial.  So thanks again!

MK

------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Dave Rolsky :: Rate this Message:

| View Threaded | Show Only this Message

On Wed, 1 Jul 2009, Raymond Wan wrote:

> Just looking at the link that Dave sent, I'm skimming over the MVC part and
> as my system doesn't use an SQL database, I'm wondering if Catalyst is
> overkill??  Anyway, I'll look at the on-line documentation some more and if
> thinks look better, maybe I can then look into the upcoming Catalyst book.

This is a serious failing of the Catalyst documentation, in that it makes
you think it has something to do with a model, when it really doesn't.
Maybe some day I'll take a crack at the docs and try to rectify this, but
for now, here's me executive summary.

All Catalyst is, at its core, is a tool to help you map URIs to some bit
of code to execute. This is the Controller part of MVC.

Catalyst also does a number of other things for you which are very helpful
when developing web apps.

* Provides a unified Request/Response API which works identically in any
web environment, including vanilla CGI, FastCGI, SpeedyCGI, mod_perl, and
several standalone Perl-based web servers.

* Provides a great development environment that allows you to start a
single-process/thread dev server by running ./script/myapp_server.pl. This
server is also capable of restarting itself any time relevant files in
your app are changed (like Apache(2)::Reload).

* Has a whole bunch of plugins for simplifying common webapp tasks such as
...
** sessions
** an authorization/authentication API usable in any controller method
** RESTful URIs
** redirects
** debugging & tracing
** logging
** much more

It also has some hooks to make working with Model classes potentially
easier, but it's important to realize that you can ignore this part of
Catalyst entirely (I do), and still get a lot of use out it.

Similarly, while the Catalyst docs are show TT examples, the choice of
templating view (or even a view that _isn't_ template-based) is entirely
up to you, and using Mason with Catalyst is trivially easy.


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/

------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Jonathan Swartz :: Rate this Message:

| View Threaded | Show Only this Message

It's worth noting that the useful features of Catalyst are  
increasingly available "a la carte" via independent CPAN modules  
(which is as it should be, IMO). For example:

* Path::Dispatcher - the controller piece (based on Jifty, but I'm  
guessing it is comparable)
* HTTP::Engine - the Request/Response API

Auto restart is still only in Catalyst AFAIK, but I'm planning to make  
it available (and improve on it) in my upcoming Server::Control.

Once Catalyst starts outsourcing its dispatching to an external module  
(which seems inevitable, if it hasn't already happened), it will no  
longer be, at its "core", any more about Controllers than it is about  
Models or Views. It just puts all these pieces together for you in a  
coherent way. Obviously there are some advantages to this, e.g.  
consistency of API, something for a community to rally around.

Jon

On Jul 1, 2009, at 7:57 AM, Dave Rolsky wrote:

> On Wed, 1 Jul 2009, Raymond Wan wrote:
>
>> Just looking at the link that Dave sent, I'm skimming over the MVC  
>> part and
>> as my system doesn't use an SQL database, I'm wondering if Catalyst  
>> is
>> overkill??  Anyway, I'll look at the on-line documentation some  
>> more and if
>> thinks look better, maybe I can then look into the upcoming  
>> Catalyst book.
>
> This is a serious failing of the Catalyst documentation, in that it  
> makes
> you think it has something to do with a model, when it really doesn't.
> Maybe some day I'll take a crack at the docs and try to rectify  
> this, but
> for now, here's me executive summary.
>
> All Catalyst is, at its core, is a tool to help you map URIs to some  
> bit
> of code to execute. This is the Controller part of MVC.
>
> Catalyst also does a number of other things for you which are very  
> helpful
> when developing web apps.
>
> * Provides a unified Request/Response API which works identically in  
> any
> web environment, including vanilla CGI, FastCGI, SpeedyCGI,  
> mod_perl, and
> several standalone Perl-based web servers.
>
> * Provides a great development environment that allows you to start a
> single-process/thread dev server by running ./script/
> myapp_server.pl. This
> server is also capable of restarting itself any time relevant files in
> your app are changed (like Apache(2)::Reload).
>
> * Has a whole bunch of plugins for simplifying common webapp tasks  
> such as
> ...
> ** sessions
> ** an authorization/authentication API usable in any controller method
> ** RESTful URIs
> ** redirects
> ** debugging & tracing
> ** logging
> ** much more
>
> It also has some hooks to make working with Model classes potentially
> easier, but it's important to realize that you can ignore this part of
> Catalyst entirely (I do), and still get a lot of use out it.
>
> Similarly, while the Catalyst docs are show TT examples, the choice of
> templating view (or even a view that _isn't_ template-based) is  
> entirely
> up to you, and using Mason with Catalyst is trivially easy.
>
>
> -dave
>
> /*============================================================
> http://VegGuide.org               http://blog.urth.org
> Your guide to all that's veg      House Absolute(ly Pointless)
> ============================================================*/
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Mason-users mailing list
> Mason-users@...
> https://lists.sourceforge.net/lists/listinfo/mason-users


------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Raymond Wan-2 :: Rate this Message:

| View Threaded | Show Only this Message


Hi all,

Dave Rolsky wrote:
> On Wed, 1 Jul 2009, Raymond Wan wrote:
>> Just looking at the link that Dave sent, I'm skimming over the MVC part and
>> as my system doesn't use an SQL database, I'm wondering if Catalyst is
>> overkill??  Anyway, I'll look at the on-line documentation some more and if
>> thinks look better, maybe I can then look into the upcoming Catalyst book.
> This is a serious failing of the Catalyst documentation, in that it makes
> you think it has something to do with a model, when it really doesn't.
> Maybe some day I'll take a crack at the docs and try to rectify this, but
> for now, here's me executive summary.


Thanks for the summary and look forward to taking some time to
re-evaluate Catalyst.

Given the many frameworks available just within Perl (ignoring other
options like Ruby on Rails) it seems like what users need is some kind
of "decision tree" that asks questions like "How many web developers are
there?" and "Will you make use of a SQL database?" -- and at the bottom
of this tree is the suggested framework to use.  :-)

In any case, even with a system developed, a second look at Catalyst was
always in the back of my mind.  Perhaps with this momentum, it's time to
actually take a look...

Thank you all for the comments and the digression from the original
thread; hope MK didn't mind!  :-)

Ray


------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Dave Rolsky :: Rate this Message:

| View Threaded | Show Only this Message

On Thu, 2 Jul 2009, Raymond Wan wrote:

> Given the many frameworks available just within Perl (ignoring other
> options like Ruby on Rails) it seems like what users need is some kind
> of "decision tree" that asks questions like "How many web developers are
> there?" and "Will you make use of a SQL database?" -- and at the bottom
> of this tree is the suggested framework to use.  :-)

Well, I don't think the decision's are nearly that clear cut. Ultimately,
it's pretty subjective.

I tell people to use Catalyst mostly because _I like_ Catalyst. It's not
the best web framework ever, and other people may prefer the competition.

However, I do think that using some sort of controller is pretty crucial
to having a maintainable webapp, and using Mason as your controller is not
a good idea.


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/

------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Jonathan Swartz :: Rate this Message:

| View Threaded | Show Only this Message

>> Given the many frameworks available just within Perl (ignoring other
>> options like Ruby on Rails) it seems like what users need is some  
>> kind
>> of "decision tree" that asks questions like "How many web  
>> developers are
>> there?" and "Will you make use of a SQL database?" -- and at the  
>> bottom
>> of this tree is the suggested framework to use.  :-)
>
> Well, I don't think the decision's are nearly that clear cut.  
> Ultimately,
> it's pretty subjective.
>
> I tell people to use Catalyst mostly because _I like_ Catalyst. It's  
> not
> the best web framework ever, and other people may prefer the  
> competition.
>
> However, I do think that using some sort of controller is pretty  
> crucial
> to having a maintainable webapp, and using Mason as your controller  
> is not
> a good idea.
>

I think the last bit (using Mason as your controller) is also  
subjective. True, dhandlers and autohandlers and so on are  
underpowered compared with today's frameworks, but they are also dead  
simple to use and work just fine for some web sites.

Jon


------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Dave Rolsky :: Rate this Message:

| View Threaded | Show Only this Message

On Thu, 2 Jul 2009, Jonathan Swartz wrote:

>> However, I do think that using some sort of controller is pretty crucial
>> to having a maintainable webapp, and using Mason as your controller is not
>> a good idea.
>
> I think the last bit (using Mason as your controller) is also subjective.
> True, dhandlers and autohandlers and so on are underpowered compared with
> today's frameworks, but they are also dead simple to use and work just fine
> for some web sites.

It's all subjective!

I know you disagree, but that's not going to stop me stating my opinion,
and I'm not a fan of couching every statement in "in my opinion". If it
wasn't my opinion, I wouldn't write it down with my name on the From
header.

That said, Catalyst clearly gives you more flexibility and power than
Mason's dhandlers. I still use autohandlers all the time, but I never
thought of them as a dispatching tool anyway. They're great for wrappers,
but their dispatching power is somewhat limited.

Finally, there's a lot to be gotten out of moving things that have nothing
to do with HTML generation into the plain old Perl world of Catalyst
controllers, which are just regular modules. You get things like real
inheritance and Moose Roles, both of which are really useful in controller
logic, as well as easier testability.


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/

------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Raymond Wan-2 :: Rate this Message:

| View Threaded | Show Only this Message



Dave Rolsky wrote:

> On Thu, 2 Jul 2009, Jonathan Swartz wrote:
>> I think the last bit (using Mason as your controller) is also subjective.
>> True, dhandlers and autohandlers and so on are underpowered compared with
>> today's frameworks, but they are also dead simple to use and work just fine
>> for some web sites.
>
> It's all subjective!
>
> I know you disagree, but that's not going to stop me stating my opinion,
> and I'm not a fan of couching every statement in "in my opinion". If it
> wasn't my opinion, I wouldn't write it down with my name on the From
> header.


Yes, that's true.  I think that Jonathan's point is that to someone like
me who doesn't know the whole story or only knows one part (Mason), then
something that is subjective will be taken as fact very easily.

In that sense, it is actually a good thing that you two disagree on this
issue since it actually emphasizes how subjection the decision is...
So, thank you to both of you!  :-)

Ray



------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Bill Walz :: Rate this Message:

| View Threaded | Show Only this Message

Hi all, Mason is the best thing I have ever encountered and I have  
built an application with 36K users and 9K concurrent users. Using my  
own homegrown framework.  There is no answer to your questions or an  
easy way out.  Use your talent and build what works.  Stop trying to  
solve your problems using someone else.  Dave is god to me and  
receives nothing in return.  Please known that what you built is the  
shit.  Let's talk. 517 927 7699.

-Bill

On Jul 2, 2009, at 9:18 PM, Raymond Wan wrote:

>
>
> Dave Rolsky wrote:
>> On Thu, 2 Jul 2009, Jonathan Swartz wrote:
>>> I think the last bit (using Mason as your controller) is also  
>>> subjective.
>>> True, dhandlers and autohandlers and so on are underpowered  
>>> compared with
>>> today's frameworks, but they are also dead simple to use and work  
>>> just fine
>>> for some web sites.
>>
>> It's all subjective!
>>
>> I know you disagree, but that's not going to stop me stating my  
>> opinion,
>> and I'm not a fan of couching every statement in "in my opinion".  
>> If it
>> wasn't my opinion, I wouldn't write it down with my name on the From
>> header.
>
>
> Yes, that's true.  I think that Jonathan's point is that to someone  
> like
> me who doesn't know the whole story or only knows one part (Mason),  
> then
> something that is subjective will be taken as fact very easily.
>
> In that sense, it is actually a good thing that you two disagree on  
> this
> issue since it actually emphasizes how subjection the decision is...
> So, thank you to both of you!  :-)
>
> Ray
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Mason-users mailing list
> Mason-users@...
> https://lists.sourceforge.net/lists/listinfo/mason-users


------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users

Re: new Mason tutorial

by Paul Vixie-4 :: Rate this Message:

| View Threaded | Show Only this Message

Dave Rolsky <autarch@...> writes:

> ..., I do think that using some sort of controller is pretty crucial to
> having a maintainable webapp, and using Mason as your controller is not a
> good idea.

i graduated from raw mod-perl2 and 'use CGI' to mason last year, and am
loving it so far.  my gripe with the MVC approach is that it requires
more discipline than i have and more foreknowledge than i ever have about
exactly what i'm building and when i'll be done.

no question that for a non-research project where a design predates the
implementation and/or where multiple developers will work together on it
(either simultaneously or eventually) i'd want the MVC approach.  folks
hereabout are using RoR and it's driving our quality up and our dev costs
down.  but they don't use perl.  i do.  and i don't work on things where
i know in advance what they are, or with help.  so, mason as "controller"
(noting that the map is not the territory and i'm only using the term
because the quoted text uses it) is perfect for my way of working in 2009.
--
Paul Vixie
KI6YSY


------------------------------------------------------------------------------
_______________________________________________
Mason-users mailing list
Mason-users@...
https://lists.sourceforge.net/lists/listinfo/mason-users
< Prev | 1 - 2 | Next >