際際滷

際際滷Share a Scribd company logo
All rights reserved. 2015 息 ZeroTurnaround Inc.
1
Yes it has
JAVA FOREVER CHANGED
By Arnel P辰llo
All rights reserved. 2015 息 ZeroTurnaround Inc.
2
CLAIM YOUR FREE JREBEL TRIAL TODAY!
Use the links below for instructions on adding JRebel to your IDE:
JRebel for:
Or visit ZeroTurnaround.com/JRebel to learn more about
eliminating Java redeploys with JRebel
For those with only few minutes to spare, this paper addresses the ways
in which JRebel, Javas famed redeploy killer, has made an impact on how
developers spend their day coding. With JRebel, developers get to reload
code changes instantly, fine-tune their code with incremental changes,
debug, explore their code with ease (both locally and remotely), and
ultimately spend more time learning and communicating with colleagues
instead of waiting for the dreaded application redeploy to finish.
ZeroTurnaround is transforming how software is created, enabling
development teams to build better software faster. Powered by award-
winning Hotpatching Technology, JRebel and XRebel are revolutionizing
the way development teams work with Java. Thousands of engineers
use JRebel to turn the laborious build/test/deploy phase of application
development into a light-speed cycle as fast and iterative as Python or PHP,
while XRebel, the lightweight Java profiler, helps developers get insight into
their applications performance.
Abstract
Click and continue
being awesome
All rights reserved. 2015 息 ZeroTurnaround Inc.
3
Introduction
Javas bane has always been a reliance on tools. If all I had for writing
code was Notepad and a command line compiler, I would have gladly
considered a worthwhile career in street-cleansing, fruit-picking or
subway-guitar playing industries.
But we have a handful of modern IDEs. We also have a huge ecosystem
that provides us with amazing OSS libraries and application servers. And
since we have JRebel, gone are the days of reading through the whole
series of Harry Potter novels in one week while waiting for the application
to redeploy itself after fixing that spelling typo, only to discover theres
one more.
This post reviews some of the great advantages of using JRebel in Java
development, and how eradicating the daily, time-consuming process of
redeploying your application to see your changes has long-lasting effects
on the way that you will write code in the future.
All rights reserved. 2015 息 ZeroTurnaround Inc.
4
Java changed forever #1
Does your code smell? Find out really quickly and run your own
mini-tests throughout the day. Remove bad code before it goes
to QA and they make fun of you.
With JRebel, you get to reload the your changes immediately
after compiling them. When the IDE builds classes automatically,
the process is as fast as using a scripting language or testing
your latest HTML changes. In fact, I urge you to try compiling
the following code snippet, start it up with JRebel enabled,
and change the Hello World part to something else while the
program is running.
For me, the console output following the JRebel banner was
(yes, I write fast):
This opens up a world of possibilities that have never before been
available for developers. It combines the power of Java with the
fast turnaround of dynamic scripting languages. You dont have to
queue up a gazillion changes before redeploying. You can code by
making small incremental changes and alt-tabbing to your browser
to verify the results.
SEE ALL CHANGES IMMEDIATELY
All rights reserved. 2015 息 ZeroTurnaround Inc.
5
This works best when you have to implement some
logic that is tricky to get just right. Imagine you have
to add validation to your form. With JRebel, you can
add the rules field by field and play around with
the way errors should be displayed until satisfied
by the results. You can even add some new fields
to your controller or validator with JRebel as well.
By the way, JRebel preserves all application state,
which means it does not matter how you reached
the page youre modifying.
JRebel actually goes way beyond simple class
reloading. Applications today take advantage of
frameworks and Java EE technologies, such as EJBs,
Hibernate, Spring Framework, JSF, Seam, Struts,
etc. The thing with frameworks and technology
implementations is that they initialize themselves
when the application starts up and generate lots of
metadata. It is usually a good thing since nobody
wants Hibernate to re- initialize itself for every HTTP
request (thats what PHP programs have to do, by
the way, even with opcode caching enabled).
JRebel has addressed this by having explicit support
for almost 90+ popular frameworks and application
containers. This means when you make a change
to a special resource such as adding a new EJB,
changing JPA mappings (either via xml or
annotations), or add new Spring Beans (again,
either via xml or annotations), JRebel updates the
metadata to reflect those changes. Your job is to
press F5 in the browser.
FINE-TUNING THROUGH INCREMENTAL CHANGES
Java changed forever #2
All rights reserved. 2015 息 ZeroTurnaround Inc.
6
JRebel makes remote debugging more useful than ever. Imagine you are using it to hunt down some difficult bug. Now you can hit
a breakpoint, investigate whats going on, make a change, resume execution, and see the result almost immediately! The new code kicks in
right after compiling, next time when the affected method is invoked. You can use this approach to fix discovered bugs immediately or to
quickly add some debugging statements in the code (just remember to avoid committing them). You can even drop to
a parent frame and check the effect immediately!
One of the benefits of small turnaround is
that you can test the framework features
interactively. You can write a small method to
test some functionality of a new framework
and learn hands on how it works. Python and
Scala even have interactive shells.
The problem here is the applicability in real
world. While exploring the API of Java libraries
is easy (even if they lack documentation), it
can be ridiculously tedious in some other
languages, especially when they are dynamic
in nature, lack documentation and/or miss
out on good IDE support.
Even if you can indeed enjoy the fast
turnaround with PHP and the like, it has little
net value when you have to dig into some big
and obscure framework (like Joomla CMS,
which I actually tried that a few years ago,
and it wasnt pleasant) to see how it works.
The ability to ctrl-click and dive into the code,
as well as enjoy the auto- completion would
be great, if only they were there. Granted,
there is some support for it in modern
IDEs, but it is nowhere nearly as useful. The
difference is in the order of magnitudes.
Java, on the other hand, suffers from the
fact that while the 3rd-party code is easily
navigable, writing the stubs and running
them can be tedious or time consuming.
Writing stand alone tests requires effort to
set up and are not exactly a substitute for a
real-world use case.
Embedding a test code into an existing
application is simple and easy, but restarting
the server or redeploying the app to see
the changes takes time...unless youre using
JRebel to eliminate the need to restart.
DEBUG REMOTELY FOR FUN AND PROFIT
EXPLORE THE CODE WITH EASE
Java changed forever #3
Java changed forever #4
All rights reserved. 2015 息 ZeroTurnaround Inc.
7
Its great when a developer can check out a code from
a repository, compile it, and deploy the thing in his own
machine. Sometimes this is not possible.
It can be due to performance reasons, or the whole system
is simply too complex. Sometimes the system has to run in
a different network than the developers, which cannot be
easily simulated. Some developers may be using low-powered
laptops. Whatever the reason, sometimes running the app in
the same machine is not an option.
I can almost hear developers cry (myself included) when that
is the case. JRebel can help even in this case and the capability
to make a system deployable on a developers machine is not
crucial anymore.
JRebel Remoting was introduced in version 4.6, which lets
you push changes from a developers machine to a remote
server. It works over HTTP on the same port as the server is
serving the application itself, therefore needs close to zero
configuration to set up and no changes to firewall settings.
We have examples on our website where we show JRebel
Remoting in action when deploying to Amazon EC2, so if it can
work well in the cloud far away, it will definitely work in your
LAN or on the other side of the city.
You can even let multiple developers loose on a single
application instance on a remote machine. By default, JRebel
Remoting reverts back to the initial codebase when the
app server is restarted. You can set up an application on
the remote machine, have a developer have his way with it,
restart it (ok, theres one redeploy, sorry), and allow another
developer do his magic on the app. This is the case when
both developers are making changes to the same application.
When there are several apps deployed to the remote server,
developers can bombard them without stepping on each
others toes.
DEPLOYING CODE LOCALLY OR REMOTELY
Java changed forever #5
All rights reserved. 2015 息 ZeroTurnaround Inc.
8
No restarts means no forced interruptions, which means devs have more time for doing
better things. Sometimes its hard to maintain concentration on a single task for more than
a few minutes, and thats when the level of focus is totally up to the devs themselves. If
there was a circus clown jumping out from behind a door every 6 minutes to frighten me, I
couldnt imagine working properly throughout the day.
With JRebel, you get more time to meet your deadlines, research & learn and *gasp*
communicate with people. According to a recent report on Developer Stress, it came out
that developers really do care about making deadlines and their level of expertise, wishing
they had more time to spend on education.
In a related post, we also discovered that for every 1 hour developers spend writing
code, they spend 30 minutes dealing with communication overhead (i.e. meetings, chats,
reporting/timesheets, etc). JRebels instantly class reloading magic simply frees up more
time for doing the things that developers are already spending time on.
NO RESTARTS = MORE TIME FOR BETTER STUFF
Java changed forever #6
All rights reserved. 2015 息 ZeroTurnaround Inc.
9
Final words
JRebel will give you the best of both worlds  the performance, scalability and robustness of Java, as well as the
FTL-turnaround and the feeling of lightness, which are typically associated with 100 line guestbook applications,
not with big mature systems. JRebel behaves as if its in Rome  you dont have to make changes to your code,
architecture or sysops. It adapts to your environment and requirements. All you have to do is start using it.
You get to keep all the effort and investments already made to your infrastructure.
Weve heard from thousands of developers directly about how JRebel has forever changed not only how
productive they work  saving more than 5 full work weeks of time otherwise lost to Java restarts each year  but
the way in which they actually write the code, how they discover faults and test iteratively in order to minimize
service requests and bugs.
The joy we provide is achieved in a sensible way, not via some dark magic of something on rails. Nothing in your
entire app (frameworks included) is vague, ambiguous or hidden from you. All we do is some good engineering
with JVMs and popular OSS frameworks. And only within the walls of Hogwarts (i.e. during development). The
delivered software has no runtime penalties or lingering dependencies.
Arnel P辰llo is a Java engineer at ZeroTurnaround.
He works on adding support for web-service frameworks
into JRebel and is a major fanboy of pretty code. He plays
Bioware games and hacks his Android phone on weekends.
He also likes salsa dancing and can make a great Mojito.
You can connect with Arnel on Facebook. Thanks for reading
All rights reserved. 2015 息 ZeroTurnaround Inc.
10
Contact Us
Twitter: @zeroturnaround
Web: http://zeroturnaround.com
Email: info@zeroturnaround.com
Estonia
likooli 2, 4th floor
Tartu, Estonia, 51003
Phone: +372 653 6099
USA
399 Boylston Street,
Suite 300, Boston,
MA, USA, 02116
Phone: 1(857)277-1199
Czech Republic
Jankovcova 1037/49
Building C, 5th floor,
170 00 Prague 7, Czech Republic
Phone:+420 227 020 130

More Related Content

What's hot (19)

Getting Started with IntelliJ IDEA as an Eclipse User
Getting Started with IntelliJ IDEA as an Eclipse UserGetting Started with IntelliJ IDEA as an Eclipse User
Getting Started with IntelliJ IDEA as an Eclipse User
ZeroTurnaround
Lean engineering for lean/balanced teams: lessons learned (and still learning...
Lean engineering for lean/balanced teams: lessons learned (and still learning...Lean engineering for lean/balanced teams: lessons learned (and still learning...
Lean engineering for lean/balanced teams: lessons learned (and still learning...
Balanced Team
Why We Choose Java Over The Python In Selenium Web Driver?
Why We Choose Java Over The Python In Selenium Web Driver?Why We Choose Java Over The Python In Selenium Web Driver?
Why We Choose Java Over The Python In Selenium Web Driver?
BugRaptors
Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learned
Wojciech Koszek
Samsung Indonesia: Tizen Wearables
Samsung Indonesia: Tizen WearablesSamsung Indonesia: Tizen Wearables
Samsung Indonesia: Tizen Wearables
Ryo Jin
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium Tutorial
Kevin Whinnery
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
Bill Scott
The Lean Tech Stack
The Lean Tech StackThe Lean Tech Stack
The Lean Tech Stack
Bill Scott
More Productivitiy with Spring Roo
More Productivitiy with Spring RooMore Productivitiy with Spring Roo
More Productivitiy with Spring Roo
Eberhard Wolff
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and ArquillianDeveloper Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Ray Ploski
Kicking Up the Dust with Node JS
Kicking Up the Dust with Node JSKicking Up the Dust with Node JS
Kicking Up the Dust with Node JS
Bill Scott
JBoss Forge - Breaking new ground in developer productivity
JBoss Forge - Breaking new ground in developer productivityJBoss Forge - Breaking new ground in developer productivity
JBoss Forge - Breaking new ground in developer productivity
Vineet Reynolds
Iterating For Success: A Case Study in Remote Paired Programming, The Evoluti...
Iterating For Success: A Case Study in Remote Paired Programming, The Evoluti...Iterating For Success: A Case Study in Remote Paired Programming, The Evoluti...
Iterating For Success: A Case Study in Remote Paired Programming, The Evoluti...
VMware Tanzu
Java And Community Support
Java And Community SupportJava And Community Support
Java And Community Support
William Grosso
Netbeans gui tutorial
Netbeans gui tutorialNetbeans gui tutorial
Netbeans gui tutorial
stephan EL'wiin Shaarawy
bringing design to life with lean ux & lean engineering - Lean Day West 2013
bringing design to life with  lean ux & lean engineering - Lean Day West 2013bringing design to life with  lean ux & lean engineering - Lean Day West 2013
bringing design to life with lean ux & lean engineering - Lean Day West 2013
Bill Scott
p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...
p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...
p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...
irbull
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Daniel Gallego Vico
[Japan Selenium User Community in Remote] Test Automation Journey
[Japan Selenium User Community in Remote] Test Automation Journey[Japan Selenium User Community in Remote] Test Automation Journey
[Japan Selenium User Community in Remote] Test Automation Journey
Woohyeok Kim
Getting Started with IntelliJ IDEA as an Eclipse User
Getting Started with IntelliJ IDEA as an Eclipse UserGetting Started with IntelliJ IDEA as an Eclipse User
Getting Started with IntelliJ IDEA as an Eclipse User
ZeroTurnaround
Lean engineering for lean/balanced teams: lessons learned (and still learning...
Lean engineering for lean/balanced teams: lessons learned (and still learning...Lean engineering for lean/balanced teams: lessons learned (and still learning...
Lean engineering for lean/balanced teams: lessons learned (and still learning...
Balanced Team
Why We Choose Java Over The Python In Selenium Web Driver?
Why We Choose Java Over The Python In Selenium Web Driver?Why We Choose Java Over The Python In Selenium Web Driver?
Why We Choose Java Over The Python In Selenium Web Driver?
BugRaptors
Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learned
Wojciech Koszek
Samsung Indonesia: Tizen Wearables
Samsung Indonesia: Tizen WearablesSamsung Indonesia: Tizen Wearables
Samsung Indonesia: Tizen Wearables
Ryo Jin
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium Tutorial
Kevin Whinnery
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
6 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
Bill Scott
The Lean Tech Stack
The Lean Tech StackThe Lean Tech Stack
The Lean Tech Stack
Bill Scott
More Productivitiy with Spring Roo
More Productivitiy with Spring RooMore Productivitiy with Spring Roo
More Productivitiy with Spring Roo
Eberhard Wolff
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and ArquillianDeveloper Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Ray Ploski
Kicking Up the Dust with Node JS
Kicking Up the Dust with Node JSKicking Up the Dust with Node JS
Kicking Up the Dust with Node JS
Bill Scott
JBoss Forge - Breaking new ground in developer productivity
JBoss Forge - Breaking new ground in developer productivityJBoss Forge - Breaking new ground in developer productivity
JBoss Forge - Breaking new ground in developer productivity
Vineet Reynolds
Iterating For Success: A Case Study in Remote Paired Programming, The Evoluti...
Iterating For Success: A Case Study in Remote Paired Programming, The Evoluti...Iterating For Success: A Case Study in Remote Paired Programming, The Evoluti...
Iterating For Success: A Case Study in Remote Paired Programming, The Evoluti...
VMware Tanzu
Java And Community Support
Java And Community SupportJava And Community Support
Java And Community Support
William Grosso
bringing design to life with lean ux & lean engineering - Lean Day West 2013
bringing design to life with  lean ux & lean engineering - Lean Day West 2013bringing design to life with  lean ux & lean engineering - Lean Day West 2013
bringing design to life with lean ux & lean engineering - Lean Day West 2013
Bill Scott
p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...
p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...
p2, your savior or your achilles heel? Everything an Eclipse team needs to kn...
irbull
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Daniel Gallego Vico
[Japan Selenium User Community in Remote] Test Automation Journey
[Japan Selenium User Community in Remote] Test Automation Journey[Japan Selenium User Community in Remote] Test Automation Journey
[Japan Selenium User Community in Remote] Test Automation Journey
Woohyeok Kim

Similar to Coding With JRebel - Java Forever Changed (20)

Learn Java Programming Language In Gurgaon.pptx
Learn Java Programming Language In Gurgaon.pptxLearn Java Programming Language In Gurgaon.pptx
Learn Java Programming Language In Gurgaon.pptx
APTRON Gurgaon
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks Comparison
Hamed Hatami
Advantages and Disadvantages of React Native App Development
Advantages and Disadvantages of React Native App DevelopmentAdvantages and Disadvantages of React Native App Development
Advantages and Disadvantages of React Native App Development
APPNWEB Technologies
How can JAVA Performance tuning speed up applications.pdf
How can JAVA Performance tuning speed up applications.pdfHow can JAVA Performance tuning speed up applications.pdf
How can JAVA Performance tuning speed up applications.pdf
Mindfire LLC
9 reasons why programmers should learn react native
9 reasons why programmers should learn react native9 reasons why programmers should learn react native
9 reasons why programmers should learn react native
React Sharing
What should you know to become a better Java programmer?
What should you know to become a better Java programmer?What should you know to become a better Java programmer?
What should you know to become a better Java programmer?
NexSoftsys
Seattle bestpractices2010
Seattle bestpractices2010Seattle bestpractices2010
Seattle bestpractices2010
Olaseni Odebiyi
Front end-modernization
Front end-modernizationFront end-modernization
Front end-modernization
ColdFusionConference
Front-End Modernization for Mortals
Front-End Modernization for MortalsFront-End Modernization for Mortals
Front-End Modernization for Mortals
cgack
Front end-modernization
Front end-modernizationFront end-modernization
Front end-modernization
devObjective
Refactoring
RefactoringRefactoring
Refactoring
Rabeya Bashri
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Applitools
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Abdelkrim Boujraf
A Beginner's Guide to How to Code in Java
A Beginner's Guide to How to Code in JavaA Beginner's Guide to How to Code in Java
A Beginner's Guide to How to Code in Java
JAMESJOHN130
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about java
kanchanmahajan23
Java Developer Roadmap PDF By ScholarHat
Java Developer Roadmap PDF By ScholarHatJava Developer Roadmap PDF By ScholarHat
Java Developer Roadmap PDF By ScholarHat
Scholarhat
Download Java Performance 2nd Edition Scott Oaks ebook All Chapters PDF
Download Java Performance 2nd Edition Scott Oaks ebook All Chapters PDFDownload Java Performance 2nd Edition Scott Oaks ebook All Chapters PDF
Download Java Performance 2nd Edition Scott Oaks ebook All Chapters PDF
sorucuvrases
Node.js vs. java
Node.js vs. javaNode.js vs. java
Node.js vs. java
MoonTechnolabsPvtLtd
oraclewls-jrebel
oraclewls-jrebeloraclewls-jrebel
oraclewls-jrebel
Gabriel Torres
Metamorphosis from Forms to Java: a tech lead's perspective (paper)
Metamorphosis from Forms to Java: a tech lead's perspective (paper)Metamorphosis from Forms to Java: a tech lead's perspective (paper)
Metamorphosis from Forms to Java: a tech lead's perspective (paper)
Michael Fons
Learn Java Programming Language In Gurgaon.pptx
Learn Java Programming Language In Gurgaon.pptxLearn Java Programming Language In Gurgaon.pptx
Learn Java Programming Language In Gurgaon.pptx
APTRON Gurgaon
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks Comparison
Hamed Hatami
Advantages and Disadvantages of React Native App Development
Advantages and Disadvantages of React Native App DevelopmentAdvantages and Disadvantages of React Native App Development
Advantages and Disadvantages of React Native App Development
APPNWEB Technologies
How can JAVA Performance tuning speed up applications.pdf
How can JAVA Performance tuning speed up applications.pdfHow can JAVA Performance tuning speed up applications.pdf
How can JAVA Performance tuning speed up applications.pdf
Mindfire LLC
9 reasons why programmers should learn react native
9 reasons why programmers should learn react native9 reasons why programmers should learn react native
9 reasons why programmers should learn react native
React Sharing
What should you know to become a better Java programmer?
What should you know to become a better Java programmer?What should you know to become a better Java programmer?
What should you know to become a better Java programmer?
NexSoftsys
Seattle bestpractices2010
Seattle bestpractices2010Seattle bestpractices2010
Seattle bestpractices2010
Olaseni Odebiyi
Front-End Modernization for Mortals
Front-End Modernization for MortalsFront-End Modernization for Mortals
Front-End Modernization for Mortals
cgack
Front end-modernization
Front end-modernizationFront end-modernization
Front end-modernization
devObjective
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Applitools
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Abdelkrim Boujraf
A Beginner's Guide to How to Code in Java
A Beginner's Guide to How to Code in JavaA Beginner's Guide to How to Code in Java
A Beginner's Guide to How to Code in Java
JAMESJOHN130
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about java
kanchanmahajan23
Java Developer Roadmap PDF By ScholarHat
Java Developer Roadmap PDF By ScholarHatJava Developer Roadmap PDF By ScholarHat
Java Developer Roadmap PDF By ScholarHat
Scholarhat
Download Java Performance 2nd Edition Scott Oaks ebook All Chapters PDF
Download Java Performance 2nd Edition Scott Oaks ebook All Chapters PDFDownload Java Performance 2nd Edition Scott Oaks ebook All Chapters PDF
Download Java Performance 2nd Edition Scott Oaks ebook All Chapters PDF
sorucuvrases
Metamorphosis from Forms to Java: a tech lead's perspective (paper)
Metamorphosis from Forms to Java: a tech lead's perspective (paper)Metamorphosis from Forms to Java: a tech lead's perspective (paper)
Metamorphosis from Forms to Java: a tech lead's perspective (paper)
Michael Fons

Coding With JRebel - Java Forever Changed

  • 1. All rights reserved. 2015 息 ZeroTurnaround Inc. 1 Yes it has JAVA FOREVER CHANGED By Arnel P辰llo
  • 2. All rights reserved. 2015 息 ZeroTurnaround Inc. 2 CLAIM YOUR FREE JREBEL TRIAL TODAY! Use the links below for instructions on adding JRebel to your IDE: JRebel for: Or visit ZeroTurnaround.com/JRebel to learn more about eliminating Java redeploys with JRebel For those with only few minutes to spare, this paper addresses the ways in which JRebel, Javas famed redeploy killer, has made an impact on how developers spend their day coding. With JRebel, developers get to reload code changes instantly, fine-tune their code with incremental changes, debug, explore their code with ease (both locally and remotely), and ultimately spend more time learning and communicating with colleagues instead of waiting for the dreaded application redeploy to finish. ZeroTurnaround is transforming how software is created, enabling development teams to build better software faster. Powered by award- winning Hotpatching Technology, JRebel and XRebel are revolutionizing the way development teams work with Java. Thousands of engineers use JRebel to turn the laborious build/test/deploy phase of application development into a light-speed cycle as fast and iterative as Python or PHP, while XRebel, the lightweight Java profiler, helps developers get insight into their applications performance. Abstract Click and continue being awesome
  • 3. All rights reserved. 2015 息 ZeroTurnaround Inc. 3 Introduction Javas bane has always been a reliance on tools. If all I had for writing code was Notepad and a command line compiler, I would have gladly considered a worthwhile career in street-cleansing, fruit-picking or subway-guitar playing industries. But we have a handful of modern IDEs. We also have a huge ecosystem that provides us with amazing OSS libraries and application servers. And since we have JRebel, gone are the days of reading through the whole series of Harry Potter novels in one week while waiting for the application to redeploy itself after fixing that spelling typo, only to discover theres one more. This post reviews some of the great advantages of using JRebel in Java development, and how eradicating the daily, time-consuming process of redeploying your application to see your changes has long-lasting effects on the way that you will write code in the future.
  • 4. All rights reserved. 2015 息 ZeroTurnaround Inc. 4 Java changed forever #1 Does your code smell? Find out really quickly and run your own mini-tests throughout the day. Remove bad code before it goes to QA and they make fun of you. With JRebel, you get to reload the your changes immediately after compiling them. When the IDE builds classes automatically, the process is as fast as using a scripting language or testing your latest HTML changes. In fact, I urge you to try compiling the following code snippet, start it up with JRebel enabled, and change the Hello World part to something else while the program is running. For me, the console output following the JRebel banner was (yes, I write fast): This opens up a world of possibilities that have never before been available for developers. It combines the power of Java with the fast turnaround of dynamic scripting languages. You dont have to queue up a gazillion changes before redeploying. You can code by making small incremental changes and alt-tabbing to your browser to verify the results. SEE ALL CHANGES IMMEDIATELY
  • 5. All rights reserved. 2015 息 ZeroTurnaround Inc. 5 This works best when you have to implement some logic that is tricky to get just right. Imagine you have to add validation to your form. With JRebel, you can add the rules field by field and play around with the way errors should be displayed until satisfied by the results. You can even add some new fields to your controller or validator with JRebel as well. By the way, JRebel preserves all application state, which means it does not matter how you reached the page youre modifying. JRebel actually goes way beyond simple class reloading. Applications today take advantage of frameworks and Java EE technologies, such as EJBs, Hibernate, Spring Framework, JSF, Seam, Struts, etc. The thing with frameworks and technology implementations is that they initialize themselves when the application starts up and generate lots of metadata. It is usually a good thing since nobody wants Hibernate to re- initialize itself for every HTTP request (thats what PHP programs have to do, by the way, even with opcode caching enabled). JRebel has addressed this by having explicit support for almost 90+ popular frameworks and application containers. This means when you make a change to a special resource such as adding a new EJB, changing JPA mappings (either via xml or annotations), or add new Spring Beans (again, either via xml or annotations), JRebel updates the metadata to reflect those changes. Your job is to press F5 in the browser. FINE-TUNING THROUGH INCREMENTAL CHANGES Java changed forever #2
  • 6. All rights reserved. 2015 息 ZeroTurnaround Inc. 6 JRebel makes remote debugging more useful than ever. Imagine you are using it to hunt down some difficult bug. Now you can hit a breakpoint, investigate whats going on, make a change, resume execution, and see the result almost immediately! The new code kicks in right after compiling, next time when the affected method is invoked. You can use this approach to fix discovered bugs immediately or to quickly add some debugging statements in the code (just remember to avoid committing them). You can even drop to a parent frame and check the effect immediately! One of the benefits of small turnaround is that you can test the framework features interactively. You can write a small method to test some functionality of a new framework and learn hands on how it works. Python and Scala even have interactive shells. The problem here is the applicability in real world. While exploring the API of Java libraries is easy (even if they lack documentation), it can be ridiculously tedious in some other languages, especially when they are dynamic in nature, lack documentation and/or miss out on good IDE support. Even if you can indeed enjoy the fast turnaround with PHP and the like, it has little net value when you have to dig into some big and obscure framework (like Joomla CMS, which I actually tried that a few years ago, and it wasnt pleasant) to see how it works. The ability to ctrl-click and dive into the code, as well as enjoy the auto- completion would be great, if only they were there. Granted, there is some support for it in modern IDEs, but it is nowhere nearly as useful. The difference is in the order of magnitudes. Java, on the other hand, suffers from the fact that while the 3rd-party code is easily navigable, writing the stubs and running them can be tedious or time consuming. Writing stand alone tests requires effort to set up and are not exactly a substitute for a real-world use case. Embedding a test code into an existing application is simple and easy, but restarting the server or redeploying the app to see the changes takes time...unless youre using JRebel to eliminate the need to restart. DEBUG REMOTELY FOR FUN AND PROFIT EXPLORE THE CODE WITH EASE Java changed forever #3 Java changed forever #4
  • 7. All rights reserved. 2015 息 ZeroTurnaround Inc. 7 Its great when a developer can check out a code from a repository, compile it, and deploy the thing in his own machine. Sometimes this is not possible. It can be due to performance reasons, or the whole system is simply too complex. Sometimes the system has to run in a different network than the developers, which cannot be easily simulated. Some developers may be using low-powered laptops. Whatever the reason, sometimes running the app in the same machine is not an option. I can almost hear developers cry (myself included) when that is the case. JRebel can help even in this case and the capability to make a system deployable on a developers machine is not crucial anymore. JRebel Remoting was introduced in version 4.6, which lets you push changes from a developers machine to a remote server. It works over HTTP on the same port as the server is serving the application itself, therefore needs close to zero configuration to set up and no changes to firewall settings. We have examples on our website where we show JRebel Remoting in action when deploying to Amazon EC2, so if it can work well in the cloud far away, it will definitely work in your LAN or on the other side of the city. You can even let multiple developers loose on a single application instance on a remote machine. By default, JRebel Remoting reverts back to the initial codebase when the app server is restarted. You can set up an application on the remote machine, have a developer have his way with it, restart it (ok, theres one redeploy, sorry), and allow another developer do his magic on the app. This is the case when both developers are making changes to the same application. When there are several apps deployed to the remote server, developers can bombard them without stepping on each others toes. DEPLOYING CODE LOCALLY OR REMOTELY Java changed forever #5
  • 8. All rights reserved. 2015 息 ZeroTurnaround Inc. 8 No restarts means no forced interruptions, which means devs have more time for doing better things. Sometimes its hard to maintain concentration on a single task for more than a few minutes, and thats when the level of focus is totally up to the devs themselves. If there was a circus clown jumping out from behind a door every 6 minutes to frighten me, I couldnt imagine working properly throughout the day. With JRebel, you get more time to meet your deadlines, research & learn and *gasp* communicate with people. According to a recent report on Developer Stress, it came out that developers really do care about making deadlines and their level of expertise, wishing they had more time to spend on education. In a related post, we also discovered that for every 1 hour developers spend writing code, they spend 30 minutes dealing with communication overhead (i.e. meetings, chats, reporting/timesheets, etc). JRebels instantly class reloading magic simply frees up more time for doing the things that developers are already spending time on. NO RESTARTS = MORE TIME FOR BETTER STUFF Java changed forever #6
  • 9. All rights reserved. 2015 息 ZeroTurnaround Inc. 9 Final words JRebel will give you the best of both worlds the performance, scalability and robustness of Java, as well as the FTL-turnaround and the feeling of lightness, which are typically associated with 100 line guestbook applications, not with big mature systems. JRebel behaves as if its in Rome you dont have to make changes to your code, architecture or sysops. It adapts to your environment and requirements. All you have to do is start using it. You get to keep all the effort and investments already made to your infrastructure. Weve heard from thousands of developers directly about how JRebel has forever changed not only how productive they work saving more than 5 full work weeks of time otherwise lost to Java restarts each year but the way in which they actually write the code, how they discover faults and test iteratively in order to minimize service requests and bugs. The joy we provide is achieved in a sensible way, not via some dark magic of something on rails. Nothing in your entire app (frameworks included) is vague, ambiguous or hidden from you. All we do is some good engineering with JVMs and popular OSS frameworks. And only within the walls of Hogwarts (i.e. during development). The delivered software has no runtime penalties or lingering dependencies. Arnel P辰llo is a Java engineer at ZeroTurnaround. He works on adding support for web-service frameworks into JRebel and is a major fanboy of pretty code. He plays Bioware games and hacks his Android phone on weekends. He also likes salsa dancing and can make a great Mojito. You can connect with Arnel on Facebook. Thanks for reading
  • 10. All rights reserved. 2015 息 ZeroTurnaround Inc. 10 Contact Us Twitter: @zeroturnaround Web: http://zeroturnaround.com Email: info@zeroturnaround.com Estonia likooli 2, 4th floor Tartu, Estonia, 51003 Phone: +372 653 6099 USA 399 Boylston Street, Suite 300, Boston, MA, USA, 02116 Phone: 1(857)277-1199 Czech Republic Jankovcova 1037/49 Building C, 5th floor, 170 00 Prague 7, Czech Republic Phone:+420 227 020 130