tags:

views:

219

answers:

8

Friends,

I've got some exp in c++ and now kind of starting my way to J2EE (to survive:))). Meanwhile, I've got a plan to venture in to a web portal my own. But with very little experience in web technology, I'd need to start from scratch. I'm little confused on which way to go and I'm here. PHP, Python or JSP, considering the fact that, anyway I've got to learn J2EE at my work. Would that be worth to learn PHP or Python to develop a portal which I expect to get 80-100K hits per day "IF" everything goes well OR jsp would be sufficient?

Many thanks

+12  A: 

Before learning either of these, spend some real time and learn HTML and CSS in depth. Also learn Javascript and JQuery (or your favorite client side library). The O'Reilly books on the topic are pretty much all good IMO.

I say that because I think that you'll find that for most modern web sites, a lot of richness is moving to the client side, and away from the server side. Under this model, your code in PHP or JSP is probably going to look pretty similar (ie, fetch data from the database and serve it to your view or into JSON for the client to consume).

Dave Markle
+1 for "or your favorite client side library"
Justin Johnson
+1  A: 

Considering you're used to c++, should look at aspx and c# - probably closer to your current experience.

That said, PHP is a doddle, so it shouldn't present any challenges. Bear in mind that if you want to get the most from the language, you absolutely have to learn a little bit about configuring apache, and frameworks (cake, codeigniter, zend etc).

danp
A: 

I expect this question to be closed as being subjective. But, I'll put in my 2 cents.

JSP would likely dovetail well with J2EE. (I've heard that it can be a bit rigid, but I have no experience to provide any insight on the matter.)

PHP is a good candidate, because it's popular. You can find a lot of info on the web.

Python isn't as popular for webdev, so finding examples won't be as easy.

I also second Dave Markle's opinion. If you want to learn webdev, HTML, CSS and JavaScript will be crucial as well. You may never want to be a front-end developer, but you can't get away from dealing with those technologies at some point.

George Marian
A: 

There are many options.

  1. Since you already know (and is learning about) Java, one option is to use GWT for both server and client. This can help you in that you do not need to learn another language (JS/HTML/Python/PHP etc). If your portal is going to be big, using Java can help you organise the application better - usually JS/HTML based applications are not very suitable for proper organisation, even if you use good JS Libraries like jQuery or YUI. Having a good organisation can help a lot - during updation and modification later.

  2. If your planned venture is a single/two person venture or if it is time bound - where time to market is everything - then I would not suggest the earlier approach - especially if your server side part is expected to be big.

    Java is a slow language to write code in. A project which you will take say 6 months to write in Python will take you close to 1 year + in Java. In such a scneario, I would prefer Python - it is a proper language - unlike PHP, and you create code with good organisation there too - albeit a little less organised than using Java.

    Please note that if your client side code is much more complex than your server side code, then going with GWT will do you no harm. But if your server side code is very complex compared to the client side, then I would suggest Python.

  3. Another point is to use existing Web Frameworks to ease your work. For Python, Django is an excellent choice. This itself will decrease your work time by 50% or more, while making your code much more secure and scalable.

Koran
Forgot to add the following: If you are worried about the fact that you need to learn Python and that will take time etc - what I have faced is that it is indeed a very easy language to learn - say within 3 weeks or so of study only.
Koran
You lost me when you used organisation as a basis to select a language. Let's blame the tool rather than the inexperience of the developer...
Kieran Allen
For a newbie on an area, organisation is indeed an important aspect - and if a tool provides mechanism for better organisation, then better use it. In my experience, I really felt that JS provides very little scope for organisation for a newbie, while languages like Java does improve upon it a lot. If needed we can write extremely organised code in even assembly, but it needs ooldes of patience and a huge lot of experience. Neither being the case here - since the OP wants to start a venture ASAP on an area where he has very little experience - I would still prefer to think I am right here.
Koran
+1  A: 

All the server-side technologies you list are "sufficient" for the volume of traffic you expect, if you design the site well from a performance and scaling viewpoint -- and so do many others you haven't mentioned, such as other Java-based approaches, C# ones, and (last but not least) Ruby (probably with Rails, though, like the other languages, it has several frameworks for you to choose from).

As most everybody said, the client-side considerations are sharper -- unless you want to try a "server-side generator of client-side code" like gwt (I'm told the latter works well, but personally I'm always wary of code generators, esp. using a code generator w/o understanding of the "code" it makes for you, which in this case is HTML, CSS, and Javascript with its own framework). Except for GWT and similar approaches (if that's your chosen poison), really learning HTML, CSS and Javascript is really a must -- and then you get to choose among many, many frameworks again (jQuery, Dojo, closure, etc, etc).

For performance issues, you really want to study Steve Souders' site (and books, etc) -- Steve was a server-side guru until measurement showed him the bottleneck was really client-side, and then he turned himself into the client-side performance wizard;-). But to get the most out of the books you'll need understanding of HTTP, HTML, etc, etc, to start with;-).

Alex Martelli
A: 

As was said in the previous answers you will for sure need to learn HTML, CSS and Javascript to get going on the client-side.

Now, if you already need to learn JavaScript, why don't use it on server side, too? Node.JS is a very high speed server using JavaScript. It may easily handle some 20k requests per second, even though it is only one process. The API is quite nice, JavaScript has loads of possibilities ('cause it's prototype based), there are implementations of MySQL interfaces, aso.

Furthermore I think JS by itself is a language worth learning.

PS: I personally am using PHP. But that's only 'cause I always used it. As it is now, I am thinking about switching to Node.JS.

nikic
A: 

It really isn't that similar to C++, but I would recommend PHP. You really can't expect a server-side scripting language to be similar to a compiled language like C++. Personally, I find PHP to be an ugly, messy looking language, but once you get into it, it's very rewarding. Other languages have too many drawbacks. ASP.Net is too Microsoft-centric, Python and Ruby on Rails are too obscure, and are also non-curly bracket languages, meaning it will require a lot of adjustment to change to them. Hope this helps.

JC Leyba
Calling Python and Ruby obscure is a bit of a stretch...
Vitor Py
+1  A: 

Hit's per day isn't a really useful metric for estimating performance. You really need to be concerned with the peak load and the acceptable response time.

80-100k hits per day is an average of about 1 hit per second. The hits are not going to be evenly spread out, so for normal traffic you might expect a peak load of 10 hits per second.

If you are going to promote the site with newsletters or commercials, expect to peack at 100's of hits per second.

If you selling $1 air tickets, expect to peak at 1000's of hits per second.

Now the language you choose for the site isn't nearly as important as your choice of database (not necessarily relational) and the way you store the data in the database.

Scaling up frontends is relatively easy, so having really fast efficient HTML generation shouldn't be a primary concern. Pick a platform that is going to be efficient for development time.

gnibbler