Uplevel e-solutions

Webware and Rich Internet Applications

Flex and Rails

This is the one of the most exciting topic in web development in my opinion. Why ? It’s because Adobe Flex gives us amazing flexible tool for creating RIA interfaces. I mean we can be very productive in creating very very usable and beautiful interfaces for our applications, and what is more it is can’t be even compared to Ajax capabilities. Ok, this is frontend but what about backend ? Here we have another cool and productive stuff in this category - Ruby on Rails. Of course you can now say “ohh now he said that NXD is easier way, that Seaside is great and the only way, and now he’s talking about Rails again” - yes, but everything depends on what problems we have to solve. If it’s unnecessary to implement extremely difficult business logic I prefer NXD (native xml databse) and Flex. But Rails destination is exactly to solve these difficult problems. On other hand sometimes also there is no need to use something so powerfull like Flex - in this case, my favorit is now Seaside and some Ajax stuff like YUI or Prototype and Script.aculo.us So generally how many solutions we know, so many problems we can solve properly.

Back to Flex and Rails, last time I found sth called Flexible Rails: Flex 3 on Rails 2 this is one of the series Dzone Refcardz. But to be honest it’s not outstanting help, there is about 8 pages of pdf lecture. Best start of using Flex and Rails is to read Peter Armstrong’s book Flexible Rails (Flex 3 on Rails 2). I’ve read this book and it’s really good, unfortunately based on Cairngorm framework (rubbish). If the author had mentioned about PureMVC there, it could be simple outstanding. There is a couple examples of different ways of communication between Flex and Rails. First he’s talking about REST in Rails so XML way. Later there is an example of AMF format but with RubyAMF (open source flash remoting gateway for rails) which is much faster than WebORB and easier to use. But there are other solutions e.g. Flex Dynamic Scaffolding for Ruby on Rails, here is also screencast and project site. Interesting is also Ruboss framework but I haven’t tried it yet. From their page ” The goal of the Ruboss Framework is to automate much of the plumbing necessary to use Adobe Flex and Adobe AIR with Ruby on Rails. The Ruboss Framework brings the design principles and productivity of Rails to Flex development, and makes integration with RESTful Rails controllers as simple as possible.” See also announcing enterprise flexible rails book.

Generally Flex and Rails gives a lot of fun and profit in web developing, so try it and have fun :)

  • Comments
  • Filed under: Flex, Ruby, RubyOnRails
  • Seaside and Rails

    Last time there was an another great article about Smalltalk called Back to the future for Smalltalk. Looks like a smalltalk back to the game :) It’s maybe the same history like a Ruby, today Ruby is really popular because DHH created Rails. But in Smalltalk we have Seaside which is also outstanding. Im generally a Ruby programmer, now im working with Squeak. I just wanna try how productive could I be with Seaside. Today I was a little worry about generally Squeak performance because there are many tests where people said “Ohh no ohh no, its so slow in this hello world test”. But after that I realized how long i was working with Ruby and Rails, and i’ve never had problems with performance at all. What is more Smalltalk is even faster than Ruby. So for me more important is how productive these frameworks are (and both are so efficient) than thousand extremelny weird speed tests. In one test someone said that Java is so cool, it’s so fancy and generally great because it’s faster than Ruby and Smalltalk. But I don’t care about performance if i must write thousands lines of Java code which displays simple “hello world”, I can do the same in one line here.

    Here is a short video about comparison Rails and Seaside (rather developing style). Another demonstrates that Seaside is a sever and an IDE in one. But what is the most important I watched Giles Bowkett really interesting presentation about Rails and Seaside and here is it:
    Seaside and Rails (The 2007 Goto) from giles goat boy on Vimeo.

  • Comments
  • Filed under: Ruby, RubyOnRails
  • Juggernaut - server push in Rails

    Juggernaut

    This is a really interesting plugin for your Ruby On Rails apps, like they said:

    “aims to revolutionize your Rails app by letting the server initiate a connection and push data to the client. In other words your app can have a real time connection to the server with the advantage of instant updates.”

    The plugin Juggernaut initiates a flash xmlsocket between server and browser allowing real time communication between the two. The open socket connection allows the server to ‘push’ base64 encoded javascript to the browser which is subsequently decoded and evaluated.

    So generally something like Comet for Rails :)

  • Comments
  • Filed under: RubyOnRails
  • Cells niesie ze sobą to co w Ruby On Rails sie nie udało, czyli moduły, czyniąc to bez straty dla wydajności co pierwotnym modułom też się nie udało. Każda komórka (Cell) jest jak niewielki lekki kontroler (wraz z odpowiadającymi widokami), który można użyć wszędzie w naszej aplikacji. Jest to bardzo interesująca rzecz, która pozwala budować aplikacje zorientowane bardziej komponentowo.

    Kolejna rzecz to Apotomo - jest to stanowy (stateful) komponentowy framework dla Railsów. Posiada on bazujące na Cells widgety do implementowania logiki aplikacji (wielokrotnego użytku). Strona nie musi być już budowana jednym monolitycznym kontrolerem, ale może być definiowana za pomocą zagnieżdżonego drzewa widgetów :) . Całość w każdym razie wygląda bardzo fajnie (dziś zacząłem używać :) ). Warte uwagi jest też, że Apotomo zostało porównane do Seaside frameworka napisanego w języku Smalltalk.

    Warto odwiedzić tą liste mailingową, gdzie ludzie, do których się dołączam od dzis :p tworzą i używają stanowe, komponentowe frameworki. Może to pozwoli frameworkom Ruby być jeszcze lepszymi :)

  • Comments
  • Filed under: Ruby, RubyOnRails
  • Ruby On Rails VS CakePHP

    Stary motyw od chłopaków z RailsEnvy :) Jednak bardzo prawdziwy. Tak sobie właśnie myślałem, że niemożliwe jest osiągnięcie sukcesu w budowaniu Mercedesa mając do dyspozycji skorupę malucha. Mimo ciągłego wzorowania się na tym Mercedesie, to dalej pozostanie tylko zardzewiały maluch. Dzieje się tak dlatego, że najważniejsze są środki do jego budowy. Mercedes ma do dyspozycji bardzo elastyczne, potężne narzędzia (Ruby), natomiast maluch, nędzny silnik i zardzewiałą blachę (PHP). Wynik tego pojedynku jest oczywisty. “Inżynierowie” od tego malucha często jednak mówią “aaa bo maluch kosztuj 5 razy mniej niż twój Mercedes” (Hosting). Jednak ktoś trzeźwo myślący, wybierze to co jest ważniejsze: mieć popsutego taniego malucha, czy jeździć na wakacje mercedesem.

  • Comments
  • Filed under: Ruby, RubyOnRails
  • Hobo to zbiór open-sourceowych pluginów dla frameworka Ruby On Rails pomagających łatwiej i szybciej(sprawdzone na własnej skórze :p) tworzyć aplikacje webowe. Główne założenie: pisać mniej kodu. Z takimi rozwiązaniami jak HOBO czyli narzędzia typu RAD(Rapid Application Development) wiążą sie zazwyczaj pewne problemy, mianowicie: nie sztuka zrobić coś szybko, ale sztuka utrzymać przy tym uniwersalność i prostotę danego narzędzia. Mam tu na myśli unikanie “magii”. Hobo radzi sobie z tym znakomicie, jest bardzo przejrzyste-uniwersalne głównie dzięki zastosowaniu szablonów DRYML. Nadaje dobrze zarówno do małych aplikacji jak i tych większych (np.http://thesourcepool.com jest napisana cała przy pomocy HOBO, jeszcze w mojej poprzedniej firmie). Oczywiście są pewne braki: dokumentacja(produkują ją) i stabilność/wydajność(obecna wersja to dopiero 0.7.5).

    Tutaj jest zbiór przydatnych tutoriali i dokumentacja HOBO tutorials

  • Comments
  • Filed under: RubyOnRails