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 ......... 
 


45 comments:

  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

    ReplyDelete
    Replies
    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

      Delete
  2. 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

    ReplyDelete
  3. 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

    ReplyDelete
  4. 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

    ReplyDelete

  5. 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

    ReplyDelete
  6. 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

    ReplyDelete
  7. YOU ARE A CRAZY HUMAN BEING…….!! ALTHOUGH. CREATIVE CONTENT…….THANKS FOR SHARING…..!!

    ReplyDelete
  8. 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

    ReplyDelete
  9. 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


    ReplyDelete
  10. 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

    ReplyDelete
  11. 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

    ReplyDelete
  12. 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

    ReplyDelete
  13. 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!

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

    ReplyDelete
  15. 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

    ReplyDelete
  16. 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

    ReplyDelete
  17. 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

    ReplyDelete
  18. 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 |

    ReplyDelete
  19. 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 |

    ReplyDelete
  20. 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 |

    ReplyDelete
  21. 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 |

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

    ReplyDelete
  23. Extraordinary blog! I recently went over your website and have found some interesting content.I am glad I found this amazing website on the web.
    Website - JBM Global School

    ReplyDelete
  24. I just stumbled upon your blog and it was great to be here! Definitely, this is a great post with great content.
    Website - JBM Smart Start

    ReplyDelete
  25. I would like to thank you for the efforts you have made in writing this article. Hope to see some great stuff in the future as well.
    Website - Stepping Stone School

    ReplyDelete

  26. Gandhi Brothers Lottery Group was founded by Mr Manmeet Singh when he was 12 years old and today, it has been developed as a very reputed the well-established business firm of providing secure Lottery of Punjab State Lottery since the last 36 years. It has two Lottery system. Bumper Prizes weekly Prizes. The biggest jackpot hit from the Punjab State Lottery is New Year Bumper 2012 on 19-01-12 amounting Rs.2.00 crore Monthly Lottery Bumper 2012 held on 23-07-12 amounting Rs. 51 Lakhs distributed over prize money. Gandhi Brother’s lottery is Authorized and legal, assuring each player of a fair playing lottery.
    Monthly lottery

    ReplyDelete
  27. Nice Blog, it is very Impressive. keep sharing good information with us.
    business plan

    ReplyDelete
  28. This is very useful software for you and me. No errors were found during the check.
    You can use it. I hope you like it.
    Conference Rooms Graphics in Denver

    ReplyDelete
  29. Thank you for sharing so insightful article. Rozana.in has a far-reaching presence across various cities in India.
    Visit for more info online shopping

    ReplyDelete
  30. Hello there, You have done a great job. As we all know how much Bill of Sale being used. This document is usually used for sale and purchase between two parties like Buyer & seller.
    Visit here AR Bill of sale

    ReplyDelete
  31. Excellent read, Positive site, I have read a few of the articles on your website now, and I really like your style.

    ecommerce services provider in india

    ecommerce solutions services

    ReplyDelete
  32. Acadecraft offers the best and excellent experience for all the valued partners out there while the clients seek online assessment development services. Every grade's curriculum requires a range of questions that demand high thinking skills and theoretical knowledge for the same. Moreover, not every service comprises experts that are well-acknowledged with the understanding and the practicality of every subject.
    quality checker

    ReplyDelete
  33. Thank You for Providing Such insightful information. If someone is looking for the QuickBooks Support Phone Number in US.

    ReplyDelete
  34. The world of today is developing on the basis of creative services. From content ideas to attractive pitches and from digitization to promotion, all functions are a product of creativity. There are many creative agency services that are available as well. Acadecraft is acing the digital world as one of the top creative agencies with its impeccable and innovative services across the world.
    abstracting and indexing services

    ReplyDelete
  35. Thank You for Providing Such insightful information. If someone is looking for the Quickbooks customer service in US.

    ReplyDelete
  36. Are you in search of services offering assistance in medical writing? Here's the place meant for you providing a range of professionalized and highly customized services. The Kindle Conversion Services include the conversion of PDFs and documents into Kindle Conversions. At this Platform, we assure to provide the best solutions to any modification of formatting problems.
    scientific book indexing service

    ReplyDelete
  37. Great work...You've made some very fascinating points, in my opinion. Continue your excellent work.
    ERP Software Companies

    ReplyDelete