Archive for 'ruby'
When inheritance and mixins become a design issue
Posted on 09. Mar, 2011 by Guilherme Silveira.
One object, more than 300 public methods, 560 instance and 300 class or static methods. It is easy to see that those objects tipically present low cohesion, more than one responsibility, tight coupling and a huge interface. A pattern known as “God Class”. You can create them in Java using class inheritance, or in Ruby [...]
Continue Reading
Driving design: adding a touch of our domain to our APIs
Posted on 21. Jan, 2011 by Guilherme Silveira.
In this second screencast from the Driving Design series, the amazingly simple form gem is shown along with a simple DSL implementation. Its current API uses a fluent interface through Ruby hashes that allows easy output customization. This is the current version of simple_form that allows one to configure the building process of a form: [...]
Continue Reading
Designing code: fluent interfaces and your domain
Posted on 03. Jan, 2011 by Guilherme Silveira.
Together with coworkers, we have been talking about the influence of Test First in our design: it is not only about testing, or testing all the time. The discussion is on how developers should learn from understanding feedback from every type of tests (unit, integration and so on) and act accordingly. We have begun a [...]
Continue Reading
Restfulie is almost there: first beta out
Posted on 04. Nov, 2010 by Guilherme Silveira.
Rhaiger and Ricardo Nakamura have contributed with support to formurlencoded (issue 152), now simple form posts are also supported. In parallel, through Respondie one is capable of extending and composing behavior on resource rendering. The following example shows a simple trait that renders an etag whenever the resource responds to etag: Respondie is a Rails [...]
Continue Reading
Restfulie at RailsConf 2010
Posted on 22. Feb, 2010 by guilhermesilveira.
Fabio Akita, from Locaweb, is presenting a session on Restfulie and becoming truly REST in Rails. With the help of Caue Guerra, George GuimarĂ£es, and many others, Restfulie is growing and implementing new features that we still expect from REST client apis. For those who are going to RailsConf this year and want to create [...]
Continue Reading
RESTEasy: Where did the hypermedia go to?
Posted on 03. Dec, 2009 by guilhermesilveira.
Some friends have asked what are the major differences between Restfulie and RESTEasy client frameworks. Strong coupling and hypermedia awareless As of today, Resteasy requires you to create an interface mapping every resource operation to a specific method, using @VerbName and @Path annotations to specify the desired target URI. RESTEasy is ignoring the power of [...]
Continue Reading
missing_knowledge: dynamically adding ruby methods
Posted on 09. Nov, 2009 by guilhermesilveira.
While creating restfulie we have come across a few issues related to my complete lack of mastery of the ruby meta programming features. The client’s code (hypermedia aware resource consumer) is based on ruby’s open classes and objects idea: while parsing a xml (or json) format, one can easily add specific methods to that particular [...]
Continue Reading
quit pretending, use the web for real: restfulie
Posted on 03. Nov, 2009 by guilhermesilveira.
Resource representation A simple resource representation in xml would be as <order> <product>basic rails course</product> <product>RESTful training</product> <price>500.00</price> </order> Note that it provides information on the order itself, as we are used to. But it lacks providing meta information on the business process: from here, I am unable to go anywhere. This resource still lacks [...]
Continue Reading
Fractals in cloud computing with Google App Engine
Posted on 04. Sep, 2009 by guilhermesilveira.
While studying math methods as a minor in my applied math course, I had a mentor, Eduardo Colli, who helped me teaching the math requirements to implement a desktop based discrete dynamical systems software, Pulga. In the dynamical systems area – usually non-linears – people started talking about caothic behaviour of particles and one of [...]
SUBSCRIBE TO OUR RSS