Jump to content



Photo

Deploying PHP Applications as a Native Desktop Application


  • Please log in to reply
21 replies to this topic

#1 roosevelt

roosevelt

    Neowinian

  • Tech Issues Solved: 1
  • Joined: 25-August 04

Posted 27 June 2013 - 06:06

Hi,

 

I am sure this is one of those things that people probably asked many times. However, my research still

hasn't pointed me to a suitable solution. Basically I am tring to make my PHP applications (running on CakePHP, and SQLite) as painless as possible to deploy.

 

Are there any kind of tool or a package of Apache and PHP that self-contained and is very small and makes it super easy

to deploy an application for production use? So, the end user just has to run a single file and it will take care of

starting the web servers and launching the website. And once the window is closed it turns off the servers as well?

 

A solution that works on three major platforms (Windows, Mac and Linux) would be ideal.

 

Any ideas or options?

 

FYI coding in JAVA is not an option. CakePHP and EXTJS are all you need!

 

Thanks :)




#2 Kami-

Kami-

    ♫ d(-_-)b ♫

  • Tech Issues Solved: 2
  • Joined: 28-July 08
  • Location: SandBox

Posted 27 June 2013 - 12:01

WAMP/LAMP/MAMP or XAMPP? (These are useful for installing/configuring apache, mysql, php all together - then simply place your web application in a folder from the root of the server and browse to it).

 

Not exactly 'native'  but would suffice.



#3 TheGhostWalker

TheGhostWalker

    Neowinian

  • Joined: 04-February 10
  • OS: Windows 7 x64 Ultimate & Fedora 19 & Mac OS X 10.9.4

Posted 27 June 2013 - 12:07

Maybe these help:

 

https://code.google.com/p/phpdesktop/

http://gtk.php.net/

http://wxphp.org/

http://winbinder.org/



#4 ILikeTobacco

ILikeTobacco

    Neowinian Senior

  • Joined: 08-July 10

Posted 27 June 2013 - 12:34

OMG I love you. Which one do you suggest though. Downloaded PHP Desktop and messed around with it. Which one provides the most options.



#5 threetonesun

threetonesun

    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 26-February 02

Posted 27 June 2013 - 13:07

PHP-GTK seems to be the oldest / most popular, although people like WinBinder. The real issue is that there wasn't a PHP release worth developing with on the desktop until (arguably) 5.3 so... obviously there's not a lot of support for desktop applications out there. Also, Python has existed as long as PHP has, and already covered the native application side of things.



#6 ILikeTobacco

ILikeTobacco

    Neowinian Senior

  • Joined: 08-July 10

Posted 27 June 2013 - 13:10

PHP-GTK seems to be the oldest / most popular, although people like WinBinder. The real issue is that there wasn't a PHP release worth developing with on the desktop until (arguably) 5.3 so... obviously there's not a lot of support for desktop applications out there. Also, Python has existed as long as PHP has, and already covered the native application side of things.

But I haven't been bothered to learn Python. Right now I do all of my web development in PHP/SQL so having the ability to transfer that knowledge to the desktop makes a bit of sense for me. I hate switching between languages on a daily basis. Eventually you confuse something and can't find what you did wrong because both versions look fine.



#7 Jub Fequois

Jub Fequois

    Owlblood

  • Joined: 06-June 04
  • Location: London, UK
  • OS: OS X, Windows
  • Phone: iPhone

Posted 27 June 2013 - 13:17

What's stopping you from serving the app from a server? Surely that would take care of all your problems and make it even easier for people.

 

In any case, you're probably better of trying out the alternatives mentioned by TheGhostWalker to find which one you like since your requirements are a little bit on the vague side.



#8 ILikeTobacco

ILikeTobacco

    Neowinian Senior

  • Joined: 08-July 10

Posted 27 June 2013 - 13:25

What's stopping you from serving the app from a server? Surely that would take care of all your problems and make it even easier for people.

 

In any case, you're probably better of trying out the alternatives mentioned by TheGhostWalker to find which one you like since your requirements are a little bit on the vague side.

I am not the OP :p. However, while nothing is stopping me from running it from the server, having to have a server itself is a limitation. No longer having that limitation is a plus in some situations. Servers add more variables of things that can go wrong. What if the person doesn't install the server correctly? What if they change a single setting and now the server doesn't want to launch anymore. I use to do stuff with XAMP until a client managed to render the software completely useless. Couldn't get it to launch. Reinstalling didn't matter. Tried for hours to get it to work but nothing would budge. Having everything confined and using very little settings and files is a much better solution than having to rely on a customer not somehow screwing up something by changing a single obscure setting. After looking through PHP Desktop, I noticed there are not very many files. If someone screws up, just copy and paste over the files and the software would work again. Simple solutions always trump unnecessarily complex ones in my book.



#9 threetonesun

threetonesun

    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 26-February 02

Posted 27 June 2013 - 13:29

But I haven't been bothered to learn Python. Right now I do all of my web development in PHP/SQL so having the ability to transfer that knowledge to the desktop makes a bit of sense for me. I hate switching between languages on a daily basis. Eventually you confuse something and can't find what you did wrong because both versions look fine.

 

Well, usually you can either do everything with Javascript (now that local storage is available), or you're going to want access to APIs that PHP doesn't have.


I am not the OP :p. However, while nothing is stopping me from running it from the server, having to have a server itself is a limitation. No longer having that limitation is a plus in some situations. Servers add more variables of things that can go wrong. What if the person doesn't install the server correctly? What if they change a single setting and now the server doesn't want to launch anymore. I use to do stuff with XAMP until a client managed to render the software completely useless. Couldn't get it to launch. Reinstalling didn't matter. Tried for hours to get it to work but nothing would budge. Having everything confined and using very little settings and files is a much better solution than having to rely on a customer not somehow screwing up something by changing a single obscure setting. After looking through PHP Desktop, I noticed there are not very many files. If someone screws up, just copy and paste over the files and the software would work again. Simple solutions always trump unnecessarily complex ones in my book.

 

This all sounds soooooo terrible :laugh:

 

PHP for desktop applications is very much the "if you only have a hammer, everything is a nail" mentality.



#10 ILikeTobacco

ILikeTobacco

    Neowinian Senior

  • Joined: 08-July 10

Posted 27 June 2013 - 13:33

Well, usually you can either do everything with Javascript (now that local storage is available), or you're going to want access to APIs that PHP doesn't have.


 

This all sounds soooooo terrible :laugh:

 

PHP for desktop applications is very much the "if you only have a hammer, everything is a nail" mentality.

Comes down to time constraints. I rarely do anything that is confined to a single desktop. Most of my work is for websites and applications that require a server anyway. If you are short on time, you make everything a nail. :p

 

Also, for SQL, even though JavaScript technically can be used, I prefer to stay away from that practice. It may just be me, but I find using PHP for any sort of processing is just more efficient.



#11 TheGhostWalker

TheGhostWalker

    Neowinian

  • Joined: 04-February 10
  • OS: Windows 7 x64 Ultimate & Fedora 19 & Mac OS X 10.9.4

Posted 27 June 2013 - 14:19

OMG I love you. Which one do you suggest though. Downloaded PHP Desktop and messed around with it. Which one provides the most options.

My only experience is with php gtk, but winbinder seems lovely (and so does php desktop) :).



#12 OP roosevelt

roosevelt

    Neowinian

  • Tech Issues Solved: 1
  • Joined: 25-August 04

Posted 27 June 2013 - 17:47

Wow, thanks for those links guys. ILikeTobacco, I am glad that I am not the only crazy one looking for a solution like that. I honestly feel that PHP is badass and with the technologies like CakePHP, EXTJS or jQuery you can create badass applications. Surely, putting things on the web has its benefits but why not both :p.... I have a fetish for native applications or something.

 

I could switch to JAVA and make my application there. But honestly the amount of code and the things you have to do in JAVA just to build a cross platform application take more time than if you used a popular library like EXT for the front-end and CakePHP for handling the logic.

 

I was looking for a solution like Adobe AIR... but instead of just HTML/JAVASCRIPT or SQLLite, you would code in PHP.

 

ThreeToneSun, I am not familiar with Python. But did you just say if I create a web app in Python, it will act as if it's a native application? Or would I still have to fire up a browser to run them?

 

I just looked up EXTJS and JAVA... something interesting popped up :p



#13 ILikeTobacco

ILikeTobacco

    Neowinian Senior

  • Joined: 08-July 10

Posted 27 June 2013 - 17:50


ThreeToneSun, I am not familiar with Python. But did you just say if I create a web app in Python, it will act as if it's a native application? Or would I still have to fire up a browser to run them?

Python is just another server side language like PHP. However, it isn't as focused on web applications as PHP is. It can also be run directly on a desktop.



#14 veternan

veternan

    Neowinian

  • Joined: 16-May 09
  • Location: .\
  • OS: Windows 7 U SP1 x64
  • Phone: Xperia Mini

Posted 27 June 2013 - 17:58

ExeOutput for PHP: http://www.exeoutput.com



#15 OP roosevelt

roosevelt

    Neowinian

  • Tech Issues Solved: 1
  • Joined: 25-August 04

Posted 27 June 2013 - 19:17

Guys I ran into this awesome nugget. Even though it does not support PHP... using a badass Javascript library to handle user's actions would be a good replacement for this. It's called AppJS. Basicaly it allows you to package your HTML/JAVASCRIPT/CSS project as a native desktop application. And it runs on Windows, Mac and Linux. I tested EXTJS, my ultimate fetish, and it is working great!

 

http://appjs.org/