• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Does Groovy Work in a PHP Environment?

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can I use Groovy to build hopefully better web applications that run in the same environment with PHP web applications (on an Apache web server with Java SE installed). Would they conflict in any way? Is Groovy stable enough to compete?

I am being asked to abandon Java EE efforts as too costly to develop (Facelets and JPA); the prevailing wisdom is that PHP would be faster to develop, though, in the end harder to maintain.

Would it be possible to use Groovy with EclipseLink for complex database applications?

Thanks for any insight. Web page suggestions are welcome, just point me in the right direction.
So far I found this excellent link:
"Curious Creature" 2007/03/25 Persistence Made Easy with Groovy and JPA
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can I use Groovy to build hopefully better web applications that run in the same environment with PHP web applications (on an Apache web server with Java SE installed).

In general, No. I suppose if you could find a way for you PHP files to call Groovy code then yes. But that seems like trouble waiting to happen.

I am being asked to abandon Java EE efforts as too costly to develop (Facelets and JPA); the prevailing wisdom is that PHP would be faster to develop, though, in the end harder to maintain.

Wow, so many issues with this statement. Choosing the wrong framework will often make a technology appear too costly. Also, kind of depends on the skill set of the developer(s). I personally would never choose Facelets (or anything JSF). JPA isn't bad if you know what you are doing. And PHP is only as unmaintanable as the developer lets it become. There are decent PHP frameworks that help keep things organized. Symfony and CodeIgniter come to mind.

I'm not really sure what to recommend here because I don't believe jumping java and going to PHP is going to solve your problem unless the developer(s) really know PHP. If you think Groovy might help ease the pain of plain old java then maybe you should look into Grails.

My personal toolbox for *most* web applications...

Stripes
iBatis or JPA/Hibernate
Spring
jQuery
 
Mike Rainville
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The key issue is perceived development speed PHP vs Java EE, JSF and/or facelets. Java applet, Groovy, and PHP are the available alternatives.

Adequate PHP experience and manpower are available, but I would prefer to use my years of Java, Swing, JDBC, SQL, and JPA in Groovy, if possible, because it is clearly more readable, and supported by the full power of Java.

I use Eclipse 3.4 and NetBeans 6.1. I have been working intensely with Java for 5 years, and I have programmed in many more languages before that. I am using JPA 1.0 with Java JDK 1.6.0_07 now, for other things.

The PHP and Groovy applications would be independent of each other,
but would they be able to share the same web (http) server, with Java SE 5 or 6, but NO Java application server. The database is Oracle 10g or 11g.


Is it reasonable to consider using EclipseLink 1.0 just released with Groovy? Has anyone tried to make these work together yet?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suppose I misunderstood the original question. Could you explain a bit more on the following:

Can I use Groovy to build hopefully better web applications...

and

The PHP and Groovy applications would be independent of each other

Will the Groovy application be a standalone desktop type application that access web related resources? Are you planning on creating a web application using Groovy?
 
Mike Rainville
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To clarify: there are many independent applications, some entirely PHP and some Forms 6i. When complete all they will run on the same web server, but independently of each other. They might be started from the same HTML or XHTML page.

I am trying to find a way to script web applications similar to the PHP style, using perhaps MarkupBuilder and EclipseLink, i.e. client server web applications running on J2SE on the web server.

It's a fight to the death for Groovy vs PHP, on PHP's home turf!
[ July 28, 2008: Message edited by: Mike Rainville ]
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Quick question, Mike: have you yet discovered Grails?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Marc Peabody:
Quick question, Mike: have you yet discovered Grails?



I already mentioned that. I still don't think I have a full understanding of what he is really wanting but I somehow doubt that he is looking for Grails.
 
Mike Rainville
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I really like JRuby, but I will have to use something more familiar: if Groovy can't work, I will probably have to use an applet and require Java 6 update 10.

I looked at Rails briefly; Grails will be next, but that's totally new. They both require an application server, to the best of my knowledge, though. I might be able to justify Tomcat on the web server, if need be. Java EE has been denied me.

Think of the SwingSet2 applet, but built with Groovy's XMLBuilder as an XHTML page.

Many of the Oracle Forms 6i(client) pages are simple database CRUD, with the occasional dropdown, though the biggest has 14 panels, dialogues, and components: e.g. date with date picker, date interval, and a few other patterns, so components or templates are necessary.

I am trying to produce the equivalent of an XHTML Facelets Java EE application using Groovy and Java SE with EclipseLink JPA and Oracle 11g R1 thing JDBC client, with the Java SE and Groovy installed on an httpServer, and the application in a web browser, like Firefox 3 or Safari.

There are tens of users at most...
[ July 28, 2008: Message edited by: Mike Rainville ]
 
Mike Rainville
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The more I look at it , the answer is yes...

There appear to be many ways,
of which this would be about what I was looking for
Groovlets (httpServer + Tomcat), and I could even use JSF and EclipseLink JPA, if I wanted.

Over the long haul, I see the JVM on the web server running legacy PHP and Groovy web applications, side by side.

I promise to study Grails, but 2nd edition definitive book won't be out for a while.

Thanks for all the tips, and I'll keep watching.
(Trying to get the JPA example working with EclipseLink soon ...

Mike

p.s. Thank God, and his creatures , for Groovy
[ July 30, 2008: Message edited by: Mike Rainville ]
 
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic