xoops forums

jmass

Friend of XOOPS
Posted on: 2004/3/25 15:01
jmass
jmass (Show more)
Friend of XOOPS
Posts: 524
Since: 2003/12/18
#1

Java Classes and Xoops Integration

Hello!

I am wondering what the difficulty in integrating XOOPS with some pre-existing Java classes would be? I know PHP can do this rather well... but am not sure how XOOPS would affect this. (If at all).

I want to build a module that can access theses public classes on an existing J2EE application. Does anyone else have the faintest desire to do this kind of thing?

Any insight or discussion is welcome.

JMass

Mithrandir

XOOPS is my life!
Posted on: 2004/3/25 15:08
Mithrandir
Mithrandir (Show more)
XOOPS is my life!
Posts: 6320
Since: 2003/6/21
#2

Re: Java Classes and Xoops Integration

I don't have any clue as to, how PHP and Java can communicate - but what is possible with PHP should be possible with XOOPS

jmass

Friend of XOOPS
Posted on: 2004/3/25 20:42
jmass
jmass (Show more)
Friend of XOOPS
Posts: 524
Since: 2003/12/18
#3

Re: Java Classes and Xoops Integration

Mirthraddir,

Check out this devshed link for PHP and Java...

http://www.devshed.com/c/a/PHP/Using-PHP-with-Java/

I know DevShed sucks (Melonfire~~Shudder).... But it was what prompted the idea.

I really want to interface XOOPS with IBM/Lotus domino. A poor mans WebSphere Portal Server if you will. Not so much for the cost of software, but to be able to code the View in PHP rather than Java.

JMass

Mithrandir

XOOPS is my life!
Posted on: 2004/3/25 21:50
Mithrandir
Mithrandir (Show more)
XOOPS is my life!
Posts: 6320
Since: 2003/6/21
#4

Re: Java Classes and Xoops Integration

Very interesting reading.
I know about Java, but lack the intimate class library knowledge to be able to use it properly.

Wouldn't you need to code the Controller in PHP, too? and I agree - I'd much rather do website Views in Smarty than in JSP.

(PS. 2-3 attempts and you still can't get my nick right )

jmass

Friend of XOOPS
Posted on: 2004/3/26 3:24
jmass
jmass (Show more)
Friend of XOOPS
Posts: 524
Since: 2003/12/18
#5

Re: Java Classes and Xoops Integration

Mith, (I'm sticking with that!)

I have been considering that too. In java it is:

Model - Beans or EJBs (If you really think you are cool)

View - JSP (Yuck)

Controller - Struts, Maverick, etc. (Struts dominates)

I really only want to do the model in java. Not really wanting to do it in Java either. That just happens to be the best way to interfacce with Domino. Domino is such a powerful and flexable data store that it is worth the effort. Plus I can design for the fat Notes client on the desk top and build a slick webapp at the same time.

The Domino classes provide very robust methods of manipulating the model. Really it is a Data Access Ojbect.

I do not want to replace the DB of XOOPS (MySql now, hopefully other choices soon.) I want to run XOOPS as is. However, I want to be able to manipulate the DAO of Domino from within a module. I would hack XOOPS to use Ldap for single signon.

I believe that you are correct. The controller would be on the PHP side of things. However, it would not be the XOOPS controller. It would have to be a "controller" written in the module.

Don't get me started on using the front controller methodology in web apps! I agree whole hartedly with:
http://www.phppatterns.com/index.php/article/articleview/81/1/1/
I think the business logic (read controller logic) can be isolated enough without a true controller setup like php.mvc which is a php rebuild of Struts.

Am I crazy to try this?

JMass

eikke

Just popping in
Posted on: 2004/3/26 6:59
eikke
eikke (Show more)
Just popping in
Posts: 40
Since: 2004/1/15
#6

Re: Java Classes and Xoops Integration

Cant you write the whole frontend in PHP, and interact with your Java backend using SOAP/WSDL or XML/RPC (altough I guess SOAP is a better choice in this case)?

jmass

Friend of XOOPS
Posted on: 2004/3/27 3:09
jmass
jmass (Show more)
Friend of XOOPS
Posts: 524
Since: 2003/12/18
#7

Re: Java Classes and Xoops Integration

SOAP and the others are really a higher level solution than I need. To access the power of the Domino Data Store I believe that I need to communicate at a much lower level: at the class level.

I could be wrong. I need to investigate SOAP more. I will look into it.

JMass

fatman

Friend of XOOPS
Posted on: 2004/3/27 5:50
fatman
fatman (Show more)
Friend of XOOPS
Posts: 176
Since: 2003/12/13
#8

Re: Java Classes and Xoops Integration

SOAP could be used.

You should be able to find some sort of a SOAP class for your j2ee application that will can make select functions from the java app available via XML calls. (SOAP is just the format of the XML message)

On the PHP side, you could use the nuSOAP class for PHP. This will let you write PHP functions or class files that send and recieve SOAP messages. It very easy to make a remote SOAP call as long as you know the URL of the server where the java app is running.

Unfortunately here you're going to have to know Java and PHP. I used SOAP to communicate with a JAVA app in the xoogle module but google had already done all the java work :P