[ANN] Introducing Waves - Web App Framework

D

Dan Yoder

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://rubywaves.com/

Thanks!
Dan
 
M

Matt Todd

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
 
D

Dan Yoder

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
 
J

Jeremy McAnally

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

It happens a lot. :)

--Jeremy

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.jeremymcanally.com/

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

My free Ruby e-book
http://www.humblelittlerubybook.com/

My blogs:
http://www.mrneighborly.com/
http://www.rubyinpractice.com/
 
D

Daniel DeLorme

Dan said:
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
 
D

Dean Wampler

Y

yudi

[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!
 
D

Dan Yoder

just like rails, except done in a slightly different way, different
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.

Some of what follows is covered at http://rubywaves.com/features 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
 
D

Dan Yoder

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
 
S

s.ross

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
 
D

Dan Yoder

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.

really easy. the only reason i didn't go with haml out of the gate is
because markaby accomplishes a lot of the same things but is much
more flexible since it is actually ruby. of course, if you want
client-editable templates, than that becomes a drawback, one which i
plan to address using sandbox. that said, it really isn't difficult
to add haml support if it turns out to be a must-have. if you're
interested at giving it a shot yourself, take a look at the
Waves::Renderers stuff in the API docs.

dan
 
D

Dan Yoder

just out of curiosity, how do you test your framework?

for functional testing, i have several apps running on it, and i test
those. i would like to formalize that into actual test apps as
contributors come on (knock on wood).

for performance testing, right now i am using ab, although
performance will become more of a focus in future releases.

btw, thin support is coming in the next release. i've already had a
couple of requests for it. :)
 
S

Sasa Ebach

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).

Oh, this one is really interesting. I remember asking David H. back at 0.5
if Rails will ever support this and he said no. The app folder in Rails
should really be an apps folder with subfolders which in turn have
controllers, models, views, … So for my main use case (having many
customers running on one codebase, with each sharing 90 % of functionality
and having 10 % of customized functionality) Rails died back then. This is
the main reason I still develop my main app in PHP.

I will have to look at waves then as soon as I have the time ;)

-sasa
 
T

Trans

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://rubywaves.com/

Hi,

The website is very distorted for me. The sidebar (I think it is a
sidebar) sits above the main text. And the menu bar is wacked=out too.
Thought you'd like to know. (I'm using firefox on linux).

T.
 
M

Martin DeMello

Hi,

The website is very distorted for me. The sidebar (I think it is a
sidebar) sits above the main text. And the menu bar is wacked=out too.
Thought you'd like to know. (I'm using firefox on linux).

Works perfectly for me (firefox 2.0.0.11 on linux)

m.
 
D

Dan Yoder

Are you using FF3? I've gotten a couple of reports on that ... not
sure what the problem is. :(
Dan
 
J

Jesús Gabriel y Galán

Are you using FF3? I've gotten a couple of reports on that ... not
sure what the problem is. :(

I see the same weird layout as Trans, I'm using FF 2.0.0.11 in Ubuntu.

Jesus.
 
D

Dan Yoder

can anyone who is having this problem see if it is fixed now? i =20
updated the theme, but i since i'm not seeing this problem, i am not =20
sure if i fixed it or not? thanks again to everyone who helped me =20
resolve this. -dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,197
Latest member
Sean29G025

Latest Threads

Top