Ask Slashdot: Which Web Platform Would You Use?
New submitter datavirtue writes "I'm about to embark on developing active content (database driven, and web services) for the first time for my website and I have grown to love PHP. Knowing that there are other web development platforms available, and noticing some disdain for PHP in some circles, I'm curious to know which platforms slashdotters prefer along with the reasons why. Before I get started into heavy development I would like to get some opinions and more facts. Why shouldn't I use PHP?"
PHP is fine, but if you want to learn about a better, enterprise-ready languages I would suggest using ASP.NET. It integrates perfectly with .NET apps and libraries and comes with a comprehensive library (as it uses .NET). The great thing about ASP.NET is that you can use C# to develop for it. ASP.NET also comes with various functions to make state management easier - an important feature that is completely missing in other languages. It also has built-in cache management.
.NET. This means you can use VB.NET, C#, J#, Delphi.NET etc. And because you compile the code to bytecode, it runs significantly faster. On top of that Visual Studio is a great free (and commercial) development environment.
ASP.NET originally lacked templating engine, but Microsoft introduced it in 2.0 version. You can have master templates that have placeholders for the dynamic content, as well as all the HTML and JavaScript that is shared between all pages.
It is basically more than your off-the-shelf PHP/Python/Ruby. ASP.NET provides much larger library to use, has templating engine, error handling, controls and events (and hence is more familiar to Windows developers), caching, object-oriented design and session control which can even be saved in SQL Server. It's not just a language, it's the complete package.
One of the great things about ASP.NET is also that you can use your favorite language to develop for it, as long as it supports
Oh, and if you want to run ASP.NET under Linux servers, it's easy too. Apache has mod_mono module or you can use it via FastCGI.
Most hate towards PHP comes from elitist snobs who don't know how to use the language. PHP is perfectly fine language to use, and it is extremely powerful and flexible. If you are going to develop for web, I suggest using some framework, as it makes the process much more straightforward, faster and better. I personally use CodeIgniter, which is fast and has a good library of helpers and other essential framework stuff. CakePHP is often suggested for persons new to frameworks, but I would stay away from it. It's slower and it's more pain in the ass to learn.
There's also other good things about PHP. First of all, it works with practically every web host out there, and doesn't require you to play around with it to get it work. It has an extremely comprehensive library, amazing documentation and almost all API's have client libraries for it, if they just have some. PHP, being the #1 platform on the web, gives you that advantage.
...as Subjective and Argumentative.
Oh, wrong site.
Bitten Apples are still better than dirty Windows...
I've been using Django for a while now on my web app, having moved away from home-brewed PHP. Very easy to use, and encourages well-written and elegant code.
Ydco co
PHP is an ugly programming language. Just look at a comparison with some other languages to get a feel for its ugliness: http://hyperpolyglot.org/scripting
I use PHP for 90% of my work because it's the right tool for the job. We can also bring other developers up to speed on our own framework and projects pretty fast.
There are times when Python is a better fit. The fact that it remains running across page loads can be very handy (as opposed to every request to PHP being completely distinct, which has its own advantages). A continuously running app is often better for backend processing, especially when interacting with third party systems.
Developers: We can use your help.
ASP.NET is bloated--it's only good for web applications where you aren't concerned with the user experience. The downside of using it's existing libraries is that a simple task becomes thousands of lines of JavaScript. PHP is much simpler for your every-day dynamic site, and you'll have a better experience working with hosting providers (not to mention plans that typically cost less).
What do you guys think of Catalyst these days? Does Catalyst still have enough support behind it to make it worth my while to sit down and really learn Catalyst?
This is assuming that I already know Perl well, and that I'm also not interested in switching to another language at the present time.
It does have its flaws but there are a plethora of Java based frameworks out there.
The sheer amount of options you get at zero cost(some of it actually Free) and the quality of API documentation is simply astounding.
20 minutes into the future
PHP is quick and dirty (not to mention easy - but in a bad way), but it has scaling issues. Frameworks are nice and all, but in the end it's still a hodgepodge of code spaghetti. Personally, I prefer Django with Python because of the built-in ORM, security features (i.e. CSRF protection), modularity, a "true" built-in templating engine plus native OOP w/MVC design coupled with the power (and conciseness) of Python. Scalability is also easier because Django "out of the box" supports Memcached, CDN's, tiered architectures, multiple database types, etc.
Use the language of Money and buy someone to build it for you. Problem solved!
... well, not really. But there is such a thing for the web: http://www.runbasic.com/
Oh arse
First, let me commend the original poster on an irresistible troll.
"I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say 'Yeah it works but you're leaking memory everywhere. Perhaps we should fix that.' I’ll just restart Apache every 10 requests." --Rasmus Lerdorf, the Original php guy
Wt is the best one I have tried. I use the C++ version, although there is also a Java version (JWt).
What makes Wt unique is its approach: widgets. You develop web applications like you were developing desktop applications. Also, the API is Qt-like (but using Boost).
I gave up on Rails after I used Wt.
Want a virtualization console? Take Wt, libvirt and an HTML5 VNC client and you are done.
Need Active Directory authentication? Wt, Samba (or Windows APIs if you are on Windows), done.
Streaming? Wt, ffmpeg libraries, done.
Forgetting about bindings and being able to use the millions of C/C++ libraries out there was a huge relief.
Also, size: Rails, Django (and even PHP) just do not fit in an embedded environment. Wt does.
Zend is a php-framework ready to do almost anything. It has a very active community which updates very often the code. Very easy to learn it although the documentation is lacking a lot of things.
Along with some html/css/javascript tricks you can do a lot of amazing things that they are not allready exists in the wild.
//LIFE WOULD BE EASIER IF I HAD THE SOURCE CODE!
Only thing worth using is based on mod_perl
Just template toolkit should be ok
or you can use a framework like catalyst
(If it is good enough for Slashdot likely good enough for you).
Wt ("witty") is a C++ toolkit that is modeled after Qt. It uses boost and STL, but you get to use familiar Qt concepts - signals & slots, Model view, etc. Basically think of Qt-based web pages. It fully supports AJAX and can handle the data server-side or on the client. It also has a C++ -> JS converter so you can just make a function for conversion to JS and have it exec on the client. Of course it runs as a module, or it comes with its own server. It fully supports CSS, DOM, etc.
I reall like this approach because my two complaints of PHP:
1. It is unstructured
2. it is ugly (both syntax, and having code embedded in pages)
are alleviated.
1. C++ object orientation encourages a structured approach.
2. The "it's 100% C++" ensures that you focus less on the presentation in PHP and just on the application logic. This helps encourage a model-view-controller approach. While you might have to write CSS, you will never have to write HTML and you won't ever have to mix the two in a CPP file.
Another reason is speed. Everything is compiled and runs natively, or compiled to JS and moved to the client.
Yet another reason is security. Wt has several protections built in. See the features link below.
If you're looking to do web pages entirely differently, this is it.
Additional features list
Slashdot's rate-of-post filter: Preventing you from posting too many great ideas at once.
The programming language itself is pretty irrelevant. You won't find huge differences between the popular choices. What will make a much bigger difference is the platform. I ran my website with Drupal (PHP, drupal.org) for years. When it came time to move to a new platform, I chose WordPress (PHP, wordpress.org). The fact that WordPress is also based on PHP was of secondary importance. I wanted the biggest community and the biggest selection of prebuilt components to save time.
use a good framework.
I'm just another peon in the startup world, but if I were starting out on a new project in a new language right now, then I would pick one of two languages for server-side.
Ruby on Rails: The speed of development with RoR is remarkable. As a framework, it is incredibly well supported, and for most tasks, an ideal candidate. Not only is it a great language, but it's probably one of the easier languages to find capable, ambitious young talent in. It has a lot of ... conventions ... and RoR will punish you for going outside of them, but all in all, they're reasonable conventions. There have been complaints about performance, but they are being addressed with every release.
Node.js: If you're building a web application in which users interact in real time, or for some other reason need some kind of timely event notification, node.js is a good candidate. Built on top of google's V8 javascript engine, it's very fast (gaining advantage from every advance Google puts into its web browser), can connect into C/C++ to link with your existing infrastructure, but its defining feature is being able to maintain a large number of long lasting connections.
PHP is fine, and there's something to be said for 'going with what you know'. Also, there's no question you'll be able to find cheap labour to build out your project in PHP. There are some great PHP frameworks, too.
PHP is just fine. There's nothing wrong with PHP at all and it powers some of the largest sites on the internet. If you want something slow and awkward, choose Java just like all of the banking websites use.
I've been doing a lot of web programming, and I evolved from PERL to PHP to Python. I happen to prefer Python these days, but there's nothing wrong with PHP. I wrote my company's PTO system using PHP (LAMP) and it works great. I would also suggest JQuery or similar for richer content.
Most "disdain" for any given language is mostly elitism and people self-validating their own choices. It's true PHP can be messy, but I recall having a Ruby developer look at my PERL code and be surprised at how readable it actually was... in other words, it's up to the programmer. I can make some pretty ugly programs in any language.
Stupid sexy Flanders.
I'm sure you will receive a lot of suggestions for server side MVC frameworks such as Rails, Django, Play, Asp.net mvc, etc...
How about a different direction and use javascript without a server side MVC framework at all. Node.js can run on the server and serve back json for your service urls. Should you need to provide pages in addition to just the service urls, you can return static html documents and use something like jQuery and Knockout to fetch the json from your service url and render the model to the page.
If you'd prefer to use something statically typed on the server side, using Scala and a framework like Scalatra or Unfiltered for the web server gives you a lot of power in a concise syntax.
You might as well ask which religion is the best one.
The one with the least amount of security.... That way everyone will know... if it connects to the internet, there is no privacy... rather than lying babel saying otherwise.
The reason why there is so much disdain for PHP programmers is because the language is only one part of the picture which many PHP programmers don't learn. Having good project layout and design is important. Picking the right technology choices for backend, frontend, ORM, plugins and modules is important because they will all eventually roll in to a big ball of mud. Ultimately bad and good PHP software degrades due to a lack of automated testing or bad coverage. You should seriously consider learning a good testing suite first before you foray in to actual development. Lastly, rather than invent your own framework and methodologies, consider using well adopted web frameworks with a good community behind them.
As far as I am concerned, I really enjoy developing in Ruby and Rails. RoR has really reached the maturation plateau where it's no longer necessarily so cool but great people are getting great work done with it. There is a significant amount of culture surrounding it so that is important and you can really isolate yourself and not write RoR code well if you don't pay attention. If you need scalability from the get-go, it doesn't matter what language or platform you use; if you don't know how to write scalable apps you're going to fail at that regardless of what you use. Consider visiting and then joining your local user groups. I attend the local Ruby on Rails group and have built some great relationships with other local devs in town as well as learned who all the significant employers in that space are.
Nobody should be allowed to register an opinion in this topic without linking to their githubs.
Here's a little secret for you: Anyone that uses the word "enterprise" is full of shit. It is used by mediocre developers who work at relatively big corporations and have been forced through the years to work with a bunch of bureaucracy. This people can't release a fucking shell script without 10 formal test cases, 50 meetings, 10 flowcharts, and it's own repository.
Serious huge projects are written in C++. Serious huge projects that need incredible performance are written in C with assembly optimizations. When somebody tells you that you can't write anything if it's not done in Java, that guy is a corporate droid. If somebody tells you the same for Perl, he's an old monk. If somone tells you that for Ruby/Python/Brainfuck, he's a snob and a fan of that particular language, ignore him too.
Truth is, leaving aside the obvious differences, when it comes to features that help organize huge projects, C has nothing that PHP doesn't implement on some way. Don't get me wrong, I'm not comparing the base of all modern computing with a modern and not very well designed interpreted language, I'm talking about features that some idiots would call "corporate". And yet, there are incredibly HUGE projects written entirely in C. And yes, there are also huge projects written in PHP.
Truth is, if you are a good coder, you'll do a good job even if you have to use Basic. And if you are not, you'll write spaghetti code even in C++.
PHP is a simple, straight to the point language, with a very clear syntax, that is great for web development. It's syntax is very much C-like, just like Javascript, and that certainly helps when you are writting web apps. It's easy to find PHP coders, and that certainly helps too.
The problem with PHP's reputation is that it's incredibly easy to just write some script or modify an existing one, and call yourself a coder. So the amount of bad PHP code out there is incredibly huge and incredibly public. Of course, if you reviewed each of those Corporate-enterprise-mega-super-jumbo java apps, you would find as many WTFs as you could in your average PHP project, the only difference is that the assholes rooting for Java won't show you their code, and they'll act very dignified.
Also, avoid the motherfucking frameworks. You don't need them, at all.
WTF am I doing replying to an AC at 5 A.M on a Friday night?
The submitter left out far too many criteria to make this a useful Ask. We can't possibly know what platform(s) would suit his endeavors. But he sure succeeded in starting a bunch of little flamewars :)
The thing about PHP is that it is very easy to get started with, and gets a big user base partially because of that. Because it has a large userbase, people sometimes assume it is by default the best choice.
It is a decent language, and after all, you can use it for most tasks.
However, i'd strongly recommend you to give Python and Django a try before you settle for PHP. It is so much nicer than PHP once you get used to it.
This video is a good (although slightly old) intro:
http://www.youtube.com/watch?v=p-WXiqrzAf8
Important stuff
The bigger hate that most people have expressed is the randomly put together hack jobs of code that people need to support and it is apparent in any language. I have had C# and PHP projects that I have looked at a few weeks later and simply said "What the hell was I thinking?".
If you know PHP, it is a perfectly capable web framework and great for development. If you want to learn something else, there is a lot of other languages out there but the time to become a proficient developer in another language that does the same thing as PHP to me is not worth the hassle. Depending on the project, pick the language you know. If it is a larger scale project then I would simply choose PHP because I know it well and how to write clean code. If I was doing some smaller project, I may pick another language or framework to start to learn and grow on.
They all suck, which one sucks the least depends on the circumstances of your project (time, budget, techincal aspects, what you already know, what you would like to learn, performance requirements, scalability requirements).
1. documentation for basic features still sucks. You're lucky when you can find what you need out of the comments. This was and still is the single worst thing about PHP, IMHO.
2. PHP forgets state after each request unless you save it in the session. Just having your state NOT thrown away is a huge advantage when you know how to make use of it.
3. Performance. Apache+PHP is slow compared to Tomcat or Jetty, even with frameworks like Wicket above them.
On a nice side note, I read the comments above and the "criticism" about other approaches than PHP are mostly ad hominem attacks.
The reason I dislike PHP is because it has a bunch of bizarre patched together conventions that don't make sense to me. But if they make sense to you and you're absolutely sure that your code is safe and maintainable, then it's the best framework for you. Someone mentioned asking this is like asking about religion and they're right. Since you asked, I'll point out the advantages I see with two frameworks I'm using today:
1. Google App Engine: super easy to get started and have something running. Lowest amount of code / task of any framework I've used.
2. ASP.NET MVC 3: clean separation of concerns that uses reflection and dependency injection (so there's very little configuration required). Lots of support on stackoverflow and asp.net/mvc.
Both of those are great for me mostly because I like and respect HTML/HTTP and want full control over some aspects of the request/response paradigm when I need to do fancier things like domain based routing. Both frameworks allow me to dive deep without complicating themselves too much. And I like C# 4.0 & Python 2.7, both are very pleasant to work with.
I'd recommend that you start learning Python. I moved away from PHP to Python in late 2008 and have NEVER, even once, looked back. Its just a better engineered language and the community is more deliberate and professional. SQLAlchemy is the best database library/ORM ever! And there are plenty of web frameworks to choose from (start with Flask or Pyramid).
Here are some thoughts from 2008 that got me moving away from PHP towards python. The python web community has grown a lot over the last few years, so my comments about Python being hard to get started in can be considered somewhat deprecated:
http://old.nabble.com/Creole-is-Dead,-long-live-Python!-p20488959.html
http://propel.tigris.org/ds/viewMessage.do?dsForumId=1093&dsMessageId=88191
Finally, Python is much more general purpose than PHP, so the Python skills you learn while doing web development can be put to use in other programming areas (I do a lot of scripting and data manipulation with Python).
If you'd suggested a half broken, totally unsupported open source framework which triples development time in exchange for little or no benefit you would have gotten +5 informative instead.
he did suggest mono and and is well in the +n informative...
I've written a large web app that uses PHP on the backend (currently using MySQL, but by using a abstraction layer it can be switched to any major database), and javascript on the front end. This has proved to be one of the best decisions I could have made when starting this project 2 years ago. Browser javascript engines are being constantly upgraded and the web app, which was responsive to start with, is faster now on the same hardware.
As far as a front-end platform I really like YUI. It has good documentation, an active user community, and a BSD license. For the backend, I don't think you need a full platform since it's mostly database stuff, so design a good backend architecture, using some database abstraction layer so you can switch databases easily.
Here are some things that I have learned from this web app:
1) use MVC on the front-end. It's a good design pattern for a reason
2) make the app RESTful. I didn't start out with this, but then had to make a major design change to add needed features and this has been wonderful. Users can use the browsers forward and back buttons and URL's can be bookmarked/emailed and the app will know exactly what should be displayed.
3) learn to use firebug
4) add the following debug information to app in the beginning
a) When the frontend requests data, send the data and the SQL statement back to the frontend if debug is turned on.
b) Log the errors and queries in the database ( When in production mode and debug is turned off, users will have problems and you can look at the error log (table) and see what was going on, by using the database you can search the error log easily
c) my app needs to email people when certain conditions are met, this takes a lot of time ( seconds instead of tenths of a second ), so make email asynchronous, so the app feels snappy.
5) put a waiting (retrieving information) dialog box up whenever the app is waiting on the backend. Hopefully most of the time it disappears so quick the user doesn't notice, but when there is the occasional network lag, the user knows what is going on, instead of thinking the app is unresponsive.
Relax, PHP Taliban. It's a joke.
Sort of.
Never shake hands with a man you meet in a fertility clinic.
First, I should state that it's really not about the language, it's about the coder. You can build great and crappy things with any language. And every language has it's warts.
That said, the best language I've used in the past 20 years of programming has got to be Modern Perl. Not the chicken scratch Perl you saw 5 or 10 years ago, but Modern Perl. Here are some of the strengths of modern Perl:
It's object system: https://metacpan.org/module/Moose
It's web frameworks, especially Dancer: https://metacpan.org/module/Dancer
It's ORM: https://metacpan.org/module/DBIx::Class
It's package installer: https://metacpan.org/module/App::cpanminus
And so much more. Do yourself a favor and at least have a look at Perl.
Something like node.js, narwhal with wsgi or ringo.js? On a really basic level, coding the front and backend in the same language has really saved my little brain quite a bit of frustration, especially when I'm using plus's to concatinate in php and dots in javascript. I work with node and know that a properly architected event driven server can be wicked fast (not just fast, but WICKED FAST!). There is quite a bit of middle ware available and why not work with mongodb in the backend to create a perfect trifecta of javascript? node is really simple to setup and test with apache bench (ab), narwhal and ringo took a bit longer for me (I was trying to run them in google apps engine though). Curious what you end up going with.
I've done professional projects with PHP and Python (Pylons specifically, with Mako for templates and SQLAlchemy as ORM; and a few small projects with web.py)
After a couple of years with Python, every week or two I'm still learning a wonderful new thing that makes me smile and makes life easier.
After a couple of years with PHP, every day (sometimes several times per day) I'm finding some bug, design flaw, or general retardation in the standard libraries that makes me want to simultaneously cry and punch a PHP developer. Taking a look down my commit logs for the past week:
6 WTFs and it's only Tuesday. This in addition to all the regular and well-known retardations, like how they thought it was a good idea to automatically escape all input data assuming that it would be inserted into a mysql database - but they escaped it in a broken way, so even if you did want to insert it into a mysql database you'd need to un-escape it and then re-escape it properly (remembering to use mysql_real_escape_string, because mysql_escape_string is buggy and insecure. Not that anyone should be building SQL strings by hand anyway...)
The one and only positive thing I have to say about PHP is that it has a low barrier to entry; any monkey can take your code and install it on their cheapo shared web host, and do simple modifications for themselves.
I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
I've written a large web app that uses PHP on the backend (currently using MySQL, but by using a abstraction layer it can be switched to any major database), and javascript on the front end. This has proved to be one of the best decisions I could have made when starting this project 2 years ago. Browser javascript engines are being constantly upgraded and the web app, which was responsive to start with, is faster now on the same hardware. As far as a front-end platform I really like YUI. It has good documentation, an active user community, and a BSD license. For the backend, I don't think you need a full platform since it's mostly database stuff, so design a good backend architecture, using some database abstraction layer so you can switch databases easily. Here are some things that I have learned from this web app: 1) use MVC on the front-end. It's a good design pattern for a reason 2) make the app RESTful. I didn't start out with this, but then had to make a major design change to add needed features and this has been wonderful. Users can use the browsers forward and back buttons and URL's can be bookmarked/emailed and the app will know exactly what should be displayed. 3) learn to use firebug 4) add the following debug information to app in the beginning a) When the frontend requests data, send the data and the SQL statement back to the frontend if debug is turned on. b) Log the errors and queries in the database ( When in production mode and debug is turned off, users will have problems and you can look at the error log (table) and see what was going on, by using the database you can search the error log easily c) my app needs to email people when certain conditions are met, this takes a lot of time ( seconds instead of tenths of a second ), so make email asynchronous, so the app feels snappy. 5) put a waiting (retrieving information) dialog box up whenever the app is waiting on the backend. Hopefully most of the time it disappears so quick the user doesn't notice, but when there is the occasional network lag, the user knows what is going on, instead of thinking the app is unresponsive.
Seriously, anyone who 'develops' in PHP can't call themselves a programmer. It's a simple, half-assed scripting language for simple people. If you can't code websites in Assembly then you don't deserve a computer.
You can develop ASP.Net easily enough using MS's free "Express" studio and SQL offerings (I do). Obviously hosting completed sites is another story (but in my case - working contracts - that's not my problem), but you can be a small web developer without coughing up MS licence fees that way.
If you don't risk failure you don't risk success.
Raw PHP makes it far too easy to just throw something together and have it work, for today at least. Be sure to use a framework that encourages better behaviour. Markup and code should never be in the same file — user interface should be kept far, far away from application logic.
I recently returned to web development after a hiatus of a few years and I have been loving Perl Dancer, which is inspired by Ruby Sinatra. http://perldancer.org/ ... it's a very lightweight framework that just gets out of your way and doesn't prescribe any particular way of doing things. I had a whole pile of back-end application logic set up before I started on the web front-end, and Dancer allowed me to keep that separated from the web logic, and the user interface separated from both, very cleanly.
It's to the point where I can work on application logic and web behaviours in the same sandbox, and check in one or the other very easily, because the two parts of the system don't overlap in any files. A very good sign when I'm not even asking much of the source code management system!
-- Tom Rathborne
ASP.NET or JAVA EE are all perfectly fine and their real advantage in Enterprise development is the ability to find good Professional Software Developers.
PHP as a language is a personal preference... However many of the PHP Developers do not do too much Enterprise coding so PHP code tends to be sloppy. While ASP.NET or JAVA EE Code seems to be written in more of a professional way.
You can write good PHP Code that does everything that ASP.NET or JAVA EE does and it may even be better and faster. However the people who tend to write PHP do not code thinking of enterprise teer development
If something is so important that you feel the need to post it on the internet... It probably isn't that important.
Why not use it? You aren't going to find any platform that doesn't have haters. Every platform also has some kind of poster child high visibility large scale application that's implemented using it. PHP seems perfectly capable of anything. You already know it. You like it. Without doing anything, you are months farther down the road than you would be by picking the platform du jour.
In the end, nobody really cares about what's on your server. If you want to tout a platform that is trendy, just talk about how HTML5y your site is.
From the sounds of things your .NET shop is doing everything horribly, horribly wrong. 'Everything is DataSets'? WTF? Maybe if you're stuck maintaing an ancient classic ASP webapp this might be true, but if you're using a vaguely modern version of the ASP.NET MVC framework then you should seriously consider working elsewhere as your developers are fucking idiots.
So, you have a couple options, each with plusses and minuses:
1) PHP, with Zend or Cake (or some other framework). PHP is not the fastest executing, but it's easy to learn, easy to find developers for if your project grows, and is perfectly functional for front and back end coding. I strongly recommend going with Zend or Cake. There's a steeper learning curve, because you'll have to pick up some OO principles, but 5 years down the line when someone is maintaining your codebase, they will curse your ineptitude slightly less. Even if that person is you.
2) Railo with ColdBox. Railo compiles its code to Java Bytecode, and is extremely efficient. It's blazingly fast compared to PHP, still relatively easy to learn, and with the ColdBox framework, you'll still end up with some pretty clean, maintainable code at the end of it all. You have to run it on a Java Servlet Container though, which will have a large server footprint, and carries along with it some higher priced dependencies than just a simple LAMP setup.
3) Python with Django: Dead simple to get a development environment up, very fun language to code in. A lot of support in the open source community. Python/Django is a very popular choice. Just about any outside communication you want to undertake is well supported in Python, with native libraries often available from the API providers. Moving from PHP to Python may be a bit tricky though, and some people don't like the fact that Python is "whitespace sensitive", so the formatting of your code is very specific.
4) Ruby and Rails: A TON of support in the Open Source world. Very Sexy, though less so than it was 2-3 years ago. Very easy to code in and update. However, there are downsides: Ruby people are in demand, so hiring extra developers will be expensive, and the Rails framework itself is constantly in flux. Just looking at the last 5 years, Rails is very different today than it was then.
5) Microsoft Stack: ASP.Net MVC, Visual Studio, SQL Server, IIS. Look, a ton of people hate on Microsoft, but honestly, if you buy their stack top to bottom, a ton of stuff "just works". Building a simple app on MS Servers, with MS tools, in MS's recommended style can be done in no time flat. However, deviate from their master plan just a bit, and watch your house of cards fall apart. Want to run ASP.Net on a linux server? Mono is missing huge chunks of functionality. You'll probably have to re-write your app. Want to Connect to a MySQL or Oracle Database? Suddenly Entity Framework breaks down, and you're back to writing SQL in DAOs if you're lucky. Don't want to pay the $1200 license for Visual Studio? Sure you can try using MonoDevelop, but it'll take you 3 times as long to code your app, and any tutorial or blog posts you read you'll have to put through the "mental translation" of Visual Studio to MonoDevelop. Oh, and that's leaving aside the cost. Potentially tens of thousands of dollars sunk into the stack just for the software, not to mention the hardware that runs it.
Zend Framework not only provides a great framework in terms of programming, but also as a learning guide. Zend Framework helps provide everything that is described above. Using the source as a reference, it helps develop good programming habits and understand proper design patterns.
interactive hologram, or it didn't happen.
I'd recommend Mojolicious - a fantastic web application framework. For most functionality that's not provided, you can find a CPAN module...
Switch from PHP to Perl and you won't go back!
when i hear the word Enterprise I keep thinking of Star Trek, not computer software/platforms. Seriously.
anyone tried JSP? I think a few websites run JSP
oh, and someone mentioned running ASP.net on Linux/Unix. I guess a Linux or Unix user would need a Windows computer to develop (write code) for the ASP.net website and database. I wonder if the programmer could use mono to compile a website compiled with C# or VB.net.
If your goal is to develop a website, then use what you know: PHP.
If your goal is to learn a new web stack, then choose one that you will give you the most value for learning. Perhaps you want to use it professionally. Perhaps you want to use it for more websites. There are perhaps a dozen decent choices, but only you know which one might give you the most use.
If you wanted to post some requirements, I'm sure you could get some helpful answers. But with no requirements, this is the best that anybody will be able to tell you.
They don't grade fathers, but if your daughter's a stripper, you fucked up. --Chris Rock
Use xforms. Use Orbeon or Chiba to translate xforms into html/ajax. Hopefully someday browsers will support xforms directly, and you'll be ahead of the curve.
One language and code base for server & client: see www.haxe.org
Forget language/framework selection at this point, you need to define your requirements. After that, you can start eliminating possible solutions. That will leave you with a smaller subset for more detailed research.
* DB size
* TPM
* Transaction sizes
* Pages/sec expected
* Page size (including all those JS, CSS, IMG files)
* Ave Page size
* Available infrastructure, if any.
* Budget limits (HW, SW, Hosting, Developers)
* Security demands (SSO or OpenID or something else?)
* Client browser support needs
** Desktops only
** Smartphones
** Feature phones
** Tablets
* Protocol support
** HTTP
** HTTPS
** XML
** JSON
* Complexity
* Reverse proxy and/or load balancer requirements
* Desired OS platform
* 3rd party affiliate support
* 3rd party content delivery
* Payment affiliates
Different solutions will support these requirements at different performance levels and price points.
Security professionals don't like PHP for a number of reasons, real or imagined. Personally, I avoid using PHP on public internet services due to a poor track record of patches and that the average PHP developer is a rank noob when compared with the average Perl developer.
I prefer Python over Php, but that's mainly a language choice - Python is a general purpose language. How many desktop php apps have you ever seen? Do you want to become expert in 2 languages when 1 as an expert and another as a familiar is all you need?
For simple web apps, I've been using Perl with Dancer as the framework. When/if my apps outgrow Dancer's capabilities, I'll migrate to Catalyst. Perl doesn't force anything, so you can always drop outside the framework. That's part of the Perl way. OTOH, if you want to find cheap labor to help with your project, Perl isn't as sexy, so php or python could be better choices - from that perspective.
There were recent issues publicized related to handling of some commonly used web-app. Ruby, Python, and Php were all impacted. Perl was not. Any of those impacted languages will need an update and the apps using them will need an update to close that hole. Just another consideration.
Don't make the same mistake that the Twitter guys made in choosing Ruby. I love ruby as a language, but it still has scalability issues. Rails doesn't like it when you don't do it the "rails" way either.
Regardless of the final solution, start with the requirements.
If you write your program as a "FastCGI" process it's running as a normal process that accepts tasks one at a time from the web server and sends the results back for the webserver to forward to the client. Your process keeps running so you don't have the overhead of continually restarting your web program that you get with plain CGI.
It is, in theory, possible to have a FastCGI server using a shell script. But pointless because FastCGI is supposed to be used to eliminate cost of starting of processes. Otherwise any language that makes normal executable program can be used, if a library exists or you write something following the (pretty simple) documentation, but for really limited languages you may need a wrapper.
Once you're writing your own persistent program in your own choice of language to service the requests the rest is supposed to be easy. :-)
Based on responses from 2052 people : http://therighttool.hammerprinciple.com/statements/i-would-use-this-language-for-a-web-project
For a new project, I would personally either go for Python or JS based web app - try NodeJS with RailwayJS or Web2Py if you are still learning python.
There are a lot of good web frameworks out there. Some might be better suited for your skills and project, but its hard to say without more details. Coming from PHP, I have a feeling you'll really enjoy Rails or Django. I'm also partial to Grails, which is similar Rails, but based on Groovy/Java.
A good place to hang out to learn more is Hacker News (http://news.ycombinator.org/news).
Grails is a web application framework for Groovy, a new-ish (8 years?) language that runs in the JVM and is 99.99% compatible with java.
Grails itself borrows the good stuff from Ruby on Rails, like convention over configuration. It's a springsource project that uses other springsource resources, like Spring Security and Spring MVC. The first time your build or parse XML/Json using Groovy you will fall in love. Database access is similarly easy using GORM (Grails Object Relational Mapping) which is built on top of hibernate (but without any XML configuration).
Based on responses from 2052 people : http://therighttool.hammerprinciple.com/statements/i-would-use-this-language-for-a-web-project -- I would either go for NodeJS with RailwayJS or Python with Web2py.
Negotiate Before You Buy
Each PHP release is better than the one before it, and it's getting close to being much like a "normal" language.
Close. It's not there yet, and probably never will be, due to compatibility requirements.
You can pretty much do anything in PHP you want, but the bigger your project gets, the more you're going to run into its weirdnesses. I don't have a list to enumerate for you, but please believe me, I run into "Holy shit, I don't believe this" language oddities every couple months, where PHP does something just plain weird and wrong compared everything else. After nearly 5 years maintaining some PHP code, I still get surprised once in a while.
Another thing to look out for is that PHP versions deployed on various web providers vary, so when someone says PHP 5.3 fixed something that had been totally fucked-up-beyond-belief in the language before that, they might be right, but are you sure you're going to be using 5.3?
Just look at the release notes to get some idea how bad things have been. I'm not saying that's a fair way to judge the state of the language as of the latest release, but when you see quotations from the past (as recently a just 2 years ago) about how great PHP is, and realize just how horrible PHP definitely was at the time the person said that, you'll realize that most PHP recommendations need to be taken with a shovelful of skepticism.
That said, if you inherit and have to maintain a PHP project, I wouldn't worry too much about it. Your brain will eventually get used to all the damn dollar signs in the variable names, you will be able to get your job done. I've never been in a position where I could say "It's not my fault, PHP just can't do it" because it always can. There's always a way around PHP's problems and it has never stopped me from accomplishing a goal, but you are going to occasionally be expending more effort than programmers who use normal languages.
Don't spread it. Don't start new projects in PHP, both for your own sake in case the project grows, and for the sake of whoever comes after you. There are plenty of not-broken languages out there.
As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
Java + Google Web Toolkit
GWT makes it relatively easy to write user interfaces, leaving coder to focus on site functionality. It has good performance. I find it little hard to code tough, but I'm not real programmer and lack the experience. I would be happy to hear why this is not considered as an option, sense I was going to learn it next.
Having just finished a non-trivial project using Java EE 6, I'm very pleasantly surprised at how far things have progressed in the Java world.
I used:
* Glassfish (app server)
* JPA 2 (EclipseLink)
* JSF 2 (Mojarra)
* EJB 3.1
* PrimeFaces (excellent JSF toolkit)
* Selenium/JUnit/Maven, etc.
* Java 6+
Java EE 6 completes the job started in Java EE 5, which is essentially ... re-do everything using the best practices developed in the last 10 years, learning from everyone's new ideas and jettison'ing the old. Convention over configuration, annotations, streamlining ... all decent throughout.
Standard Java EE is now very robust, speeds development, assures safety, and aids test-driven development.
I also think this particular stack will hang around for a good number of years, if not decades. They finally got it right.
I've got nothing against the merits expressed here for using django for php, or even python, but I use Drupal professionally for many years and here's my points for using it.
There is using php, and then again there is using an open-source framework/api like Drupal. Just like you can write your own javascript, or instead learn to use jQuery for much greater efficiency and power. Except not only is the well-travelled road made smooth for you, but you get your own security team as a result of using Drupal, and you need that. Just use best practices and learn to apply updates to stay fresh; sort of like windowsupdate.
Authentication, roles, permissions etc. Why write your own and reinvent the wheel, even if you just bought a nice book that says you can?
Jobs. Seriously go look, on www.dice.com, www.authenticjobs.com You might start with a little website now, but like learning to develop a little something in linux, the sky is the limit. The Documentum corporation (for example) is not going to deny access of their 'advanced' software to you, and you will not be denied whatever documentation exists either. Jump in! Compared to wordpress this is wonderful. Name some big budget wordpress projects, because I'd like to know about them. I'll list a few Drupal projects here:
Sony/BMG (artist sites, movie sites, etc.)
Warner Bros
whitehouse.gov
congress.gov
economist.com
onion.com
nasa.tv (actually I think they broke the URL for that)
aol and yahoo have used it for their corporate and research sites respectively (research.yahoo.com)
and many, many more
You can't be ahead of the curve, if you're stuck in a loop.
First, I should state that it's really not about the language, it's about the coder. You can build great and crappy things with any language. And every language has it's warts. That said, the best language I've used in the past 20 years of programming has got to be Modern Perl. Not the chicken scratch Perl you saw 5 or 10 years ago, but Modern Perl. Here are some of the strengths of modern Perl: {SNIP} And so much more. Do yourself a favor and at least have a look at Perl.
In have been working with Perl5 for the past decade.... What exactly is Modern Perl? Is it perl6? Is perl6 out yet? How easy is deployment to unix and windows machines? For windows can I provide a self contained Executable or do I need to provide a list of instructions on how to install perl, how to download from cpan etc? How is the support on the shared accounts renting for $5/m? Does the default perl installation bundle all the modules you have mentioned?
To Share Is To care
I prefer the Lisp way. Hunchentoot on SBCL Lisp and hooked up to a Postgresql database through the postmodern interface.
The whole thing runs excellent on Linux and You can download are all sorts of nifty packages available to simplify Lisp web development.
If the load becomes too heavy then stick an Apache server in front to handle the static stuff and SSL.
TCAP-Abort
I use PHP (and the great Symfony framework) for small or mid-size projects, but for enterprise class stuff I use Java. One of the main reasons (yet not the only one) is performance, but I acknowledge it's more of a personal prejudice. How is it going now? any reliable benchmark out there to support my preferences?
Open Source Network Inventory for the masses! Kuwaiba
PHP itself is a fine language and allows you to write something very quickly without structure. That being said, like any language, it would be good to get into the habit of designing something first and then implementing it in a structured way. This is true of anything - C, C++, Java. The Object Oriented system within PHP5 and above is fine, and appears to be a rip-off from the Java design, which makes it quite simple but very useful.
I would recommend avoiding frameworks for PHP. You will end up learning the framework, not the language. It would make more sense to build a core library of classes and functions that you use frequently and reuse them. When something breaks, you'll know why because you wrote it and won't have to get bogged down in getting used to someone else's coding style, naming conventions and clever/obtuse/bad coding.
There is a lot of bad PHP code out there, but the same is true of many other languages, probably least of all C++ because nobody bothers learning it. A shame, as that too is a good language and is an excellent choice for desktop software given a decent GUI library, such as wxWidgets. If you're intending to make money from software you write, ensure that you choose BSD-style licenced stuff and avoid GPL and perhaps LGPL, depending on whether you're deriving the work or writing a library. PHP tends to get a bad press from fans of Java and the monks of Perl and Python, although I personally do not see why. Each of those languages is fine in some situations, the same as PHP is fine on a web server.
For hosting, you'll find many hosts offering the typical LAMP stack. Although some databases such as PostgreSQL are nicer to work with in some instances, for 90% of the simple websites you'll find, MySQL is fine too but you might run into some headaches with it. There are workarounds though (such as creating triggers instead of using check constraints, as MySQL doesn't support check constraints).
You will find PHP easier to read than Perl. For client-side stuff, you might like to look at Javascript libraries such as jQuery for fancy animations and AJAX requests. Read up on DOM and find ways of manipulating a static web page using Javascript before rushing into jQuery, as you'll end up learning frameworks instead of libraries and then be stuck when things break and you won't know why as you didn't learn the language.
Get into your head that the Internet (and specifically dynamic websites) are just giant text generation machines. Take a request, work out what the user wants, grab some data from a database, and wrap it in XHTML, or generate XML and wrap it in XSL. The step to web services just involves not wrapping it in XHTML but returning JSON or XML instead.
Read up on the very simple HTTP protocol. If you are coming from a desktop application development background, get it into your head that HTTP is stateless and unlike desktop apps where you might rely on a client-side dataset of data you've retrieved from a database, do modifications on it and then sync it back, dynamic sites generally are atomic. Even with AJAX, you will be fetching the data, displaying it, and sending back modifications without the concept of logically and deliberately storing a client-side cache.
Give yourself sample problems to solve. Don't wait for someone to ask you to write something because you will run out of time and won't be driven.
I've been working as a professional php developer for 5 years now. I do enjoy writing code in php. It was very easy for me to learn php coming from a C background since the syntax is very similar. There are certain issues with php but I believe this can be said about any programming language. One of my largest complaints is the lack of consistency with the ordering of parameters for string functions. I pretty frequently have to check the docs to make sure that I am using them in the proper order. This could easy be solved with writing your own string class or writing wrapper functions for php's built in functions.
The company I work for uses the Zend Framework for development. I did a lot of research at the time we started using it and made this recommendation myself. I like how the components are loosely coupled, meaning you aren't tied into any particular way of doing things. I find the Zend community rather helpful also. I've pretty much always been able to get help when I've needed.
I might recommend looking into python if you are starting completely fresh. I really love the language over all. It is truly object oriented and overall I feel like I do a lot less typing. But with php you will be able to find a lot more libraries and help if needed.
I also highly recommend using postgresql over mysql. There are so many reason that I wont even get into it. But let's put it this way: postgresql is a real database and once you get used to it mysql feels like some micky mouse bullshit.
Good luck.
If you are coding for yourself, and you are productive and have fun using PHP, go for it, don't worry about what other people say about the language. If you are going to hand it off to someone else, later, you need to be cognizant of how hard it is to find coders for your language of choice. I personally like picking up new programming languages, they affect the way I approach any programming task. My usual thing is to write a web-app in the new language. That being said, if I just have to get something working, and working well, I will go with what I already know well, if I can, or with what the environment requires, if I don't have a choice. Where I work, the choice is Java or Java.
I personally enjoy using Django (Python) for any complicated websites- Python is such a pretty language, very easy to learn the basics, and is great for rapid development. It's a strict language (which people coming from a Perl or PHP background might not like) but it rocks.
For smaller applications I enjoy using CherryPy (Again, Python) as the server (and back end logic and actual serving), and just use JQUERY (and ajax) for any any dynamic content-- completely forgoing any template language (although whenever I have to use one, naturally I go with Jinja 2 since it's template syntax is very similar to Django's template language).
Also Django has a wonderful community that is just the right size.
If you like php, use it.
Theres a simple quote who's origins i forget (think it was bjarne stroustrup) that goes "there are those languages that people complain about, and those that people dont use".
Sadly, the more people who use language, the more you generate hate, and php is one of the most widely used in existence.
PHP has alot going for it:
- its an elegant language
- its quite quick to write almost anything in
- its generally quite fast
- theres bucket loads of people using it, so finding solutions to problems is easy
- lots of different frameworks if you need them
- tonnes of api support.
- almost every web host supports it.
- the number of people using it generally just helps the code base, bugs get found and dealt with, etc etc etc.
The only reason to switch to another language comes down to the goals your trying to achieve, which aren't really stated. Generally speaking you could achieve any type of web content in any language to an extent. There are few languages that have the support for api's that php does, thats for sure. Perl is probably the only one that beats it in terms of "i want to connect to from my web code".
But it depends also on what you had in mind in terms of switching to.
- Java is a reasonably nice language, very well supported (by vendors) and scales well, but requires significant development time and quite a decent amount of grunt - forces you to abstract your work ad infinitum but sometimes thats a good thing. Lots of different api's, though mileage varies greatly.
- Dot-net i personally find to be somewhat on the buggy side, but again, well supported and well used - often forces you down an MVC framework path, which i dont like.
- Python's probably a better language generally, but for web coding, you get caught up in the basics with python around choosing frameworks and so forth and later if you find the framework you choose wasnt that great, then its re-code time cause frameworks generally dont have easy migration options. My main annoyance with python is that learning python tends to diverge a fair bit from helping you with other languages (i.e. learning python wont help you with c/c#/c++/java/etc).
- Ruby has similar traits to python - you get caught up in the frameworks, the language is nice but doesn't translate easily to other languages.
There are other options, but personally, stick with the top three if its your first coding exercise for content - php, java, dot.net
All my web projects are now use mojolicous. It's a great platform to develop on and easy to get started. And make sure to try the websocket and events support. Very fun stuff.
Or, here are some interesting alternatives.
you had me at #!
I suggest your whole team takes some course on software architecture and design patterns. Contrary to what you say, .Net does not encourage that - you people simply don't know what you're doing. If you write that kind of crap in .Net I'd hate to see your PHP code.
AccountKiller
At least were suitable, Drupal seems to be an excellent choice.
We've been exposed to the excellent tutorial videos by Lullabot,
and impressed by the extendable capabilities of Drupal.
Drupal seems a bit like Android: You start with a functionality core
and add modules (analogous to app's) to expand from there.
Interconnection & integration can be built into added modules,
so, there's lots less time needed for designing & implementing
"infrastructure"... leaving more time to explore & design inno-
vative features for the target system to provide.
I'd suggest that Drupal would be the choice for those, who
do not want to be held under the thumb of their developers,
at least, once there are enough Drupal developers around
to meet all the needs - both current & future.
I've been slowly learning Ruby on Rails. Seems alright.
No matter what you choose, there will be somebody who tells you it's a stupid solution. The most important thing is making sure it's not *you* who realizes it's a stupid solution in a short amount of time.
I recently had to make a similar decision myself, having done everything in Perl for years and years, and knowing that on my new project I will likely want to had it off to have somebody else develop, if it takes off. I had to ask myself some honest questions about not only what I wanted to write it in (which is relevant, certainly), but also what kinds of resources would be readily available in the job market (or even the volunteer or partner market).
Whether you're considering PHP, Perl, Rails, ASP.NET, Java, Python, or anything else... there will be those who want to say "It's a framework, stupid!" or "It's a language, stupid!", and will want to belittle languages they hate and promote languages they love. The truth is that we live in a time of many choices, which is a great thing. It's good that you're examining the pros and cons. I'm just not sure how much of an answer the Slashdot community is going to be able to provide :)
I strongly second this, and mention frameworks like Catalyst and Mojo. I'd also mention PSGI/Plack middleware as a having a lot to offer. The Padre IDE is not too bad either.
"Modern Perl" is, as I understand it, basically Perl 5 (preferably 5.10+) using more modern syntax and best of breed CPAN modules. I believe the book "Best Perl Practices" started the ball rolling, and the Moose object system is really excellent.
The blog modernperlbooks.com goes into a lot more detail into what constitutes "Modern Perl".
For Windows you might want to checkout "Strawberry Perl" which at least makes getting Perl and a big chunk of CPAN a lot easier.
Rather than argue about inane language versus framework flames, I would recommend the article writer consider a Python based "framework" or complete Content management System (CMS) like Django framework or the Django-CMS. The advantages over any Microsoft based technologies are that
(a) one is not tied into using Microsoft IIS HTTP server and all the other large, clumsy and expensive tools like SQL Server, Sharepoint Server, and other Dot.Net baggage.
(b) The main advantages accrue to much greater security, better scalability/performance and (indirectly) reliability, since the developer can use Linux/UNIX foundation rather being stuck with MS Server. No comparisons, at least by independent, respected and knowledgeable testing/evaluation prganizations. Or just check the web structure for Google, Facebook, Twitter, LinkedIn, Amazon, ABC, CBS, Fox News and almost everyone else - no Microsoft there.
JEE with Java 6 provides me virtually unlimited flexibility and much greater scalability than any of the scripting toolkits could ever dream of.
But my only experience with web site development has been on systems that have to deal with hundreds of thousands of concurrent users, if not millions during the load peaks.
Sure it's a lot more code and a lot more work to use JEE than a scripting tool, but whether that development effort is worthwhile depends on your scalability needs. Screaming about how great your favourite web tool is won't make it scale.
I have nothing but contempt for MySQL on the same basis. It's a toy database with bare-minimum functionality and not suitable for complex business applications. The fact that there are hundreds of thousands of websites built on MySQL doesn't mean that organizations like Facebook haven't realized they made a bad decision putting their eggs in that underpowered basket.
I design and develop systems with FUTURE needs in mind, not just a bare-bones implementation for the current requirements. In the long run, it saves you millions for large systems because you don't need to toss out v 1.0 and rewrite it completely to produce 2.0; instead, 2.0 is an evolution of sound decisions made in 1.0's design and tool selections.
I do not fail; I succeed at finding out what does not work.
It's because the question kind of sucks. For basic web development, any language will do just fine. Really. Pick your poison and live with the pain in the places where your particular tool isn't strong, chain different tools / languages together to take advantage of the inherent strengths / weaknesses, and move on. Really there isn't any inherent problem with PHP, or ASP or Ruby or Python or Java (EE6). There are things that rock and things that suck about each and every language and framework out there. I had the misfortune of inheriting a PHP application (SaaS) which utilized extensive cURL calls and pcntl_fork to try to pull off a multithreaded concurrent PHP app. The problem was, none of it was reliable.. at all. Sure some of it came down to some bad design decisions which I was never a part of, but I've been working with PHP on and off for the last 13 years and in my opinion the real problem was that it wasn't really the right tool for THIS job or at least this part of the job. The biggest issue is they were trying to get it to do something that it really isn't good at namely concurrency and IPC. Yes, I know about semaphores and shared memory segments in PHP. Yes I know it's possible. I'm trying to say however possible, it's far from elegant. Especially compared to something like EE6. For a lot of things, PHP rocks. For this particular application, it was a nightmare.
Play-framework is a JVM web framework which works with both Java and Scala. It reminds me a lot of RoR and Django, with additional benefits, such as:
I've been using this in production for 9 months now and haven't looked back. The community support on the Scala side (IRC, Twitter, Stack Overflow) has also been friendly and responsive.
Censorship is obscene. Patriotism is bigotry. Faith is a vice. Slashdot 2.0 sucks.
Skimming the posts above, I am astounded that so few slashdotters recommend node.js. Where on the Internet is the node crowd lounging?
This is the best way to produce highly scalable web applications.
Languages:
PHP
The only widespread domain-specific language in existance. It's a strange combination of domain-specific and 'basic-anchestor' for the simple fact that it grew paralell to the web and was the first to be 'not Perl but on Apache, as in mod_php' and easy to pick up for n00bs. It started as a Perl templating engine - which shows to this very day - and has since turned into the prime got-to language for serverside web development. And for good reasons too. In recent years it has started to bit measurable chunks out of the Java space aswell, and ever since virtualisation, cheap hardware, PHP 5.3 and Facebook growing past 0.5 billion active users the last of the 'PHP doesn't scale' crowd have shut up aswell.
It has by far the largest set of mature and seasoned web development and WCMS toolkits available, and the largest set of projects based on it that are still in high activity development and maintainance. If in doubt, chose PHP. The syntax is a weedy mix of Perl, C++ and other middle-ages semicolon languages, it has some very strange and bizar purpose-built integrated functions for web-stuff, but it gets the job done, and does that well. It has a community that doesn't have its head up its ass, like the Ruby guys (see below). Very n00b friendly and modest. Thus its popularity.
Python
My favourite language, although I do my webstuff in PHP (see above for the reasons about that). Clean, modern syntax, all the goodies of Perl and PHP minus the syntax suckage. Only a handfull of webkits and appservers in active development, but all of those are top-of-the-line. All in all, it's a better choice than PHP, popularity aside. Which is a bit of a shame. If you like Pythons syntax, use it for your webstuff and join one of the larger Python webkit projekts to spread the love. You'll be making the world a better place and the community will thank you for it.
Ruby :-)
This is a tricky one. Neat language, with the one or other issue still to nitpick at, due to the fact that Rubys runtime coreteam isn't nearly as big as Pythons or PHPs. If you like it, you maybe want to look into it. The biggest problem with Ruby is its community, as the Ruby fans think they inventent web frameworks when they came up with Ruby on Rails and showed it to the Java guys. My encounters showed lots of un-sympathetic academic dick-waving here and tons of raving of how awesome web-dev has become with RubyOnRails, the Ruby persons go-to webkit. You have to hand it to the rails guys / 37signals though, they pratically invented show-case/off screencasts and FOSS websites that don't look like shit. Ever since Rails appeared, no toolkit or community can afford to have crappy websites anymore. An effect for which I personally am grateful. They also made webkits and easy script based webdev know beyond the PHP and Python community. If you like the Ruby syntax and are into PragProg Books about any subject on Rails, this might be your thing. Ruby and RubyOnRails go together though, that's basically what you buy into. Just don't mention Mojave or Zope around those guys or show them any of the countless mature PHP projects they'll either start crying or snap in to a tantrum, foaming at the mouth, raving on about how unbelievably awesome Rails and how professional and PHP is insecure by design and doesn't scale so on. Just *shhh*, mums the word. Or mention Facebook when the 'doesn't scale' thing comes up, but step back a little before doing that.
Java
The FOSS Java community has since seen the light and has come up with its own small and neat set of usable webkits. If you chose Java, look into the wicket web framework. Appears to be the least scary of Java toolkits. I don't like Java and I don't like Oracle, but that's just me. You may have other priorities.
Perl
Neat old-school language, but I wouldn't bother. PHP came out of Perl to take care of the web domain. Which is precisely what happend. If you know Perl and like it, look for Perl webki
We suffer more in our imagination than in reality. - Seneca
When the code starts to get (really) complex, it gets hard to keep track of errors coming up. In a compiled, statically typed language the extra nagging from the compiler really really pays off, as you know EXACTLY what the problem is and where to expect one. Then the debugging really comes down to hunting nulls and what-if scenarios. In PHP you basically have to keep track of almost everything having the right type etc.
I grew up as a Java person (even got meself the SCJP) and I then had to cope with PHP on my work enviroment. I came to appreciate how you can do a lot of things really quickly, but now I spend my time hunting for errors that start appearing once the code passes a certain level of complexity (even though I did take care to design things in a proper OO manner). It's simply hard to keep track of things.
Object orientation kinda sucks in PHP, btw and I have yet to come up with a viable solution to the "include" mess. In Java you have your packages and subpackages in specific folders. You add the right dir in the classpath and you're sorted. In PHP... most things are relevant to the location of the entry file. And packages... basically don't exist.
Coming to which... I'm now trying to squeeze my way into J2EE... it's the "right" way for anything large scale but it's a bit daunting to begin with. And that's what's kept me so far from delving into it.
Then I hear a lot of good things about the ZK framework, which I'm currently looking into and it seems quite promising. So, from what I've seen so far it looks like a technology well worth investing into.
I'm no longer fed up with MS Windows: I go rid of them
If you go with ASP.NET use the new MVC platform. Don't use WebForms. In WebForms you will inevitably be tempted to code as if you were on the desktop. Don't do it! The page life cycle of WebForms tries to mimic an event driven pattern like on the desktop. While you can avoid the dual curse of postbacks and viewstate you have to work to do it. Use jQuery/AJAX and ASP.NET MVC.
?php
I would suggest developing into a nice OOP PHP 5.3 and use a newer framework like Fuel, Code Igniter, or Zend Framework 2.0, OR if you're developing something similar to a blog engine, Habari is shaping up nicely.
I would avoid using Drupal, Mambo or Joomla; the top 3 reasons why people hate PHP so much and for good reason. PHP 4 was pretty bad and, as was mentioned above, their architecture forced bad programming habits. PHPBB and PHPNuke should be shot like the dead horses they are. But these are all the CMS's people tried to use a framework over the years... so a lot of what you read out there is now so old, it's silly. Like a lot of the grudges against PHP in this thread.
I love PHP more and more with every release since 5.0 and I have become convinced that those people who dislike it should at least give it another go now that it has namespacing, interfaces and lazyloading. 3 features I have yet to hear anyone above mention. Personally, I think they're all holding a 4 year old grudge and it only persists out of ignorance. I would challenge them to break that grudge and give it another go.
FTR: I've worked with ASP, C#, RUBY, Python, PERL, C++, JAVA. Heck, I've even coded in Pascal (incl. Turbo), Machine and Assembly.
I would recommend going with PHP today *for a web app* with the suggestion of avoiding any library licensed with GPL v3 - Go with a MIT license instead. I would also make sure it's minimum requirement is PHP 5.x If it says it will run on PHP 4, run away.
On that note, if you go with MySQL for your database be sure to use InnoDB. But that's a whole 'nother askSlashdot isn't it?
Make it either full blown EJB/JavaEE, or something lightweight, it's up to you. Depending on how many features you need, the learning curve might be a bit steep, but you get:
* Loads of features. Distributed caching, distributed transactions, webservices, messaging, clustering, high availability, OR mapping, database support, security, AJAX interactive webapps, you name it.
* Choice of free/open source servers and frameworks.
* High performance if you don't do something brain damaged.
* LOTS of open source frameworks and libraries to do pretty much anything.
* Cross platform.
* Mature and proven- used in 1000s of applications all over the world.
It's not without its drawbacks. It's not that easy to learn or to get things right. Although learning to work in enterprise Java is still quicker and better than writing your own half-backed implementations of some features provided as standard in JavaEE that are not readily available elsewhere. Hosting might not be as cheap as PHP. Getting application actually written might take a bit longer than PHP or Ruby. Getting everything set up migth be a bit tedious as well. Sometimes there are several libraries or frameworks or servers doing the same thing and chosing right one is tricky. IDEs (eclipse/netbeans) are slow-ish and sometimes buggy. Java serverside APPs take a while to start up- so compile/deploy/build cycle isn't as quick as with other languages/frameworks.
--Coder
I do a modest amount of work in PHP. I found PHP to be basically what I was looking for due to a couple of reasons: 1 - free to use and develop with, 2 - readily accessible free examples for learning, 3 - it wasn't an MS product, 4 - it's available and supported on almost every web service provider, 5 - very robust in development.
I use Java as my language of choice (because I know it and there are tons of libraries available.)
For web sites that are use by people, I use Apache Tapestry 5 as the web framework. It's very easy to use, integrates with Hibernate, is very fast and makes me very productive. I find that I can write nice looking pages that work well in a very short amount of time. I end up writing very little actual code, so maintenance is easy. Live class reloading is a major plus, I just edit my page or Java class, hit save and the changes are ready to be used in my browser.
However, there are many other Java web frameworks to chose from based on what you like best. Java is a bit bloated, but it's pretty fast and stable. And there are libraries for almost anything. (I generate PDFs, for example, using iText and everything works very well together.)
I use Eclipse for my IDE, which while it could be faster and less bloated, seems to work pretty well.
If you want to focus entirely on web services (e.g. SOAP or REST), then there are easier solutions for that in the Java world. (I use JAXB annotations with Jersey for REST services.) For SOAP I'd use Apache CXF based on what I've read. You can integrate both of these with Tapestry and Hibernate to create a cohesive web platform.
I don't know, but it works for me.
I thought the whole idea of mono was to set you up for a Microsoft lawsuit? Microsoft files frivolous patent lawsuits all the time, and MS threatens even more than that.
I think I would steer clear of mono.
Please, please... you think facebook, of all places, is a "professional" venue? It's a big venue, but it's at the cardinal opposite end from professional. Good grief, you can't find a poorer UI, a more clueless group of users who have no idea how to use it (partly because it's poor, partly because they're clueless), or a less valuable collection of content anywhere on the net.
Hey, guess what I don't have? And don't want! A Facebook account. Did you guess? lol...
You infer, incorrectly, that I care what Facebook devs think. I don't. The site is a POS, designed for the least common denominator, very poorly put together, crippled by ridiculous policies, and reflecting the very worst of human nature from end to end in its mining of privacy and promotion of a false impression of importance driven by pseudo-popularity. And no, I don't think switching to a real development language would help at all. The problems are too broadly inherent to the idea. The poor choice of dev language is just a symptom of the LCD nature of the site itself.
I've fallen off your lawn, and I can't get up.
I'm sorry but loaded questions like these should never make it to the list because THERE IS NO ANSWER only OPINION!
Asking a question such as this is like asking what car is the best one for driving? It's subjective and only causes flame wars.
What's the "best"? Well, the "best" is the "right tool for the right job".
Find a language that suits the job (ie. does it require quick turn around and easy coding, go for a scripting language, if it requires scaling and enterprise level features then pick a language that suits), then if the language has frameworks that do what you need them to do, then select one based on those values rather than a blanket, "what's the best".
Everyone in here stating that one language is better than another should be sent to the naughty corner as they should well know by now that EVERY bloody language has it's pro's and con's.
http://www.gibby.net.au
Over the years I've developed a library of utilities to draw and manage web forms, database interaction, etc. I've translated them originally from ASP classic, to Php and ColdFusion, and to a lessor extent Dot.NET with some minor changes (applying experience as I go). The libraries work best with "scriptish" languages.
I have personal syntactic preferences*, but at the end of the day it doesn't matter that much which scriptish language I use as long as I have my trusted and time-tested libraries to use.
It may take a few days to rewrite them in a diff language if I have to work in a new shop or diff app, but it's usually worth it. And I may customize them per flavor of app.
Some claim Dot.Net is just such libraries, but the code is still about 3 times more verbose than my libraries. Microsoft automates bloat, not reduces it. My libraries read almost like pseudo-code. Plus it's hard to know what's going on under the hood with MS widgets. My libraries are relatively short and well-commented so they are easy to dissect if need be.
I don't claim to be a great library writer, only that I learn and improve along the way via the hard knocks of real-world maintenance, and take pride in the craft of improving the libraries. It's evolution, not so much intelligent design.
* Languages with powerful and flexible maps (dictionary arrays) seem to make life easier.
Table-ized A.I.
The biggest benefit to PHP is that it's easy, simple and just works. Most other platforms such as Ruby on Rails, ASP, and JSP derive from other languages such as C#, Visual Basic, Java, and Ruby that were not specifically designed for web development. PHP was designed from the ground up to build web sites.
Ruby on Rails was designed for rapid development, great if your manufacturing web sites. Java and C# can do anything, including web services but they are best suited for enterprise applications that are likely to integrate with other systems that are far more complex.
I think Steve McConnell said it best when comparing software solutions and how some projects are simple and can be built with simple tools. But if your designing and building a skyscraper you will use different tools and different expertise. http://www.codinghorror.com/blog/2007/09/steve-mcconnell-in-the-doghouse.html
The disdain you sense in some circles is the contrast from the highly experienced software engineer vs the unfortunately common PHP coder who doesn't realize how ignorant they are. To play off Steve's analogy, it would be like one saying they can design a skyscraper because they did such a great job designing their dog's house.
I was one of those arrogant PHP coders and thought I could do anything. Then I got a clue and realized that I knew nothing, as said best by Socrates. If any PHP programmers are reading this and are offended then simply ask yourself if you can name five design patterns. If you can then you are not the ignorant PHP developer I'm talking about.
PHP is a very powerful language, especially when coupled with jQuery, Zend, Yii, Cake, or many of the other frameworks. Therefor if you are not sure what language you should use then you will want to use PHP.
I am having lots of fun with Spring Roo and GWT (Google Web Toolkit). The latter is supported by the former. :-D
Roo allows to generate automatically a CRUD application with different technologies (AFAIK it currently supports GWT, Spring MVC and Web Flow). GWT allows to create single-page applications, using the server as a service and data provider only. In other words, let the browser do the hard work
Single-page applications are much faster than server-centric web applications. Security can be managed effectively at service level, for example using Spring Security annotations.
Please don't flame me, this is my opinion based on personal experience. Just as a language, I don't think PHP compares to Java. It's OK for building scripts / apps that can be characterized as "reacting to web page clicks in a simple way" but when you have very complex domains and object models it really starts to burst at the seams.
I only deal in websites that are backed by very complex domains which need to be modeled. I get that not everyone does that or should do that.
Java has well developed libraries for a huge number of deep and specialized domains which yet have very broad applicability- interesting things like Lucene and graph layout and genetics, not to mention world class graphics libraries. These are not things people program in using PHP, yet they are all interesting to web developers who are writing web-based front ends to these domains. Not all web programming is MySpace / Facebook-type programming.
It's not that somewhere somehow some PHP programmer can't - through twisting the language and it's capabilities in a perverse way attempt to implement all this- "hey,. we're all Turing complete here", it's that result would be something like what Dr. Johnson is said to have observed upon seeing a dog walk walk on it's hind quarters:
" The wonder of the thing lay not in the fact that it was done well; it is that it was done at all. "
OK so you're telling me I really have to choose one? Then I'll choose Java. Just look at the Venn diagram. The smaller PHP circle is fully enclosed by the much larger Java circle.
Let the flaming begin..
You know, there are hundreds of other languages out there for server-side work. Just check wikipedia;
http://en.wikipedia.org/wiki/Server-side_scripting
http://en.wikipedia.org/wiki/List_of_programming_languages_by_category
But the bottom line is - PHP and ASP have simply become the vanilla ice creams of the world. Are those the only good ice creams to eat? Certainly not. Of these languages, many of them have matured to a point where they can do everything - and more - than these languages. Developers focus of these two popular languages cause they think "that's where the work is" - where in reality, most of the high-paying work is in the niche languages. In addition, most client's don't even care what language you use - as long as the language can do what you want.
Take Lasso, for example. This language, once owned by Apple, has been used to make millions of dynamic web pages since the mid nineties. It's faster, more secure, has more structure and is easier to install and develop with than PHP or ASP - but, it doesn't have the popularity of the other languages. And why? Cause it's not free. The Lasso world is going crazy, with thousands of developers using it and flocking back to it, but there's not a single mention of it here.
That's because, Slashdot is no longer for the people who are looking for the new and interesting, but the things which everyone else already has found. It's not about innovation and early adoption, but is now hampered by Luddites with their open-source t-shirts and their long white beards.
I think one of the best platforms is PYTHON and Framework WEB2PY
I would use a platform I know and has a good community supporting the platform, .. so if I write something I don't write 2000 exploits in just one script, and if i eventually do make a mistake or don't know how to do something, that i'll always got different points of view to fall back on.
I think all should see this video : DjangoCon 2008 Keynote: Cal Henderson - "Why I Hate Django"
It's one of the flickr devs talking about Django, and frameworks in general. Now, it says Django, but he have a lot of really good points about frameworks and webdev in general, and I honestly think everyone working with webapps should see it.
He touches on many points, among others when frameworks are good, when they are bad, what's annoying, things involved with scaling, and so on.. And he's entertaining too :)
One of the points he makes : "Does it even make sense for a web framework to aim for top100 scalability? No. Most webpages are not in the top 100. In fact, all but about a hundred web pages are not in the top 100."
It's The Golden Rule: "He who has the gold makes the rules."
As a Professional PHP Developer of 5+ Years.
Stay Away.
Far Away.
I've never seen more unprofessional software in my life. If you must use it, choose an enterprise stack such as Symfony2.
Ruby, Python, Perl, and ASP.NET are all smarter choices.
Early in your web development career.
Then you take the training wheels off, grow up, and use Java.
"I'm about to embark on developing active content (database driven, and web services) for the first time for my website and I have grown to love PHP. Knowing that there are other web development platforms available, and noticing some disdain for PHP in some circles, I'm curious to know which platforms slashdotters prefer along with the reasons why. Before I get started into heavy development I would like to get some opinions and more facts. Why shouldn't I use PHP?"
So lets actually look at the question:
1. Developer has grown to love PHP.
2. Developer is adding active content for the first time.
3. Developer wants to get "the one right truth" before heavy development.
Conclusion: Developer has forgotten the very basic rule of coding: You will throw it away and recode it.
Repeat: You will throw it away and recode it.
If you ever forget that, you do not know how to code.
How do you write the best, high quality code? Answer: You understand the problem. How do you understand a problem? Answer: You write something that looked good initially, failed, and then understood why it failed.
My recommendation: Write a proof of concept -- a small scale demo, something a little more than a mock-up.
Learn from that, and then write the next version. This second version is first written in "english", or "file cards (*)", or "text files". Then it is re-written in some programming language.
This version is the first real version (you just thew away version zero). This is the version that you expect to work. And, in the process, you'll understand exactly what you are trying to do.
The process is no different for a desktop program, an HTML-output report generator, or an HTML/Javascript (with or without async) /CSS/Dom manipulation input and output program.
The goals of programming, of a functioning program, are something along these lines:
1. Work correctly.
2. Work as expected.
3. Work securely.
4. Work fast enough.
(you may switch the order of the last three.)
Ideally, you want:
5. Work quickly.
6. Work with few resources consumed.
Programmer time is a resource. Maintenance time is a resource. Disk space and CPU time are also resources.
Security may be a pain, or impossible, in languages like PHP. Even if your code is 100% perfect, if you are using frameworks, you may have pain. Remember: We just had recent disclosure that most web development systems used some type of hash on the input data as part of their function, said input data was 100% under attacker control, and attackers could do major hash table collision attacks with very little resources consumed, and no way for the developer to counter it.
You love PHP? Fine. Use that for your first trial. Don't fall in love with your first trial.
*: Programming by file cards: This is a way to identify your classes and objects / primary data structures and operations. Get a bunch of file cards -- either 3x5 or 4x6, primarily based on how small you can still write legibly. On each card, you identify one data structure or class, and the primary operations you think you want to perform. If those operations require the use of other data structures/classes, you identify what you want to do with/to those structures.
If a class's requirements -- including what other people want to do to it -- gets too big for your file card, break it up into parts.