Php As More Than Just A Web Application?
Posted 12 December 2012 - 10:30 AM
Let me elaborate...
I am looking into creating a "program" that is run mostly on php and mysql.
Users would interact with it as though it was a web application ( ie. through the web browser ), however it will do more than just save to a database or return information.
I want it so it runs off one server, accessed by other PC's on the network, but will have the ability to print to printers, read from bar scanners, etc.
You may wonder why I'd want to do it in php and not a proper programming language, but this is because I like the idea of how easy it is to change the code etc.
Ideally my question is, is this achievable with just php and mysql or would I need more ( such as ruby on rails etc ).
I'm still a novice and haven't work with php much in the real world so if this question is an obvious yes or no please excuse me.
Posted 12 December 2012 - 05:30 PM
As far reading barcode scanners, that would be something you'd have to handle on the local client through some other language. I've no experience with such devices so I can't say much more than that.
Basically you can use PHP to do non-web things, but you have to keep in mind the client-server relationship and realize that your PHP code running on the server won't have access to things on the client PC such as scanners or the PC's files.
Did I help you out? Feeling generous? I accept tips via Paypal or Bitcoin @ 14mDxaob8Jgdg52scDbvf3uaeR61tB2yC7
Posted 13 December 2012 - 04:25 AM
Unfortunately things such as bar scanners aren't really designed to be used in a client-server application environment, which means you'll have to take a lot more care to ensure that the communication between the client and server parts goes smoothly. Since you already would need a local client to deal with the input from the bar scanner, I'd recommend writing the entire sales interface as a local client. You can still have it communicate with the server, upon closing the sale, fetching the inventory list and stuff like that.
In short: I'd recommend using a different language for the sales and bar scanner interface, one that's geared towards GUI applications. Preferably one that has an API for the bar scanner available.
Posted 31 December 2012 - 05:12 PM
In regards to printing. Most of our printing is done via PDF's. We have a Java applet that handles the client side of things, but a lot of this could potentially be done via the native browser print dialogs.
Posted 31 December 2012 - 05:30 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users