Best language for Web applications?

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

30 Replies - 4676 Views - Last Post: 02 December 2017 - 05:03 PM

#16 bluemarmalade  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 05-July 15

Re: Best language for Web applications?

Posted 01 December 2017 - 09:10 AM

There are really only a few choices if you want to make that kind of webside. Php is not a good choice. No one today in their right mind starts to make a professional webside in php if they had a choice. Python and ruby are also kind of beginner languages that are really too slow for enterprise development. Since the op has experience in VB, Asp.net core is the obvious choice.

It is really easy to work with compared to the old asp.net. It runs everywhere and is both fast and powerfull. The docs and tooling(visual studio) are very good. Learning C# will also give you very good knowledge of programming that you can easily adopt other languages in the future. And because .net core is open source, you can contribute and get experience that you can put on your cv that looks good. The only other option is javascript. Then Vue or React are the best choices, with node on the backend. Express is a very handy framework to use here.

The thing is, php, python, javascript etc are not easier to learn than C# or Java. That is simply bogus.
Was This Post Helpful? 0
  • +
  • -

#17 jon.kiparsky  Icon User is offline

  • Beginner
  • member icon


Reputation: 11020
  • View blog
  • Posts: 18,804
  • Joined: 19-March 11

Re: Best language for Web applications?

Posted 01 December 2017 - 11:25 AM

Quote

Python and ruby are also kind of beginner languages that are really too slow for enterprise development


Hm. I know a lot of enterprises that disagree with you on that, and frankly it's not clear what you mean by "beginner languages" and by "too slow". Considering that the request/response loop includes human beings and network delays, it seems to me that even if you could support the assertion about speed that it wouldn't matter a whole lot for the front-end server.

Using javascript for the backend is sort of the ruby on rails of 2017. We'll see where it goes. I suspect that it'll wind up on the heap of options, with the other options.
Me, I'm not excited about it. Nothing about javascript ever made me think "gosh, I want to use this more". Mostly, it makes me think "gosh, I wish there were a good language that could use for this, but there isn't so I'm stuck with this steaming heap of dreck that is javascript".
Was This Post Helpful? 3
  • +
  • -

#18 bluemarmalade  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 05-July 15

Re: Best language for Web applications?

Posted 01 December 2017 - 01:05 PM

View Postjon.kiparsky, on 01 December 2017 - 11:25 AM, said:

Hm. I know a lot of enterprises that disagree with you on that, and frankly it's not clear what you mean by "beginner languages" and by "too slow". Considering that the request/response loop includes human beings and network delays, it seems to me that even if you could support the assertion about speed that it wouldn't matter a whole lot for the front-end server.


Sure, alot of big companies like Google use python and AirBnb use Ruby etc. The problem is that unless you have a stab of more people that can write your heavy lifting in c++, then you are screwed. Secondly, those companies use many languages and most is written in java.
There is certainly a place for python, just not in the backend for the most part.
Was This Post Helpful? 0
  • +
  • -

#19 xclite  Icon User is offline

  • I wrote you an code
  • member icon


Reputation: 1266
  • View blog
  • Posts: 4,064
  • Joined: 12-May 09

Re: Best language for Web applications?

Posted 01 December 2017 - 01:21 PM

That is patently false. For many operations, the database/network is the bottleneck, and you can use whatever dynamic language you want for the web gateway and rendering work. Sure python is slow, but it's not too slow for web applications by any stretch.
Was This Post Helpful? 3
  • +
  • -

#20 jon.kiparsky  Icon User is offline

  • Beginner
  • member icon


Reputation: 11020
  • View blog
  • Posts: 18,804
  • Joined: 19-March 11

Re: Best language for Web applications?

Posted 01 December 2017 - 01:47 PM

View Postbluemarmalade, on 01 December 2017 - 03:05 PM, said:

Sure, alot of big companies like Google use python and AirBnb use Ruby etc. The problem is that unless you have a stab of more people that can write your heavy lifting in c++, then you are screwed.


Well, two answers to that. One, we're using python for both servicing requests and also for the back end stuff - we don't do super-heavy backend, but we have a some processes that do a reasonable amount of calculation and aggregation. The fact is, for most companies that stuff is happening in the database, not as separate backend processes that you'd write as independent services.
Two, if you do have a heavyweight process that you're spinning out as a service, and you choose to use C++ or Java for that, you still would probably like to handle your requests separately, and python or ruby are still reasonable languages for taking care of that. Not to say that there aren't reasonable frameworks, but django and rails are certainly strong contenders in that game.
Was This Post Helpful? 0
  • +
  • -

#21 bluemarmalade  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 05-July 15

Re: Best language for Web applications?

Posted 02 December 2017 - 01:21 AM

View Postxclite, on 01 December 2017 - 01:21 PM, said:

That is patently false. For many operations, the database/network is the bottleneck, and you can use whatever dynamic language you want for the web gateway and rendering work. Sure python is slow, but it's not too slow for web applications by any stretch.

It's obviously not blatantly false. How can you say that? I'm talking about backend tasks, not network.
Was This Post Helpful? 0
  • +
  • -

#22 ndc85430  Icon User is offline

  • I think you'll find it's "Dr"
  • member icon

Reputation: 778
  • View blog
  • Posts: 3,173
  • Joined: 13-June 14

Re: Best language for Web applications?

Posted 02 December 2017 - 01:30 AM

The point that xclite is making is that the times taken for data going across the network and accessing the database are the dominant ones in the time taken to serve a request, so any slowness processing the data is negligible compared to those. jon.kiparsky also made the same point.

At my last company, our backend was entirely written in Python and yes, there was lots of data processing, but also lots of network access since the system was split into services.

You also still haven't explained what you mean by "beginner languages".
Was This Post Helpful? 1
  • +
  • -

#23 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 6110
  • View blog
  • Posts: 21,025
  • Joined: 05-May 12

Re: Best language for Web applications?

Posted 02 December 2017 - 06:33 AM

View Postndc85430, on 02 December 2017 - 03:30 AM, said:

The point that xclite is making is that the times taken for data going across the network and accessing the database are the dominant ones in the time taken to serve a request, so any slowness processing the data is negligible compared to those. jon.kiparsky also made the same point.


True, but how long it takes process a single request is only one dimension of things. The other dimension is how many requests one can process with in a time frame. How does one scale to the number of requests that an application or web service needs to support? Assuming you've already got the best design that you can theoretically get, and maximized the amount of caching and precalculated values that you can, you are left with how fast can you process requests to free up a thread to accept more requests. Do you scale up and get faster more expensive hardware (or VMs)? Do you scale out and get more cheap hardware (or VMs)? Can you avoid having to scale up by using a language that tends to be faster than another language?

I think that this is the reason why Javascript on node.js looks so tempting for some people (as much as I also abhor Javascript as being the core language for it). Although essentially single threaded, it acts like it is multi-threaded due to its asynchronous nature. So given an implementation in Javascript on node.js, and an implementation of a Java servlet running in a Java container that does the typical one-thread-per-request, both running on the same kind hardware, the Javascript web app will look like its handling more requests even with its single thread while the Java web app is constrained by the number of threads that the Java container has available at its disposal. So even though Javascript is slower than Java, it looks like it is actually doing more.

For a C# or VB.NET web app using ASP.NET, it would almost be in the same boat as the Java web app, except ASP.NET is pretty smart to detect when a particular thread is waiting on asynchronous operations, and so it'll use the thread to accept more requests. ASP.NET is not constrained to just C# code -- it supports running managed code written in C++. Since C# code runs about 10-15% slower than C++ code, one could potentially get a speed boost at the price of a potentially more complexity.
Was This Post Helpful? 0
  • +
  • -

#24 bluemarmalade  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 05-July 15

Re: Best language for Web applications?

Posted 02 December 2017 - 08:20 AM

View Postndc85430, on 02 December 2017 - 01:30 AM, said:

The point that xclite is making is that the times taken for data going across the network and accessing the database are the dominant ones in the time taken to serve a request, so any slowness processing the data is negligible compared to those. jon.kiparsky also made the same point.

You also still haven't explained what you mean by "beginner languages".

Accessing the database is not relevant to my point, neither is network speed. Those are controlled resources. But if a user is waiting for a calculartion to complete, that could be a big bottleneck when you also have many other users waiting for that same operation. You then have to rely on the server's processing power. So using Python for this would not be ideal because you could potentially completely slow down the application and you would have to get an even more powerfull server or even more servers. I thought this was obvious when I wrote my first post.

By beginner language I mean that Python is fairly easy to learn, but most importantly, you can get results fast. This is why it is used so much in education now and it is the language thought to young people who want to learn programming in my area. I simply think that it is better to start with Java or C# because they are superior in almost every way. I'm not saying Python is completely useless. Ruby on the other hand....

This post has been edited by bluemarmalade: 02 December 2017 - 08:26 AM

Was This Post Helpful? 0
  • +
  • -

#25 xclite  Icon User is offline

  • I wrote you an code
  • member icon


Reputation: 1266
  • View blog
  • Posts: 4,064
  • Joined: 12-May 09

Re: Best language for Web applications?

Posted 02 December 2017 - 08:37 AM

Perhaps you are misunderstanding the topic. This topic isn't about data analytics, simulation and modeling, physics engines... it's about web applications. The truth of it is that you are not waiting for the language that application is written in to perform a calculation in web applications. For any use case where a web application is doing work that could be sped up to a degree noticeable by the user by using an alternative language, there are tens of thousands of web applications where that isn't the case. Web applications are the domain where languages like Ruby and Python are entirely appropriate. The optimization of such applications nearly always comes down to improving database performance or network performance through data model improvements, query tuning, caching strategies, etc.

The difference between a Java server and a Ruby on Rails server for a web application is largely down to taste. Perhaps your definition of a web application is much broader, perhaps something like "programs that communicate over a network", which would be a different conversation entirely, since that encompasses nearly every type of modern software.
Was This Post Helpful? 1
  • +
  • -

#26 macosxnerd101  Icon User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12271
  • View blog
  • Posts: 45,363
  • Joined: 27-December 08

Re: Best language for Web applications?

Posted 02 December 2017 - 08:46 AM

Quote

By beginner language I mean that Python is fairly easy to learn, but most importantly, you can get results fast. This is why it is used so much in education now and it is the language thought to young people who want to learn programming in my area. I simply think that it is better to start with Java or C# because they are superior in almost every way.


This is a very short-sighted statement. It sounds like you resent your classmates wanting programming to be easy, which may or may not be a fair sentiment. But that sentiment doesn't imply that "Java and C# are superior to Python and Ruby."
Was This Post Helpful? 0
  • +
  • -

#27 bluemarmalade  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 19
  • Joined: 05-July 15

Re: Best language for Web applications?

Posted 02 December 2017 - 09:53 AM

View Postxclite, on 02 December 2017 - 08:37 AM, said:

The difference between a Java server and a Ruby on Rails server for a web application is largely down to taste. Perhaps your definition of a web application is much broader, perhaps something like "programs that communicate over a network", which would be a different conversation entirely, since that encompasses nearly every type of modern software.


Modern web applications are programs that runs on a server which is just a computer. If you only have a web app that pulls some text from a database then obviously there's not much relevance to how you do it.

View Postmacosxnerd101, on 02 December 2017 - 08:46 AM, said:

This is a very short-sighted statement. It sounds like you resent your classmates wanting programming to be easy, which may or may not be a fair sentiment. But that sentiment doesn't imply that "Java and C# are superior to Python and Ruby."

My main point is that Java and C# is superior in terms of speed. Or are you actually disputing this? My second point is that there are more benefits by using Java or C# than Python or Ruby for the backend(and in general). So far I haven't seen any arguments to use Pyhon other than "personal taste".

This post has been edited by bluemarmalade: 02 December 2017 - 09:59 AM

Was This Post Helpful? 0
  • +
  • -

#28 xclite  Icon User is offline

  • I wrote you an code
  • member icon


Reputation: 1266
  • View blog
  • Posts: 4,064
  • Joined: 12-May 09

Re: Best language for Web applications?

Posted 02 December 2017 - 10:20 AM

View Postbluemarmalade, on 02 December 2017 - 11:53 AM, said:

View Postxclite, on 02 December 2017 - 08:37 AM, said:

The difference between a Java server and a Ruby on Rails server for a web application is largely down to taste. Perhaps your definition of a web application is much broader, perhaps something like "programs that communicate over a network", which would be a different conversation entirely, since that encompasses nearly every type of modern software.


Modern web applications are programs that runs on a server which is just a computer. If you only have a web app that pulls some text from a database then obviously there's not much relevance to how you do it.


Most web applications that do more than that are doing their work client-side. What is an example of a class of web applications where language execution speed matters serverside? Where the difference between Java and Ruby is noticeable by your user? Where the vast majority of the request time isn't spent in other parts of the stack?

Quote

View Postmacosxnerd101, on 02 December 2017 - 08:46 AM, said:

This is a very short-sighted statement. It sounds like you resent your classmates wanting programming to be easy, which may or may not be a fair sentiment. But that sentiment doesn't imply that "Java and C# are superior to Python and Ruby."

My main point is that Java and C# is superior in terms of speed. Or are you actually disputing this? My second point is that there are more benefits by using Java or C# than Python or Ruby for the backend(and in general). So far I haven't seen any arguments to use Pyhon other than "personal taste".


You're putting forth points that themselves are irrelevant. First, speed:
1. Many python libraries actually outpace Java/C# equivalents for a lot of number crunching because they are optimized for those use cases, though of course sometimes those optimizations manifest as a drop into C.
2. Speed doesn't matter as much for web applications. In cases where it can be improved, the solutions are language agnostic (caching will be equally fast for a Python app or a Java app). Even the vaunted "we rewrote our app in language Y and saw a 100% speedup" articles are garbage - you learn lessons running an application, and probably even rewriting in the same stack would have yielded impressive performance.

Secondly, that there are advantages for using Java or C#. I wholeheartedly agree; I prefer to use Java where possible. The advantages, which are shared by C#, of a good ecosystem, reasonable type system, and good performance when you need it, are awesome. I just don't think that web applications are an arena where these advantages win out - Ruby and Python have a stronger web development ecosystem and the performance is less of a concern. I'd still like the advantages of a type system personally, but...

Thirdly, many people will argue that they can work faster in dynamic languages as their justification for using them, and that type systems only get in their way. I think those people are wrong when they push that workflow as gospel, but I also see evidence that they can build simple, reliable, and yes, performant web applications in those languages.

I don't disagree with any of your assertions that C#/Java are a good choice. I just don't find your argument from the perspective of performance compelling. In fact, I think it's the weakest argument against using Ruby or Python for web applications. Better arguments:

1. Less magic in static languages (although Java frameworks go too far with reflection)
2. Type systems are useful
3. For APIs, better, standard frameworks that actually conform to REST (see: Jersey)
4. Better general libraries
5. Better runtime debugging and analysis tools
6. (At least for Java) A much simpler deployment process
Was This Post Helpful? 2
  • +
  • -

#29 jon.kiparsky  Icon User is offline

  • Beginner
  • member icon


Reputation: 11020
  • View blog
  • Posts: 18,804
  • Joined: 19-March 11

Re: Best language for Web applications?

Posted 02 December 2017 - 04:36 PM

It seems to me that deciding to use one language over another because "it's faster" is the most blatant case of premature optimization I could come up with. If I'm trying to decide which language to use I'm ranking the readability and maintainability very highly, and the language community and the availability and the quality of existing libraries close behind them, and the supposed speed of the language well behind those, just because developers are much more expensive than machines, and it's a lot easier to deploy new boxes than new developers (and to take boxes out of service when they're no longer needed!)

As I think we all agree, python and ruby tend to score higher for readability and maintainability than C++ and Java, and I believe that productivity is generally thought to be higher in python and ruby as compared to C++ and Java as well.
Was This Post Helpful? 3
  • +
  • -

#30 jon.kiparsky  Icon User is offline

  • Beginner
  • member icon


Reputation: 11020
  • View blog
  • Posts: 18,804
  • Joined: 19-March 11

Re: Best language for Web applications?

Posted 02 December 2017 - 04:50 PM

View Postbluemarmalade, on 02 December 2017 - 10:20 AM, said:

By beginner language I mean that Python is fairly easy to learn, but most importantly, you can get results fast.


What's wrong with getting results fast? That's what I'm actually looking for. At least, I've never had anyone complain that I'm delivering results too quickly.

Quote

This is why it is used so much in education now and it is the language thought to young people who want to learn programming in my area. I simply think that it is better to start with Java or C# because they are superior in almost every way.


Now we're getting into another area. If you want to argue that someone should start out by learning Java or C++ instead of python or ruby, that's another kettle of fish. Now you're talking about pedagogical approaches, and I could make some good arguments for using Java as a language of instruction. I don't know that they'd be convincing arguments at the end of the day, but there are good arguments to be made there. I'm sure I could make similar arguments for C++, but I'm not as familiar with that language so I'm staying back from making that case.

Quote

I'm not saying Python is completely useless.


That's good, because that would be a pretty silly thing to say if you ask me, and I'd hate to have to call you silly.

But what would there be that would tempt you to all one language or another "useless"? What are the things that make a language useful or useless in your mind?
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3