Google Developers Live Italia: la libreria Dart Web UI
20 Sep 2013È online un nuovo episodio per Google Developers Live Italia, argomenti trattati: web_ui.dart
, libreria che ci consente di utilizzare Model-driven Views (MDV) e Web Components in Dart. Il codice
proposto è disponibile sull’account gdl-italia su github.
Un esempio di MDV:
Input
<html>
<body>
<h1>{{ titolo }}</h1>
<p>Hello {{ soggetto }}!</p>
<p>L: {{ soggetto.length }}</p>
</body>
</html>
// codice Dart
String titolo = 'Esempio';
String soggetto = 'world';
Output
<html>
<body>
<h1>Esempio</h1>
<p>Hello world!</p>
<p>L: 5</p>
</body>
</html>
Un esempio di Web Components:
Input
<html>
<social-button network="facebook" username="myusername"></social-button>
<social-button
displayedname="Developers Italia"
network="google+"
username="117196874771284793338"></social-button>
</html>
Output
Questo episodio fa parte del programma GDL Italia che potete seguire sul blog ufficiale Developers Italia curato da +Alfredo Morresi.