Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP standards / Guidelines

Status
Not open for further replies.

Carlvic

MIS
Jun 15, 2017
99
AE
Hello,


I'm not a full time programmer , I can read codes , manipulate and know some basics. Now I want to it seriously. YES I'm READY
Anyone can give some guidelines? Source online? Step by step.

Yes I learn programming on through searching, But I don't know where to start.

I'm using PHP, MYSQL, Javascript,


Thanks
 
1. Look in the Php online manual: http;//php.net. It’s an invaluable resource.
2. Keep your code organized, if you need to add comments.

Beyond that, start programming. Start writing code from scratch. Think about what you want to accomplish what code you need, to get that done and write it.

Best way to learn is by actually doing.




----------------------------------
Phil AKA Vacunita
----------------------------------
OS-ception: Running Linux on a Virtual Machine in Windows which itself is running in a Virtual Machine on Mac OSx.

Web & Tech
 
One Warning

PHP is a quite messy language because of the way it has evolved, there are usual multiple ways of achieving the same ends, many of them now considered to be a poor choice or positivity harmful.
(take a look a Mysql & escaping strings for an example)
This does not mean that Good programs cannot be written in PHP, just that it is very to right bad ones.

If you use up-to-date docs, Modules & follow best practices everything should be good.




Do things on the cheap & it will cost you dear
 
Thank you for this @IPGuru :).Do you have any programming language to suggest to learn for web development? I hear about ASP.NET this is good?
 
I personally disagree with PHP being messy.

PHP like many languages which have been around, have evolved and as such things become deprecated or obsolete and new methods introduced. I doubt this is exclusive to PHP.

ASP is known for its obfuscation of standard development techniques in favor of its own nomenclature which makes going from ASP to anything else quite difficult.

Personally, I find PHP invaluable in learning how development for Web works, since everything can be done from scratch in whichever way you see fit, and gives you a better of understanding of how they should work, than the encapsulation and obfuscation of other languages.

Also PHP offers flexibility which other languages may not.

Many of the largest websites today use PHP. Facebook, Amazon, CNN etc... PHP is only as messy as you let it be with your coding.





----------------------------------
Phil AKA Vacunita
----------------------------------
OS-ception: Running Linux on a Virtual Machine in Windows which itself is running in a Virtual Machine on Mac OSx.

Web & Tech
 
PHP can be messy in the same way that our common language can be messy. That doesn't mean that either PHP or English should be avoided. It just means we should choose to speak or write goodly-like.

You should select the language that will meet your goal. I prefer PHP because it is freely licensed and can run on any server (easily deployed). ASP requires a paid license and only runs well on Microsoft servers.

While there is merit in learning how to develop from the ground up, you might also benefit from building on to an existing framework or system. For example, instead of creating a CMS from scratch, consider learning to write a PHP plugin/module for WordPress or Drupal. Building on to a framework will more often keep you on the right path (avoiding messy code) as they endeavor to follow best practices.



 
indeed do not misconstrue my comments, there are many programmers who will belittle PHP but I am not one of them

I was simply highlighting that care needs to be taken as here are may parts of the language that have been depreciated & it is vert easy to write code that works but would be considered poorly constructed.

as I said it is possible to write good php code, it is just also very easy to write extremely poor code (lookig at my early code compared to more recent code makes this very clear to me).

Almost any language can be used for web development but PHP is one of the simplest to get started




Do things on the cheap & it will cost you dear
 
PHP can be messy in the same way that our common language can be messy.

Yeah, but PHP is messy in a way like no other language is, There is/was not even a consistent function naming convention, so names could be and are ThisFunction() or this_function, This-Function and/or ANY combination of the three.



Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top