DART on Googlen avoimen lähdekoodin ohjelmointikieli, joka toimii verkkosivuilla ja servereissä, ja jolla voi JavaScriptiä paremmin hoitaa suurten verkkosovellusten koodaamisen. DART kielen kehitys aloitettiin 9/2011 ja 1.0-versio kielestä julkistettiin loppuvuodesta -2013. Nyt jo on olemassa lähes valmiit työkalut Chrome selainta varten. Blogger-blogien pitäjiä varten saamme ehkä kiintoisia Gadgetteja sivupalkkeihin ja muuta toiminnallisuutta verkkosivuille.
TÄMÄ blogi sisältää pääosin omia pohdintojani ja muistiinpanoja, eikä se varmaankaan tuo kovinkaan paljon uutta DART-kielen opiskeluun. Materiaali on pääosin KOPIOITU :( Dartlang-sivustoilta, josta kannattaa KÄYDÄ TARKISTAMASSA kielen viimeiset syntaksit.

lauantai 23. maaliskuuta 2013

Path ympäristömuuttujan asettaminen Dart / Pub Pakettien asentamiseen Windows 7:ssä

Setting Path environment variables in Windows7 for Pub Packages in dart:
Now I have something wrong... can't get Pub packages....  

Hahaa: problem was only:   :    Dont write:  dice:     BUT  dice     without :
Instruction in dartlang and Editors window were little confusing....
No need to read further.....   SOLVED.   No need to set path either...

perjantai 22. maaliskuuta 2013

Täydellinen paketti Dart kielen opiskeluun.

Tämä on hieno paketti Dartin itsenäiseen opiskeluun;  järjestelmällisesti alusta alkaen, kurssimuotoinen linkkeineen ja oppiaineineen.  Esimerkit GitHubissa.
Kurssi perustuu kirjaan Dart Up_And Running.

http://ondart.me/web_programming.md

Dzenan Ridjanovic has updated his self-paced resources for learning web programming with Dart to milestone 3. This list of resources and learning guide is useful for anyone wanting to start out web programming.

maanantai 18. maaliskuuta 2013

Tietokanta keskustelua ja linkkejä Dart ohjelmointikielessä.

Se on kaikki tietokantaa..  it's all about data.

Hyvä ja pitkä ihmettely tietokantojen puuttumisesta Dart:ista.
https://groups.google.com/a/dartlang.org/d/msg/misc/Uv05GvFTsLU/UsMABfztF4sJ

Hyvä kooste tietokanta-elementeistä ja ohjelmista Dartissa. Linkkejä...
https://groups.google.com/a/dartlang.org/d/msg/misc/Uv05GvFTsLU/wcz8hF4anhUJ

Tietokanta on juuri se alue, joka minua kiinnostaa eniten.
.

perjantai 15. maaliskuuta 2013

About Dart functions and Closures, Dart funktiot ja sulkemiset

Understanding Closures.. hard..  and Functions. (spec: Functions abstract over executable actions)

This conversation is from:
https://groups.google.com/a/dartlang.org/forum/?fromgroups=#!topic/misc/NOuoGrxW2nE

https://groups.google.com/a/dartlang.org/d/msg/misc/NOuoGrxW2nE/DHTVT-_qq40J
Direct link to just this piece of conversation..  Great!!

Alex Tatumizer   Mar 14 (16 hours ago)

@Ladislav:
Somehow, I overlooked the fact that whatever is called Function in dart in fact doesn't correspond to javascript notion of Function - it's really a closure, e.g.
  Function f="abcd".substring;
  print(f(0,2));

This is a great feature, so I withdraw my sarcasm. I thought dart makes distinction between Function (as pointer to function "codes") and Closure, but it probably doesn't.
Won't it be better to call it Closure, not Function then, to avoid confusion?



Ladislav Thon asvered:  

Function is just something that can be called. Even this, I believe:

class Answer {
  call() => 42;
}

main() {
  var a = new Answer();
  print(a());
  print(a is Function);
}

Some Functions are in fact closures, meaning that they carry their lexical environment, but not all of them. I'm not sure about renaming Function to Closure, I think it would make some situations more clear and some less.

Tatumizer ansvered:

Probably you are right, but then things get a bit confusing indeed for anyone coming from javascript (huge army of potential dart users).
Look at "Tour of the dart language" - they are talking about functions AND closures, without elaborating on subtleties - but this are very important subtleties, deserved to be featured much more prominently.
 Needs to be better documented maybe?  

Check link for more conversation...



And next theme:         Orthogonal  Wikipedia:  

Computer science

Orthogonality in programming language design is the ability to use various language features in arbitrary combinations with consistent results.[9] This usage was introduced by von Wijngaarten in the design of Algol 68:


The number of independent primitive concepts has been minimized in order that the language be easy to describe, to learn, and to implement. On the other hand, these concepts have been applied “orthogonally” in order to maximize the expressive power of the language while trying to avoid deleterious superfluities.[10]

Orthogonality is a system design property which guarantees that modifying the technical effect produced by a component of a system neither creates nor propagates side effects to other components of the system. Typically this is achieved through the separation of concerns and encapsulation, and it is essential for feasible and compact designs of complex systems. The emergent behavior of a system consisting of components should be controlled strictly by formal definitions of its logic and not by side effects resulting from poor integration, i.e. nonorthogonal design of modules and interfaces. Orthogonality reduces testing and development time because it is easier to verify designs that neither cause side effects nor depend on them.

An instruction set is said to be orthogonal if it lacks redundancy (i.e. there is only a single instruction that can be used to accomplish a given task)[11] and is designed such that instructions can use any register in any addressing mode. This terminology results from considering an instruction as a vector whose components are the instruction fields. One field identifies the registers to be operated upon, and another specifies the addressing mode. An orthogonal instruction setuniquely encodes all combinations of registers and addressing modes.[citatio

perjantai 8. maaliskuuta 2013

Yksinkertainen DART ohjelmointi esimerkki, Luokkien periyttäminen. Extending DART Classes.


DART esimerkki, luokkien periyttäminen.  Extending DART Classes
Tarkista koodin viimeinen versio linkistä:
https://github.com/heiklap/Simple-DART-Examples/blob/master/ape_man.dart

//  apeman.dart   5.3.2013.   simple dart example.
//  for presenting how dart classes are created, extended and instantiated.
//  developing this still further...

// This class exists simply for others to extend
class Ape {
  String apeFood = "Eating juicy banana...  ";
  String apeJob  = "Scratching my back..... ";
  bool wannaMoreBananas = true;
  num weightKg = 28;
}

//  Human class learns something from apes and gives it forward..
//  class human do not get instantiated (used) in this example..
class Human extends Ape {
  String humanThinking = "What do others think about me..?  ";
  num weightKg = 78;
 }

class HumansWife {        //  This class is here just to celebrate international Womans Day  8.3.
  num weightKg = 67;      //  Will use this class in later programs
  String OuSheIs = "Ou!  She Is so...   Eternal Inner Beauty...  ";
}

// this class will have an instance AND it uses properties
// inherited from other classes
class Programmer extends Human {
  String progJob = "Solving problems. And producing new and more complicated problems...";
  num weightKg = 102;                 //  and counting  :(     LOL!!
}
/*
  main is where every DART program begins to execute.  TYPE Void is strictly a note to You and your
  programmer friends.  It tells that main is not intended to return any value.
  If there is num or String instead of void, THEN main would return a value.
*/
void main() {
  print("Hei, Apina!!  Terve, Ihminen!  Moikka, ohjelmoija!!  ");

// here Programmer class will be instantiated with keyword: new, to p.
// note, that class type: Programmer is with BIG P. Its instance is with SMALL p.  !!
  var p = new Programmer();

// Class programmer, p. !! uses some ancient ape skills witch it inherited..
// BUT NOTE:  all these  (p.apeFood and p. apeJob..)  are now p. :s properties!!
  print(p.apeFood);                                     //  Eating juicy banana...
  print(p.apeJob);                                      //  Scratching my back.....
  if (p.wannaMoreBananas) print('I Wanna More Bananas !!');     //  I Wanna More Bananas !!

 // Programmer class have also inherited all of human properties..
  print(p.humanThinking);                               //  What do others think about me..?

  // this programmer do not have many his OWN skills yet,
  // He thinks only his Job.  Should give him more properties...
  print(' You asking what I am doing?? ');
  print(p.progJob);                      //  "Solving problems. And producing new and more
                                                   //   complicated problems..."
  print(p.weightKg);                     // ( WTF!!  This must be a BUG!!)  Stomach overflow..

  print("===   End of program   ===");
}

/*   Output of program should be this:
Hei, Apina!!  Terve, Ihminen!  Moikka, ohjelmoija!!
Eating juicy banana...
Scratching my back.....
What do others think about me..?
I Wanna More Bananas !!
 You asking what I am doing??
"Solving problems. And producing new and more complicated problems..."
===   End of program   ===

NEXT:   Maybe some functions and more properties...
*/

lauantai 2. maaliskuuta 2013

Dart versionhallinta ja paketinjakelija, DART Pub Package Manager

Valikoin muutamia paketteja, joita tutkin tarkemmin.
I choosed some packets, witch I want to study closer.

http://pub.dartlang.org/packages/sqljocky  MySQL connector for the Dart programming language.
http://pub.dartlang.org/packages/rikulo  http://rikulo.org/projects/ui   Rikulo UI is a free and open source Dart framework for creating incredible cross-platform web and native mobile applications using HTML5.

http://pub.dartlang.org/packages/mongo_dart   server-side library with minimalistic support of MongoDb.
http://pub.dartlang.org/packages/bot  A collection of (mostly) general libraries to make working with Dart more productive

http://pub.dartlang.org/packages/web_ui   build web apps as if you had a browser from the future.
http://pub.dartlang.org/packages/hart    The heart of any Dart app

http://pub.dartlang.org/packages/harvest  Event store for Dart with multiple backends for easly creating event sourced applications on both the browser and VM.

http://pub.dartlang.org/packages/persistent  Efficient Persistent Data Structures
http://pub.dartlang.org/packages/js  The js.dart library allows Dart code running in the browser to manipulate JavaScript running in the same page. It is intended to allow Dart code to easily interact with third-party JavaScript libraries.
http://pub.dartlang.org/packages/google_tasks_v1_api  Auto-generated client library for accessing the tasks v1 API.

Valintani perustui siihen, että olin keskusteluissa ja G+:ssa kuullut paketista, tai sen nimi / tyyppi kuulosti jotenkin hyvältä. Monta hyvää pakettia siis jäi sivuun, eikä tämä kokoelma välttämättä vastaa tarpeitani. Nyt kuitenkin nämä on talletettu kirjanmerkkeihin molemmissa koneissani.. tutkiminen ja soveltaminen alkaa.

http://pub.dartlang.org/  Welcome to pub.dartlang.org!
This is your friendly repository of packages of software for the Dart programming language. Explore packages here and install them using pub, the package manager for Dart.
.