ZMM Posted January 9, 2014 Share Posted January 9, 2014 Hi, For a project I need to create a visual/graphical bin-packing algorithm program and I was planning to use Java with JavaFX to make it a normal GUI computer app - however, as I don't like Java that much and I have way more experience in PHP and jQuery, I was wondering if you guys think it would be possible to make this project as a website using PHP and jQuery because I haven't worked with PHP for a long time and I'm not sure if the appropriate tools are available to make something like this. Basically this is what I want to do: Ask user how many bins he wants and with what sizes + a set of numbers they would like to use to fill the bins with Draw/show the bins on one side of the page and the numbers on the other side Have the ability to drag numbers into any bin Once the bin is full, it gets filled with a red background The ability to write the bin-packing algorithm itself in PHP and have a button that can do it all for the user automatically Do you think something similar to this would be possible at all as a website or would I be better off using JavaFX to create an application? Please note that this is just a whole concept I had in mind, so I wasn't assuming what's actually doable and what's not within the time frame I got (until the first week of May). I would really appreciate any thoughts on this Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/285238-graphical-bin-packing-using-php/ Share on other sites More sharing options...
kicken Posted January 9, 2014 Share Posted January 9, 2014 Based on what you wrote for requirements, the entire thing could be done with just Javascript without any need for PHP at all. If you want to use PHP that is fine, but it is unnecessary unless you want to do some kind of DB interaction like save/load stuff. For the UI you would just design your web page however you want things to display, then add the interactive stuff like drag-n-drop using Javascript. jQuery will make the javascript part considerably easier to implement and help keep things organized better. Quote Link to comment https://forums.phpfreaks.com/topic/285238-graphical-bin-packing-using-php/#findComment-1464603 Share on other sites More sharing options...
ZMM Posted January 9, 2014 Author Share Posted January 9, 2014 Based on what you wrote for requirements, the entire thing could be done with just Javascript without any need for PHP at all. If you want to use PHP that is fine, but it is unnecessary unless you want to do some kind of DB interaction like save/load stuff. For the UI you would just design your web page however you want things to display, then add the interactive stuff like drag-n-drop using Javascript. jQuery will make the javascript part considerably easier to implement and help keep things organized better. First of all thank you for your reply, it is much appreciated! Just a question came to my mind: wouldn't I need to write the bin-packing algorithm itself in PHP? Quote Link to comment https://forums.phpfreaks.com/topic/285238-graphical-bin-packing-using-php/#findComment-1464620 Share on other sites More sharing options...
Solution kicken Posted January 9, 2014 Solution Share Posted January 9, 2014 No, you could write it in Javascript. You'd only need to implement it in PHP if you wanted to keep people from viewing your implementation details. In this particular problem there is nothing that PHP can do which Javascript cannot. Quote Link to comment https://forums.phpfreaks.com/topic/285238-graphical-bin-packing-using-php/#findComment-1464632 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.