24

Does anybody know a library or project that allows for an AngularJS style of programming in Dart?

I'd like to be able to create annotated HTML files for declaring my UI instead of imperatively instantiating everything like in SWT. Also, features like data binding would be helpful. Can I use Dart for that instead of JS?

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
vsp
  • 919
  • 7
  • 14

5 Answers5

20

angular.dart - official port of Angular to Dart.


Old answer:

Another option: Web UI. There's a new article on it here.

Artem Andreev
  • 19,942
  • 5
  • 43
  • 42
4

The angularjs team announced a port for Dart a couple of days ago

Here you go the link http://news.dartlang.org/2013/06/angularjs-announces-port-for-dart.html

Josh Lee
  • 171,072
  • 38
  • 269
  • 275
yeraycaballero
  • 1,603
  • 3
  • 19
  • 29
1

You should check out Buckshot from John Evans. Buckshot gives you declarative UI and data binding. https://github.com/prujohn/Buckshot

Seth Ladd
  • 112,095
  • 66
  • 196
  • 279
  • Buckshot has it's own Xaml-style templating system. AngularJS uses HTML and gives ability to extend it. Due to this AngularJS applications seems more natural imho. – Artem Andreev Aug 11 '12 at 04:12
  • @ArtemAndreev While AngularJS solves the data-binding problem nicely for HTML, it does not solve certain extensibility challenges. Try to extend HTML Button, for example, such that it has new behaviors and appearance. You can't directly. You have to tag it with some class and then let a javascript find it, add hooks, UI transformations, etc. Buckshot's abstraction seems foreign at first, but when you start to see what's coming soon with web components in HTML5, you'll see that it's not so strange. Buckshot's extensibility allows the Xaml-like base elements to be transformed into anything. – John Evans Aug 21 '12 at 20:55
  • 1
    @JohnEvans May be I misunderstood you in something. But AngularJS has nice ability to extend HTML syntax using [directives](http://docs.angularjs.org/guide/directive). You no need to tag it with some class and then let a javascript find it, add hooks, UI transformations, etc. And I can use new elements and attributes in conjunction with other standard HTML elements and attributes, ie I no need to create and use textblock, border, etc. As far as I understand AngularJS uses HTML and extends it, and Buckshot replaces HTML with something like XAML. – Artem Andreev Aug 22 '12 at 06:20
  • @ArtemAndreev Xaml is the starting point, but the extensibility afforded by Buckshot via Dart means that you can create your own schemas, suited to your application. Take StackPanel for example: If you didn't like the name you could just extend it like so in Dart: "class Stack extends StackPanel {}" (in fact I have done this in a recent commit). That's all that needs to be done. I'm not saying that Buckshot is the right solution for everyone. Much of it depends on your background. .net people tell me they love Buckshot, whereas traditional web developers take longer to warm up to it. :) – John Evans Aug 22 '12 at 14:40
1

There are a bunch of UI frameworks being created for Dart right now. I know about PureMVC, Buckshot, and HipsterMVC, but there are probably others. I don't know which of these are like AngularJS.

Google also just released an article on using Web Components in Dart.

mguymon
  • 8,946
  • 2
  • 39
  • 61
Shannon -jj Behrens
  • 4,910
  • 2
  • 19
  • 24
-2

AngularJS uses the new methodology of MVC (Model-View-Controller) to separate information from the user interface. Many web frameworks, most notably Ruby on Rails and ASP.NET MVC 3 and MVC 4, use this methodology to make programming web apps easier, in my opinion. JavaScript libraries, like AngularJS and Backbone are beginning to use this style of programming on the client-side as well. For Dart, I would take a look at Hipster MVC. Its still being developed, but it looks very promising and should be completed soon. Hope this helps!

inspile
  • 35
  • 6