librelist archives

« back to archive

MVC

MVC

From:
Gosu Coder
Date:
2014-05-08 @ 20:48
Hey,
I have a question that may be a stupid question.
Do I need extra code to use MVC with Shoes, or can I do MVC with shoes?
I saw someone had written a library for using Shoes MVC style. Is a lot of
extra code necessary for this?

Gosu

Re: [shoes] MVC

From:
Cecil Coupe
Date:
2014-05-09 @ 04:57
Gosu,

   IMO. MVC and Shoes are at  opposite ends of GUI design.  I wouldn't 
attempt a complex GUI with Shoes. It's just not made to do that. Of 
course, if your skill level is very high you could make it work - after 
writing lots of code that does magical things shoes wasn't designed for.

   Shoes is for quick and simple and fun and learning and cute.  The 
Fiat 500 of GUI. If you want a BMW M3 class car, you wouldn't  build one 
with Fiat 500 chassis. You would learn to drive a the Fiat first and 
then decide to pay a lot more for the BMW.

--Cecil

On 05/08/2014 02:48 PM, Gosu Coder wrote:
> Hey,
> I have a question that may be a stupid question.
> Do I need extra code to use MVC with Shoes, or can I do MVC with shoes?
> I saw someone had written a library for using Shoes MVC style. Is a 
> lot of extra code necessary for this?
>
> Gosu

Re: [shoes] MVC

From:
Tobias Pfeiffer
Date:
2014-05-09 @ 07:34
Agreed that shoes and MVC are on different ends of the spectrum.

When I write shoes apps I often do a Model + View thing as I don't see 
the need for a controller. E.g. I define my domain objects and their 
logic in the models directory, test those and then wire it up in the UI.

Example can be found here: 
https://github.com/PragTob/pomodoro_tracker/tree/master/lib/pomodoro_tracker

Doing "Real" MVC is certainly possible just don't know of any framework 
to do so, yet :-)

certainly though, that would require quite some extra work and shoes 
wasn't designed witht hat in mind (as cecil said).

I'm thinking of shoes a bit like Sinatra. It's easy and fun to use for 
small projects. If you want to extend on that you need quite some 
custom code (which imo is fun writing!) or libraries/gems. E.g. maybe 
someone will build the shoes version of padrino┬╣.

Cheers,
Tobi

┬╣Padrino is a Web MVC Framework that builds on sinatra and is also 
pretty configurable: http://www.padrinorb.com/


On Fri 09 May 2014 06:57:30 AM CEST, Cecil Coupe wrote:
> Gosu,
>
>    IMO. MVC and Shoes are at  opposite ends of GUI design.  I wouldn't
> attempt a complex GUI with Shoes. It's just not made to do that. Of
> course, if your skill level is very high you could make it work - after
> writing lots of code that does magical things shoes wasn't designed for.
>
>    Shoes is for quick and simple and fun and learning and cute.  The
> Fiat 500 of GUI. If you want a BMW M3 class car, you wouldn't  build one
> with Fiat 500 chassis. You would learn to drive a the Fiat first and
> then decide to pay a lot more for the BMW.
>
> --Cecil
>
> On 05/08/2014 02:48 PM, Gosu Coder wrote:
>> Hey,
>> I have a question that may be a stupid question.
>> Do I need extra code to use MVC with Shoes, or can I do MVC with shoes?
>> I saw someone had written a library for using Shoes MVC style. Is a
>> lot of extra code necessary for this?
>>
>> Gosu
>

--
www.pragtob.info

Re: [shoes] MVC

From:
Sebastjan Hribar
Date:
2014-05-09 @ 07:49
Hi,


> I'm thinking of shoes a bit like Sinatra. It's easy and fun to use for
> small projects.
>
>
I've recently went Camping (http://camping.io) which is MVC and reminds me
of shoes (I wonder why:) by its size to power ratio. So shoes and camping
are my favorite choices for small projects:)

regards,
seba

Re: [shoes] MVC

From:
Tobias Pfeiffer
Date:
2014-05-09 @ 07:58
Oh! I didn't know there were still people working on camping although 
not much... great news. When i got time in a couple of months I'm 
totally gonna build a camping app and read the source! =D

Thanks!

On Fri 09 May 2014 09:49:02 AM CEST, Sebastjan Hribar wrote:
> Hi,
>
>
>     I'm thinking of shoes a bit like Sinatra. It's easy and fun to use for
>     small projects.
>
>
> I've recently went Camping (http://camping.io) which is MVC and
> reminds me of shoes (I wonder why:) by its size to power ratio. So
> shoes and camping are my favorite choices for small projects:)
>
> regards,
> seba

--
www.pragtob.info

Re: [shoes] MVC

From:
Sebastjan Hribar
Date:
2014-05-09 @ 08:11
Yes, I kind of stumbled upon it and at first I was a bit discouraged as it
seemed not a lot of people are using it so reference apps are a bit scarse.

Nevertheless I went for it and I must admit the learning curve was quite
steep but the rewards were well worth it. I had to read and learn
everything from activerecord to html and markaby. In fact I was suggested
to go the "Rails -> Camping" path. Which makes sense since in Rails
everything just works (at least in the demo app I wrote - well, generated:).

I chose the other way around and I don't regret it.

I wrote a quality management web app in about 750-ish lines, and even a
third of that is used for markaby tables in forms.

I'd recommend camping to anyone interested in micro web frameworks.

regards,
seba


2014-05-09 9:58 GMT+02:00 Tobias Pfeiffer <
tobias.pfeiffer@student.hpi.uni-potsdam.de>:

> Oh! I didn't know there were still people working on camping although
> not much... great news. When i got time in a couple of months I'm
> totally gonna build a camping app and read the source! =D
>
> Thanks!
>
> On Fri 09 May 2014 09:49:02 AM CEST, Sebastjan Hribar wrote:
> > Hi,
> >
> >
> >     I'm thinking of shoes a bit like Sinatra. It's easy and fun to use
> for
> >     small projects.
> >
> >
> > I've recently went Camping (http://camping.io) which is MVC and
> > reminds me of shoes (I wonder why:) by its size to power ratio. So
> > shoes and camping are my favorite choices for small projects:)
> >
> > regards,
> > seba
>
> --
> www.pragtob.info
>
>

Re: [shoes] MVC

From:
David Eastman
Date:
2014-05-09 @ 10:13
I'd probably recommend Sinatra as a compact MVC. Its focus is the route, so
can appear not to need a model, or even a view.

Shoes works more as a scripted HTML page, but I think its flexibility is a
reflection of your own ability
On May 9, 2014 9:12 AM, "Sebastjan Hribar" <sebastjan.hribar@gmail.com>
wrote:

> Yes, I kind of stumbled upon it and at first I was a bit discouraged as it
> seemed not a lot of people are using it so reference apps are a bit scarse.
>
> Nevertheless I went for it and I must admit the learning curve was quite
> steep but the rewards were well worth it. I had to read and learn
> everything from activerecord to html and markaby. In fact I was suggested
> to go the "Rails -> Camping" path. Which makes sense since in Rails
> everything just works (at least in the demo app I wrote - well, generated:).
>
> I chose the other way around and I don't regret it.
>
> I wrote a quality management web app in about 750-ish lines, and even a
> third of that is used for markaby tables in forms.
>
> I'd recommend camping to anyone interested in micro web frameworks.
>
> regards,
> seba
>
>
> 2014-05-09 9:58 GMT+02:00 Tobias Pfeiffer <
> tobias.pfeiffer@student.hpi.uni-potsdam.de>:
>
>> Oh! I didn't know there were still people working on camping although
>> not much... great news. When i got time in a couple of months I'm
>> totally gonna build a camping app and read the source! =D
>>
>> Thanks!
>>
>> On Fri 09 May 2014 09:49:02 AM CEST, Sebastjan Hribar wrote:
>> > Hi,
>> >
>> >
>> >     I'm thinking of shoes a bit like Sinatra. It's easy and fun to use
>> for
>> >     small projects.
>> >
>> >
>> > I've recently went Camping (http://camping.io) which is MVC and
>> > reminds me of shoes (I wonder why:) by its size to power ratio. So
>> > shoes and camping are my favorite choices for small projects:)
>> >
>> > regards,
>> > seba
>>
>> --
>> www.pragtob.info
>>
>>
>

Re: [shoes] MVC

From:
Sebastjan Hribar
Date:
2014-05-10 @ 13:43
I've just remembered that in shoes, I've used the url system to 
structure and control a couple of my apps.
That kind of reminds me of the MVC (correct me if I'm mistaken), at 
least as far as the
matching of the url and the "view" goes.

I find the url system a very powerful feature of shoes.

regards,
seba


On 09. 05. 2014 12:13, David Eastman wrote:
>
> I'd probably recommend Sinatra as a compact MVC. Its focus is the 
> route, so can appear not to need a model, or even a view.
>
> Shoes works more as a scripted HTML page, but I think its flexibility 
> is a reflection of your own ability
>
> On May 9, 2014 9:12 AM, "Sebastjan Hribar" <sebastjan.hribar@gmail.com 
> <mailto:sebastjan.hribar@gmail.com>> wrote:
>
>     Yes, I kind of stumbled upon it and at first I was a bit
>     discouraged as it seemed not a lot of people are using it so
>     reference apps are a bit scarse.
>
>     Nevertheless I went for it and I must admit the learning curve was
>     quite steep but the rewards were well worth it. I had to read and
>     learn everything from activerecord to html and markaby. In fact I
>     was suggested to go the "Rails -> Camping" path. Which makes sense
>     since in Rails everything just works (at least in the demo app I
>     wrote - well, generated:).
>
>     I chose the other way around and I don't regret it.
>
>     I wrote a quality management web app in about 750-ish lines, and
>     even a third of that is used for markaby tables in forms.
>
>     I'd recommend camping to anyone interested in micro web frameworks.
>
>     regards,
>     seba
>
>
>     2014-05-09 9:58 GMT+02:00 Tobias Pfeiffer
>     <tobias.pfeiffer@student.hpi.uni-potsdam.de
>     <mailto:tobias.pfeiffer@student.hpi.uni-potsdam.de>>:
>
>         Oh! I didn't know there were still people working on camping
>         although
>         not much... great news. When i got time in a couple of months I'm
>         totally gonna build a camping app and read the source! =D
>
>         Thanks!
>
>         On Fri 09 May 2014 09:49:02 AM CEST, Sebastjan Hribar wrote:
>         > Hi,
>         >
>         >
>         >     I'm thinking of shoes a bit like Sinatra. It's easy and
>         fun to use for
>         >     small projects.
>         >
>         >
>         > I've recently went Camping (http://camping.io) which is MVC and
>         > reminds me of shoes (I wonder why:) by its size to power
>         ratio. So
>         > shoes and camping are my favorite choices for small projects:)
>         >
>         > regards,
>         > seba
>
>         --
>         www.pragtob.info <http://www.pragtob.info>
>
>