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
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!
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.
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.
I really don't get why people refer to Wordpress as a "platform". It's a blogging system for crying out loud. If the app you're building is very close to a blog, yes, it makes sense to customize Wordpress. Even if the core of your system is very CMSish, Wordpress may be a decent choice since its admin interface is quite extensive and ready to go. But don't refer to Wordpress as a "platform" for any other purpose, please.
Bitten Apples are still better than dirty Windows...
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.
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 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
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).
or develop your own, if you have the skill.
This signature has Super Cow Powers
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...
Relax, PHP Taliban. It's a joke.
Sort of.
Never shake hands with a man you meet in a fertility clinic.
Why not? It's as much a platform as Drupal is. It's flexible, easy to extend, with a full service api (which is actually more evolved than other frameworks) and the admin control panel is built for you. Wordpress does things out of the box that even Drupal 7 is lacking in terms of standard functionality, and it's not prone to the same kind of bloat the Drupal is (in my experience). Granted, there are things all wordpress developers seem to do that are totally unnecessary, and facilitate poor programming practices. I think the templating system in Wordpress as most people implement it is terrible. That said, it's pretty powerful, and mostly secure if you do it right. I think it qualifies as a platform for those reasons.
This signature has Super Cow Powers
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.
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.
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.
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
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.
There is a significant difference between Java and the Java EE stack, and just because banks write slow software doesn't mean that Java is inherently a slow language. The JVM is rather optimized and in many cases runs comparably if not more efficiently than similar C++ code.
Further, the vast array of frameworks and libraries available give an immense range of choices that allow for efficient, scalable, maintainable and unit tested code to be written rapidly. If you hate the verboseness of Java and wish to use a more modern language, there are a number of newer languages available that all compile to JVM byte code and run on top of the byte code, Scala comes to mind.
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. :-)
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
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.
Thanks. Looking at CodeIgnitor and how "easy" it is there is definitely scaling issues at play with PHP. Hell, I think there are scaling issues with web apps period. Maybe this is more of a problem because I'm not on a VPS or dedicated server so I can't just fire up tomcat and sidestep trying to build apps with PHP. I like PHP, it is great when you don't want to setup an application server and deal with all that, but for long term projects it is probably much better to use a more enterprisey setup. I can see FB having issues now that I understand these situations better. They can throw hardware at the problem and divide the work among as many people as they need to solve the problem for now.
I object to power without constructive purpose. --Spock
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
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.
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.
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?
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
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 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..
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."
"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.