I-PHP: Incwadi Enkulu nohlaka lwe-MVC lwe-PHP

Abantu abangaphezulu Ukushicilelwa kwePakethe babe nokuthunyelwe kwakamuva lapho bebekhuthaza abathuthukisi be-PHP / ama-blogger ukuthi bafunde incwadi entsha futhi babhulogi ngakho. Ngiwazisa kakhulu amathuba anjengalawa - ongazange acele noma yikuphi ukuthumela okuhle noma okungalungile, ukubuyekezwa okuthembekile kwencwadi abayinikezayo (mahhala).

1847191746Incwadi engiyitholile ithi I-CodeIgniter Yokuthuthukiswa Kokufaka Isicelo se-PHP, ebhalwe nguDavid Upton.

Incwadi yami engiyithandayo ku-PHP / MySQL isamile Ukuthuthukiswa kwe-PHP ne-MySQL. Yi-PHP 101 ne-MySQL 101 yonke isongwe ngencwadi emnandi, ephelele ngamathani amasampula ekhodi. ICodeIgniter ukuncoma okuphelele, mhlawumbe umhlahlandlela we-PHP 201. Kuthatha konke ukufaka ikhodi eqinile ye-PHP futhi kunikeze uhlaka lokuthuthukisa ikhodi ngokushesha nangemikhuba emihle ye Ama-MVC uhlelo.

Ngokuvumelana ne Wikipedia:

I-Model-view-controller (MVC) iphethini yokwakha esetshenziswa kubunjiniyela be-software. Kuzinhlelo zokusebenza eziyinkimbinkimbi zamakhompiyutha ezethula inani elikhulu ledatha kumsebenzisi, unjiniyela uvame ukufisa ukwehlukanisa idatha (imodeli) nokukhathazeka kwesixhumi esibonakalayo somsebenzisi (buka), ukuze ushintsho kusixhumi esibonakalayo somsebenzisi lungathinti ukuphathwa kwedatha, nokuthi idatha ingahlelwa kabusha ngaphandle kokushintsha i-interface yomsebenzisi. Isilawuli sokubuka imodeli sixazulula le nkinga ngokuhlukanisa ukufinyelela kwedatha kanye nomqondo webhizinisi kusuka ekwethulweni kwedatha nokuxhumana komsebenzisi, ngokwethula ingxenye ephakathi nendawo: isilawuli.

Ngaphandle kokubhalwa kahle ngamathani ezibonelo zomhlaba wangempela, enye yezinto engizithanda kakhulu ngale ncwadi ukuthi ichaza ukuthi akuyona yini. I-CodeIgniter luhlaka lomthombo ovulekile olwakhiwe ekhaya. Ngakho-ke, inemikhawulo ethile evunyelwe. Incwadi ingena kulokhu ngokuningiliziwe. Imikhawulo embalwa engiyitholile kube ukungabi khona kwezinto ezifinyelelekayo ekubonisweni kwezinto zomsebenzisi ezinjengamahange, amatafula namafomu nanoma ikuphi ukubhekisela kuma-XML REST APIs amadala kanye Nezinsizakalo zeWebhu. Kodwa-ke, ngikholwa ukuthi lezo zinketho zingangezwa kalula ezinhlotsheni ezizayo - sizobona!

Ingxenye ephelele kakhulu yeCodeIgniter, ngombono wami, ilabhulali yedatha. Ngithola ukubhala ukuxhumana kwe-MySQL nemibuzo kudla isikhathi futhi kusebenza kanzima. Ngifuna ukungena ngokushesha ku-CodeIgniter ukuze ngisebenzise uhlaka lwayo lwe-database, ngikholwa ukuthi kuzongongela isikhathi esithile - ikakhulukazi ngokubhala / ukubhala kabusha imibuzo! Kukhona nezinye izengezo ezinhle ze-Ajax, JChart kanye nokukhohlisa kwesithombe.

Uma kuzwakala sengathi ngixoxa ngeCodeIgniter ngaphezu kwencwadi, bobabili bamunye ngempela. Incwadi iyindlela ephelele yokufunda amasu entuthuko athuthukile, hhayi ukusebenzisa iCodeIgniter nje. Ngingayincoma kakhulu le ncwadi. Incwadi ithi "Thuthukisa umkhiqizo wakho wokubhala ngekhodi we-PHP ngohlaka lwamahhala oluvulekile lomthombo we-MVC CodeIgniter!". Lokhu kuthembekile!

Uma unentshisekelo ku-CodeIgniter, qiniseka ukubuka i-Video Yesingeniso.

2 Amazwana

  1. 1

    Inhloso yohlaka ukwenza inqubo yokubhala izinhlelo zokusebenza ezisuselwa kuwebhu zibe lula.

    Uhlelo lokusebenza olwenzelwe i-MVC kulula ukuphatha ngoba luhlukaniswe lwaba izigaba, ezivumela intuthuko ezimele. Lokhu kukhuthaza ukusetshenziswa kwekhodi ngokwakha amamodeli, asebenza kabusha kulo lonke uhlelo lokusebenza.

  2. 2

    Inhloso yohlaka ukwenza inqubo yokubhala izinhlelo zokusebenza ezisuselwa kuwebhu zibe lula.

    Uhlelo lokusebenza olwenzelwe i-MVC kulula ukuphatha ngoba luhlukaniswe lwaba izigaba, ezivumela intuthuko ezimele. Lokhu kukhuthaza ukusetshenziswa kwekhodi ngokwakha amamodeli, asebenza kabusha kulo lonke uhlelo lokusebenza.

UCABANGANI?

Le sayithi isebenzisa i-Akismet ukunciphisa ugaxekile. Funda ukuthi idatha yakho yokuphawula isetshenziswa kanjani.