středa 12. listopadu 2014

How we did Dart and Polymer.dart Code Labs

Last Saturday me and Jakub Škvára participated in DevFest Kraków as Code Labers for Dart and Polymer.dart. I am really happy that we had such opportunity to visit this event, meet other developers and finally visit Poland.

We did this Code Labs after our Code Labs in Prague and we wanted to do them differently. We wanted to show some easy application in Dart and then rewrite it directly into Polymer.dart to show how easy and great it is. Each Code Lab was 1.5h long.

Code Lab Applications

So we did two simple Note-taking applications, one in Dart using dart:html library and Twitter Bootstrap for styles and the second one in Polymer.dart with Paper elements.

Both Code Labs are available on Github divided into some steps.

Dart Application


Dart application

Polymer.dart Application

Sources and Code Lab text: https://github.com/jskvara/dart-polymer-code-lab-krakow

Polymer.dart application

Code Lab best practices for future Code Labers :-)

Do you also plan to do some Code Lab? After our three Code Labs I can share some best practices which worked for us:

  1. Do a short presentation before the actual Code Lab. Answer on these questions: What is it? Why/when to use it? How to use it?
  2. Try to code some basics with people before the actual Code Lab: Let's code our first "Hello world!". Which value is in int count;? How to write method/class/constructor/inheritance etc.?
  3. Ask people if they have any problems or questions after each bigger step and help them solve it. Communicate with them.
  4. Have fun! :-)

And finally, I am sharing some photo from beautiful night Kraków.


Beautiful, isn't It?

pondělí 27. října 2014

Stagehand: Tool you want to use for your next Dart project

Yesterday I found a great tool with name Stagehand. I would say that this tool makes happy Dart developer even more happier. Stagehand helps you create a new Dart project easily with all the important things prepared.

Yes, creating a new project with Dart Editor is nice but with Stagehand it is awesome. Creating a new project for me without Stagehand always involved searching wherever for the .gitignore file (if you do not know .gitignore.io) and then searching for some libraries etc.

With Stagehand you have everything important prepared.

How to install?

As a first thing you should update to the latest version of Dart SDK.

And then run in the command line:

pub global activate stagehand

I had to also add some folder to the PATH on Windows. Then you are done. You can use it :-)

How to use?

Using of Stagehand is really easy. When you are in the desired folder where you want to generate the project, just run:

stagehand <apptype>

where the apptype is:
  • consoleapp
  • package
  • polymerapp
  • shelfapp
  • webapp

I will create a new web application project into my folder with command:

stagehand webapp

And then open the project in Dart Editor, run it and see, what Stagehand did.

Stagehand web template
Nice Dart web application

Inspecting project files is event better. You will see that you have prepared responsive website with Sass, CSS minification and even routing!

That is a good start for a new Dart web project, isn't it?

With Stagehand you can also start your new Polymer project, console app, shelf app or package. One option I am missing is Chrome packaged app, hope it will be added in the future.

Do you plan to try Stagehand for your next project? For me it is definitely YES.

čtvrtek 9. října 2014

Dart + Polymer Hackathon Prague 2014: Přijďte si zahackovat v Dartu!




Po dvou Dart + Polymer Code Labech organizujeme s GDG Prague 1.11.2014 Dart + Polymer hackathon!

Můžete pracovat na svých vlastních nápadech, přijít s rozpracovanou aplikací, vyzkoušet si práci s Dartem a Polymerem, a nebo se můžete přidat a pomoci některému z ostatních týmů.

Žádné předchozí znalosti Dartu ani Polymeru nejsou nutné. Cílem je si technologie vyzkoušet, něco si v nich třeba napsat a zažít s námi srandu :-)

Vstup zdarma, registrace nutná, omezená kapacita.


Jaká byla sranda na posledním Code Labu se můžete přesvědčit z videa:




Případně si o posledním Code Labu můžete přečíst článek.

Přijdete? :-)

čtvrtek 4. září 2014

The 3 main reasons why I love Dart

Dart is a new language from Google which is object oriented with optional types. People are often asking me why I am so interested in Dart. So I have decided to write blog post about the three best highlights in Dart according to me.



1. Dart is open source and has lots of libraries

Dart SDK contains lots of libraries which can help you to write amazing apps. Do you want to work with JSON, play with HTML or try Web Sockets? No problem. Everything and more is included, just try it.

There is also big community around Dart, people are writing open source libraries to extend possibilities of language and libraries in SDK which can be easily downloaded in your project using pub.

I definitely recommend to follow Dartisans community on Google+. There is lots of interesting posts from the people about language, libraries etc.

2. Dart is really fast

When people are asking me about the reason why they should use Dart I am showing them this. It is awesome.

Source: https://www.dartlang.org/performance/

3. Dart is easy to learn

If you have ever seen Java, Dart is in some way similar BUT better than Java. You can learn it really fast and you will love it. Some small examples:


Do you remember constructor in Java? This is Dart

class Person {
  String firstName;
  String lastName;
  int age;

  Person(this.firstName, this.lastName);
}

void main() {                          
  Person person = new Person("Jana", "Moudrá");
}

Private attributes + getter and setter in one line

class Person {
  String _firstName;
  String _lastName;
  int _age;

  Person(this._firstName, this._lastName);

  int get age => _age;
      set age(int age) => _age = age;
}

Futures!

HttpRequest.getString('shapes.json')            
  .then((String jsonString) {                   
    print(jsonString);
  })
  .catchError((error) {
    print(error);
  });

And what do YOU love on Dart?

pondělí 1. září 2014

Let´s start

Hi, I am Jana Moudrá, woman geek from Prague, Czech Republic. I am co-founder of a small company called Juicymo, I love my job and everything interesting about IT, especially web.

I am also organizing some developer related events in our Prague GDGs.

For some time I am really interested in the new language called Dart, I could say that I am Dart enthusiast, so most of the blog posts will be Dart related, maybe with some posts about Android and design :-)

If you would like to find me on social networks/contact me, here is my G+, Twitter, LinkedIn and E-mail.