[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] Introducing Waves - Web App Framework

Dan Yoder

2/5/2008 7:34:00 AM

I am pleased to announce the first beta release of Waves, an open-
source framework for building Ruby-based Web applications. Waves is
feature-rich, compact, and extensible. Waves is thread-safe, hot-
patchable, and supports easy clustering. Waves relies on best-of-
breed Ruby libraries, including Rack, Mongrel, Sequel, Markaby, and
Erubis, among others. And it uses just-in-time class and module
creation to minimize the code you have to write.

To learn more, please visit the Ruby Waves Web site, where you'll
find a screencast, tutorial, reference docs, support forums, and more.

http://ruby...

Thanks!
Dan

30 Answers

Matt Todd

2/5/2008 3:30:00 PM

0

Hi Dan,

I must say that I like the looks of Wave thus far and the
documentation on the website is pretty good. Great work.

I would be interested to see how well it performs, in terms of
requests/sec and memory footprint, compared to a number of other
similarly-sized and -functional frameworks.

Again, good job... looks very cool.

Matt Todd

Dan Yoder

2/5/2008 5:35:00 PM

0

> I must say that I like the looks of Wave thus far and the
> documentation on the website is pretty good. Great work.

Thanks!

> I would be interested to see how well it performs, in terms of
> requests/sec and memory footprint, compared to a number of other
> similarly-sized and -functional frameworks.

Me, too! :)

Seriously, performance was not my top priority initially. I just
wanted to get the abstractions right and put a strong foundation in
place. I will be looking increasingly at performance over the next
few months. In fact, I should probably say that in the roadmap ... :)

>
> Again, good job... looks very cool.

Thanks for your feedback! Much appreciated.
Dan


Jeremy McAnally

2/5/2008 10:56:00 PM

0

It looks like the gem requirement should be RedCloth not redcloth.

It happens a lot. :)

--Jeremy

On Feb 5, 2008 3:31 PM, Mario Guenterberg <mg@havelsoft.com> wrote:
>
> On Tue, Feb 05, 2008 at 04:33:53PM +0900, Dan Yoder wrote:
> > I am pleased to announce the first beta release of Waves, an open-source
> > framework for building Ruby-based Web applications. Waves is
> > feature-rich, compact, and extensible. Waves is thread-safe, hot-
> > patchable, and supports easy clustering. Waves relies on best-of-breed
> > Ruby libraries, including Rack, Mongrel, Sequel, Markaby, and Erubis,
> > among others. And it uses just-in-time class and module creation to
> > minimize the code you have to write.
> >
> > To learn more, please visit the Ruby Waves Web site, where you'll find a
> > screencast, tutorial, reference docs, support forums, and more.
> >
> > http://ruby...
> >
>
> Hi Dan,
>
> I tried to install waves with sudo gem install waves, but I got the following
> error:
>
> ERROR: Error installing waves:
> waves requires redcloth (> 0.0.0)
>
> When I do gem list, I see RedCloth 3.0.4 is already installed.
>
> But when I try sudo gem install waves -v 0.7.0 all works fine.
>
> It is a little mistake, if I read the install instructions on the
> website.
>
> Greetings
> Mario
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iQIVAwUBR6jHnzUZahlMISn3AQJegw/8DZv7bmzDjULcYH2PDIU+MtNB3uUdgTn+
> Q/ULDJMN/lOuOIOTfgB2vLUFuX7ZEAW4/7lHNqlAnvl+BfIpRMtg8C1Tg+qGZ7dr
> K95B8NA7bsXBC+CkHbzde30FFGga7eANbRhhzCA+/F9R1V9d9pBXPwJgKRDcKiRD
> hK0xyd+7j3E9kpx0dbJy/EbjgWPHycNp35tyijDn73iNzQnD8M16PJq45HuGlSC4
> afRLcgz2HUZQr8d+DPzHZOyWzvqSMOB5AS/drBki/DqGmImfEjexEyEzAmhE0XFT
> hNfaoVXNn81C3czp3OL04bR+P+MQT7DXZH26Ou1P+Htx+DlQn/yH8S/dW4vnccdp
> kBH1X9xP+ob1iwsqWVAwWqbc1RKaUVwCiVjxAiHEzHc/8kjJ1L6Z60lRN5J+9ba8
> cDGWi4Uaf5t7t1UEPIDpyBabkC+BT5tTIq9HJg9YCcNb0PgckW1EdRMjeiJGAJZQ
> muL3k3MorPqPtCH3b7TeosFxdytKjzhkbqWuUAeIg6qzTnHmQYwusw2WO7jwr1O7
> jBY0fp/B996HR8DQqDRY0O34F8D4Zrje7cHKtlJ55DWu0Qtx/7dNdB1caDLWlIWN
> DquBwYMOwNh5w5S0bmC9V42AiK+thb65dG9tPJ0mhoFHnywPauJYq59jAF5wtrIi
> a8lq2HBI3Q4=
> =7PYV
> -----END PGP SIGNATURE-----
>
>



--
http://www.jeremymca...

My books:
Ruby in Practice
http://www.manning.com...

My free Ruby e-book
http://www.humblelittlerub...

My blogs:
http://www.mrneigh...
http://www.rubyinpra...

Daniel DeLorme

2/6/2008 1:10:00 AM

0

Dan Yoder wrote:
> I am pleased to announce the first beta release of Waves, an open-source
> framework for building Ruby-based Web applications. Waves is
> feature-rich, compact, and extensible. Waves is thread-safe,
> hot-patchable, and supports easy clustering. Waves relies on
> best-of-breed Ruby libraries, including Rack, Mongrel, Sequel, Markaby,
> and Erubis, among others. And it uses just-in-time class and module
> creation to minimize the code you have to write.

It's a very nice effort and all that, but it seems to me that this is
just like rails, except done in a slightly different way, different
conventions, etc. So let me ask the (possible rude) question that
matters most:

Why should I use this instead of rails?

Daniel

Dean Wampler

2/6/2008 1:31:00 AM

0

[Note: parts of this message were removed to make it a legal post.]

Or Merb?

On Feb 5, 2008 7:10 PM, Daniel DeLorme <dan-ml@dan42.com> wrote:

> Dan Yoder wrote:
> > I am pleased to announce the first beta release of Waves, an open-source
> > framework for building Ruby-based Web applications. Waves is
> > feature-rich, compact, and extensible. Waves is thread-safe,
> > hot-patchable, and supports easy clustering. Waves relies on
> > best-of-breed Ruby libraries, including Rack, Mongrel, Sequel, Markaby,
> > and Erubis, among others. And it uses just-in-time class and module
> > creation to minimize the code you have to write.
>
> It's a very nice effort and all that, but it seems to me that this is
> just like rails, except done in a slightly different way, different
> conventions, etc. So let me ask the (possible rude) question that
> matters most:
>
> Why should I use this instead of rails?
>
> Daniel
>
>


--
Dean Wampler
http://www.object...
http://www.aspectprogr...
http://aquarium.rub...
http://www.cont...

yudi

2/6/2008 5:35:00 AM

0

[Note: parts of this message were removed to make it a legal post.]

different pattern, using mapping on controller and module interesting.
Now what is the pros and cons?

any other framework adopting this pattern?

good job by the way!

On Feb 5, 2008 7:30 PM, Dean Wampler <deanwampler@gmail.com> wrote:

> Or Merb?
>
> On Feb 5, 2008 7:10 PM, Daniel DeLorme <dan-ml@dan42.com> wrote:
>
> > Dan Yoder wrote:
> > > I am pleased to announce the first beta release of Waves, an
> open-source
> > > framework for building Ruby-based Web applications. Waves is
> > > feature-rich, compact, and extensible. Waves is thread-safe,
> > > hot-patchable, and supports easy clustering. Waves relies on
> > > best-of-breed Ruby libraries, including Rack, Mongrel, Sequel,
> Markaby,
> > > and Erubis, among others. And it uses just-in-time class and module
> > > creation to minimize the code you have to write.
> >
> > It's a very nice effort and all that, but it seems to me that this is
> > just like rails, except done in a slightly different way, different
> > conventions, etc. So let me ask the (possible rude) question that
> > matters most:
> >
> > Why should I use this instead of rails?
> >
> > Daniel
> >
> >
>
>
> --
> Dean Wampler
> http://www.object...
> http://www.aspectprogr...
> http://aquarium.rub...
> http://www.cont...
>



--
Do not be afraid of Change.

Dan Yoder

2/6/2008 5:21:00 PM

0

>> just like rails, except done in a slightly different way, different
>> conventions, etc. So let me ask the (possible rude) question that
>> matters most:
>>
>> Why should I use this instead of rails?

It's not a rude question at all and you're not the first person to
ask, just the first to ask on the ML. Apparently, I am not
communicating this as well as I'd hoped on the Web site. :( I am
going to have to work on that; I appreciate the feedback.

> Or Merb?

Some of what follows is covered at http://rubywaves.co... but
I will try to summarize here some of the key differences.

Waves is thread-safe (like Merb, but unlike Rails); it is DB-agnostic
(like Merb) but comes prepackaged to support Sequel (which is also
multi-threaded and can convert Ruby expressions into SQL queries).

Waves request mapping ("routing") is very different from either Merb
or Rails. It is much more flexible and you can avoid MVC overhead
when you don't need it because requests are mapped into blocks, not
preset parameters.

Filters are also handled in the mapping, so you can lock down all
your controllers from your mapping configuration. You don't have to
worry about a secure method accidentally being exposed by a wayward
controller.

Example:

# make sure users are logged in before allowing them access to URLs
# beginning with '/admin
before %r{^/admin/} do { redirect('/login') unless session[:user] }

Common patterns can also be packaged into modules for reuse, as is
done with the built-in "PrettyUrl" rule sets. I expect to provide
more of these (hopefully through contributors as well as my own
efforts) in the future.

Waves implements something I am calling "just in time resources"
which are MVC classes that are created on-demand based on exemplars.
Thus, you often don't need to explicitly implement a model or
controller class if it follows a well-known problem. Because
controllers are simpler in Waves (they simply return a data object of
some kind, essentially adapting requests to models) they tend to be
easier to reuse.

Views are also very different. For example, layouts are set in view
templates (where I feel they really belong, since they are part of
the view), not in the controller, like this:

layout :default, :title => @person.full_name do
...
end

You can also call views directly from within other views (sort of
like partials, but there is no real distinction between a view and a
nested view in Waves). Waves views are primarily based around
Markaby, allowing for pure Ruby templates, although any rendering
engine can be easily integrated.

Waves also is hot-patchable because it supports true code-reloading
(unloading and then loading, as opposed to just loading a second
time, which can leave stray constants and values from prior loads).

Waves is designed to support multiple applications. Each application
lives inside its own module, so they are completely separated. This
makes it easy to reuse entire applications (although only one
"master" application can provide the mappings and configuration).

Finally, Waves may look on the surface somewhat similar, but beneath
the covers, almost every aspect of Waves is designed to be extended.
Even the dispatcher can be extended or replaced entirely.

There's more, but hopefully, that helps a bit. I will try to spell
this out a bit better on the Web site. Thanks for the feedback!

Regards,
Dan

Dan Yoder

2/6/2008 5:40:00 PM

0

Thanks for catching this. Should be fixed in the latest gem (0.7.2). -
Dan

On Feb 5, 2008, at 2:55 PM, Jeremy McAnally wrote:

> It looks like the gem requirement should be RedCloth not redcloth.
>
> It happens a lot. :)
>
> --Jeremy
>
> On Feb 5, 2008 3:31 PM, Mario Guenterberg <mg@havelsoft.com> wrote:
>>
>> On Tue, Feb 05, 2008 at 04:33:53PM +0900, Dan Yoder wrote:
>>> I am pleased to announce the first beta release of Waves, an open-
>>> source
>>> framework for building Ruby-based Web applications. Waves is
>>> feature-rich, compact, and extensible. Waves is thread-safe, hot-
>>> patchable, and supports easy clustering. Waves relies on best-of-
>>> breed
>>> Ruby libraries, including Rack, Mongrel, Sequel, Markaby, and
>>> Erubis,
>>> among others. And it uses just-in-time class and module creation to
>>> minimize the code you have to write.
>>>
>>> To learn more, please visit the Ruby Waves Web site, where you'll
>>> find a
>>> screencast, tutorial, reference docs, support forums, and more.
>>>
>>> http://ruby...
>>>
>>
>> Hi Dan,
>>
>> I tried to install waves with sudo gem install waves, but I got
>> the following
>> error:
>>
>> ERROR: Error installing waves:
>> waves requires redcloth (> 0.0.0)
>>
>> When I do gem list, I see RedCloth 3.0.4 is already installed.
>>
>> But when I try sudo gem install waves -v 0.7.0 all works fine.
>>
>> It is a little mistake, if I read the install instructions on the
>> website.
>>
>> Greetings
>> Mario
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.6 (GNU/Linux)
>>
>> iQIVAwUBR6jHnzUZahlMISn3AQJegw/8DZv7bmzDjULcYH2PDIU+MtNB3uUdgTn+
>> Q/ULDJMN/lOuOIOTfgB2vLUFuX7ZEAW4/7lHNqlAnvl+BfIpRMtg8C1Tg+qGZ7dr
>> K95B8NA7bsXBC+CkHbzde30FFGga7eANbRhhzCA+/F9R1V9d9pBXPwJgKRDcKiRD
>> hK0xyd+7j3E9kpx0dbJy/EbjgWPHycNp35tyijDn73iNzQnD8M16PJq45HuGlSC4
>> afRLcgz2HUZQr8d+DPzHZOyWzvqSMOB5AS/drBki/DqGmImfEjexEyEzAmhE0XFT
>> hNfaoVXNn81C3czp3OL04bR+P+MQT7DXZH26Ou1P+Htx+DlQn/yH8S/dW4vnccdp
>> kBH1X9xP+ob1iwsqWVAwWqbc1RKaUVwCiVjxAiHEzHc/8kjJ1L6Z60lRN5J+9ba8
>> cDGWi4Uaf5t7t1UEPIDpyBabkC+BT5tTIq9HJg9YCcNb0PgckW1EdRMjeiJGAJZQ
>> muL3k3MorPqPtCH3b7TeosFxdytKjzhkbqWuUAeIg6qzTnHmQYwusw2WO7jwr1O7
>> jBY0fp/B996HR8DQqDRY0O34F8D4Zrje7cHKtlJ55DWu0Qtx/7dNdB1caDLWlIWN
>> DquBwYMOwNh5w5S0bmC9V42AiK+thb65dG9tPJ0mhoFHnywPauJYq59jAF5wtrIi
>> a8lq2HBI3Q4=
>> =7PYV
>> -----END PGP SIGNATURE-----
>>
>>
>
>
>
> --
> http://www.jeremymca...
>
> My books:
> Ruby in Practice
> http://www.manning.com...
>
> My free Ruby e-book
> http://www.humblelittlerub...
>
> My blogs:
> http://www.mrneigh...
> http://www.rubyinpra...
>


Dan Yoder

2/6/2008 5:52:00 PM

0

> different pattern, using mapping on controller and module interesting.
> Now what is the pros and cons?

The advantage, IMHO, of this approach is that the mapping are more
flexible and the controllers are simplified and completely
independent of the request context. This makes the controllers more
reusable and allows you ultimately to even bypass the MVC approach
when appropriate. For example, in one of my applications, I've
bypassed the MVC stuff for serving up certain kinds of resources
(like stylesheets). You have total control over which resources to do
this with or how it gets done.

Also, because the filtering is done in the mapping, not in the
controller, it is much easier to ensure that filters are run
consistently across controllers and that stray methods are
accidentally exposed as URLs. I gave an example of this on the Web
site and in a prior post.

The disadvantage is that they are somewhat more verbose and complex.
There are convenient helper methods to try to minimize this, but I
haven't figured out how to get it to the same expressiveness of Rails
or Merb.

Also, the responsibility is on the developer not to be too liberal in
bypassing controller or view logic.

> any other framework adopting this pattern?

Not as such, but Rack does use request-based mappings as well.

> good job by the way!

Thank you!

Dan

>
> On Feb 5, 2008 7:30 PM, Dean Wampler <deanwampler@gmail.com> wrote:
>
>> Or Merb?
>>
>> On Feb 5, 2008 7:10 PM, Daniel DeLorme <dan-ml@dan42.com> wrote:
>>
>>> Dan Yoder wrote:
>>>> I am pleased to announce the first beta release of Waves, an
>> open-source
>>>> framework for building Ruby-based Web applications. Waves is
>>>> feature-rich, compact, and extensible. Waves is thread-safe,
>>>> hot-patchable, and supports easy clustering. Waves relies on
>>>> best-of-breed Ruby libraries, including Rack, Mongrel, Sequel,
>> Markaby,
>>>> and Erubis, among others. And it uses just-in-time class and module
>>>> creation to minimize the code you have to write.
>>>
>>> It's a very nice effort and all that, but it seems to me that
>>> this is
>>> just like rails, except done in a slightly different way, different
>>> conventions, etc. So let me ask the (possible rude) question that
>>> matters most:
>>>
>>> Why should I use this instead of rails?
>>>
>>> Daniel
>>>
>>>
>>
>>
>> --
>> Dean Wampler
>> http://www.object...
>> http://www.aspectprogr...
>> http://aquarium.rub...
>> http://www.cont...
>>
>
>
>
> --
> Do not be afraid of Change.


Steve Ross

2/6/2008 8:25:00 PM

0

On Feb 6, 2008, at 9:20 AM, Dan Yoder wrote:

> comes prepackaged to support Sequel

The walk-through looked promising, although I haven't had a chance to
try it. Have you attempted Haml integration? Haml and Sass are such
incredible productivity enhancers (honest, without them I feel like I
have one hand tied behind my back). It would be great to know whether
they are easy, sorta-easy, or really hard to integrate.

--s