Lus Qhuab Qhia hauv Symfony yog dab tsi?
Lus Qhuab Qhia hauv Symfony yog dab tsi?

Video: Lus Qhuab Qhia hauv Symfony yog dab tsi?

Video: Lus Qhuab Qhia hauv Symfony yog dab tsi?
Video: Dr. Txawj Teev Vaj : Yam zoo tshwm tau hauv yam phem tuaj / Mloog Lus Qhuab Qhia hauv 9xhmtg 2024, Kaum ib hlis
Anonim

Lus qhuab qhia yog lig decoupled los ntawm Symfony thiab siv nws yog xaiv tau. Tshooj no yog txhua yam hais txog lub Lus qhuab qhia ORM, uas lub hom phiaj cia koj daim ntawv qhia cov khoom rau cov ntaub ntawv sib raug zoo (xws li MySQL, PostgreSQL lossis Microsoft SQL). Koj tuaj yeem txuas ntxiv cov ntaub ntawv rau MongoDB siv Lus qhuab qhia ODM tsev qiv ntawv.

Ib yam li ntawd, koj tuaj yeem nug, ORM yog dab tsi hauv Symfony?

Nws yog ib phau ntawm cov cai uas qhia txog Lus Qhuab Qhia ORM raws nraim li cas cov tub ntxhais kawm ntawv thiab nws cov khoom yog mapped rau ib lub rooj database tshwj xeeb. Zoo, cov metadata no tuaj yeem teev nyob rau hauv ntau hom ntawv sib txawv, suav nrog YAML, XML lossis koj tuaj yeem nkag ncaj qha rau Cov Tub Kawm Ntawv hauv chav kawm siv cov lus piav qhia.

Ib yam li ntawd, cov lus qhuab qhia DBAL yog dab tsi? Cov Lus qhuab qhia Database Abstraction Layer ( DBAL ) yog txheej txheej abstraction uas zaum saum PDO thiab muaj qhov nkag siab zoo thiab hloov pauv API rau kev sib txuas lus nrog cov ntaub ntawv sib raug zoo tshaj plaws.

Cov lus qhuab qhia database yog dab tsi?

Cov Lus qhuab qhia Qhov project (los yog Lus qhuab qhia ) yog ib txheej ntawm PHP cov tsev qiv ntawv feem ntau tsom rau kev muab cov kev pabcuam persistence thiab muaj feem xyuam rau kev ua haujlwm. Nws cov khoom plig khoom plig yog cov khoom siv sib txuas lus (ORM) thiab cov database abstraction txheej nws yog ua rau saum.

ORM moj khaum yog dab tsi?

ORM tseem yog lwm nerd-acronym, nws luv luv rau Object Relational Mapping. Nyob rau hauv ib tug nutshell, ib ORM txoj haujlwm yog sau rau hauv ib hom lus taw qhia (xws li PHP, Java, C# thiab lwm yam …) thiab nws yog tsim los kom zoo qhwv ib ncig ntawm cov ntaub ntawv sib raug zoo.

Pom zoo: