Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Is it possible to write enterprise web applications in PHP as it is in Java (with Java EE stack of technologies)? I know just a bit of PHP and I've always seen it like a request-process-response programming/scripting language with no objects staying alive on the server (like #Stateful ejbs) after the script has finished its execution.
To put it in another way: can the same web application be implemented in Java and in PHP? Or is one of the two languages more powerful than the other?
Edit: let me clarify my question: I already know Java and have some experience in enterprise web applications. I want to know if PHP is equally powerful (in language structure, in today available frameworks, and so forth) to make the same complex applications that can be done in Java.
Not more powerful in the sense that you could write something in Java that would be impossible to replicate in PHP. I'm not familiar with PHP, but there's most likely similar frameworks and libraries that have been created for PHP that exist already in Java (such as an ORM framework like JPA).
Stateful EJBs aren't that special (and not that common either). You can readily store information in the session whether you're using Java or PHP.
This isn't really a suitable question for SO either, since programming languages are different and frameworks are different and you'll never find the "best" something, because that doesn't really exist.
Solution: learn both.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
Can someone explain why is React so popular?
My understanding is that it helps with the V part of MVC design pattern for apps and is useful as its JS so can be used for UI perhaps in general.
Why would it be better than SPA (not sure I get what this means exactly, i.e. just using Javascript? - Real technical advantages of React Native over Web)
Also, it was created by Facebook so perhaps there is added benefit/functionality through that (if anyone can provide specifics that would help.
But what are the specific technical advantages/efficiencies about React is so advantageous and helpful to developers?
As an example, say I work for a bank and am designing a bank account app - how would React be useful over an alternative?
So it basically depends upon what type of application you are making . Few benefits that I found with react are:
It is based on the concept of virtual dom (main benefit of it): you can read more abt it from https://reactjs.org/docs/faq-internals.html
Easy to learn as mostly it is javascript, ES6 compared to Angular latest versions
Good community support
However, React alone is of no good use for big applications. So ultimately you have to use some state management tool like redux/ flux with it
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
What are the main advantages of using java cloudant client api instead of directly using the cloudant REST API?
thanks
A lot of effort has been made to ensure that the Cloudant Java library is slick to use, and hiding both some of the rough edges of the API, encoding some best practices and saving you from tedious boiler plating.
It also gives you a lot of extra functionality "for free", for example automatic retrying of requests that generated a "429: Too Many Requests" response in the rate-limited environment on IBM Cloud.
The Java library is of course also officially supported, with a regular release cadence, meaning that you can raise tickets against it, and have an expectation that issues will be fixed. As these libraries are developed in conjunction with the service, you can also expect that new features in the service will be reflected in the client libraries.
Saying all that, it's good to reflect on when to use a library that someone else wrote, and when to "roll your own". All languages and platforms tend to have good support for HTTP, and speaking directly to the API can mean that you know exactly what you have, and you can avoid any bloat, especially if you only need a fraction of what the library provides.
Here's an example I wrote (in Python, but the ideas hold for any language) to show how simple it can be to write a "micro" library yourself to target the API directly:
https://github.com/xpqz/microcdt
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 a question:
I'm rying to make web services for Android but I don't know which language (PHP or Java) I should write on according to the ability of scaling the website for different devices.
One of the primary structural differences between PHP and Java is the
difference between strongly- and weakly-typed languages. Java is a
strongly-typed language, meaning it requires explicit statements of
intent to function and that it is backed by a compiler. At the highest
level, you can think of this as meaning it has strict expectations on
how you express inputs and outputs. If these exact expectations are
not met, the compiler will fail and the program will not work until
errors are resolved.
PHP, in contrast, is weakly typed, essentially meaning it is more
flexible and reliant on “common sense programming” in how a task is
accomplished. While this may sound more attractive because it
requires less formal knowledge, some contend that it complicates
certain tasks, particularly in object oriented programming, with its
lack of standards.
Choose according to your needs
Everything depends on what you want to do on this website.
But here is a Link of a blog that discusses which is better:
PHP vs 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 6 years ago.
Improve this question
I am working on a small project on metadata extraction from documents and have run into, eh a dilemma. I have some libraries in Java which work well with document-handling for information retrieval, like Apache Tika, POI etc and some more tools in other languages like Ruby(pdf-extract) and a script in bash to fetch data from a RESTful API using wget.
AFAIK, Code reuse is a good thing, right? But then, if its not possible (natively, I mean) to reuse all this code, What approach has to be taken?
Using Java to run terminal-commands is a solution but I don't think it is good programming practice.
Integrating multiple technologies is something that is very common in real world applications. In order for it to scale properly, you probably want to use some methodology to keep things consistent. To me, the weakest part is probably fetching using wget, but that's my opinion.
In order to integrate and for everything to scale nicely you may want to look at some message passing protocols and have some sort of handling of queues where individual workers run in different programming languages and environments. Look at:
https://www.amqp.org/ (message passing standard)
https://www.rabbitmq.com/ (Java, .NET, Ruby, Python, PHP, JavaScript...
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'm a student who work part-time at a start-up, which runs a website made with JSP.
We are planning an android app in this summer and I'm considering developing it with Python, which I'm interested in.
However, the service provided by the app is supposed to be added to the website made with JSP later. I'm afraid the difference of the language would cause any obstacle.
Since they will use a common database, I think using different languages to access it won't have any problem. I want to make sure that my guess is correct.
Pardon my poor English. I'd appreciate your answers.
I would recommend building the API services in the current language used by your start-up. If resources are limited, the company may not wish to maintain services in another language.
Though I would not recommend this, it is definitely possible for you to develop the portions of your Android application in Python and use a different language for the API services (assuming you are willing to use Python libraries like Kivy).
This will allow you to code a chunk of your application logic in Python.
To consider:
http://kivy.org/#home
https://code.google.com/p/android-scripting/
We are planning an android app in this summer and I'm considering
developing it with Python
Native Android apps are developed using Java.
However, the service provided by the app is supposed to be added to
the website made with JSP later. I'm afraid the difference of the
language would cause any obstacle.
You will need to create an API that communicates between Android and your database.