miércoles, 28 de agosto de 2013

PHP VS JAVA

PHP VS JAVA



Well now I bring you a comparison between these languages ​​applied to the web (well in the case of php and web in nature but not in the case of python or java ) .

Php is a very mature language that has been in business many years ago ( 1995 ) and as major advantages :

1 to 1 large community of programmers who can help you when you atores into something
2 - the learning curve is very smooth as it is very easy to learn (in addition to its resemblance to c )
3 - the number of libraries that will simplify the development of things like imaging and pdf handling sockets and databases in a very simple and straightforward , so
4 - from the point of view of a business development time is minimal and php very fast which results in high productivity.
5 - a very simple implementation is therefore offer hosting that support this technology is huge .

and disadvantages have:
1 - which is very slow on websites that have many requests per second or heavy loads access to BD , it will be the best choice
February - although there is data persistence to serialize manually or through sessions , there is persistence of objects which can be a disadvantage when programming OOP .
3 - is a language that at first did not support OOP so making spaghetti code is very easy and almost involuntary , besides that in some benchmark proves to be slow to run simple code structured OOP .

Java was also very mature and experienced and has the following advantages :
1 - as in a lot of php programmers can help
2 - high power and speed, since there are used servlets and persistent objects.
3 - is a fully OOP language making it impossible to schedule ugly (or at least not like in php XD )

and disadvantages :
1 - the learning curve is very heavy, because this language is very complex , which makes it not justifiable if your development is fairly simple.
2 - The development time and therefore productivity is not as good as in php at least relatively simple developments like e -commerce sites , using simple database . Although more complex sites where the burden of database queries is very high is better Java .
3 - the implementation of this technology is more expensive so it is more in short supply hosting for it.

Python is more like java to php ( in the way they operate ) and even more ancient than php (1991 ) its foray into the web has been very limited , although an interpreted language like php , it seems more to java and if you think about it java is also interpreted as the compilation authentic does not occur in these languages ​​not as in co c + + , both both java and python translate the script to a bytecode (very similar to machine language ) unlike php that their opcodes are more similar to assembly language, and are more optimal bytecode , so python is more efficient in its execution but php is not about to java , BUT there is a configuration for python , which I like and I bet the whole , it is a framework that supports sessions sERVLETS mvc and foremost this is python as java servlets can handle this framework , so that their performance would improve a lot I would say that he walks on the heels of Java , but that shall speak later on a benchmark I intend to do in these three technologies.

as main advantages :
1 - very smooth learning curve , it is a language that can boast of being very high- almost approaching human language , leaving java and php in this regard.
2 - runs as java bytecode does what it does very fast turning to be in the middle between php and java on quickly.
3 - also implements a lot of libraries to work wonders as in php

and disadvantages :
1 - not many programmers in this technology and the documentation is very scarce in Spanish and in English but also in Spanish there are more .
2 - implement this technology is very complex web therefore the hosting that support python are even more scarce than in Java.

This is a simple analysis of these technologies , go doing more analysis of these technologies further and more complete , this is an introduction.

Just as a final thought , and almost like a final blow and deadly , those who are in favor of python as I do , we can boast of having as support for companies as large as none other than Google , Yahoo and NASA, these three companies have their websites in python .


It is thought that these companies have teams of highly trained engineers ( merjor what the world) and if turned their eyes to this technology is something is not it?



------------------------------------------------------------------------------------------------------------

     

>>PHP<<

PHP is a programming language commonly used server side code originally designed for web development of dynamic content. It was one of the first programming languages ​​server side that could be incorporated directly into the HTML document instead of calling an external file to process data. The code is interpreted by a web server with a PHP processor module which generates the resulting web page. PHP has evolved so that now also includes a command line interface that can be used in standalone graphical applications. PHP can be used on most web servers as in almost every operating system and platform free of charge.
PHP was originally created by Rasmus Lerdorf in 1995. Currently the language is being developed with new features for the group PHP. This language is part of Free Software released under the PHP License which is incompatible with the GNU General Public License because of restrictions on the use of the term PHP.




>>Features<<

Focusing on development of dynamic web applications with access to information stored in a database.
It is considered an easy language to learn, because in its development were simplified different specifications , such as the definition of the primitive variables , such that is evident in the use of PHP arrays.
The source code written in PHP is invisible to the client web browser , since it is the server that is responsible for implementing the code and send HTML to the browser your results . This makes programming in PHP is safe and reliable.
Switching capabilities most database engines that are used at present, highlights its connectivity MySQL and PostgreSQL .
Ability to expand their potential using modules (called ext 's or extensions) .
Has extensive documentation on its official website , among which stands out that all functions of the system are explained and exemplified in a single help file.
It's free , so it is presented as an accessible alternative for everyone.
Apply techniques of object-oriented programming . Even applications like Zend Framework , PHP company developing , are fully developed by this methodology.
It requires defining variable types although their variables can also be evaluated by the guy who is handling at runtime .
Has exception handling (from PHP5 ) .
While PHP does not require the wearer to have a certain methodology to the programming , even so, the programmer can apply in their work any programming or technical development to write code that allows orderly, structured and manageable. An example of this are the developments that have been made in PHP design pattern Model View Controller ( MVC ), which allow to separate treatment and access to data, the control logic and the user interface into three separate components.
Due to its flexibility has been very successful as the base language for Web applications content management , and is its main use .

------------------------------------------------------------------------------------------------------------

>>JAVA<<

El lenguaje de programación Java fue originalmente desarrollado por James Gosling de Sun Microsystems (la cual fue adquirida por la compañía Oracle) y publicado en el 1995 como un componente fundamental de la plataforma Java de Sun Microsystems. Susintaxis deriva mucho de C y C++, pero tiene menos facilidades de bajo nivel que cualquiera de ellos. Las aplicaciones de Java son generalmente compiladas a bytecode (clase Java) que puede ejecutarse en cualquier máquina virtual Java (JVM) sin importar laarquitectura de la computadora subyacente. Java es un lenguaje de programación de propósito general, concurrente, orientado a objetos y basado en clases que fue diseñado específicamente para tener tan pocas dependencias de implementación como fuera posible. Su intención es permitir que los desarrolladores de aplicaciones escriban el programa una vez y lo ejecuten en cualquier dispositivo (conocido en inglés como WORA, o "write once, run anywhere"), lo que quiere decir que el código que es ejecutado en una plataforma no tiene que ser recompilado para correr en otra. Java es, a partir del 2012, uno de los lenguajes de programación más populares en uso, particularmente para aplicaciones de cliente-servidor de web, con unos 10 millones de usuarios reportados.




>>Feature<<

1. - Plain Language :
It is known as simpleporque language comes from the same structure c and c + + , since C + + was creating java referentepara why use certain features of c + + yse have eliminated other .

2. - Object Oriented :
All inits java programming is object oriented majority as to be grouped in encapsulated estructurasenestructuras easier handling.

3. - Distributed :
Opens sockets, establecery accept connections with remote clients or servers ; lacreación facilitates distributed applications as it provides a collection declases for networked applications .

4. - Robust :
It is highly reliable with c encomparación have been eliminadomuchas features with pointer arithmetic provides numerosascomprobaciones in compilation and runtime .

5. - Insurance:
Safety is very important in java unacaracterística as deseguridad barriers have been implemented in the language and system for real-time execution .

6 . - Indifferent to laarquitectura :
Java supports the másvariados network environments , whatever these from Windows 95 , Unix and Mac aWindows Nt , trabajarcon to different operating systems.
Java is very versatile because bytecodes queutiliza an intermediate format that is used to efficiently transport theCode or different platforms ( Hardware - Software).

7 . - Portable :
Laarquitectura being indifferent which is working on , this makes efficient seamuy its portability , its programs are the same in any of the platforms , java yaque basic sizes specified , this is known as virtual machine dejava .

8. - Interpreted and compiled lavez :
Java can be compiled einterpretado in real time, as when building this setransforma source code in a kind of machine code.

9. - Multithreaded or Multithreaded :
Java has a facility decumplir several functions at the same time, thanks to its role multahilos as each thread is executed that as a program has many functions in real time simultaneously.

10 . - Dynamic:
The Java language is very dinámicoen bonded phase , only act in their classes as they are required or need to estopermitirá that links can be included even from very variadaso sources from the network.

11. - Produce Applets :
In java can be independent crearaplicaciones applets.
Independent because puedencomportar as any program written in any language.
Appletsconsiderados Moreover the small programs, have the ability to perform functions muycomplejas .

12. - High performance
Java is considered high throughput for being so swift in running elmomento and programs ahorrase many lines of code .

------------------------------------------------------------------------------------------------------------


>>¿What is better php or java??<<

It depends on what you need.
Java is cross-platform and serves to applications, most mobile and desktop.
PHP is used to make dynamic web pages.
Maybe you should look for: "Differences enters Java and PHP", I think this will be most useful.
If you want to know more of each:


>>Video<<


0 comentarios:

Publicar un comentario