473,666 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PERL or PHP for a regular console application?

Hello everyone,
Can someone help me in deciding the development language?

I need to develop a "regular console application" which will require -

1. Communication with another application over message queue
2. HTTP/HTTPS communication with another application
3. Parsing XML file
4. Persistent in memory for a range of commands execution

I have investigated the above features in PERL and PHP. It seems it is
possible to develop the application in PERL. I am a little bit
skeptical about PHP because as I know it is suitable for website
generation.

Can someone explain if the application is possible using PHP?
Is PHP suitable for regular console application?

Thanks in advance
A.R.John

Jul 17 '05 #1
9 3680
ar********@hotm ail.com wrote:

I need to develop a "regular console application" which will require -

1. Communication with another application over message queue
2. HTTP/HTTPS communication with another application
3. Parsing XML file
4. Persistent in memory for a range of commands execution


Yes - PHP can do all that. So can PERL.

HTH

C.
Jul 17 '05 #2
It is suitable. In fact you can write a fullblown unix deamon in PHP.
Shared memory, pcntl_fork(), ncurses, everything is there. There are
good tutorials out there, give google a try :)
On 26.04.2005 14:41, ar********@hotm ail.com wrote:
Can someone explain if the application is possible using PHP?
Is PHP suitable for regular console application?

Thanks in advance
A.R.John

Jul 17 '05 #3
Possible, yes. Suitable? Probable not. PHP has a way of hogging more
and more memory while it runs a script. A good strategy for processing
web requests. Lousy when you're trying to write a daemon.

Perl is probably a better bet.

Jul 17 '05 #4
arjohn7...@hotm ail.com wrote:
Hello everyone,
Can someone help me in deciding the development language?

I need to develop a "regular console application" which will require

-
<snip>
What about C?

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #5
One quick glance of an experienced eye allowed to understand the blurred
and almost unreadable ar********@hotm ail.com's handwriting:
Hello everyone,
Can someone help me in deciding the development language?

I need to develop a "regular console application" which will require -

1. Communication with another application over message queue
2. HTTP/HTTPS communication with another application
3. Parsing XML file
4. Persistent in memory for a range of commands execution

I have investigated the above features in PERL and PHP. It seems it is
possible to develop the application in PERL. I am a little bit
skeptical about PHP because as I know it is suitable for website
generation.

Can someone explain if the application is possible using PHP?
Is PHP suitable for regular console application?

Thanks in advance
A.R.John


From these two - Python. :)
As powerful as Perl, but much cleaner and more elegant.

Cheers
Mike
Jul 17 '05 #6
> From these two - Python. :)
As powerful as Perl, but much cleaner and more elegant.


or ruby :)
or maybe asm is suited as well? :)
Jul 17 '05 #7
ar********@hotm ail.com wrote:
Hello everyone,
Can someone help me in deciding the development language?

I need to develop a "regular console application" which will require -

1. Communication with another application over message queue
2. HTTP/HTTPS communication with another application
3. Parsing XML file
4. Persistent in memory for a range of commands execution

I have investigated the above features in PERL and PHP. It seems it is
possible to develop the application in PERL. I am a little bit
skeptical about PHP because as I know it is suitable for website
generation.

Can someone explain if the application is possible using PHP?
Is PHP suitable for regular console application?

Thanks in advance
A.R.John


I would personally use perl, however check this out:
http://www.phpbuilder.com/columns/darrell20000319.php3

php can be used as a shell scripting lang. Is that what u are talking about?

2nd, you seem to want it to run a a daemon, wont MaxExecutionTim e affect
that?
Jul 17 '05 #8
Edward Pearson wrote:
I would personally use perl, however check this out:
http://www.phpbuilder.com/columns/darrell20000319.php3

php can be used as a shell scripting lang. Is that what u are talking
about?

2nd, you seem to want it to run a a daemon, wont MaxExecutionTim e affect
that?


the maximum execution time can be changed using the set_time_limit
function. You can set_time_limit( 0) to remove the limit.

PHP is also capable of everything that is desired. I have don several
console-based application using PHP. The main one I have done is a bot
which connects to IRC, similar to eggdrops. I've also made scripts
which downloads and parse information from various sites, some of which
use XML as a datatransport, and I've made socket-servers before which
accept connections and perform certain functions based on the input.

So php is capable, how suitable it is depends on the specifics of the
requirements, and also how knowledged you are at perl vs. php.
Jul 17 '05 #9
ar********@hotm ail.com wrote:
Hello everyone,
Can someone help me in deciding the development language?

I need to develop a "regular console application" which will require -

1. Communication with another application over message queue
2. HTTP/HTTPS communication with another application
3. Parsing XML file
4. Persistent in memory for a range of commands execution

I have investigated the above features in PERL and PHP. It seems it is
possible to develop the application in PERL. I am a little bit
skeptical about PHP because as I know it is suitable for website
generation.

Can someone explain if the application is possible using PHP?
Is PHP suitable for regular console application?

Thanks in advance
A.R.John


Just look at the function list, PHP is full-blown language suitable for any
task. Since discovering PHP I don't use anything else.

One caveat: I have no experience with using it to write a DESKTOP app, for
user interface I do only web, so can't talk about desktop apps.
--
Kenneth Downs
Secure Data Software, Inc.
(Ken)nneth@(Sec )ure(Dat)a(.com )
Jul 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2921
by: Lionel | last post by:
Hi all, I would like having more informations on how we could exchange informations and/or objects between PERL and JAVA. We have a Java programs that open, maintain and close telnet connections, for PERL scripts... Is it possible, to echange the Java telnet session object to PERL programs ? Or thoses two languages could not exchange objects or such
31
4778
by: surfunbear | last post by:
I've read some posts on Perl versus Python and studied a bit of my Python book. I'm a software engineer, familiar with C++ objected oriented development, but have been using Perl because it is great for pattern matching, text processing, and automated testing. Our company is really fixated on risk managnemt and the only way I can do enough testing without working overtime (which some people have ended up doing) is by automating my...
6
6019
by: Danny Lu | last post by:
Hi, can anyone tell me where I can get a good perl book? TIA Dan
9
4512
by: Dieter Vanderelst | last post by:
Dear all, I'm currently comparing Python versus Perl to use in a project that involved a lot of text processing. I'm trying to determine what the most efficient language would be for our purposes. I have to admit that, although I'm very familiar with Python, I'm complete Perl noob (and I hope to stay one) which is reflected in my questions. I know that the web offers a lot of resources on Python/Perl differences. But I couldn't find a...
3
2456
by: phal | last post by:
Hi all; I code Perl for CGI, I using regular expression to check the validation of user input, because the form is small and it run only from my own computer, anyways if many people using my form, do you think it will be slow due to Perl is run under server. How about using JavaSCript to check validation for user input? Do you think it a bit faster?
3
517
by: Marius | last post by:
Hi, I'm having an odd problem with a regular expression in C#. I'm trying to parse the rows in a web page with this pattern, and the computer locks up: "<tr valign=middle>.+?<a href=\"/listings/details/index\\.cfm\\?itemnum=.+?8000 FB 24/7.+?(Antonius|Marcus).+?PLATINUM (\\d+)K PP.+?\\$<b>(\\d+(\\.\\d+)*)</b>.+?</tr>"
0
2307
by: Peter Conrey | last post by:
I have a perl web service (using SOAP::Lite) with a method called "Detail" that returns a strucure (hash reference to be exact). It works fine when consumed by a Perl client, but when I try to consume it with a C# application, I get the following runtime error from C#: Cannot assign object of type System.Xml.XmlNode to an object of type ConsoleApplication1.com.hilton.crmdev.SummaryType. Below is the Perl code that generates the hash,...
9
1781
by: peter | last post by:
Hi, this is not stinky bait. If you take it that way, please dont respond.. I have been away from UNIX software for quite awhile and want to get back into it. I liked "C" but Java seems like the way to go for compiled langs, now days so I will learn that. At one time, I did a bit of perl but now I see php alot. I was wondering what you guys thinks of the pros/cons of perl and php.
1
47446
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
0
8454
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8878
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8785
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8560
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8644
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6200
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4200
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1778
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.