Pongo aquí la primer parte de este artículo que acabo de leer y recomiendo sin dudas, incluso para los totalmente novatos en Ruby.
-~-~-~- Ruby on Rails has helped launch the Ruby programming language into stardom, and for good reason. Rails opened many eyes to the power of Ruby and made web programming that much easier. But one of the unfortunate aspects of Rails is that it tends to color Ruby as a language primarily for database-backed web applications. Some software just doesn't work well in that mold. Additionally, the extreme popularity of Rails has left some Rubyists in the corner wondering what happened to the other great software written in their language. It hasn't gone away; on the contrary, there are a tremendous number of open-source Ruby projects under development. We are going to look at two of them here. The Merb web framework, written by Ezra Zygmuntowicz, was first popularized as a lightweight way to handle file uploads for Rails applications. It has since grown to become an excellent framework in its own right for creating web applications. It is simpler and seems to be faster than Rails, and it is more flexible in some ways. While Rails is deliberately "opinionated software," Merb acknowledges that there are different options for object-relational mapping systems and web template engines, and does not try to pick one over the other. If Merb is a paragon of professionalism and class, Shoes is a monkey on LSD. Shoes, by why the lucky stiff, is an incredibly compact cross-platform GUI toolkit for Ruby, but it looks nothing like the other cross-platform toolkits out there. For one thing, it is lightweight. Shoes lets you build GUIs in Ruby whose code actually looks like Ruby, not XML or Java. Shoes is under heavy development right now, but it will eventually form the basis for the new Hackety Hack, _why's programming environment for kids. So, what are a web framework and a GUI framework doing together, you might ask? We are going to build a pastebin as a repository for our own code snippets and pieces of text we want to save. We'll build a GUI frontend using Shoes, and connect it to a Merb backend that will handle the database. We could just as easily slap on a web interface to the Merb application as well, but we will use the Shoes GUI to demonstrate the ease with which we can connect the two components using Ruby. In fact, the basic proof of concept took the two of us about an hour to get working, and it took another hour to finish. Without further ado, we present our pastebin application, using Shoes and Merb, Shmerboes. -~-~-~- No se lo pierdan completo! http://www.oreillynet.com/pub/a/ruby/2008/01/14/shoes-meets-merb-interfacing-a-gtk2-front-end-and-a-rails-web-service.html -- Diego Algorta Casamayou http://www.oboxodo.com - http://diego.algorta.net _______________________________________________ Ruby mailing list [email protected] http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar
