Re: [U2] PHP vs Java
|boolean| |*add http://java.sun.com/javase/6/docs/api/java/util/ArrayList.html#add%28E%29*(E http://java.sun.com/javase/6/docs/api/java/util/ArrayList.html e)| Appends the specified element to the end of this list. | void| |*add http://java.sun.com/javase/6/docs/api/java/util/ArrayList.html#add%28int,%20E%29*(int index, E http://java.sun.com/javase/6/docs/api/java/util/ArrayList.html element)| Inserts the specified element at the specified position in this list. Adrian Merrall wrote: Bill, I don't have the javadoc for the dynamic array class provided by uniobjects handy but that may do it. I don't think a simple ArrayList will do it, primarily because it won't have insert capability. Building a dynamic array in java is certainly possible but has some interesting cases to handle. Regards, Adrian On Fri, Jul 31, 2009 at 10:39 AM, Brutzman, Bill bi...@hkmetalcraft.comwrote: Yes... It looks like it would. Thanks Jeff. I will plan to reVisit the Morris County Library to find the textbook that I found the java source code for the method to handle dynamic arrays... and try to determine why ArrayList was not mentioned. --Bill -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Powell Sent: Thursday, July 30, 2009 6:30 PM To: U2 Users List Subject: Re: [U2] PHP vs Java Wouldn't the ArrayList work? It has add and get methods plus a toArray method. Brutzman, Bill wrote: Thanks to Kevin and Ross for responding. I was surprised to learn that Java does not have built-in functionality to support dynamic arrays although a little method can be written to handle it. The battle inside my head continues... --B -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Wednesday, July 29, 2009 9:21 PM To: U2 Users List Subject: Re: [U2] Using PHP To start, I'll echo Ross. PHP is great for sessions and all manners of web-type programming. Unlike Java - an otherwise excellent language which tends to require some complex-ish web server setup - PHP is much more lightweight and plugs into just about any web server quickly and efficiently. The language is purportedly derived from Perl but syntactically I find it closer to the original ANSI C++ with just a touch of Java-isms to keep it friendly. It's easy (dare I say fun?) to learn, easy to read, easy to deploy, and can be very maintainable (though of course individual mileage in this department varies per individual - as with all languages). There are all sorts of frameworks and infrastructures available for PHP but one doesn't have to use anything more than an editor to get started. The documentation is well written (I find it much more understandable than most) and there are plenty of books available with code samples to get one moving in the right direction. PHP can install with lots of different modules from SQL connectors to crypto libraries, ZIP and PDF creators and extractors, and a blindingly large array of other features as well. And if that's not enough there's a whole boatload of other user-contributed libraries available via PEAR. Generally speaking, (well written) PHP code performs very well, it's a reasonably mature language with a good object model (as of PHP5) but where it really shines is in passing data to and through a web server and managing sessions. I've also used it for *nix shell scripting for administration types of things and even had the pleasure of writing a NAGIOS plugin with it. Come to think of it, I've used it for all sorts of ad-hoc data analysis on my Windows box as well when awk was just a little too ... awkward? (pun intended, of course) I've heard PHP is the #2 language in the world behind C++, but I don't know definitively that's entirely reliable. That said, it does seem like it's gaining momentum because it's so flexible and pervasive. The fact that it can be used beyond the web and on nearly every platform imaginable without additional hardware or software, well, that has to account for something. The only downside to PHP in terms of U2 is that IBM has so far refused to create any kind of native connector. The UO connector works but it requires something of a walk on the wild side to mitigate some weirdness in the dynamic array extraction methods. Yeah, there's that TechConnect article which describes rolling your own, but even I'm not THAT geeky. Finally, FREE is always a good price, especially when you get so much with PHP. -K ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] PHP vs Java
Here is sun's javadoc for Java 6. http://java.sun.com/javase/6/docs/api/ I'm not advocating one platform over the other since I use both myself. PHP certainly has a place for rapid application development. I have however done extensive work with web-services that connect to UniData via UniObjects for java. One application that is in use in our warehouse uses JSON, reflection and webservices to create an interactive web picker tool with real time validation of the material codes entered by the picker. Brutzman, Bill wrote: Yes... It looks like it would. Thanks Jeff. I will plan to reVisit the Morris County Library to find the textbook that I found the java source code for the method to handle dynamic arrays... and try to determine why ArrayList was not mentioned. --Bill -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Powell Sent: Thursday, July 30, 2009 6:30 PM To: U2 Users List Subject: Re: [U2] PHP vs Java Wouldn't the ArrayList work? It has add and get methods plus a toArray method. Brutzman, Bill wrote: Thanks to Kevin and Ross for responding. I was surprised to learn that Java does not have built-in functionality to support dynamic arrays although a little method can be written to handle it. The battle inside my head continues... --B -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Wednesday, July 29, 2009 9:21 PM To: U2 Users List Subject: Re: [U2] Using PHP To start, I'll echo Ross. PHP is great for sessions and all manners of web-type programming. Unlike Java - an otherwise excellent language which tends to require some complex-ish web server setup - PHP is much more lightweight and plugs into just about any web server quickly and efficiently. The language is purportedly derived from Perl but syntactically I find it closer to the original ANSI C++ with just a touch of Java-isms to keep it friendly. It's easy (dare I say fun?) to learn, easy to read, easy to deploy, and can be very maintainable (though of course individual mileage in this department varies per individual - as with all languages). There are all sorts of frameworks and infrastructures available for PHP but one doesn't have to use anything more than an editor to get started. The documentation is well written (I find it much more understandable than most) and there are plenty of books available with code samples to get one moving in the right direction. PHP can install with lots of different modules from SQL connectors to crypto libraries, ZIP and PDF creators and extractors, and a blindingly large array of other features as well. And if that's not enough there's a whole boatload of other user-contributed libraries available via PEAR. Generally speaking, (well written) PHP code performs very well, it's a reasonably mature language with a good object model (as of PHP5) but where it really shines is in passing data to and through a web server and managing sessions. I've also used it for *nix shell scripting for administration types of things and even had the pleasure of writing a NAGIOS plugin with it. Come to think of it, I've used it for all sorts of ad-hoc data analysis on my Windows box as well when awk was just a little too ... awkward? (pun intended, of course) I've heard PHP is the #2 language in the world behind C++, but I don't know definitively that's entirely reliable. That said, it does seem like it's gaining momentum because it's so flexible and pervasive. The fact that it can be used beyond the web and on nearly every platform imaginable without additional hardware or software, well, that has to account for something. The only downside to PHP in terms of U2 is that IBM has so far refused to create any kind of native connector. The UO connector works but it requires something of a walk on the wild side to mitigate some weirdness in the dynamic array extraction methods. Yeah, there's that TechConnect article which describes rolling your own, but even I'm not THAT geeky. Finally, FREE is always a good price, especially when you get so much with PHP. -K ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] PHP vs Java
-Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Brutzman, Bill Sent: Thursday, July 30, 2009 2:59 PM To: U2 Users List Subject: Re: [U2] PHP vs Java Thanks to Kevin and Ross for responding. I was surprised to learn that Java does not have built-in functionality to support dynamic arrays although a little method can be written to handle it. The battle inside my head continues... --B The UOJ UniDynArray object and methods will let you pass dynamic arrays between Java applications and UniBASIC programs as a subroutine argument, but you can also use them independently of any U2 subroutine calls. We use them extensively. They have essentially the same functionality in Java as in UniBASIC. From the UOJ manual: The following table describes the UniDynArray methods. Primary Methods count ( ) dcount ( ) delete ( ) extract ( ) insert ( ) length ( ) remove ( ) replace ( ) toString ( ) Just include the UOJ asjava.zip library in your application. -John ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] PHP vs Java
Question to those who have used the UOJ connector... Is extract as stupid in Java as it is in PHP? With PHP you can't use this to extract an attribute to a local variable and then loop through the mv's like you would in BASIC. Every freakin' routine that wants to get a multivalue has to use Field(n) to get the attribute number first, then Field(m) for the value, and that's a RPITA. I've taken to parsing delimiters and using explode() in PHP to break things up by delimiter and convert the entire dynamic array to a first class PHP array; otherwise everything just gets too long and ugly. Does UOJ have this kind of thing as well? On Fri, Jul 31, 2009 at 12:06 PM, John Hester jhes...@momtex.com wrote: -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Brutzman, Bill Sent: Thursday, July 30, 2009 2:59 PM To: U2 Users List Subject: Re: [U2] PHP vs Java Thanks to Kevin and Ross for responding. I was surprised to learn that Java does not have built-in functionality to support dynamic arrays although a little method can be written to handle it. The battle inside my head continues... --B The UOJ UniDynArray object and methods will let you pass dynamic arrays between Java applications and UniBASIC programs as a subroutine argument, but you can also use them independently of any U2 subroutine calls. We use them extensively. They have essentially the same functionality in Java as in UniBASIC. From the UOJ manual: The following table describes the UniDynArray methods. Primary Methods count ( ) dcount ( ) delete ( ) extract ( ) insert ( ) length ( ) remove ( ) replace ( ) toString ( ) Just include the UOJ asjava.zip library in your application. -John ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- -Kevin http://www.PrecisOnline.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] PHP vs Java
Kevin, You can extract to another unidynarray and then work through the values locally. Kevin King wrote: Question to those who have used the UOJ connector... Is extract as stupid in Java as it is in PHP? With PHP you can't use this to extract an attribute to a local variable and then loop through the mv's like you would in BASIC. Every freakin' routine that wants to get a multivalue has to use Field(n) to get the attribute number first, then Field(m) for the value, and that's a RPITA. I've taken to parsing delimiters and using explode() in PHP to break things up by delimiter and convert the entire dynamic array to a first class PHP array; otherwise everything just gets too long and ugly. Does UOJ have this kind of thing as well? On Fri, Jul 31, 2009 at 12:06 PM, John Hester jhes...@momtex.com wrote: -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Brutzman, Bill Sent: Thursday, July 30, 2009 2:59 PM To: U2 Users List Subject: Re: [U2] PHP vs Java Thanks to Kevin and Ross for responding. I was surprised to learn that Java does not have built-in functionality to support dynamic arrays although a little method can be written to handle it. The battle inside my head continues... --B The UOJ UniDynArray object and methods will let you pass dynamic arrays between Java applications and UniBASIC programs as a subroutine argument, but you can also use them independently of any U2 subroutine calls. We use them extensively. They have essentially the same functionality in Java as in UniBASIC. From the UOJ manual: The following table describes the UniDynArray methods. Primary Methods count ( ) dcount ( ) delete ( ) extract ( ) insert ( ) length ( ) remove ( ) replace ( ) toString ( ) Just include the UOJ asjava.zip library in your application. -John ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] PHP vs Java
In PHP you can't. If you extract something with Field(n) it appears the whole record goes to the other unidynarray. You still have to use Field(a)-Field(v)-... to get to a specific something even after the assignment. THAT is my biggest beef with this, but fortunately the explode solution works; otherwise I wouldn't even consider recommending PHP with UO. On Fri, Jul 31, 2009 at 1:09 PM, Jeff Powell j...@powellclan.com wrote: Kevin, You can extract to another unidynarray and then work through the values locally. Kevin King wrote: Question to those who have used the UOJ connector... Is extract as stupid in Java as it is in PHP? With PHP you can't use this to extract an attribute to a local variable and then loop through the mv's like you would in BASIC. Every freakin' routine that wants to get a multivalue has to use Field(n) to get the attribute number first, then Field(m) for the value, and that's a RPITA. I've taken to parsing delimiters and using explode() in PHP to break things up by delimiter and convert the entire dynamic array to a first class PHP array; otherwise everything just gets too long and ugly. Does UOJ have this kind of thing as well? On Fri, Jul 31, 2009 at 12:06 PM, John Hester jhes...@momtex.com wrote: -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Brutzman, Bill Sent: Thursday, July 30, 2009 2:59 PM To: U2 Users List Subject: Re: [U2] PHP vs Java Thanks to Kevin and Ross for responding. I was surprised to learn that Java does not have built-in functionality to support dynamic arrays although a little method can be written to handle it. The battle inside my head continues... --B The UOJ UniDynArray object and methods will let you pass dynamic arrays between Java applications and UniBASIC programs as a subroutine argument, but you can also use them independently of any U2 subroutine calls. We use them extensively. They have essentially the same functionality in Java as in UniBASIC. From the UOJ manual: The following table describes the UniDynArray methods. Primary Methods count ( ) dcount ( ) delete ( ) extract ( ) insert ( ) length ( ) remove ( ) replace ( ) toString ( ) Just include the UOJ asjava.zip library in your application. -John ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- -Kevin http://www.PrecisOnline.com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] PHP vs Java
There's also something to be said for writing a common method to handle these things. Do it once, use your own methods, and forget about it needs to be handled internally. T You still have to use Field(a)-Field(v)--users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] PHP vs Java
Thanks to Kevin and Ross for responding. I was surprised to learn that Java does not have built-in functionality to support dynamic arrays although a little method can be written to handle it. The battle inside my head continues... --B -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Wednesday, July 29, 2009 9:21 PM To: U2 Users List Subject: Re: [U2] Using PHP To start, I'll echo Ross. PHP is great for sessions and all manners of web-type programming. Unlike Java - an otherwise excellent language which tends to require some complex-ish web server setup - PHP is much more lightweight and plugs into just about any web server quickly and efficiently. The language is purportedly derived from Perl but syntactically I find it closer to the original ANSI C++ with just a touch of Java-isms to keep it friendly. It's easy (dare I say fun?) to learn, easy to read, easy to deploy, and can be very maintainable (though of course individual mileage in this department varies per individual - as with all languages). There are all sorts of frameworks and infrastructures available for PHP but one doesn't have to use anything more than an editor to get started. The documentation is well written (I find it much more understandable than most) and there are plenty of books available with code samples to get one moving in the right direction. PHP can install with lots of different modules from SQL connectors to crypto libraries, ZIP and PDF creators and extractors, and a blindingly large array of other features as well. And if that's not enough there's a whole boatload of other user-contributed libraries available via PEAR. Generally speaking, (well written) PHP code performs very well, it's a reasonably mature language with a good object model (as of PHP5) but where it really shines is in passing data to and through a web server and managing sessions. I've also used it for *nix shell scripting for administration types of things and even had the pleasure of writing a NAGIOS plugin with it. Come to think of it, I've used it for all sorts of ad-hoc data analysis on my Windows box as well when awk was just a little too ... awkward? (pun intended, of course) I've heard PHP is the #2 language in the world behind C++, but I don't know definitively that's entirely reliable. That said, it does seem like it's gaining momentum because it's so flexible and pervasive. The fact that it can be used beyond the web and on nearly every platform imaginable without additional hardware or software, well, that has to account for something. The only downside to PHP in terms of U2 is that IBM has so far refused to create any kind of native connector. The UO connector works but it requires something of a walk on the wild side to mitigate some weirdness in the dynamic array extraction methods. Yeah, there's that TechConnect article which describes rolling your own, but even I'm not THAT geeky. Finally, FREE is always a good price, especially when you get so much with PHP. -K ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] PHP vs Java
Wouldn't the ArrayList work? It has add and get methods plus a toArray method. Brutzman, Bill wrote: Thanks to Kevin and Ross for responding. I was surprised to learn that Java does not have built-in functionality to support dynamic arrays although a little method can be written to handle it. The battle inside my head continues... --B -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Wednesday, July 29, 2009 9:21 PM To: U2 Users List Subject: Re: [U2] Using PHP To start, I'll echo Ross. PHP is great for sessions and all manners of web-type programming. Unlike Java - an otherwise excellent language which tends to require some complex-ish web server setup - PHP is much more lightweight and plugs into just about any web server quickly and efficiently. The language is purportedly derived from Perl but syntactically I find it closer to the original ANSI C++ with just a touch of Java-isms to keep it friendly. It's easy (dare I say fun?) to learn, easy to read, easy to deploy, and can be very maintainable (though of course individual mileage in this department varies per individual - as with all languages). There are all sorts of frameworks and infrastructures available for PHP but one doesn't have to use anything more than an editor to get started. The documentation is well written (I find it much more understandable than most) and there are plenty of books available with code samples to get one moving in the right direction. PHP can install with lots of different modules from SQL connectors to crypto libraries, ZIP and PDF creators and extractors, and a blindingly large array of other features as well. And if that's not enough there's a whole boatload of other user-contributed libraries available via PEAR. Generally speaking, (well written) PHP code performs very well, it's a reasonably mature language with a good object model (as of PHP5) but where it really shines is in passing data to and through a web server and managing sessions. I've also used it for *nix shell scripting for administration types of things and even had the pleasure of writing a NAGIOS plugin with it. Come to think of it, I've used it for all sorts of ad-hoc data analysis on my Windows box as well when awk was just a little too ... awkward? (pun intended, of course) I've heard PHP is the #2 language in the world behind C++, but I don't know definitively that's entirely reliable. That said, it does seem like it's gaining momentum because it's so flexible and pervasive. The fact that it can be used beyond the web and on nearly every platform imaginable without additional hardware or software, well, that has to account for something. The only downside to PHP in terms of U2 is that IBM has so far refused to create any kind of native connector. The UO connector works but it requires something of a walk on the wild side to mitigate some weirdness in the dynamic array extraction methods. Yeah, there's that TechConnect article which describes rolling your own, but even I'm not THAT geeky. Finally, FREE is always a good price, especially when you get so much with PHP. -K ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] PHP vs Java
Yes... It looks like it would. Thanks Jeff. I will plan to reVisit the Morris County Library to find the textbook that I found the java source code for the method to handle dynamic arrays... and try to determine why ArrayList was not mentioned. --Bill -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Powell Sent: Thursday, July 30, 2009 6:30 PM To: U2 Users List Subject: Re: [U2] PHP vs Java Wouldn't the ArrayList work? It has add and get methods plus a toArray method. Brutzman, Bill wrote: Thanks to Kevin and Ross for responding. I was surprised to learn that Java does not have built-in functionality to support dynamic arrays although a little method can be written to handle it. The battle inside my head continues... --B -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Wednesday, July 29, 2009 9:21 PM To: U2 Users List Subject: Re: [U2] Using PHP To start, I'll echo Ross. PHP is great for sessions and all manners of web-type programming. Unlike Java - an otherwise excellent language which tends to require some complex-ish web server setup - PHP is much more lightweight and plugs into just about any web server quickly and efficiently. The language is purportedly derived from Perl but syntactically I find it closer to the original ANSI C++ with just a touch of Java-isms to keep it friendly. It's easy (dare I say fun?) to learn, easy to read, easy to deploy, and can be very maintainable (though of course individual mileage in this department varies per individual - as with all languages). There are all sorts of frameworks and infrastructures available for PHP but one doesn't have to use anything more than an editor to get started. The documentation is well written (I find it much more understandable than most) and there are plenty of books available with code samples to get one moving in the right direction. PHP can install with lots of different modules from SQL connectors to crypto libraries, ZIP and PDF creators and extractors, and a blindingly large array of other features as well. And if that's not enough there's a whole boatload of other user-contributed libraries available via PEAR. Generally speaking, (well written) PHP code performs very well, it's a reasonably mature language with a good object model (as of PHP5) but where it really shines is in passing data to and through a web server and managing sessions. I've also used it for *nix shell scripting for administration types of things and even had the pleasure of writing a NAGIOS plugin with it. Come to think of it, I've used it for all sorts of ad-hoc data analysis on my Windows box as well when awk was just a little too ... awkward? (pun intended, of course) I've heard PHP is the #2 language in the world behind C++, but I don't know definitively that's entirely reliable. That said, it does seem like it's gaining momentum because it's so flexible and pervasive. The fact that it can be used beyond the web and on nearly every platform imaginable without additional hardware or software, well, that has to account for something. The only downside to PHP in terms of U2 is that IBM has so far refused to create any kind of native connector. The UO connector works but it requires something of a walk on the wild side to mitigate some weirdness in the dynamic array extraction methods. Yeah, there's that TechConnect article which describes rolling your own, but even I'm not THAT geeky. Finally, FREE is always a good price, especially when you get so much with PHP. -K ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] PHP vs Java
Bill, I don't have the javadoc for the dynamic array class provided by uniobjects handy but that may do it. I don't think a simple ArrayList will do it, primarily because it won't have insert capability. Building a dynamic array in java is certainly possible but has some interesting cases to handle. Regards, Adrian On Fri, Jul 31, 2009 at 10:39 AM, Brutzman, Bill bi...@hkmetalcraft.comwrote: Yes... It looks like it would. Thanks Jeff. I will plan to reVisit the Morris County Library to find the textbook that I found the java source code for the method to handle dynamic arrays... and try to determine why ArrayList was not mentioned. --Bill -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Jeff Powell Sent: Thursday, July 30, 2009 6:30 PM To: U2 Users List Subject: Re: [U2] PHP vs Java Wouldn't the ArrayList work? It has add and get methods plus a toArray method. Brutzman, Bill wrote: Thanks to Kevin and Ross for responding. I was surprised to learn that Java does not have built-in functionality to support dynamic arrays although a little method can be written to handle it. The battle inside my head continues... --B -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Wednesday, July 29, 2009 9:21 PM To: U2 Users List Subject: Re: [U2] Using PHP To start, I'll echo Ross. PHP is great for sessions and all manners of web-type programming. Unlike Java - an otherwise excellent language which tends to require some complex-ish web server setup - PHP is much more lightweight and plugs into just about any web server quickly and efficiently. The language is purportedly derived from Perl but syntactically I find it closer to the original ANSI C++ with just a touch of Java-isms to keep it friendly. It's easy (dare I say fun?) to learn, easy to read, easy to deploy, and can be very maintainable (though of course individual mileage in this department varies per individual - as with all languages). There are all sorts of frameworks and infrastructures available for PHP but one doesn't have to use anything more than an editor to get started. The documentation is well written (I find it much more understandable than most) and there are plenty of books available with code samples to get one moving in the right direction. PHP can install with lots of different modules from SQL connectors to crypto libraries, ZIP and PDF creators and extractors, and a blindingly large array of other features as well. And if that's not enough there's a whole boatload of other user-contributed libraries available via PEAR. Generally speaking, (well written) PHP code performs very well, it's a reasonably mature language with a good object model (as of PHP5) but where it really shines is in passing data to and through a web server and managing sessions. I've also used it for *nix shell scripting for administration types of things and even had the pleasure of writing a NAGIOS plugin with it. Come to think of it, I've used it for all sorts of ad-hoc data analysis on my Windows box as well when awk was just a little too ... awkward? (pun intended, of course) I've heard PHP is the #2 language in the world behind C++, but I don't know definitively that's entirely reliable. That said, it does seem like it's gaining momentum because it's so flexible and pervasive. The fact that it can be used beyond the web and on nearly every platform imaginable without additional hardware or software, well, that has to account for something. The only downside to PHP in terms of U2 is that IBM has so far refused to create any kind of native connector. The UO connector works but it requires something of a walk on the wild side to mitigate some weirdness in the dynamic array extraction methods. Yeah, there's that TechConnect article which describes rolling your own, but even I'm not THAT geeky. Finally, FREE is always a good price, especially when you get so much with PHP. -K ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org