Favored Language for Network Enabled Apps.

Michael L Torrie torriem at chem.byu.edu
Mon Oct 29 11:29:57 MDT 2007


Steve wrote:
> Hi Everyone,
> 
> I have a question for the group, really more of a straw poll I guess.
> 
> What is the best language for writing network enabled applications or...
> What language do you feel fits the problem domain of creating network
> enabled appplications best or...
> If you were given the task of writing a network enabled application
> which language would you reach for first.

What is a "network enabled application" [sic]?  A tcp/ip server?  A web app?

For developing some kind of tcp/ip server/client system, Python wins,
hands down.  Twisted for networking, or django for a web frontend (or
Turbo Gears.  Whatever).  A simple, asynchronous, event-driven server
complete with a custom protocol can be created with about 10-20 lines of
code.

> 
> Reason I ask this is because I was asked it at an interview the other
> day and I'ld like to see if my answers mesh with the general populace.
> 
> My answer was Java for rapid development, and ease of deployment.
> Possibly python for faster execution times trade off being not quite
> as easy to deploy.

Eh?  I wouldn't say Python would be faster than Java in terms of
execution speed.  But a network app is I/O bound anyway, so I guess it
doesn't matter.  Python would definitely beat Java in terms of rapid
development.

In terms of deployment, Python is more difficult.  cx_freeze is useful here.

> C/C++ if needed for best possible execution times, trade off being
> speed of development (i.e. Slower, and portability being another
> possible concern).

C++, or even C, with the right framework libraries can be a killer
combination for all kinds of app development including networking.  The
Qt Socket API, for example, makes building servers and clients extremely
fast, faster than in Java, I'd say.  Even on C Using glib and gnet I can
build a C socket server with a protocol in very short order, even.  In
short, it's the tools, not the language that bring flexibility and rapid
 development.

Until very recently Java actually was a very poor language to use for
network programming.  It had no support whatsoever for asynchronous I/O,
forcing you to resort to threads, which won't scale if you don't use
thread pools and other more complicated abstractions.

> 
> In other words I couldn't come up with just a single answer.
> 
> Thanks in advance.
> 
> Sincerely,
> Steve
> 
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */
> 


-- 
Michael Torrie
Assistant CSR, System Administrator
Chemistry and Biochemistry Department
Brigham Young University
Provo, UT 84602
+1.801.422.5771




More information about the PLUG mailing list