473,800 Members | 2,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

perl and php, horses for courses?

pc
hi all,

I have been blessed with the task of writing a web based database
representing the state of our globally installed isam databases.

there are basically four steps in setting this up:

1) schedule isam file reports to run at all remote sites. this
generates a text file describing the current state of tables (files) in
the database.

2) schedule an ftp job to pick up these text reports and dump them on a
central server

3) parse the reports and write the information to a mysql database

4) front end web based gui. make the information available (reports,
alerts, etc.)

Our company wants to use PHP for the front end GUI. Not having had much
experience with PHP it seems to me that the way to do the above would
be to do steps 1, 2 and 3 with Shell / Perl scripting (Perl being
designed for text file manipulation) and then to use PHP to provide the
GUI.

Anyone's thoughts and / or input on this matter would be much
appreciated.

cheers!

eddiec :-)

Jan 5 '06 #1
3 1438
On Thu, 05 Jan 2006 14:19:26 -0800, pc wrote:
Our company wants to use PHP for the front end GUI. Not having had much
experience with PHP it seems to me that the way to do the above would
be to do steps 1, 2 and 3 with Shell / Perl scripting (Perl being
designed for text file manipulation) and then to use PHP to provide the
GUI.


PHP can do pretty much anything that Perl can. OK, for some capabilities,
like reading/writing Excel spreadsheets and LWP, I would still go to Perl,
but text file manipulation can be done perfectly well with PHP.

--
http://www.mgogala.com

Jan 5 '06 #2
pc wrote:
hi all,

I have been blessed with the task of writing a web based database
representing the state of our globally installed isam databases.

there are basically four steps in setting this up:

1) schedule isam file reports to run at all remote sites. this
generates a text file describing the current state of tables (files) in
the database.

2) schedule an ftp job to pick up these text reports and dump them on a
central server

3) parse the reports and write the information to a mysql database

4) front end web based gui. make the information available (reports,
alerts, etc.)

Our company wants to use PHP for the front end GUI. Not having had much
experience with PHP it seems to me that the way to do the above would
be to do steps 1, 2 and 3 with Shell / Perl scripting (Perl being
designed for text file manipulation) and then to use PHP to provide the
GUI.

Anyone's thoughts and / or input on this matter would be much
appreciated.


Steps #1 and #2 could be simplified (and conserve bandwidth if that's
important) by using rsync on the remote sites. Not sure what OS your
remote sites are using but I'm pretty sure rsync is available for Windows.
Generate an MD5 for the file and send that to database feeder too. That
way it can check to see if the file it's about to load is valid/complete.

Step #3 could be done in PHP, but if you're more comfortable with Perl, then
knock yourself out. Populating a database is one of the jobs that seems to
lend itself to Perl/Python. Additionally, you could daemonize the
process/script so it detects when steps #1/2 have changed or added files
that need pumping into the database.

Decide on whether you want a fundamental push or pull model. Personally, in
these situations, I go for a push model: let the database populating
functions sit and wait for the remote sites to feed it data. This absolves
the db-feed-process of dealing with things like incomplete file loads or
bad network connections etc and makes it all a lot more reliable. Make the
remote sites do some basic validation like checking the whole file was
uploaded (rsync return codes), sending an MD5 sum for the feeder to verify
against, that sort of thing.

Have fun!

James
--
A musician, an artist, an architect:
the man or woman who is not one of these is not a Christian.
-- William Blake

Jan 5 '06 #3
pc wrote:
hi all,

I have been blessed with the task of writing a web based database
representing the state of our globally installed isam databases.

there are basically four steps in setting this up:

1) schedule isam file reports to run at all remote sites. this
generates a text file describing the current state of tables (files) in
the database.

2) schedule an ftp job to pick up these text reports and dump them on a
central server

3) parse the reports and write the information to a mysql database

4) front end web based gui. make the information available (reports,
alerts, etc.)

Our company wants to use PHP for the front end GUI. Not having had much
experience with PHP it seems to me that the way to do the above would
be to do steps 1, 2 and 3 with Shell / Perl scripting (Perl being
designed for text file manipulation) and then to use PHP to provide the
GUI.

Anyone's thoughts and / or input on this matter would be much
appreciated.

cheers!

eddiec :-)

You can write background jobs and shell scripts in PHP. They run from
the command line using PHP-CLI. Just type "php myscript.php" from your
shell.

I'm in the process of converting a bunch of Perl, .sh, and .vbs/.wsf
programs I had written awhile back to PHP, just so all my code is
standardized to one language and there is much less need for third-party
extensions/modules. (And, because I'm not good in Perl or bash, and
their documentation can not compare to PHP docs.) Try writing some text
manipulation programs in PHP and you will be pleasantly surprised.
Jan 6 '06 #4

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

Similar topics

2
1938
by: Bob | last post by:
As the title says, I'm looking to assess the advantages and disadvantages of Perl vs. PHP for web (cgi) programming. I'm a newbie at Perl, and a true novice at PHP but I have lots of other programming in languages and scripting (eg. ASP) experience. I know that Perl has the historical advantage in volume and resources. However, PHP seems to be a strong "up and comer" and is widely available on web servers. I think Perl has far greater...
58
4522
by: @ | last post by:
A benchmark in 2002 showed PHP is much slower in shell or when Apache has Mod_Perl. With the new PHP kissing Java's ass, Perl is once again the #1 CGI choice. Java is for a big team in short time to develope something slow. ASP is a joke. PHP is a kid.
31
4816
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...
13
2489
by: Jesse Thompson | last post by:
Greetings fell XML folk. I've just gotten started making SAX filters in Perl. I was hoping to build an XML templating engine this way, but the performance of XML::SAX::Expat and XML::SAX::Writer *appear* to be unthinkably bad. This code: XML::SAX::Expat->new(Handler => XML::SAX::Writer->new( Output => '>-' ))->parse_uri("test.xml");
2
8593
by: Ralph H. Stoos Jr. | last post by:
All, I have taken a company sponsored course in PERL taught by a fellow system engineer. He tried his best but, I am still an old dog and well.. that new tricks thing seems to apply. It seems that all courses I find assume you have other programming experience either in C, C++, or Java. Since I have none of these skills, I am hoping to somehow pick up an OOP language.
1
4013
by: Pieter Linden | last post by:
Hi, I think the subject line pretty much says it all... Say I have a students-classes database and I add a twist. I want to filter what courses a student can take by comparing the courses he has taken to the list of prerequisites for the remaining courses. Everything is fine if a course only has one or no prerequisite. How do you express in SQL something like: "Course C" requires "Course A" and "Course B"
2
1507
by: Colin | last post by:
I have a table, which is a list of courses with a CourseID key field and about a dozen fields describing the courses. I also have a table that lists all of the students taught by one teacher, which also has a field called CourseID, which is linked to the CourseID in the other table. There will be many students in each course and a teacher will teach more than one course. What I want to do is to create a recordset that lists the courses...
0
1553
by: Marian Heddesheimer | last post by:
Rent-a-Tutor.com is in search for testers as online-courses students. As operators of rent-a-tutor.com we are proud to offer high quality online courses over the internet at reasonable prices. At the moment, our courses are all available in German. These courses have proven themselves to be very user-friendly and understandable on the German market. So starting January 2006, we will provide them in English as well. All of my courses...
1
1494
by: gordon | last post by:
Hi I have been using C# for a few months after reading a few books and I like to take my 'knowledge' to a more structured level. I am thinking about doing microsoft courses CSN2124 and CSN2555. If you have done these courses, could you please let me know if you found them useful? These courses are 5 day intensive courses.
0
9691
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
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10279
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
10255
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
10036
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...
0
9092
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7582
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
5607
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.