Scripting and Java



Email    print   
February 15, 2006 —  (Page 1 of 3)
The “general wisdom” about scripting languages—that systems written in them go together much faster and are much more flexible than compiled languages—is largely unsubstantiated conjecture. I just don’t believe that there’s anything inherent in a scripting language that makes for faster development and greater flexibility. I have noticed that garbage code written in PHP actually works a significant percentage of the time and that garbage code written in Java rarely works at all.

When a Java system is well-written, it’s quite flexible, and incremental changes of the sort championed by the scripting folks are easy to do. Moreover, not everything’s easy in a script. Take your average PHP system, where the HTML is embedded right in the PHP code that’s also implementing business logic. Simple look-and-feel changes, which would be trivial in a JSP-with-custom-tags system, are painful at best.

On the other hand, scripting languages do have their uses. For example, if you’re using AJAX heavily on a site that does little more than expose a database to the Web, then a scripting language is a perfectly good choice for supplying the glue that connects the AJAX control to the database. More complex sites require more complex structure, however.

Put another way, scripting languages are great for some parts of a system but not others. Hybrid systems—part Java, part PHP, part Ruby or Python—are becoming commonplace for good reason. If done properly, a hybrid architecture can solve complex problems better than a system written entirely in any one language. This structure is really just the hoary notion of a small language. Use a language that’s appropriate for the job at hand.

On the building-hybrid-systems front, JSR 223, Scripting for the Java Platform, is of particular interest. This JSR is slated for inclusion in the Mustang release and provides a means of interfacing Java programs to arbitrary scripting languages. A reference implementation is available, along with the full specification, at jcp.org and connects Java to PHP, JavaScript and Groovy.




Pages 1 2 3 


Share this link: http://sdt.bz/29129
 
Most Read Latest News Blog Resources

Add comment


Name*
Email*  
Country     


  • Comment
Loading




close
NEXT ARTICLE
Look what 2011 washed in: The return of Java
Oracle's stewardship has led to real progress for the venerable coding language Read More...
 
 
 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 

Download Current Issue
FEBRUARY 2012 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?


 
blogs tab
Are you at risk for burnout?
Burnout is a severe problem and it can strike at any time. Here's how to tell if you are nearing the edge.
02/09/2012 02:16 PM EST

Agility, mom, and apple pie
If we're to evaluate the state-of-the-art in software development, we should start with the values espoused in the Agile Manifesto.
02/07/2012 11:57 AM EST

RIM woos developers with free tablet
How do you get more apps ported to the BlackBerry PlayBook? By giving every developer a free tablet, of course!
02/04/2012 01:57 PM EST

GitHire: Use Headhunters to Find Your Perfect Programmer
Are you a hiring manager tired of scouring the job boards? Check out this new service that will find 5 people interested in your jobs.
02/03/2012 12:17 PM EST

Facebook claims hacker cred
Facebook's SEC S-1 filing form includes a short essay on the Hacker Way by Mark Zuckerberg himself.
02/02/2012 08:26 AM EST

Ryan Dahl steps down
Ryan Dahl, creator of Node.js, steps back from his position as gatekeeper for the project.
02/01/2012 04:58 PM EST

 
Events calendar tab
2/13/2012 to 2/16/2012
Santa Clara
TechWeb

2/26/2012 to 2/29/2012
San Francisco
BZ Media

2/27/2012 to 3/2/2012
San Francisco
RSA

3/4/2012 to 3/7/2012
Las Vegas
IBM Tivoli

3/5/2012 to 3/9/2012
San Francisco
TechWeb