revJournal - Interviews

Q&A with Andre Garzia, author of RevOnRockets and more

Sarah Welcome to revTalk, our Q&A column featuring members of the Revolution developer community. Here our featured guest is Andres Garzia. His RevOnRockets framework and other fine goodies can be found at http://andregarzia.com.

revJournal: You just got back from RevLive '09, the latest RunRev conference. What did you like most about the conference?

Andre Garzia: It was a very rich conference in a fabulous venue. I think the Dynamic Earth was the best place we ever held a conference to this day. RunRevLive 09 was the first conference to deal with the new RevServer (the php-like thing) and RevWeb (the web plugin thing), so it was very exciting. What I liked most is exactly what I like most about conferences in general which is the networking and meeting people. Finally seeing faces instead of email addresses.


revJournal: You gave two presentations at RevLive, one on multiuser databases and the other on integrating the desktop, plugin, and server. Can you tell us a bit about what you covered there?

Garzia: Actually I gave three presentations this year. There was one on the beginner track about multi user databases using RevServer, during this presentation I showed the audience a very simple fully functional online invoicing application, this app had administrator features and isolated client invoices, a very good and easy example of multi user databases.

Also on the beginner track was the integration session which was about demoing how people could use the new technologies together, namely Rev destop applications, RevWeb plugins and RevServer server side components. For this sessions, I created something that I thought people would find useful, a simple PayPal tracking system. This system used a server side component to talk with PayPal IPN (Instant Payment Notification) server, this way, everytime you received money (and other events) PayPal IPN would talk to our RevServer server. Then I created a RevWeb plugin using the new Datagrid to display my transactions and filter them to my liking and last, I built a desktop application which was a notifier, it would sit hidden and when you received money it would sound like coins falling and display the last transaction showing you an option to open your web browser and display the plugin. It is very simple but it is a useful example of how you can use everything together.

The third session was a big one that I approached differently. During the conference, I received feedback that people didn't like seeing code on the screen and being driven thru demos, they want a hands-on experience. So this session was about creating a RevServer based online shop from scratch, this is a huge task mind you, the fact that in two weeks I could create a web shop that was useful is a good benchmark for our language, well, what I did was guide them on how to install this online shop on their own On-Rev account so that they could explore the code and play with it themselves. It was not an easy task since it involved creating and setting databases but I think it was worth it. The web shop has hundreds of files and now, every single one of them is at the hands of the attendees. They can simply inspect them to see how things were done.


revJournal: The session on integrating the desktop, plugin, and server is especially timely, with RunRev's new web technologies. Can you give us a bit more detail about what you covered in that session, and tips that might inspire folks to dive into using these components?

Garzia: What I covered was as I said above, a simple PayPal tracking system with a server side component driven by a MySQL database used to store paypal transaction data and two client side components that would talk to that server. One was a plugin that would show a datagrid with the transactions and the other a tiny desktop application that would show the last transaction and pop to front when you received money. The main point of the session was not about paypal at all, was to show people how to approach integration. I tried to show them an easy to grasp mental framework on how to approach such jobs, when to use a server, when to use a plugin, when to use a Desktop application and how to glue things together without loosing your sanity.


revJournal: Are any of your RevLive materials available online for folks who weren't able to attend the conference?

Garzia: I am secretly working on an rev education web site, I will post all my content with docs there for free. I just need some weeks to finish it.


revJournal: You've been working on RevOnRockets, and people who've been using early versions have been raving about it. Can you describe RevOnRockets for newcomers - what is it, and how does one use it?

Garzia: This will be a long answer, so if you're not sitting, then you should find a confortable position. To talk about RevOnRockets is to talk about the history of Revolution web applications. When I started doing web with Revolution there was no RevServer, everything needed to be coded from scratch, so I started creating libraries for everything such as basic cgi routines, email sending, session management. Then I created a simple Revolution based web server that you could use to debug your web applications, I bundled all this together and called it RevOnRockets as a joke on RubyOnRails and PythonOnPlanes, my framework was put to use in many world class web sites and to this day it is performing its daily duties fine, Rockets still flies as expected and seldom explodes and when it does, it is on a nice, organized, well though explosion. Keep in your mind that this is all based on stacks using the "old" cgi engine so when Runtime Revolution released RevServer, everything changed. RevServer is a game changer, it instantly made half of RevOnRockets obsolete because all the cgi stuff is already there and so is the templating stuff. The Revolution based web server also - currently - does not work with RevServer pages.

What I am doing now is repositioning RevOnRockets on a RevServer world. Parts of RevOnRockets still quite useful, for example the email routines and the mime decoder for uploads. What happens is that RevOnRockets is an umbrella framework where I put everything we need to get us there where we want to be. Now, we're moving from a low level cgi framework to a high level web application framework. RevOnRockets is not dead, it is actually flying higher with the new RevServer, I am assembling new rockets for us to use and they will make our web living easier.

Now, when you ask how does one use it? The answer is a mixed one, because currently there are two "releases", the old cgi engine release is just a bunch of stacks that you start using like any other stack. The trick with the old cgi engine is not how to use RevOnRockets, this is quite straight forward, the tricky part is how to install the engine itself on the server. Anyway, with the new RevServer and the soon-to-be-released RevServer Core for free, I would advise against using the old cgi engine and the old RevOnRockets unless you're familliar with linux and wants to get your hands on the dirty tricks of installing the cgi engine. Now with that said, let me say, it is actually quite easy to install the cgi engine, I just said that boilerplate thing because people think it is hard but in fact it is not. You just upload the engine to the correct place and set its permissions to the correct permissions, you're done.


revJournal: How easy is RevOnRockets to set up?

Garzia: RevOnRockets is a collection of stacks, you just drop them on the server on a place you desire and start using them. On my server I made a folder called /opt/web where I put them, but it can be anywhere you remember, then to make a simple old style cgi is as easy as:

#!revolution

on startup
start using "/opt/web/RocketsCGI.rev"
cgiOutput "Hello World", "text/plain"
end startup

RevOnRockets still had its place and still performs quite well, also, RevOnRockets can use stacks and currently RevServer cannot - this will change. Talking about the new version of RevOnRockets for RevServer, it is bundled as an include file, you just include it with the include command which works much like the start using command, like:

<?rev
include "rockets.inc"
?>

This will load the new RevOnRockets if you have that file in the defaultfolder.


revJournal: I understand RevOnRockets is extensible. How does the developer take advantage of that?

Garzia: RevOnRockets is a collection of stacks (old release) and include files (new release) and a little web server to run on your local machine. Extending stack libraries is just a matter of opening them in the IDE and adding code, extending include files is even easier since you can use any plain text editor to edit them. Now, what I like the most about RevOnRockets is what people do with the web server. Called RevHTTPd (silly name), I've seen people using it in intranets to server simple applications, to use it inside their own desktop applications to provide web services and much more. Revolution is such an easy language that after a couple hours studying the server code anyone can understand it and change it to suit their own needs.


revJournal: Rev 4.0 will be released with a new server component that's rumored to be light years beyond what we can do now with the Rev CGI engine. Without getting into any details covered by your NDA with RunRev, can you tell us how will this influence the direction of RevOnRockets?

Garzia: It changes everything. RevOnRockets is being reorganized to benefit from the new RevServer technology, much of what RevOnRockets did is now being done at engine level and that is quite good and I am happy with that, so what I am doing is taking it to the next level and making RevOnRockets do what RevServer will not. RevOnRockets will always be on top of the latest web technology from RunRev, if they release something better that make RevOnRockets obsolete, I will simply accept it, see what is the next level and code for that. Right now, I am focusing on email, sessions, plugins, file uploads and overall web framework, things that RevServer has no built-in features for.


revJournal: Your web work has given you considerable experience with JavaScript. Now that Rev delivers a client-side browser experience with the new plugin, what do you see as role of the plugin, what considerations do you take into account when deciding to deliver a web app with JavaScript or the Rev plugin?

Garzia: The main issue with the plugin is, "Does my client has the plugin installed, or, can I make him install that?" For example, if you're delivering a web application to be used internally by a company, you can simply make the plugin a requirement and they will have to install it, now, if you're doing a web application that you expect to be used by everyone and his dogs, you might suffer some rejections since people might not want to install your plugin. In the end, it all depends on how useful your software is to the client, if it is really useful, they will install anything, if they have some other option that is as good as yours and has no instalation procedure, they will move to your competitor. That being said, the plugin offers a better experience UI wise, since we have all the power of Rev desktop application on the browser, you can create beautiful things and it is way easier than flash. My personal opinion is, if I am just presenting data and using simple UI, I go for HTML/Javascript/CSS, if I have a complex UI I will consider a plugin because it will cut my development time and support calls.


revJournal: Which JavaScript libraries do you use most often, and what do you like about them?

Garzia: You can never have enough JS libraries!!! Joking, I tend to use not many libraries at all, I just use the big ones. For all my needs, I use JQuery library, it is well documented and works as adverstised. If I need a rich text editor, then, I use Yahoo! User Interface library because they have the best widgets (I try not to mix YUI with JQuery, if I use YUI, I don't use JQuery). There's a library that has a special place on my heart and it is MooTools, it is tiny, well designed and works, I use JQuery instead of MooTools because it has more features and more knowledge spread over the web. If I would advise someone to keep an eye at something, I'd say, don't miss cappuccino library by 280north. That will really change everything, it is a COCOA implementation for the web, it uses a new Objective-J, Javascript, instead of Objective-C, but if you ever developed with ObjC/Cocoa, it is the same thing, but it runs on the browser with no plugin. Check out 280slides, a powerpoint like application built with that. Now, that and RevServer is a winning combination.


revJournal: What advice would you offer for Rev developers learning JavaScript as a second language?

Garzia: The only way to learn Javascript is to use it. Create simple projects and use it with no libraries at all. Buy O'Reilly Javascript: The Definitive Guide (4th and 5th ed because they differ a lot) and read it. Javascript is a quite fun language, the latest version is really well designed and has a lot of power inside. The thing is that coders still coding for Javascript 1.0 and missing all those features and shipping crap code, so when I google for goods, you end up with some outdated thing full of bad practices and think that Javascript is a bad language when it is not.


revJournal: Your work as a contract programmer seems to cover a lot of ground, from the desktop to the web and a whole lot in between. Can you tell us a bit about some of the projects you've done?

Garzia: I have a long term contract with the Monks at Kauai Hindu Monastery and together we created some really nice tools. We created a desktop application for their magazine, a digital version, full of multimedia and with the same content and layout as the printed magazine. We created online applications such as a searchable Hindu Lexicon. I also created their payment processment system with revolution cgis, all the online transactions passes thru that system.

I and others were involved in two distance learning websites for GP, Nurses, Doctors and other medical professionals. The site uses RevOnRockets and stacks to drive all the multimedia lessons and student progress.

Many clients approach me to create tiny Revolution libraries or Javascript libraries for their own projects which I like doing since they are usually small and can be done quickly.

I created a simple gateway system that enables a university to keep using its old AppleEvents based CGI applications with the Apache Server.

These are some of my favorite ones.


revJournal: I've had the pleasure of hiring you as a subcontractor on a web project, and was impressed not only by your speedy delivery and the quality of your work, but also by the care you took in providing notes to help with the integration. I'd recommend you to any project manager who could benefit from the broad scope of your experience. Do you have time to take on other contract opportunities, and what sort of project do you feel would be most interesting for you to contribute to?

Garzia: Thanks for the words Richard, if I started writing about you here there would be no room for the actual answer! I have time to take contract works and I think I am most interested in web application or network related applications. One job I like doing is to create libraries for third parties may they be Revolution based or Javascript, I have a fast turnaround and can deliver those quickly, and quickly means cheaper. So if someone needs some library, I can usually help.


revJournal: One of your projects was the enviable task of working with the Himalayan Academy at their beautiful site in Hawaii. Can you tell us a bit about what you did for the Academy, and what you enjoyed about Hawaii?

Garzia: This would deserve a whole book. Working for them is not only a professional task for me, knowing them and being there for a while, changed my life. I have a firm belief that the Kauai Hindu Monastery is the best, happiest, place on earth. I am working for them since 2005 I think, or was it 2004? During this time we created a lot of tools for internal use and some that are public.

Our biggest application is the Hinduism Today Digital Edition which is a desktop application for accessing the Hinduism Today magazine with all its graphical glory and multimedia. That application is undergoing a rewrite now using the new Rev 4.0 features. We also created lot's of server side things, all the online transactions may they be donations or buying products passes thru Revolution, we have extended RevOnRockets with payment processing libraries and more. Lots of their system are glued together with Rev, for example, their mailings passes thru a Revolution based RSS generator.

They have a blog at http://www.himalayanacademy.com/taka. This blog has photo contributions from all over the world, I built a system for the contributors to upload images and caption them so that the editor can simply approve them and they will go to the blog, simpler than receiving attachments by email.

I do a lot of Javascript there as well.


revJournal: You travel a lot, and at this point I believe you've spoken at more Rev conferences than anyone else, even more than Kevin Miller himself - you were at the first Monterrey RevCon that Chipp Walters and Dan Shafer hosted, which Kevin didn't attend. In all that traveling you've had some, shall we say, interesting experiences. Can you share one of your oh-my-god-I'm-never-traveling-again stories?

Garzia: Now that you've said, I might have spoken more at the conferences than anyone... I haven't noticed that before. There are many stories about my travels, some day, during a conference I will host a stand-up commedy night on those.

In Malta, my luggage decided it was old enough to travel by itself and ended up in Italy. My luggage know countries I never been, it is a really well travelled package. I ended up using Rays and Marks clothes for days.

Leaving LAX during the last U.S. conference, the TSA gave me that security theater and made me strip, I wondered if I should dance while doing that.

In Edinburgh I got lost on the rain inside a park! I could not find where in the meadows I was and it was raining, lucky my backpack is waterproof (I am not tough).

In Hawaii, after the last conference, a woman mixed me with one of the monks and asked for blessings. I politelly answered that I worked there, showed her where the monks were and said that if she needed a software solution, I could try to code that. That was funny and not a omg-never-travelling-again story.

As for never travelling again, the U.S. is full of stories. I was once entering the country thru Miami International Airport and the agent at imigration tried talking to me in spanish, our conversation was like this:

AGENT: "SPANISH! SPANISH! SPANISH! SPANISH!"
ME: "Excuse me, I don't speak spanish, I speak english and Portuguese."
AGENT: "SPANISH! SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!"
ME: "Yes, I do understand some Spanish, but I'd rather be addressed in English or Portuguese"
AGENT: "SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!"
ME: "In Brazil, we speak Portuguese..."
AGENT: "SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!"
ME: "Vacation."
AGENT: "SPANISH?"
ME: "I like the Monterey Aquarium."
AGENT: "SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!SPANISH! SPANISH! SPANISH!"
ME: "I am leaving in two weeks."

...and the agent promptly stamps my passport and shouts at my face: "IF YOU GO TO A COUNTRY, YOU BETTER KNOW THE LANGUAGE SPOKEN THERE!". I instantly heard the X-Files theme on my head and wondered in which country I was or if Cuba invaded and dominated Miami in the hours I was in the air. During the interval of my flight connections I saw a restaurant with a sign: "English spoken here".

I also lost the last flight home to Brazil. Our biggest airline company called VARIG (Viação Aérea Rio Grandense, the best ever, very fond of memories of them), went bankrupt (no bailout here) and I lost the last flight home, the very last VARIG plane to take off from LAX. I was left in the airport for FIVE DAYS till I started shouting that I was going to start looking for a job and applying for a green card, then, they sent me home, and that was a never-flying-again moment.


revJournal: I understand your college education was initially focused on film making. Can you tell is a bit about that, and are you still making films?

Garzia: My academic life is a interesting one, I started doing engineering but I left after 2 years and went to advertising which was just a stepping stone so that I could transfer myself to the film school. There at the film school of the Fluminense Federal University, the very best on the country, I stood for seven years. I was supposed to graduate in four but the parties were good, so I kept myself there, one important thing is to be clear about your priorities, parties were good and so was the company, the classes were great but I liked the parties better. I did not made many films, just a couple. I was involved with television, and for three years me and my friends had a live TV show that broadcast for two cities, yay! It was more popular than what we tought. There was a period when I was involved with 50% of our TV grid, basically, I was doing TV and not my classes but hey, you could count on one hand how many guys at the film school could deal with the tech side of keeping our Amiga computers running and our 1980 SVHS editing systems, the film school was like time travel, our equipment was so old that our editing isle looked like a prop from star trek with all the blinking lights and sometimes the sparks and smoke, mind you that this was from 2001-2007.

At the university my main interest was script writing but there's no business here for script writers. Here in Brazil, is common for the director to write their own scripts, which more often than not, makes the script really bad or even worse, the script writer directs the movie which often makes it a bad movie. I am a really bad director, I don't like it, but I like writting scripts and telling stories, so I moved to a new venue, I am writting books! I have two published books together with other authors, both are short stories anthologies, one is science fiction shorts and the other horrors shorts, they are called Solarium (scifi) and Sinister! (horror) and in couple days we'll have a autograph night here. I really like writing short stories, they don't give execution errors and never refuse to compile.


revJournal: What did you learn from film making that has helped your software development work?

Garzia: I am usually a subcontractor and that is a all about people skills. During the film school, I worked with artists that were in the best film school in the country, can you imagine the nightmare? Things like your main actress refusing to shot the final scene of the movie after shooting all the others, your art director walking away from the movie after a production assistant accidently droped coffee on him and the like. I learned to work (survive?) in a environment where all the work is made by many hands and where everybody thinks they are in charge, as we say here, too many chiefs for too few indians. That helps working with any kind of community because I never met a group of people that were harder to work with than artists! I think that anyone that manage to shoot a full movie with the crew from the film school is entitled to the chair of general secretary of the United Nations. I think that with just a dozen film school rejects we can bring peace to the Middle East. If you doubt me, just imagine dealing with a film crew that was supposed to bring back the film equipment , a week before, to the university but could not do it because they were lost deep in the amazon using native indian paintings on our 35mm camera while I was paying rent of a very expensive house to shoot my movie and had no camera...


revJournal: On the rare day that you're not programming you enjoy a lot of outdoors activities, from hiking to backpacking to paddling. What do you like most about getting outside?

Garzia: I like getting in contact with nature. I was a sea scout so anything related to camping, sailing, sea and mountains will attract me. We, coders, tend to get lost into abstractions of an invisible world. We have arguments, passionate discussions, dreams, that are only related to things that exist inside a machine in our head, and believe me this machine had no relation to the computer in front of you, the computer works based on faith, you have faith that it will work and sometimes it even do. Going outside, to nature, helps me to keep in touch with our planet and the real world. There's nothing better than a long walk on the beach after a hard day in front of a debugger. Makes you wonder why you work at all, I always think, can I make a living from selling coconuts and beer at the beach? Then, I think about "how can I solve the merging problem?" (pet problem #1), and then I am a coder again.


revJournal: On paddling: kayak or canoe, and why?

Garzia: kayaks all the way. Simple reason, I live less than 10 minutes away from the atlantic. Oceans are made for kayaks, I don't think I trust a canoe on a bad wavy day. Also paddling a kayak is better, easier I think. Canoes are for rivers or lakes in my opinion. Once I took a 30km kayak trip on the coast of Kauai, Hawaii. The Na'pali coast is beautiful. I did that with a horrible sit on top kayak that would track as bad as a brick and drag as bad as a fat whale swiming backwards but it was a wonderful trip, I don't know if I would take it with a canoe, I might have a prejudice, but I think canoes are for rivers, I have some indian (Brazilian) blood in me, so I might try it more.


revJournal: What's next for Andre Garzia? Any new components or applications you're building that you can tell us about?

Garzia: Many new things are comming. As the Irish say: "good things come for those who wait". I am organizing a site where I will put lots of learning material for Revolution, including my conference material. I am also working on a new RevOnRockets release that will rock! In the meanwhile, I'm trying to create a version control system for Rev but I can't solve the merging problem...

Stay tunned, the next weeks will be full of announcements.



© 2009 Fourth World Media Corporation All rights reserved. Portions copyright by the original authors.