AppML ma’lumotlari


AppML’ning asosiy vazifasi — HTML sahifalarini ma’lumotlar bilan ta’minlash.


ULASHISH

AppML’ni ma’lumotlarga ulash

  • AppML o‘zgaruvchilardagi ma’lumotlarni ko‘rsata oladi
  • AppML fayllardagi ma’lumotlarni ko‘rsata oladi
  • AppML ma’lumotlar bazalaridagi ma’lumotlarni ko‘rsata oladi

AppML’da JavaScript obyektidan foydalanish

HTML va ma’lumotlarni ajratishning keng tarqalgan usullaridan biri — ma’lumotlarni JavaScript obyektida saqlash.

Misol

<table appml-data="dataObj"> <tr>   <th>Customer</th>   <th>City</th>   <th>Country</th> </tr> <tr appml-repeat="records">   <td>{{CustomerName}}</td>   <td>{{City}}</td>   <td>{{Country}}</td> </tr> </table> <script> var dataObj = { "records":[ {"CustomerName":"Alfreds Futterkiste","City":"Berlin","Country":"Germany"}, {"CustomerName":"Ana Trujillo Emparedados y helados","City":"México D.F.","Country":"Mexico"}, {"CustomerName":"Antonio Moreno Taquería","City":"México D.F.","Country":"Mexico"}, {"CustomerName":"Around the Horn","City":"London","Country":"UK"}, {"CustomerName":"B's Beverages","City":"London","Country":"UK"}, {"CustomerName":"Berglunds snabbköp","City":"Luleå","Country":"Sweden"}, {"CustomerName":"Blauer See Delikatessen","City":"Mannheim","Country":"Germany"}, {"CustomerName":"Blondel père et fils","City":"Strasbourg","Country":"France"}, {"CustomerName":"Bólido Comidas preparadas","City":"Madrid","Country":"Spain"}, {"CustomerName":"Bon app'","City":"Marseille","Country":"France"}, {"CustomerName":"Bottom-Dollar Marketse","City":"Tsawassen","Country":"Canada"}, {"CustomerName":"Cactus Comidas para llevar","City":"Buenos Aires","Country":"Argentina"}, {"CustomerName":"Centro comercial Moctezuma","City":"México D.F.","Country":"Mexico"}, {"CustomerName":"Chop-suey Chinese","City":"Bern","Country":"Switzerland"}, {"CustomerName":"Comércio Mineiro","City":"São Paulo","Country":"Brazil"} ]}; </script>
O‘zingiz sinab ko‘ring »


AppML’da JSON fayldan foydalanish

HTML va ma’lumotlarni ajratishning yana bir keng tarqalgan usuli — ma’lumotlarni JSON faylda saqlash:

customers.js

{ "records":[ {"CustomerName":"Alfreds Futterkiste","City":"Berlin","Country":"Germany"}, {"CustomerName":"Ana Trujillo Emparedados y helados","City":"México D.F.","Country":"Mexico"}, {"CustomerName":"Antonio Moreno Taquería","City":"México D.F.","Country":"Mexico"}, {"CustomerName":"Around the Horn","City":"London","Country":"UK"}, {"CustomerName":"B's Beverages","City":"London","Country":"UK"}, {"CustomerName":"Berglunds snabbköp","City":"Luleå","Country":"Sweden"}, {"CustomerName":"Blauer See Delikatessen","City":"Mannheim","Country":"Germany"}, {"CustomerName":"Blondel père et fils","City":"Strasbourg","Country":"France"}, {"CustomerName":"Bólido Comidas preparadas","City":"Madrid","Country":"Spain"}, {"CustomerName":"Bon app'","City":"Marseille","Country":"France"}, {"CustomerName":"Bottom-Dollar Marketse","City":"Tsawassen","Country":"Canada"}, {"CustomerName":"Cactus Comidas para llevar","City":"Buenos Aires","Country":"Argentina"}, {"CustomerName":"Centro comercial Moctezuma","City":"México D.F.","Country":"Mexico"}, {"CustomerName":"Chop-suey Chinese","City":"Bern","Country":"Switzerland"}, {"CustomerName":"Comércio Mineiro","City":"São Paulo","Country":"Brazil"} ] }

AppML yordamida appml-data atributida ma’lumot manbai sifatida JSON faylni ko‘rsatishingiz mumkin:

Misol

<table appml-data="customers.js"> <tr>   <th>Customer</th>   <th>City</th>   <th>Country</th> </tr> <tr appml-repeat="records">   <td>{{CustomerName}}</td>   <td>{{City}}</td>   <td>{{Country}}</td> </tr> </table>
O‘zingiz sinab ko‘ring »

AppML’da ma’lumotlar bazasidan foydalanish

Veb-serverning ozgina yordami bilan ilovangizni SQL ma’lumotlari bilan ta’minlashingiz mumkin.

Ushbu misolda MySQL ma’lumotlar bazasidan ma’lumotlarni o‘qish uchun PHP ishlatiladi:

Misol

<table appml-data="https://www.w3schools.com/appml/customers.php"> <tr>   <th>Customer</th>   <th>City</th>   <th>Country</th> </tr> <tr appml-repeat="records">   <td>{{CustomerName}}</td>   <td>{{City}}</td>   <td>{{Country}}</td> </tr> </table>
O‘zingiz sinab ko‘ring »

AppML’ning qudrati

Siz AppML’ning qudratini kashf etish arafasidasiz.

AppML sizni quyidagilar uchun ma’lumotlar, kontrollerlar va modellar bilan ta’minlay oladi:

  • HTML ilovalarini juda oson ishlab chiqish
  • Juda oson modellashtirish, prototiplash va testlash

Bitta HTML sahifaga istaganingizcha AppML ilovalarini joylashtirishingiz mumkin.

AppML sahifaning boshqa qismlariga xalaqit bermaydi.

Sizda HTML, CSS va JavaScript bo‘yicha to‘liq erkinlik bor.

AppML yordamida to‘laqonli CRUD veb-ilovalarini ishlab chiqish mumkin.

CRUD: Create, Read, Update, Delete (yaratish, o‘qish, yangilash, o‘chirish).

AppML’ning qudratini kashf etish uchun: AppML demosini ko‘ring.


W3Schools Pathfinder

Yutuqlaringizni kuzating – bu bepul!