Wednesday, 21 October 2015

How to write managed code with PHP.

I was recently exploring some projects available on Internet built with php. There are tons of small projects, extensions and plugins easily available on Internet with specific tasks. Many newbies can easily get these codes and use them in their project, that is how PHP are said to be easy as there is thousands of extensions and plugins available ready to be used.

What do I mean by Bad practice and unmanaged codes ?

However Its very easy to build a website with these codes but using different kind of coding practice form different sources from different modules of your application is gonna get you nowhere. For example if you want to display a page and using "echo" to display html codes line by line and using built in functions directly on the front-end page then it will creates confusion with the front end and back functionality. It may be easy and faster way to design small pages with little server side scripting but as your website grow, its gonna be a nightmare for you to debug it if you get trapped with some bugs.

How should we actually write PHP codes ?

The answer is simple 'keep front end and server side scripts completely separate'. But thats not all. Try to develop with MVC even with the smallest project. Keeping your model, view and controller in separate files and folders will give you better speed and control. It also lets you easily scale your project and applications are gonna be likely anomaly free. I would also suggest to use framework there are many good framework available for both small and large systems.

some popular PHP frameworks are..
1. Codeigniter
2. Cakephp
3. Yii
4. Zend

Common mistake while using framework

Using an MVC framework isn't gonna solve all your problems. People still tends to use library functions available for front end designing like forms etc. This kind of practice is bad for responsive web site specially if you want your website to open smoothly of different devices (Mobile , Tab and different browsers). So I would suggest to develop the front end using only front end technology like HTML5 , CSS.  Jquery or Angular js. And keep all the back-end codes in separate files.

Benefits of Using PHP framework

  •  Easy to debug.
  •  Increase scalability of applications.
  •  Fast development with the help of libraries.
  •  Secure Codes and best practice enforced.
  •  Better designing and demonstration of application.

Have a great time with PHP ......... 


  1. The gave data's are extremely valuable to me. It's a superb website for learning web application. Much obliged to you for sharing this brilliant blog.
    PHP Training in Chennai | PHP Course in Chennai | PHP Institutes in Chennai | PHP Training Center in Chennai

    1. I am glad that I saw this post. It is informative blog for us and we need this type of blog thanks for share this blog, Keep posting such instructional blogs and I am looking forward for your future posts.
      Cyber Security Projects for Final Year

      JavaScript Training in Chennai

      Project Centers in Chennai

      JavaScript Training in Chennai

  2. Great Article. Thank you for sharing! Really an awesome post for every one.

    IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

    Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
    Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

  3. Looking for best Tamil typing tool online, make use of our Tamil Virtual keyboard online to type in Tamil on web browser and share it on your social media handle. Tamil Typing Software Download

  4. it is really a great and helpful piece of info. I am glad that you shared this helpful information with us. Please keep us informed like this. Thank you for sharing.
    china visa singapore

  5. I enjoyed over read your blog post. This was actually what i was looking for and i am glad to came here!
    Website: Antique jewellery designs

  6. Amazing Article,Really useful information to all So, I hope you will share more information to be check and share here.thanks for sharing .
    Website: Vietnam Adventure Tour


  7. Get instant assignment help service in Australia. We are in this service from last ten years and provide best assistance to all our clients. If you are in Australia and pursuing your graduation or post-graduation from over there, then you can get assistance from our experts. We believe in providing best to our clients to maintain a long relationship with our clients. You can expect from us a genuine work with zero plagiarism.

    Assignment Help

  8. Useful article which was very helpful. also interesting and contains good information.
    to know about python training course , use the below link.

    Python Training in chennai

    Python Course in chennai

  9. I have been examinating out a few of your articles and i can claim pretty nice stuff. I will make sure to bookmark your site.
    Visit here :- Top Seo Services In Gwalior


  11. it is really a great and helpful piece of info. I am glad that you shared this helpful information with us. Please keep us informed like this. Thank you for sharing.
    Website: Online punjab lottery

  12. it is really a great and helpful piece of info. I am glad that you shared this helpful information with us. Please keep us informed like this. Thank you for sharing.
    Dubai tourist visa

  13. Thank you for your valuable help. This blog really helped me a lot. I really appreciate your efforts.

    DevOps Training in Chennai
    DevOps Training in Chennai

  14. Thanks for this Wonderful Blog. It Was very useful to enhance my knowledge. This is what I exactly need an totally enjoying
    this blog, I Really appreciate everything That you do.
    Data Science Training In Chennai

    Data Science Course In Chennai

  15. Thanks for sharing such a amazing article, it was really useful and I would like to thank you for this article, am very much interested
    to learn new thing like this. Keep posting like this valuable information.
    Data Science Training In Chennai

    Data Science Course In Chennai

  16. I have been working as a full-time academic at MyAssignmentHelpNow to help students with their academic writing requirements. We offered assignment help to the students who are struggling with their academic writing tasks. Our experts possess a good writing and researching skills and thus we are able to provide the best supervision to the students.

    Assignment Writing Service

  17. Thanks for sharing valuable information...
    Vision Developers is one of leading Real Estate Company in Pune. Checkout new property to buy your dream home at the most affordable prices. Click for more info!

  18. Thank you very much for writing this blog. It was very easy to understand. That was a very good blog.
    Website: cz jewellery

  19. It is really a good posting and i was searching for the same and have been satisfied after reading it,thanks for sharing it. my fab 11

  20. Please keep us informed like this. Thank you it is really a great and helpful piece of info. I am glad that you shared this helpful information with us.for sharing.
    Website :- electrical technician near me

  21. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
    top online electronics shopping sites in india

  22. I always like to read a quality content having accurate information regarding the subject and the same thing I found in this post.
    Website Development Company |

  23. Good day! This is kind of off topic but I need some help from an established blog. Is it very hard to set up your own blog? I m not very technical but I can figure things out pretty quick. I'm thinking about setting up my own but I'm not sure where to begin. Do you have any tips or suggestions? Thanks .
    Craigslist Posting Service for Car Dealers |

  24. This is really amazing website that I have been found on google regarding website Blog Commenting sites. and I would like to thank admin who also given us to post the link on his side.
    Lubbock moving company |

  25. This was something I was looking for, really helpful, and great work is done. Thank you so much for sharing such valuable information.
    Car Auction Software |

  26. It’s really a cool and helpful piece of information. I am glad that you shared this useful information with us. Please keep us up to date like this. Thanks for sharing.
    Best CRM for Small Businesses |

  27. I am really like it very much for the interesting info in this blog that to this website is providing the wonderful info in this blog that to utilize the great technology in this blog.
    Web Development Company in Gwalior |

  28. I am very impressed to see this blog thanks for giving this very useful information.
    python best tutorial
    free python tutorial