Python vs Java

[edit|delete]

This article makes its point very well

http://www.ferg.org/projects/python_java_side-by-side.html

Executive summary

Python = efficient
Java = dinosaur

web2py is built on Python and uses Python for the Models, the Views, and the Controllers. Here is an example of how to built a web2py web service (get_user_by_id) that exposes records in table user (it is complete and only assumes table db.user id defined):

def get_user_by_id(id):
   rows=db(db.user.id==id).select()
   return rows.colnames, rows.response
def handler():
   return response.xmlrpc(request,[get_user_by_id])

How many lines of code does it take to do this in Java?



Post a comment