Qhov txawv ntawm Applets thiab Servlets

Qhov txawv ntawm Applets thiab Servlets
Qhov txawv ntawm Applets thiab Servlets

Video: Qhov txawv ntawm Applets thiab Servlets

Video: Qhov txawv ntawm Applets thiab Servlets
Video: Koj Hais Dab Tsi?/Suabci Kwm & Ab Meej Ham/Official MV 2023 2024, Kaum ib hlis
Anonim

Applets vs Servlets

Ib qho program sau hauv Java uas tuaj yeem kos rau hauv nplooj ntawv HTML hu ua applet. Java enabled browser tuaj yeem siv los saib nplooj ntawv web uas muaj lub applet. Thaum nplooj ntawv uas muaj lub applet raug saib, cov cai ntawm lub applet raug xa mus rau tus neeg siv lub computer thiab raug tua ntawm Java Virtual Machine (JVM) ntawm qhov browser. Java program uas siv los txhim kho / txuas ntxiv cov haujlwm ntawm lub server yog hu ua servlet. Cov neeg rau zaub mov yuav tsum tau nkag mus los ntawm tus tswv tsev daim ntawv thov siv tus qauv kev thov teb. Hauv cov ntsiab lus yooj yim, lub servert tuaj yeem pom raws li Java applet khiav ntawm server.

Applet yog dab tsi?

Ib qho program sau hauv Java uas tuaj yeem kos rau hauv nplooj ntawv HTML hu ua applet. Java enabled browser tuaj yeem siv los saib nplooj ntawv web uas muaj lub applet. Thaum nplooj ntawv uas muaj lub applet raug saib, cov cai ntawm lub applet raug xa mus rau tus neeg siv lub computer thiab raug tua ntawm Java Virtual Machine (JVM) ntawm qhov browser. Applets tso cai muab cov neeg siv nrog cov yam ntxwv sib tham sib uas tej zaum yuav tsis tuaj yeem muab siv HTML nkaus xwb. Txij li thaum lub applet code khiav ntawm JVM, applets yog platform ywj siab (txhawb Microsoft Windows, UNIX, Mac OS, thiab lwm yam) thiab tuaj yeem khiav hauv txhua qhov browser uas txhawb Java. Tsis tas li ntawd, applets yog cached los ntawm feem ntau lub web browsers. Yog li applets tuaj yeem thauj khoom sai sai thaum rov qab mus rau nplooj ntawv web. Thaum nws los txog rau kev ruaj ntseg, muaj ob hom applets hu ua kos npe applets thiab unsigned applets. Unsigned applets muaj qee qhov kev txwv tseem ceeb xws li kev nkag tsis tau rau hauv cov ntaub ntawv hauv zos. Lawv tsuas tuaj yeem nkag mus rau lub vev xaib applet rub tawm ntawm lub vev xaib. Kos npe applets tuaj yeem coj tus cwj pwm raws li daim ntawv thov nyob ib leeg thaum nws kos npe raug txheeb xyuas.

Dab tsi yog Servlet?

A Java program uas siv los txhim kho / txuas ntxiv cov haujlwm ntawm lub server hu ua servlet. Cov neeg rau zaub mov yuav tsum tau nkag mus los ntawm tus tswv tsev daim ntawv thov siv tus qauv kev thov teb. Hauv cov ntsiab lus yooj yim, lub servert tuaj yeem pom raws li Java applet khiav ntawm server. Feem ntau servlets yog siv rau khaws cia / ua cov ntaub ntawv uas tau xa mus siv daim ntawv HTML thiab muab cov ntsiab lus dynamic hauv nplooj ntawv web. Tsis tas li ntawd, servlets yog siv los tswj cov ntaub ntawv hauv xeev. Java servlets yog qhov ua tau zoo, siv tau yooj yim thiab txav tau yooj yim piv rau lwm yam CGI (Common Gateway Interface) technologies.

Qhov txawv ntawm Applets thiab Servlets yog dab tsi?

A java program uas tuaj yeem kos rau hauv nplooj ntawv HTML thiab saib siv Java enabled browser hu ua applet, thaum Java program uas siv los txhim kho / txuas ntxiv cov haujlwm ntawm lub server hu ua servlet. Qhov tseeb, servlet tuaj yeem pom tau tias yog lub applet khiav ntawm lub server. Ib qho applet tau rub tawm rau hauv tus neeg siv lub tshuab thiab khiav ntawm tus neeg siv lub browser, thaum lub servlet khiav ntawm lub server thiab hloov cov txiaj ntsig rov qab rau tus neeg siv khoom thaum nws ua tiav. Thaum siv applets, tag nrho cov cai ntawm lub applet yuav tsum raug xa mus rau tus neeg siv khoom. Yog li ntawd nws siv ntau lub network bandwidth tshaj servlets, uas tsuas yog hloov cov txiaj ntsig rau tus neeg siv khoom.

Pom zoo: