Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Everyone tells me to stop using php. How else I can built login-system ,members area etc..

Maybe everyone is telling you this because they care about you!

I have programmed in C, C++, C#, Java, JavaScript, Perl, Python, PHP, Bash, Sh, Awk, Visual
Basic, VBScript, Assembly, Scala, FoxPro, PL/SQL, Basic, Pascal, and Logo. I first started
coding at age 8, in 1981. I think I am experienced enough to bring my alternative point of view to
this table.

There are so many answers here that I hesitate to add to it, but feel compelled as the answers only
marginally address your question as asked, and nearly all of them present one point of view, one
that seems to reinforce your present bias. If that bias is why you came here to ask this question or
why you are reading and enjoying the answers then stop here. If you are really asking a question
or are someone else sharing the question and feel it has not been answered then read on.

The primary question posed here:

“How else can I build a login-system, members area, etc. ?”

There are an infinite number of answers to this question, and that it is asked shows a need to
spend some time searching the answer out. A login-system and members area can be built in any
programming language that can read environment variables and write output to the console. This
is the core of the standard that first enabled the dynamic web, CGI (Common Gateway Interface).
If you are are a web developer and do not understand the contract represented by CGI, then you
owe it to yourself to change that. While in many ways we have moved on from that paradigm, in
just as many we have not, and a thorough understanding of the subject is very basic knowledge
that should be held by every web developer.

I consider the Thomas Boutell book “CGI Programming in C and Perl” to be one of the best, and
simplest on the subject. While the examples are in C and Perl, the more important part is the
coverage of the CGI contract between the web server and the application.

As I said we have largely moved on from that, there are now many frameworks that mask the
monotony of CGI programming and speed development, PHP is only one of those. In some cases
the framework has gone so far as to eliminate the CGI paradigm completely, though this is only
truly the case in the very most modern languages like Node.js. The others implement the CGI
interface in a deep layer, such as WSGI, mod_php, or numerous other wrappers around CGI. I am
not suggesting that you program in CGI, I am suggesting you should understand it.

That is an answer to “How else can…”, but not a very satisfying one because we live in a very
fast paced world and expectations are such that we would likely be fired if we insisted on writing
C based CGI code everyday at our jobs. This is where the frameworks come in, as they make it
much easier to rapidly build the basics of a web application as you have asked “… a login-
system, members area, etc. ?”. You are doing yourself a disservice if you have not and do not
investigate the alternatives. It may be that you find PHP best suits you in the end, but
understanding the alternatives will make you a better developer and more marketable.

An incomplete list in no particular order

Rails/ Ruby on Rails (Rails)


JSP (Java)
Spring Framework (Java)
The Official Microsoft ASP.NET Site (C#)
Django/Tornado (Python)
Laravel/Symfony/CakePHP/Drupal/Joomla/… (PHP)
Angular.JS/Ember Js/React/MEAN (JavaScript)
An easy to use web application framework for C (C)
Catalyst/Mason/CGI::Ex (Perl)
CppCMS (C++)
Apache Struts/Click/OFBiz/Sling/Tapestry/Wicket (Java)
Revel/Beego/Martini/Gorilla (GO)
The list could really go on forever, there are many more including home grown solutions and
frameworks within frameworks. I am not suggesting that you should try everyone of these, but
you should investigate many, and do a trial implementation in several. Each of these will have a
solution to your original question, most of them will be straightforward and easy to implement.
The vast majority of these frameworks have a vibrant and dedicated community, with many
libraries to aid in solving common problems such as those you asked about and more. That you
have asked this question is a clear indicator that you have not done this research, and are selling
yourself short.

Within your comments on your question, and leading sentence, I see two other questions, neither
of which, seem to be addressed by the other answers here.

“Why is everyone telling me to stop using PHP?”

“What web frameworks have good documentation and a strong community?”

Or perhaps this is the true question, the one that nearly all answers here have assumed, but I see
nowhere in your original question:

“Why is it okay for me to continue using PHP and how can I better tell everyone telling me to
change to piss off?”

Let’s start with the most subjective of these:

“What web frameworks have good documentation and a strong community?”

PHP certainly has a vast community, mountains of documentation, and an army staunch
supporters as has been seen here in the answers you have received. However, IMHO, PHP
documentation is among the worst that I have had to work with. There are beacons of light such
as Laravel, but in general the documentation is incomplete and samples are lacking. I can see how
after years of working in this environment one could become comfortable with its state, but
coming from better documented platforms, I have to call a spade a spade.

I do not intend to offend with this next comment though many will certainly take offense. There
are exceptions to this, the Laravel project is a testament of that, however, the majority of PHP
developers I have worked with, have only ever programmed in PHP, are in general uninformed
and very close minded. Their knowledge of programming paradigms, design patterns and best
practices is non-existent, and if you have dealt much with PHP, you either know well the horrors
they create or you are creating them yourself. It is very possible to write excellent PHP code,
again Laravel is a great example, but I have found more very bad code written in PHP than any
other language.
Design Patterns: Elements of Reusable Object-Oriented Software: Erich Gamma

Java has a very large community, perhaps the largest. Java documentation in general is excellent,
though as with any library, there are some that are lacking. Java has the best enterprise support
and is the defacto standard in Enterprise computing. Java support is so strong that there have been
many other languages ported to the JVM such as JRuby. There are examples of how to do quite
literally anything you need to in Java. With the addition of Maven, the massive list of supporting
libraries are made easy to access and integrate. Java essentially forces you to write OO code,
though it does not force you to write good OO code. The strong typing of Java will feel
uncomfortable at first, but in time it’s value will become clear.

Thinking in Java

Ruby on Rails, is the current go to replacement for PHP. This is not my first choice but does seem
to be the community's first choice. Ruby developers are in high demand, and as such paid well.
Ruby and Ruby on Rails make every effort to push you to use development best practices. It
provides a complete MVC framework with ORM, database schema management, deployment
scripts and integrated unit testing. In some ways it is the most complete of all frameworks out of
the box. Ruby is a very opinionated language, as is the community. There is generally one right
way to do things in Ruby. While it is a scripted language, it will take some time to get used to the
paradigms, and Rails methodologies. To the original question, Rails scaffolding will allow you to
do what you ask faster than any other language.

Learn Web Development with Rails (3rd Edition) (Addison-Wesley Professional Ruby): Michael
Hartl: 9780134077703: Amazon.com: Books

The Pragmatic Programmers' Guide (The Facets of Ruby): Dave Thomas, Andy Hunt, Chad
Fowler: 9781937785499: Amazon.com: Books

Python has a growing vibrant passionate community. It is a language that allows both OO
programing and functional programming to co-exist, enabling you to use the write tool for the
job. The PIP library management makes it easy to manage dependencies. The documentation is
excellent and extensive. The language encourages good practices and readable code. While there
is usually more than one way to do something in Python, generally only one is considered the
Pythonic way. Python has a coding standard and documented best practices in its PEP 8 -- Style
Guide for Python Code. Writing threaded code in Python is easier than any other language I have
used, though the GIL is a damper on that. It is growing and should not be overlooked in an
investigation of alternatives to PHP. The script environment will feel comfortable to the PHP
developer.

Python Essential Reference

Node.JS is the relatively new kid to the block (other babies are always being born, some still need
to grow up). Support within the enterprise, the community of developers and the set of available
libraries are all growing rapidly, with good reason. Node.JS is one of the few platforms to address
the C10K problem, the handling 10k concurrent connections at the same time. Node.JS has an
advantage in that all web developers are familiar with writing JavaScript at some level. However,
very few are familiar with writing OO JavaScript and it is not the most elegant OO language.
Beyond that much of the Node.JS framework is based around event driven functional
programming. This is what enables solving the C10K problem but many good developers
struggle writing evented code at first, it requires different thinking about order of operations. The
same is true of functional programming, making Node.JS a double whammy, a learning curve
that feels like a brick wall. That said even if you go back to another language, this change in
thinking will pay dividends. With NPM the vast and growing library of community developed
Node modules are at your finger tips. In general Node.js module documentation is very good,
though there is not as much yet. Node.JS and JavaScript is where the growth is and will continue
to be for the foreseeable future.

The Principles of Object-Oriented JavaScript eBook: Nicholas C. Zakas: Kindle Store

You Don't Know JS: Async & Performance eBook: Kyle Simpson: Kindle Store

Simon Holmes: 9781617292033: Amazon.com: Books

I could go on with all the others but I will cover one last one, only because I spent so much time
writing Perl, I would feel remiss not commenting on it. While Perl is showing it’s age, Perl 6
stuck in perpetual beta for over a decade, it was a great language to program in. While I like
many others have moved on for now, Perl is undeserving of it’s reputation. Perl has silently
driven some of the largest websites in the world. At it’s prime About.com was written entirely in
Perl. Perl enables Regex in a way no other language has and is the standard by which other Regex
implementations are judged against. Perl is the least opinionated language of all that I have
worked with. There is always more than one way to solve a problem and all ways are encouraged.
CPAN was one of the first community archives, for community developed libraries, and it likely
inspired libraries like NPM, PIP and Maven. CPAN is still better in many ways than those, but
not so much in others. Perl documentation is among the best, the community is devoted and
helpful, though it is fading. Perhaps Perl 6 will revive all this, time will tell.

Programming Perl

Mastering Regular Expressions (9780596528126): Jeffrey E. F. Friedl: Books

Perl Best Practices

Object Oriented Perl

If you are still asking which systems have good documentation and strong community, you have
not looked far.

Now to the reason I felt compelled to write a post here. The question I felt implied as I read your
original question.

“Why is everyone telling me to stop using PHP?”

Because they care about you. I am sure that this will evoke some backlash, I am going to try and
stay subjective, as I have tried so far. People are telling you to stop using PHP, because they want
you to branch out and learn more, they know the exposure will benefit you. People are telling you
to stop using PHP because much of the web is moving on, and they don’t want you to get left
behind. Much like I had to leave my dear Perl, many will need to move on from PHP. Do not get
me wrong there will always be PHP jobs, but the movement is elsewhere now. People want you
to get paid better.
The average PHP developer makes $20k less per year than the average developer. PHP did not
even rank in the top 12 on Business Insiders list in 2014, Perl did. RANKED: The Highest-
Paying Programming Languages. SitePoint showed the PHP average to be $75k, $25k less than
the $100k (BI) general average in the US. Best Programming Languages For Job Demand and
Salaries, 2015. According to Codementor, in 2016 Python and Ruby developers, a similar skill set
to the PHP developer make an average of $107k vs the $89k for a PHP developer. The TIOBE
Index paints an interesting picture now, different than it has in the past. While PHP does show a
recent marginal uptick, so does Perl. Skip to the second graph and see the trend. Nearly all of the
languages in the top 10 are trending in decline over the last five years, Java, C, C++, Perl and
PHP. Python is static while Ruby and Javascript are growing. How can that be when development
is not in decline? Alternative languages are the growth languages now.

IT Statistics 2015: Software Developer Salaries and Technologies in Demand

Finally on this question, people want you to learn to write better code. Even if you eventually end
up writing PHP, nothing wrong with that as long as you have explored your options thoroughly,
you will write better PHP having exposure to other languages. You will write code that will be
more maintainable and reusable. People want to be able to work with you and PHP can make that
difficult.

Those are some of the reasons I tell people to stop writing PHP, or never to start. It is a gateway
drug to bad coding and poor pay. Doesn’t mean you are going to get hooked on the heroin, but it
paves the way.

The alternative take on your original question:

“Why is it okay for me to continue using PHP and how can I better tell everyone telling me to
change to piss off?”

This has been answered repeatedly here. There is no need for me to address that further. Some of
those answers have very sound reasoning, others sound more like “How dare you call my best
friend fat?!”.

I hope that I have provided you and other readers that venture to this question an alternative point
of view without being too inflammatory.

In closing, I have one final comment, regarding one language developers. This is by no means an
issue isolated to PHP developers, just as many Java developers suffer the same problem, or any
other language for that matter. I have found that developers who only know how to program well
in one language, are myopic in their point of view and think that the skill they have grown is
programming in that language. They do not realise that the skill they have learned is
programming, instead they think it is writing Java. This is reinforced by the HR departments and
hiring managers of the world, who are equally myopic. HR has an excuse, hiring managers do
not, they should know better, they code. This thinking is much like thinking that I only know how
to hand write english, I cannot type. The concepts learned programming one language are largely
transportable to the next language. There will be differences of course, in some cases more than
others, but the reality is in short order you will be able to move between those languages, and
apply concepts consistently. Being able to do this will give you confidence, and help you to
understand why there are so many languages. In my current job on any given day, I will write in
Java, Python, Ruby or PHP. Occasionally a little Bash for salt.

I hope to have broadened the conversation here. I hope you try another language. Perhaps PHP
will stay your love, perhaps you will wonder why you didn’t sooner.

p.s.

Quora asked that I remove any meme’s. So editted.


191.5k Views · View Upvotes
Upvote703
Comments20+
Share
From Your Quora Digest · Android (operating system)
How powerful can a rooted android device be?
Lucem Anb
Lucem Anb, Android Enthusiast
Written Sep 15

Am wondering what exclamation i should start with but me, myself and i cant live with a non-
rooted device, Rooted devices don’t only offer hacking (which is illegal by the way) With a
rooted device,...
Upvote133
Downvote
Read More
From Your Quora Digest
What are some features of the C programming language that are not well-known?
Utkal Sinha
Utkal Sinha, Computer Researcher. Author.
Updated Jul 16, 2014
I have found a small list of C features or tricks which I assume only few people would know. 1.
Add any numbers without using the addition operator Since the [code]printf()[/code] function
return...
Upvote481
Downvote
Read More
From Your Quora Digest
As a programmer which laptop will you recommend to a fellow programmer and why?
Ashish Kedia
Ashish Kedia, CS undergrad. Programming for 8 years and counting.
Updated Jan 20
I won't suggest a concrete laptop but I will tell you certain "good-to-have" features: * Backlit
Keyboard - You'll need that a lot. * 3-4 USB Ports - You definitely need those to connect a
variety ...
Upvote718
Downvote
Read More
From Your Quora Digest
What development did south India see in Modi's government in last 2 years?
Swaroop Krishnan S
Swaroop Krishnan S, Love the land..Love the people.. A place of wonders..I bleed Tri Colour
Written Sep 12

This is the story of a more than two and a half decades dream, slowly coming true for all
keralites. The idea of Vizhinjam port was conceived over 25 years ago. Political Reality of Kerala
All these ...
Upvote2.7k
Downvote
Read More
From Your Quora Digest · Laptops
Why some people still use Windows laptop when they can afford a MacBook?
Wisnu Subekti
Wisnu Subekti, Father, Teacher, and CEO of Zenius Education
Written Sep 9

Thank you Aisyah for asking the question. Perhaps before I answer the question, I need to explain
the context so people don't blame her for asking such "tiring" question. :) Background story: I
boug...
Upvote138
Downvote
Read More
2M AGO
Popular on Quora
Is Java dead?
Garry Taylor
Garry Taylor, Software developer on Mac, Windows, Solaris, IBM i
Updated May 23 · Upvoted by Paul K. Young, Software Engineer at Google
Yes, Java is completely dead. It’s as dead as the most popular language in the world can be
anyway. Totally dead and defunct, except that last year it grew in use by 5%, more than any other
language,...
Upvote3k
Downvote
Read More
Question asked · Hindi (language) · 13m
What are the most abusive words in English and Hindi spoken to date?
What are the topmost slang words (Gaali) in English and Hindi languages that are enough to
make you angry instantly and what are their al... More
8 ANSWERS
AnswerPass
Follow113
Quora SessionsSessions - Now Taking QuestionsView All
Ryan Avent
Ryan Avent
Economics columnist at The Economist, Author of The Wealth of Humans
Answering Tue at 9:30 PM
View Session
Bill Poucher
Bill Poucher
CS Professor at Baylor University and Executive Director of ACM-ICPC
Answering Mon at 11:30 PM
View Session
Popular on Quora
How do you spot a beginner programmer?
Ryan Gedwill
Ryan Gedwill, Web developer, database engineer
Updated May 28
Beginner programmers say things like: 1. What languages do you know? I know HTML and C+
+! 2. You’re not a software developer you’re a coder, you didn’t go to college! 3. You’re not a
coder, you’re a s...
Upvote7.6k
Downvote
Read More
Answer written · Web Design · Aug 14
How can I pretend being a programming geek?
Unnit Metaliya
Unnit Metaliya, Web Development is my thing.
Updated Aug 26

Yes, you can. I will tell you how. Step 1: Don’t wear formals. That’s not dress-code of geeks. Get
some t-shirt or something. And specs like this. Step 2: Now, go to some Cafe or any Public Place
whe...

You might also like