Showing posts with label Scripting. Show all posts
Showing posts with label Scripting. Show all posts

Friday, January 18, 2008

Infoq news: "Request: Sun, Drop Support for JRuby"

With the latest big news around Oracle-BEA and SUN-MySQL deals I have missed an interesting article on Infoq with the following title:
- Request: Sun, Drop Support for JRuby
I have to say that I do agree with Craig Wickesser asking Sun to Drop Support for JRuby.

Syntax Matters?
Yes syntax matters, not only for the "beauty" of it, but also because of the investment that enterprises have made into it. We should not force people to completely remodel their brain all the time, for no gain. 

I love Groovy language, and one of the main reason is because it gives me the most bang for my buck. Java people can immediately catchup with the syntax, and step by step leverage powerful features available by dynamic languages and domain specific languages. I was hoping to see a great adoption by SUN... It is one thing to support scripting with the JSR-223, but SUN has to "endorse" a scripting, and from what could be seen today it is not Groovy nor Javascript. When we see all the marketing noise it is Ruby with JRuby... And I do not think that is necessary good for the Java platform. 

Do not get me wrong, I think that is a great idea, and need for Java to be able to execute many languages, for example we see a lot of IBM WAS and BEA WL administrator using Python to administer their application server instance with Jython. But once again the "default" one should be close to Java and integrate with it as close as possible to reduce the impact on scalability and performances, and I do think that Groovy did a great job on these topics.

What about RubyOnRails?
I am not a RoR expert, far far away from it, but I have learned it, and developed small applications with it, and I have to say that I love this framework.  And I am sure that like many Java developers that used RoR, I was thinking:  "If only I had the same productivity in my favorite platform: J2EE...".

I was not expecting to run RoR application as-it-is, but more hoping that JavaEE will learn from RoR to simplify development...  And... somebody did it, with Grails. Grails takes inspiration from RoR, but in a "real" JavaEE environment, since it leverages key pieces of the current Java applications such as Hibernate and Spring, using the power of Groovy to glue all this together.

In conclusion...
I do not know for you but yes I do think that SUN should drop support for JRuby, and in place push a language more natural for existing Java Developers, I vote for Groovy. In addition to the language itself, I also expect the JavaEE EG to provide a more productive way of developing "simple" Web applications. This is where I see Grails coming in the picture, but many other framework could do the job, taking advantage of some interesting concepts of RoR...

As Rick says, I (we?) am not looking for a Revolution but for an Evolution.

Tuesday, September 19, 2006

Choose a scripting language? Groovy or JRuby?

Last week I discussed dynamic languages with some consultants. This discussion was done in the context of integration of scripting technologies into Java EE environment. So the integration to the VM is important, I also think that the learning curve is a thing to consider.

It is true that, like any developer Iike to learn things everyday, this is why I have done some development with PHP, with Ruby On Rails, and obviously with Groovy, Javascript and many other dynamic languages.

The discussion moved quickly to an argument about which language is the best... Hard to say, but I would expect that to be more productive in enterprise it is better to use a "Java Like" syntax that allows you to leverage the power of scripts. Based on this comment it is for me a no brainer to say that Groovy is more interesting to a core Java developer than JRuby (or other Jython, Jacl, ...). I do not even want to go in the details about VM integration, performances and so on...

So in this context, A. Sundararajan has posted a very interesting comparison of Java, Groovy and JRuby syntaxes.

Friday, September 2, 2005

Beta Version of Zend Core for Oracle available

Zend Core for Oracle, developed in partnership with Zend Technologies, supports businesses using PHP with Oracle Database for mission-critical Web applications. It provides a seamless out-of-the-box experience delivering a stable, high performance, easy-to-install and supported PHP development and production environment fully integrated with the Oracle Database. Zend Core for Oracle will be available as a free download from Zend in late 2005; it is currently available in Beta. Support and updates for Zend Core for Oracle will be made available directly from Zend. Find more and download link from OTN.

Monday, August 29, 2005

Online Groovy Beginners Tutorial

Interested by Groovy but never used it... You will be please to use this nice tutorial available on the Groovy site: * Groovy Beginners Tutorial Thanks to Graham Miller's contribution...

Friday, June 3, 2005

"Scripting: Higher Level Programming for the 21st Century" paper from John K. Ousterhout

With all the Java Scripting language aroun (Groovy, Rhino, Ruby, Jython... and so on) it is always interesting to understand where this come from... but also be able to talk with people about it, especially when they do not understand why scripting is interesting... Googling around looking for some information on scripting benefits for a presentation I found this very intersting article from John Ousterhout, (he wrote the article in 1998) but I am sure you will still appreciate it... Scripting: Higher Level Programming for the 21st Century. One of the most interesting part in this context is the paragraph 4:

A scripting language is not a replacement for a system programming language or vice versa. Each is suited to a different set of tasks. For gluing and system integration, applications can be developed 5-10x faster with a scripting language; system programming languages will require large amounts of boilerplate and conversion code to connect the pieces, whereas this can be done directly with a scripting language. For complex algorithms and data structures, the strong typing of a system programming language makes programs easier to manage. Where execution speed is key, a system programming language can often run 10-20x faster than a scripting language because it makes fewer run-time checks.

Saturday, March 26, 2005

PHP on OC4J??? Yes with JSR 223 RI

In this entry I am explaining how to use the JSR-223 Reference Implementation into Oracle Containers for J2EE (OC4J).

Note: I have done this only on Windows XP Platform, I did not test on Unix/Linux yet.

1-The first thing to do is to download the JSR-223 Reference Implementation from the JCP Web site.

2- Unzip the sjp-1_0-ea-windows-i586.zip in a directory let say d:\java\jsr223-ri.

3- You can choose here to do a proper installation (requires perl) or not. The *proper* installation preconfigure Apache Tomcat and the JSR-223 command line demonstration. Since what we are trying to achieve is to install the RI inside OC4J you do not need to do the installation.

4- Download this zip file that contains a Ant task and various files to configure and deploy the JSR223 sample into OC4J.

   4.1 To execute the Ant script you must start to set the following environman variables:

  • JAVA_HOME that points to the JDK home
  • ORACLE_HOME that points to the OC4J home (eg: d:\oracle\oc4j)
  • JSR223_HOME that points to directory where you have unzipped the JSR223 RI (eg d:\java\jsr223)

   4.2 Create a startup script for OC4J using the command

ant
The default target create a script names start-jsr223.bat in the %ORACLE_HOME%\bin directory. This script set various environment variable and start OC4J with the correct system parameters to load correctly the PHP scrip engine from Java.

   4.3 Start OC4J using the created script

%ORACLE_HOME%\bin\start-jsr223.bat

   4.4 Package and Deploy the Sample Application

ant deploy
This target packacge the Web samples from the reference implementation in a ear/war file, modifying the web.xml to define the different servlet mapping needed by JSR223.

5 Use the sample application

http://localhost:8888/jsr-223

You can start to use PHP in OC4J ;-) Take some time to read the sample code and specifications. JSR-223 is not only for Web container but also for JS2E, it is so interesting that the JSR-223 will probably be part of Mustang...

Tuesday, March 15, 2005

JavaWorld Article: Choosing a Java scripting language

This new Java World article compares the different Java scripting languages (Groovy, JudoScript, Pnuts, JRuby, Jacl, Jython, Rhino, and BeanShell), and list the issues that you have to select the good one... In this article that I like I would like to read a little about the JSR-223 that should help with the integration part. I will be very interested to know how you use Java Scripting language in your projects, so feel free to drop me a comment or mail ( tugdual[at]grallandco[dot]com )

Thursday, February 24, 2005

Oracle and PHP

A friend of mine was asking me:
can I use PHP with Oracle?
Sure you can!
And a very good source of information about PHP and Oracle is the OTN Web site itself, and especially the OpenSource page. Here a list of my favorites:

Can I run my PHP Applications inside Oracle Application Server?
Sure! Not only you can access the Oracle database from a PHP Application, but also if you are running Oracle Application 10g the usage of mod_php is supported with Oracle HTTP Server see: And what about development?
Development could be done inside Oracle JDeveloper 10g using the The Oracle JDeveloper 10g PHP Extension

Tuesday, February 8, 2005

JSR 223: Public Review of the Specification

The JSR 223: Scripting for the Java Platform is now open for public review until March 28th. If you are not familiar with it, the JSR 223 main goal is to define how the Java platform should integrate with scripting languages. It defines a standard API similar to Bean Scripting Framework. You can dowlnoad the spec from the JCP Web Site.