» JeaseCMS » Блог

JRebel - и хочется и колется!

Я начал разрабатывать web-приложения на PHP больше 10 лет назад...

  • Что мне действительно нравится в PHP-разработке: редактируете свой код, сохраняете его, перегружаете страницу в своем браузере и   сразу же видите что получилось.
  • Что я действительно ненавижу в PHP-разработке: редактируешь свой код, сохраняешь его, перегружаешь страницу в браузере и видишь  сразу же что у тебя получилось... но я не вижу как мои изменения (возможно небольшой рефакторинг) нарушили какие-то зависимости на другой странице которые вызовут ошибку времени исполнения после помещения приложения в производство.

Итак PHP-разработка совмещает плюсы и минусы: мне действительно нравится быстрота, но я ненавижу терять поддержку компилятора which could tell me in advance that problems might be ahead... so I usually didn't do any refactorings, because it simply meant lots of problems and the code grew and became a spaghetti mess over the while which was even harder to change and so on... a vicious circle.

PHP: quick turnarounds, but constantly growing spaghetti code...

Since I moved into the Java-universe many years ago, I really enjoy all the IDE & compiler support which comes with type-safety everyday. Refactorings are a no-brainer and a constantly growing (and changing) code base is always in a very good shape, because it is so easy to keep your code clean... making a change which wouldn't work because of a simple typo or wrong method-call is always prohibited by the help of the compiler... Refactoring is pure fun, whereas it was a matter of fear before. I never want to miss all this comfort again.

But something which frustrated me from the first day on the Java-island: the turnarounds between making a change and seeing what the results are. Changing the source, compiling, packaging, deploying, restarting, waiting... simply to recognize that the result is not what I wanted... so once again: changing, compiling, packaging, deploying, restarting, waiting... the whole process takes minutes instead of one second. What a pitty...

Java: always clean (and safe) code, but endless turnarounds...

Sometimes you're forced to choose between two obvious opposing options in this world: 

  • ...do I want to have a clean, refactorable and safe code-base (as provided by Java), but horrible turnaround times?
  • ...do I want constantly growing spaghetti code (which always breaks in production when you're on vacation), but instant turnarounds (as provided by PHP)?

Is there no chance to have one's cake and eat it?

Usually the answer is no, but sometimes wonders happen... and this wonder is called JRebel in the Java-universe. JRebel gives you zero turnarounds (works as advertised) while you're working in your type-safe and compiler-supported IDE of your choice.

I've used JRebel for Jease-Development since last year and it was a mind-blowing improvement regarding turnarounds. It saved me already several days of life... But there were still some cases where I had to restart Tomcat from time to time, because JRebel wasn't able to pick up (and hotdeploy) the changes (e.g. changing method-signatures in Java and make them available in JSPs). No big deal, but remembering the good old PHP-times this wasn't perfect either.

This was before I've worked with JRebel 3.0...

I've started to use JRebel 3.0 right from the release and now the only time when I have to restart Tomcat is when I change the persistent attributes of my content-types (so the object-database can pick up the changes properly).  All the other changes simply work by saving the changed source and reload the browser. I've never had to restart Tomcat for the whole weekend constantly changing and moving code between Java-classes and JSPs. That's what I call perfect!

JRebel: always clean (and safe) code and instant turnarounds...

Turnaround times like PHP combined with all the comfort and safety of Java... that is an absolute amazing development-experience which makes you more productive than with any competing technology. JRebel is one master-piece of software I would buy (if I had too), but the nice guys from Zeroturnaround granted me an OSS-license for Jease-Development. Thanks so much!

If you've never worked with JRebel before, just start right away... it will save you tons of time... maybe you can invest the time in supporting an open-source-project of your choice.

Last modified on 2012-04-23 by Maik Jablonski