473,903 Members | 4,731 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Advise needed: PHP without webserver + interface to (X)windows

Hi Group,

I am starting on some project and need to program all kinds of windows with
buttons/textfields/etc.
My natural reaction was to build this in Java, but since I like PHP so much
I thought about giving it a try in PHP.
My problem: I only used PHP inside a webserver untill now, and I have
experience with some simple scripts I build for cronjobs in PHP
(commandline/cli invocation).

My requirements are:
- a memoryhungry continuous proces that could last for days.
- Need windows and all kind of gadgets like buttons/textareas/etc.
- Must run under W$ and *nix. (Additional software installs are no problem)
I was thinking to invoke PHP from commandline without a timeout, overruling
php.ini.
For windowsprogramm ing I found activestate/tcl, but I have 0 experience with
it.

Is this the right way to go?
Is TCL easy to learn and use?

What other options do I have?
Does anybody have any ideas/suggestions?
Any pittfalls on the road ahead?
Should I just stick to Java?

Thanks for your time.

Regards,
Erwin Moller
Feb 16 '06 #1
7 1288
d
"Erwin Moller"
<si************ *************** *************** @spamyourself.c om> wrote in
message news:43******** *************** @news.xs4all.nl ...
Hi Group,

I am starting on some project and need to program all kinds of windows
with
buttons/textfields/etc.
My natural reaction was to build this in Java, but since I like PHP so
much
I thought about giving it a try in PHP.
My problem: I only used PHP inside a webserver untill now, and I have
experience with some simple scripts I build for cronjobs in PHP
(commandline/cli invocation).

My requirements are:
- a memoryhungry continuous proces that could last for days.
- Need windows and all kind of gadgets like buttons/textareas/etc.
- Must run under W$ and *nix. (Additional software installs are no
problem)
I was thinking to invoke PHP from commandline without a timeout,
overruling
php.ini.
For windowsprogramm ing I found activestate/tcl, but I have 0 experience
with
it.

Is this the right way to go?
Is TCL easy to learn and use?

What other options do I have?
Does anybody have any ideas/suggestions?
Any pittfalls on the road ahead?
Should I just stick to Java?

Thanks for your time.
http://gtk.php.net/

:)

Give that a go, and if it's not good enough, use Java.
Regards,
Erwin Moller


hope that helps!

dave
Feb 16 '06 #2
Erwin Moller wrote:
I was thinking to invoke PHP from commandline without a timeout, overruling
php.ini.


Take a look at this:
http://www.php.net/manual/en/features.commandline.php

PHP-cli has no timeout by default. A PHP can be run in Unix by
prefixing it with #!/usr/bin/php.

Feb 16 '06 #3
d
"Sjoerd" <sj******@gmail .com> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com...
Erwin Moller wrote:
I was thinking to invoke PHP from commandline without a timeout,
overruling
php.ini.


Take a look at this:
http://www.php.net/manual/en/features.commandline.php

PHP-cli has no timeout by default. A PHP can be run in Unix by
prefixing it with #!/usr/bin/php.


You can do the same in Windows, if you associate .php (or, say, .xphp) files
with a batch file that calls the PHP interpreter and passes the filename of
the script. This will allow you to run .php/.xphp scripts like they are
..bat files.

dave
Feb 16 '06 #4
Erwin Moller wrote:
Hi Group,

I am starting on some project and need to program all kinds of windows with
buttons/textfields/etc.
My natural reaction was to build this in Java, but since I like PHP so much
I thought about giving it a try in PHP.
My problem: I only used PHP inside a webserver untill now, and I have
experience with some simple scripts I build for cronjobs in PHP
(commandline/cli invocation).

My requirements are:
- a memoryhungry continuous proces that could last for days.
- Need windows and all kind of gadgets like buttons/textareas/etc.
- Must run under W$ and *nix. (Additional software installs are no problem)
I was thinking to invoke PHP from commandline without a timeout, overruling
php.ini.
For windowsprogramm ing I found activestate/tcl, but I have 0 experience with
it.

Is this the right way to go?
Is TCL easy to learn and use?

What other options do I have?
Does anybody have any ideas/suggestions?
Any pittfalls on the road ahead?
Should I just stick to Java?

Thanks for your time.

Regards,
Erwin Moller


Erwin,

As much as I love PHP, I think I'd do this one in Java (or C++).

PHP has some add-on libraries which get you various gadgets, but I think
Java is more mature in this area.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Feb 16 '06 #5
Thanks all for your input.

My impression of PHP/GTK is that it is not 100% evolved yet.

I think I'll stick to Java for this one.

Thanks all.

Regards,
Erwin Moller
Feb 17 '06 #6

"Erwin Moller"
<si************ *************** *************** @spamyourself.c om> wrote in
message news:43******** *************** @news.xs4all.nl ...
Hi Group,

I am starting on some project and need to program all kinds of windows
with
buttons/textfields/etc.
My natural reaction was to build this in Java, but since I like PHP so
much
I thought about giving it a try in PHP.
My problem: I only used PHP inside a webserver untill now, and I have
experience with some simple scripts I build for cronjobs in PHP
(commandline/cli invocation).

My requirements are:
- a memoryhungry continuous proces that could last for days.
- Need windows and all kind of gadgets like buttons/textareas/etc.
- Must run under W$ and *nix. (Additional software installs are no
problem)
I was thinking to invoke PHP from commandline without a timeout,
overruling
php.ini.
For windowsprogramm ing I found activestate/tcl, but I have 0 experience
with
it.

Is this the right way to go?
Is TCL easy to learn and use?
Tcl has its own learning curve. expressions are a bit difficult. all those
square brackets and odd substituion situations with variables.
You can make a complete working dialog in Tcl/Tk with 1 page of code. It's
available for UNIX and was made mainly for X. to make a button,

button .b -text "press me" -command {do something }
pack .b

and after pack, a button pops into the window. "pack .b -side left" does
what you think it does.

it can be difficult to get your gui right. there are different layout
managers, like pack, grid, and a few others I think. Pack doesn't always
act like you want it to, so you have to test & debug a lot.
for OOP, go incr-Tcl. it's considered a built-in lib now. then your stuff
can be entirely event-driven.

Tcl/Tk excels at making GUIs for command-line tools. it has sockets, and can
interface with databases.
PHP is better probably at handling dates, unless something changed I don't
know about.
If you are going to do anything serious with it, get a book. At the time, I
think it was a black book by welch, but that was years ago.

since you know PHP, maybe GTK is a best fit. Or maybe it's Tcl/Tk. I
dunno. I've used both, depending on what I'm doing. I've even used Perl/Tk
and made an FTP GUI, but that was a bit too hard (no docs).


What other options do I have?
Does anybody have any ideas/suggestions?
Any pittfalls on the road ahead?
Should I just stick to Java?

Thanks for your time.

Regards,
Erwin Moller

Feb 18 '06 #7

"Jerry Stuckle" <js*******@attg lobal.net> wrote in message
news:re******** *************** *******@comcast .com...
Erwin Moller wrote:
Hi Group,

I am starting on some project and need to program all kinds of windows
with buttons/textfields/etc.
My natural reaction was to build this in Java, but since I like PHP so
much I thought about giving it a try in PHP.
My problem: I only used PHP inside a webserver untill now, and I have
experience with some simple scripts I build for cronjobs in PHP
(commandline/cli invocation).

My requirements are:
- a memoryhungry continuous proces that could last for days.
- Need windows and all kind of gadgets like buttons/textareas/etc.
- Must run under W$ and *nix. (Additional software installs are no
problem)
I suggest to you Java or Tcl/Tk. Tcl/Tk has very light overhead and has all
kinds of gadgets. install it if it isn't already on your box and look at
their demos to see the widgets.
Tcl/Tk has a learning curve to it. expect at least 3 full-time months with a
good book to get good at it.

If you already know Java and its widgets, maybe it would be a good idea to
stick with it.



I was thinking to invoke PHP from commandline without a timeout,
overruling php.ini.
For windowsprogramm ing I found activestate/tcl, but I have 0 experience
with it.

Is this the right way to go?
Is TCL easy to learn and use?

What other options do I have?
Does anybody have any ideas/suggestions?
Any pittfalls on the road ahead?
Should I just stick to Java?

Thanks for your time.

Regards,
Erwin Moller


Erwin,

As much as I love PHP, I think I'd do this one in Java (or C++).

PHP has some add-on libraries which get you various gadgets, but I think
Java is more mature in this area.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Feb 18 '06 #8

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

Similar topics

5
1444
by: Raaijmakers, Vincent (IndSys,GE Interlogix) | last post by:
Looking at all the materials available, books, technologies etc etc.. I try to make a decision on what technology to select for a web server design, but I need help. I know, this question has been asked many many times sorry about that, but please help me. My desk is full with printouts and books, I'm getting a stack overflow. Currently the existing design is using JSP's. Now, most of the business logic of behind this application is...
67
4308
by: Steven T. Hatton | last post by:
Some people have suggested the desire for code completion and refined edit-time error detection are an indication of incompetence on the part of the programmer who wants such features. Unfortunately these ad hominem rhetorts are frequently introduced into purely technical discussions on the feasibility of supporting such functionality in C++. That usually serves to divert the discussion from the technical subject to a discussion of the...
26
4535
by: Lasse Edsvik | last post by:
Hello I'm trying to build a simple COM+ app in vs.net using C# and i cant register it in component manager..... what more is needed than this: using System; using System.EnterpriseServices;
8
1567
by: C. (http://symcbean.blogspot.com/) | last post by:
Hi all, I am looking for a way to run PHP scripts without using a webserver (from a MS Windows machine). While there are shareware solutions for doing this, it strikse me that it might be possible to use HTA (http:// www.microsoft.com/technet/scriptcenter/hubs/htas.mspx) to achieve my result, however all the documentation just describes doing this with VBScript. So far I've not found anything relevant in Google.
0
9999
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
11285
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
10878
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
10986
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,...
1
8049
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
7208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4727
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4308
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3324
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.