Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Saturday, August 09, 2008

Web-based IDE for Ruby on Rails

I was following a couple of web-based IDEs like CodeIDE or ECCO. All of them seem to be more toys rather then actually useful tools. My understanding is that this is partially because of modest project goals and partially - limitations of technology. Let me expand why I believe it can work.
The advantage of web-based IDE is obvious – anyone, who is doing software development for a living knows how many you need to do before start coding. The idea of having web access to already configured environment where you can contribute anytime you want from any browser looks attractive. But the limitations are obvious as well. Do you think it will work in C/++ world? I really doubt that. Even with modern web-based sharing solutions like WebEx that does not sound realistic. Will it work for huge JavaEE project? Well, easy processing of large text amounts in Google Docs or Adobe Buzzword still not comfortable (yet :). We need a technology that produces output, viewable in browser and does not require megabytes of coding. It looks like Ruby on Rails sounds like an ideal choice (especially taking in mind that good RoR IDE is still missing).
Imaging being able to issue all rails commands with nice and clean UI, have a nice refactoring code editor in flash and even ability to debug RoR application. Of cause UI is the most trickiest part – it will not be possible to mimic standalone IDE, we need to do the same tweak that GMail creators did when they were re-thinking classical email client folder tree. But this certainly doable and it would minimize threshold for contribution in open source projects.
It is also very important to provide seamless integration with version control. In fact, the whole development process can be built around tasks, and task descriptions can act as a descriptions for check-ins (and thus provide meaningfull history of changes).
Also I assumes that this would broaden the audience of developers, so we need to make sure that only quality pieces of code gets to the repository. We need to have good automatic checks built-in the system, that prevents check-in of bad code (similair to FxCop in TFS) and we need to provide a possibility to manually review check-ins before integrating them into main branch (that's why git might have advantage over svn)

Sunday, April 06, 2008

Simplify localization contribution for open source projects

Recently I've been played a bit with VLC player (mostly fixing bugs in ftp and avi modules). Their idea of localization is that someone has to request corresponding .po-file in mailing list and load it in poEdit. I think this is a wrong idea for open source projects. Here you suppose to welcome and simplify contribution of the people, maintaining reasonable level of quality at the same time. A lot of people is willing to donate some of their time for localization on their native language, if setup is not complicated. Aiming to use those, who is willing to spent 15+ minutes can make a real difference in timeline for getting localized versions.
So, first of all, the solution should be web-based (like Rosetta). Second, it should be as simple in setting up/login as possible (username/password/captcha). Third - show one resource-string to be translated at the time. poEdit and other professional translating tools are showing the whole table of "language pairs" - correspondence between phrases on the source and target language. And this make sense if you are targeting on professional translator, not occasional one. Here the whole concept of UI should be build around this "one phrase" translation. In addition to source phrase you can show google translation (using their unofficial api), and translation of phrases, that has some specific terms for the application (to ensure consitent vocabulary across all translation). User should be able to skip this translation and proceed to the next one, or save one's translation, if it passes certain verification rules (such as presents of %d, %s in translated text, which is corresponding to source one, etc)
Ability to perform translation on the level of individual phrases makes it easy to perform simultaneous translation of one file by several people (does not have to merge changes afterwards)

Friday, November 09, 2007

Setup PHP on Xitami

Recently I had a nessecity to quickly setup PHP development environment. I've read a couple of HOW-TO articles, and since it was not so easy to install IIS on my laptop, I decided to download and install Xitami 2.5 web-server. PHP 5.20 installer claims that it will configure this server automatically, but apparently it does not (I suspect that it was because I've installed everything to %Program Files%). Ok, there was a manual step-by-step instruction, but it also doesn't work very well. At the end of the day, I found the following:

  • If you specify php-cgi.exe as a filter for .php-extension, it will not work with aliases, only with real directories under your web-root
  • If you use php.exe, it will work with your aliases, but it $_GET and $_POST will always be empty
So the solution is to use php-cgi together with symlinks.

Friday, April 06, 2007

GUI test automation of web applications

In course of my past projects, I've multiple times tried to establish effective GUI test automation and for some reasons my attempts always failed. It does not mean that automation was not created at all, but very low effectiveness for significant effort. One of the interesting side effect, that I've seen was that complex GUI test automation usually require someone's attention - you cannot just add it into task scheduler at 2 o'clock in the night, and get result in the morning.
I've tried it with the different people (sometime I even assign good developers into it), but still they encountered enormous amount of technical problems. So I've realized that its not the fault of the people, but rather fault of software. No matter whenever you are using cheap AutomatedQA TestComplete or expensive Mercury WinRunner/QTP, the tools are huge, pretend to do everything and but actually did each task with significant limitations. The worst thing about this is that if you encounter a problem, neither google nor support usually cannot help you.
Recently I was thinking about problem of automated periodic posting of some information on various web-sites. We've tried to automate it using TestComplete, but stability and speed was far from perfect. In fact it refuses to work through TaskScheduler at all, and you will need someone, who will manually run corresponding .bat file from time to time. In order to change this situation, I've start thinking about tools like NUnitASP. It looks lightweight and cool, but does not suite my needs, because of the nature of my task. Usually such type of sites are not really happy when someone is using robot to post data there, so they actively resisting it. I need an ability to click on links and fill fields in the actual browser.
So I was thinking - if I need a real browser to automate this task - why cannot I incorporate one in my C# program? Quick search shows me one good sample on codeproject. I've downloaded it and tweaked according to my needs and it works! I've running this on task scheduler completely unattended, and just getting results from there.
I'm going to post technical details and some point of time later, when I will polish them, but the idea of this post is very simple: if you need GUI test automation - consider writing your own tool for this. Of cause it is not free, and you will have to fight with non-trivial MS implementation of DOM, but this is the only thing you will have to fight - your own automation code will be very small and lightweight (mine is less than 300 lines now :)