Extend already existing open source php tool in java [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Please tell me, is it possible to extend any PHP based tool in Java programing language.
I am trying some open sourcve tools and found one satisfactory to most of my requirment. But my problem is that, the tool i found is developed in PHP language but i know only java language and there are some business requirment as well. I need to add some more features in this tool. What is the best possioble way to achieve this extension.
Please guide me friends.
Thanks a lot.

You can't wrap or extend PHP code from Java the way you would a Java library, but you might be able to call PHP code on your server and work with the results from your own Java application. See How can I execute a PHP script from Java?
Barring than that, I agree with the comment above. It might be easier to either learn PHP or rewrite the parts of the code that you need in Java.
After seeing in your comments what PHP tool you're talking about, rewriting in Java doesn't seem like much of an option. If you're starting a site from scratch (meaning you don't already have a Java application that you want to add this to) then PHP is not that hard to learn. Other than that, you could look for Java projects that do the same thing as the PHP tool you're looking at now.

Well, it would be useful if you'd tell us what exactly your PHP tool/framework does, maybe even give us a link to it's site, then I'm sure you'll get tons of recommandations for corresponding Java tool/framework that does the same thing. I don't think you need to remake a PHP tool in Java by hand, really I can't think of PHP libraries that don't also exist for Java as well...

Related

Add Java GUI to C client [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have written a fully functional chat program in C. The server starts up and allows multiple clients to connect and talk to each other, all via command line. However I would like to try adding a GUI to this program, but all of the C/C++ GUI packages seem to have a steep learning curve just to get started. Is there any way to write a GUI using Swing and connect it to the C code underneath?
For example, I would like to type some text into a box, click "send" and have it call the C function which deals with sending text. Is this possible? And if so, is it very difficult?
I can provide code if needed. I am also open to suggestions on which C++ GUI package might be most appropriate for this kind of program.
Yes, its possible. You would have to use JNI. You should really consider the learning curve of doing JNI vs learning whatever GUI framework you want to use you C/C++.
As someone who has done this on multiple professional projects though, I really would warn against it. It can produce very hard to find bugs.
Tcl/Tk Used to be the scripting language of choice if you wanted to provide a bunch of C/C++ methods with a (not too complicated) GUI. Python also provides GUI element via PyQT and PyKDE. I think it's much easier to use a scripting language like this to bind to C then trying to do Swing<=>C/C++ bridging.

Java: SQL and Statistics/Machine Learning [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a question for you concerning Java. I am basically a Java user and did most of my work with it. However, in the machine learning classes I took in college, we used mostly python with the scikit-learn and numpy packages.
Now I want to do a project where I crawl data from the web, store it in SQL databases, and then do machine learning on this data. Maybe some of you have experience with those things and share some of it? I mean, of course it is possible to do these things with java, but maybe you have had some particular experiences on why I should use something else or what to consider?
I am happy for all your thoughts :-)
Have a great weekend!
It turns out that programming language and database implementation are secondary problems. Think first about the machine learning you want to do. Review the existing packages (in any language) and pick one according to how well it fits the needs of the business problem you are trying to solve. Then work with whatever language is most convenient for that package. You will probably find that no single language is suitable for all parts of the problem; you will end up gluing together Java, Python, R, shell scripts, etc, to make a complete solution, and there's nothing wrong with that. Consider that your job is problem solving instead of programming in a specific language and go from there.

How to make java website [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to make HTML website of course using CSS etc. But instead of using php for dynamic functions I would like to use Java. I have heard that there are plenty of web frameworks as Spring etc.
The problem is always when I search for tutorial - How to make java web? It shows me results with - web application, applet, servlet, JSP. I can't find short simple answer explaining how to start with that and what is the right thing to start with.
Would you mind telling me what should I use to make what I want? Just some short answer explaining what is what for. I remind you: I want to do some dynamic stuff on web based on Java instead of PHP.
EDIT:
I know I have to use dedicated server with Tomcat probably I am just looking for way to start. Should I start with the framework or?
I personaly only used Thymeleaf tutorials to learn about java-web and I'm satisfied with them, it has good-explained tutorials but it mostly teaches you how to process html templates with java.
If you do not want to follow thymeleaf tutorials, you should search for JAVA EE or JSP tutorials on either google or youtube, both provide well explained video tutorials for beginners
For my webserver I used tomcat which is easy to use and good with debugging. I recommand it
EDIT: A web application may have one or more jsps (java server pages). Servlets are requests from the browser to the jsp.
You must have VPS or Dedicated Server to use, because shared web hostings doesn't support languages like Java, C, C++, Node.JS and so on...

is is necessary to learn java for hadoop? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I wanted to start learning the big data technology from the scratch. I wanted to know is it necessary to learn java for operating with hadoop as i am already well versed in python?
No, you don't necessarily need java knowledge, as you can write map-reduce jobs perfectly well in pig or hive (similar to SQL). However, as with all layers of abstraction, at some point you may well need to know what is going on "behind the scenes" and being able to look, understand and debug the underlying java is a big advantage.
There is a lot of effort currently going into providing a more complete SQL interface to hadoop, with tools such as Impala (Cloudera), Presto (Facebook), Phoenix and Hive (already mentioned).
Check out MRJob, a python based wrapped for hadoop jobs running, logging and monitoring.
Although pure java solutions might be faster in some cases, you hardly ever will need to debug java code.
Not needed at all , though thats just my opinion. if you python well you should be fine.
check this out writing a hadoop map reduce in python. theres a lot of ways to implement solutions with hadoop. Just because a great deal of them are in Java doesnt mean java is the only tool to solve use . If your working with legacy that is written in java then knowing the basics may help but to be honest i think you could just reference things as you come across them. There is no need to spend a week learning the intricacies of Java 7 and whats new in Java 8 for your current needs.

How to do something like Bonjour using open source library? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to make a Java program that allow me this discover my nearby computers who is running the same problem. Which is similar like the iTunes, can discover nearby computer who enable sharing in the iTunes. How can I implement it using open source library? Also, cross platform is very important. Any ideas on that? Thank you.
Well, Bonjour itself is open source, so you might want to start there...
http://developer.apple.com/opensource/
jmdns is a full Bonjour/Zeroconf implementation written in Java compatible with Apple. There is no dependency on native libraries, it is 100% Java.
http://jmdns.sourceforge.net/
I think you definitely should take a look at UPnP. Considering the cross-platformness of such a solution, and its implementation using Java, you can consider
UPNPLib
Cyberlynk for Java
And even the various ways to connect an OSGi application to UPnP.
Finally, considering existing implementation of Bonjour using Java, this reply to a stackoverflow question sums it up.
You can use Avahi - an open-source implementation for zeroconf, which is the protocol used by iTunes. There's a nice list of options for Java at:
http://elliotth.blogspot.com/2009/03/registering-service-with-dns-sd-from.html
I don't know how far it ever got, but Java had the JXTA project, it might do what you want.

Categories