Jump to content

Should I Continue Using PHP?


Glese

Recommended Posts

My goal is to create fast and snappy websites which usually platform type of websites, I am talking about these modern ones with Ajax and jQuery, which quite dynamic and fast and snappy.

 

I do not like that PHP is not so readable and the code becomes quickly cluttered, I do like a language which makes use of indentation.

 

I did have a look at Django and Python, though I figured after 2 weeks out it is not for me, it is in my opinion mostly for people who have learned desktop application development and want to continue developing applications for the web, you usually do not really even use it to create blogs or similar.

 

Any ideas which web programming language would become an option for me? Or should I rather stick to PHP?

Link to comment
Share on other sites

If your PHP is getting cluttered, chances are you're doing it wrong.  Just because you can switch between PHP and HTML on the fly, it doesn't mean that you should.  Moreover, there's no reason why you can't make a 'snappy' website in PHP.  There are many sites that use PHP with Ajax to great effect.

 

Really, it sounds like your blaming your lack of proficiency as a developer on the language you're using rather than increasing your own skill.  Learn:

 

OOP - not just the syntax, but the methodology, including but not limited to encapsulation, polymorphism, coding to an interface, SOLID (it's an acronym) principles.

 

Design patterns - MVC is the de facto pattern for web apps, but it's implemented with other patterns.

 

Best practices - separation of concerns, DRY (another acronym), dependency injection.

Link to comment
Share on other sites

You are right about that, I did realize there is PHP and there is PHP, and if you can build Facebook with PHP then I can build everything which I am looking for to build.

 

I do agree with everything you said, I should not blame what I have, because without PHP the options would be scarcer.

 

Perhaps if I would learn using PHP properly with a framework together it would be a bit more of a pleasure to program.

Link to comment
Share on other sites

I use it in production and hate every bit of it. Our application is however so large that we are presently stuck with smarty because of the time it would take to remove it.

 

I see no benefit to any template engines. They add nothing but overhead and another layer that simply doesn't need to be there.

Link to comment
Share on other sites

I see no benefit to any template engines. They add nothing but overhead and another layer that simply doesn't need to be there.

 

Exactly.  PHP itself is a template engine.  And if your views require more than basic if/else statements or loops, you're doing it wrong.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.