richrock Posted January 7, 2009 Share Posted January 7, 2009 Hi, I've been developing some php scripts for administering a mysql database. I'm looking at the next stage of this project to expand my new found love for programming into Java, and would like to create a standalone version of the management scripts. This may end up being used on a machine that does not have mysql installed, so I need to know basic answers to the following: Is it relatively easy to translate PHP to Java? Can I potentially download the mysql database (either directly via a remote account or ftp) and allow Java to write/edit, the re-upload or synchronise? I am aware that Java is reasonably platform independent AFAIK, is this really true? I wouldn't have to code different programs based on different machines? In this case, I am likely to see this installed on Intel PC's, Intel Mac and PowerPC Mac also. The reason I ask this is that even in today's age, you can never guarantee a net connection, and need to suss out how to implement an alternative local method that matches the web interface version. Kind of life POP3 webmail => Outlook sort of thing. Thoughts and opinions appreciated. Rich Quote Link to comment https://forums.phpfreaks.com/topic/139876-java-and-mysql/ Share on other sites More sharing options...
corbin Posted January 8, 2009 Share Posted January 8, 2009 PHP -> Java? Depends on the length of the script and your knowledge of both languages. You want to download the MySQL DB, alter it directly with Java, and reupload it? Good luck! I guess you could alter SQL statements, but without a MySQL server running on the computer with the Java scripts, that will be quite difficult. Why not just use a remote connection? Java files run in a virtual environment, meaning that any platform that has a VM can run them. As far as I know, all platforms that have a VM have full support of Java. (Windows, most linux distros, so on are all covered.) I have no idea what you were trying to say with your last statement/question x.x. Quote Link to comment https://forums.phpfreaks.com/topic/139876-java-and-mysql/#findComment-732167 Share on other sites More sharing options...
Maq Posted January 8, 2009 Share Posted January 8, 2009 Is it relatively easy to translate PHP to Java? Relative to what? PHP and Java have many differences and some similarities. It's not like you could copy and code from PHP to Java (maybe some SQL statements). Can I potentially download the mysql database (either directly via a remote account or ftp) and allow Java to write/edit, the re-upload or synchronise? I don't understand this question. A DB is a DB. If you can connect to it, you can operate on it. I am aware that Java is reasonably platform independent AFAIK, is this really true? I wouldn't have to code different programs based on different machines? In this case, I am likely to see this installed on Intel PC's, Intel Mac and PowerPC Mac also. Java is platform independent. It runs on a Virtual Machine (VM), as corbin mentioned, it can run on windows, solaris, linux and mac os. The reason I ask this is that even in today's age, you can never guarantee a net connection, and need to suss out how to implement an alternative local method that matches the web interface version. If the user does not have a internet connection then they won't be able to access the DB. If they download information to their local machines, previous to the internet going down, then yeah they can use that data with the java program. Quote Link to comment https://forums.phpfreaks.com/topic/139876-java-and-mysql/#findComment-732175 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.