KodeInfo | Learning resources for web and mobile development

WHY USE A FRAMEWORK OVER PLAIN PHP

September 2nd, 2014 13:46:46 by Imran Iqbal Comments(0) - Views(1713)

In this post we will see why its important to use a framework for serious development over plain php.

WHY USE A FRAMEWORK OVER PLAIN PHP

CODE MANAGEMENT

Frameworks are organized in such a way that developers can keep there code organized by separation of presentation and logic layer . Presentation layer is done by Frontend developer who does not have anything to do with backend stuff he works with html,css,jquery most of the time . In the below image you will see how views and controllers are separated .

Frameworks follow MVC pattern which separate the layers . Models are object in the web application like Settings Object , Profile Object .Views are presentation layer which shows the visible part to the user .

Controllers are classes which takes the data from Model and pass that to Views . Controllers contain business logic .

SECURITY

In most of the application you will be using Login , Registration , Payment gateways for processing payment , Saving Credit card information for recurring transactions . This type of applications need to be secure from all sort of hacking methods . Why should we recreate it when it have been done by top developers . Frameworks are secure . Frameworks are tailored for security from the ground up

  • Filter Input escape output is automatically done for us
  • Secure routing for admin and normal users
  • Handling CSRF attacks is just changing a option in config
  • SQL Injections are very common attacks
  • Password Encryption

LIBARIES AND PACKAGES

Framework contains all the packages which are mostly used in web development . Some of the packages are

  • Form Builders
  • Authentation System
  • Email Libraries
  • String helpers
  • Localization
  • Cache
  • Pagination
  • Sessions
  • Templates
  • Validation

ACTIVERECORDS

If you are used to frameworks you will never be writing a single line of query most of the time in your applications . Frameworks provides ActiveRecord implementation to work with databases so when ever you change database you dont need to change a single line of code . If you want to get all users thats simple just query your models like below

GOOD PRACTICE AND GOOD COMMUNITY

Yes we know how to code but what if there is an alternative way which can improve performance we will surely use that . Good Frameworks have active community , good developers who teach you best practices . Give it a try

CONCLUSION

In the next few posts i will be writing posts on Laravel and let you feel comfortable with the directory stucture .

Thanks
KodeInfo Team

Author

  • Imran Iqbal
    Imran Iqbal

    Imran is a web developer and consultant from India. He is the founder of KodeInfo, the PHP and Laravel Community . In the meantime he follows other projects, works as a freelance backend consultant for PHP applications and studies IT Engineering . He loves to learn new things, not only about PHP or development but everything.

Related

GETTING STARTED WITH LARAVEL

GETTING STARTED WITH LARAVEL
read more

UNDERSTANDING LARAVEL STRUCTURE

UNDERSTANDING LARAVEL STRUCTURE
read more

UNDERSTANDING LARAVEL ROUTES

UNDERSTANDING LARAVEL ROUTES
read more

LARAVEL AUTHENTICATION PACKAGES

LARAVEL AUTHENTICATION PACKAGES
read more

comments powered by Disqus