1

I wrote a web based program using PHP, HTML, CSS and MySQL database. I would now like to convert it into a standalone desktop app for Windows and Apple.

I've done a lot of research and the 'Titanium' SDK has been advised, however even though it includes PHP, it is quite limited. Particularly I can't use <?php ?> in a html file to display a PHP variable, PHP echo isn't supported, and there seems to be an issue with global variables. While these may seem minimal, it would require considerable reprogramming, some of the functionality which I'm not sure I could re-achieve which is vital for the program.

Does anyone know of a program, similar to XCode/Titanium etc where I can bundle a web based program together for distribution as a standalone desktop app for Windows and Apple. I'm happy to use SQLite as the database as I use this already in Xcode.

3
  • 3
    My 2 cents: it's not a great idea. PHP-driven desktop apps are kinda kludgy. The underlying concepts are totally different from a web app. I would consider learning a proper platform instead that specializes in desktop apps. Commented Jun 30, 2012 at 12:58
  • Yeah. Definitely not advisable. And where does the database reside? Commented Jun 30, 2012 at 13:04
  • 1
    And as for global variables, you shouldn't be using them! Commented Jun 30, 2012 at 13:50

1 Answer 1

1

If all you use is a hammer...

PHP is in no way meant for building desktop applications. It's meant to handle a request/response paradigm such as that of a web server.

You could in theory write a PHP commandline script and have a separate GUI application issue commandline instructions to the PHP script, but such a solution would be messy, klunky, and require your users to install PHP.

In the end, there's an entire slew of languages and development platforms vastly more suited to the task. C and all its variants, Java, .NET (for Windoes applications)...

If you want to develop a desktop application, use a tool appropriate to developing desktop applications. Also, see this question.

Sign up to request clarification or add additional context in comments.

4 Comments

Many thanks everyone. I would rather be told the honest truth than a second rate workaround. May I ask then what you would recommend for a cross platform language / program to use. C? Java? Adobe Air? Thanks again
Java is completely platform independent, as long as the machine has its version of JVM installed. But you can very well expect everyone to have that.
Thanks Arjun, I'll have to dust off my Java skills!
I don't know if you are still looking for a PHP solution to programming Desktop apps but you may want to checkout nightrain.naetech.com It's cross platform native packager for PHP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.