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.
Näytetään tekstit, joissa on tunniste PubPackageManager. Näytä kaikki tekstit
Näytetään tekstit, joissa on tunniste PubPackageManager. Näytä kaikki tekstit

sunnuntai 9. helmikuuta 2014

Collection of small Pub packages, for learning purposes, best suited to study Dartlang.

Collecting links to Pub packages, in ordxer to find those, which are best suited for learning purposes, and to present different Dart properties.
-  Trying to avoid using BIG environmets, like Polymer, Angular, Hop, Bot  aso.

game_loop    http://pub.dartlang.org/packages/game_loop  This main loop is responsible for processing inputs from keyboards, mice, gamepads, and time. Also, the main loop manages browser state, e.g., pointer lock and fullscreen.   

mailer       https://pub.dartlang.org/packages/mailer    Compose and send emails from Dart. Supports file attachments, HTML emails and multiple transport methods.

solitaire     http://pub.dartlang.org/packages/solitaire      Solitaire card game.


Next I have not tested:  

chess    http://pub.dartlang.org/packages/chess     A port of chess.js to Dart. chess.dart is a library for legal chess move generation, maintenance of chess game state, and conversion to and from the formats FEN and PGN.  

bulls_eye     http://pub.dartlang.org/packages/bulls_eye   Bulls-Eye is an Dart-IO Extension to build up an WebServer (like node.js and Express)

image   http://pub.dartlang.org/packages/image    Provides server and web apps the ability to load, manipulate, and save images with various image file formats including PNG, JPEG, GIF and WebP.

more       http://pub.dartlang.org/packages/more  Various extension libraries that make Dart a better place.  More Dart — Literally   

mongo_dart  http://pub.dartlang.org/packages/mongo_dart     MongoDB driver for Dart  

eventable  http://pub.dartlang.org/packages/eventable      simple event system for implementing model->event->view design pattern. 

streamable   http://pub.dartlang.org/packages/streamable  a library of helpful custom stream candies

geo    http://pub.dartlang.org/packages/geo    A set of geographic's functions

dartminer    http://pub.dartlang.org/packages/dartminer     A Bitcoin miner with Dart language.

stillshot      http://pub.dartlang.org/packages/stillshot     A simple, bare-bones static site generator with markdown and mustache templating support.

color     http://pub.dartlang.org/packages/color     A simple Dart package exposing a Color class which can be used to create, convert, and compare colors.

chrome     http://pub.dartlang.org/packages/chrome     An library for accessing the Chrome APIs in a packaged app or extension.   

ace      http://pub.dartlang.org/packages/ace      High performance code editor for the web.

dartcoin      http://pub.dartlang.org/packages/dartcoin       A Bitcoin library for Dart. Pud-test release.

lawndart      http://pub.dartlang.org/packages/lawndart    An easier way to access storage APIs in the browser.

intl        http://pub.dartlang.org/packages/intl      internationalization and localization facilities, including message translation, plurals and genders, date/number formatting and parsing, and bidirectional text.

watch     http://pub.dartlang.org/packages/watch     Simple file watcher


Just 20   links now... most of them I have not tested. 

To be continued....   most likely..
 .

lauantai 28. joulukuuta 2013

DartEditor; pakettien tuonti Pub:sta ja niiden käyttö.

Dart pakettien käyttö ohjelmissa on kaksivaiheinen prosessi:

Ensin ne tuodaan yaml -tiedoston avulla PUB-paketinjakelijasta käyttäjän ko. packages -hakemistoon.

Sitten ne otetaan .dart ohjelmassa käyttöön (tuodaan) import-lausekkeella.


Using Dart-packages in programs is two-phase process:

First you bring them from Pub to your packages-folder with .yaml -file.
then you use them with import-clause.

perjantai 20. joulukuuta 2013

Pub dartlang path dependencies, how to use them locally without publishing in pub

Nice: with path dependencies I can locally tie 4 my packages together, so that they can use each others resources during developement, without publishing in Pub. One of them is kinda "base_library_routines",  one totally independent, and 2 closely tied-together-programs. 
Path: C:/Users/Public/myproject/base_library  is quite obvious.(not to me ) points to folder, where .yaml-file is. 

Now I can produce much reusable code. Changes in one package are immediately visible in other packages. 

http://pub.dartlang.org/doc/dependencies.html#path-packages

This was not right away obvious to me.. tried many paths..  lol 

Now seems it rquires still some get/build..  something missing from one of them...Not clear, in which order this should be done.

baselib   resources, that other packages use
prog_new, prog_old   are tight tied together and are meant to use each others resources,
they are html / browser based.  

prog_poly   is polymer based, and it is not clear to me, how I make it a package,

.yaml file is place, where I announce these path-dependencies, in overvew, and/or source-screen. 
This is the way I will work with all my coming programs. 
.

torstai 19. joulukuuta 2013

Some notes: what I know about Pub package manager:

Dartlang Pub is complicated system.. for beginner..  I have problems in start phase..
Most problems are my own errors: Testing Pub without reading/understanding instructions. Sometimes may also be, that Pub is out of order/anfunctional, when I do tests...
So I collect some poits, to deepen my knowledge of Pub and to solve my -dawo problems.
Check original text.. http://pub.dartlang.org/ this all is subject to changes!! 
-------------------------------------------------------------------------------------------------
What do I want to ask? 
1.  Is Publish the only way to push new version to my local package-folders?
2.  Does Pub use my local folders this way:
- Web, to start/rule package & main / entrypoint?
- Lib, to actual create packages content?
- Example, for others to use my package easily?
- Build, to show me, how my package looks out?
This, because global picture of folders, is still little unclear to me...
Question: is my package (which others use) a combination of web & lib folders??
--------------------------------------------------------------------------------------------------
http://pub.dartlang.org/doc/  Getting started:   My comments on red. 
reuse existing Dart code and bundle your Dart apps and libraries 
Import one or more libraries from the package:
If your app wants to use pub packages, it needs to be a package too.
An application package only consumes packages but doesn’t itself get reused. 
To turn your app into an application package so it can use other packages, you just need to give it a pubspec
The simplest possible pubspec just contains the name of the package.
Most packages just define a single entrypoint whose name is the same as the name of the package.      !!!!!!!!!
import '../../lib/parser.dart';
But that’s a pretty nasty relative path. 
When you are ready to upgrade your dependencies to the latest versions, do:  Ugrade. 
YES.   All seems quite clear. ===================================
http://pub.dartlang.org/doc/dependencies.html  Dependencies. 
 For library packages, you specify the range of versions of that package that you allow. 
allows any version, and looks it up using the default source, which is this site itself.   MEANS WHAT?  Ou!! it means pub-html-page... :)
the “live” version of that package on your local file system.
Relative paths are allowed and are considered relative to the directory containing your pubspec.
you cannot upload a package to pub.dartlang.org if it has any path dependencies in its pubspec.
Git & bVersion constrains.. Clear!!  Dev dependencies:  Clear.

http://pub.dartlang.org/doc/pubspec.html  Pubspec Format.. Quite clear.
Each time you publish your package, you will publish it at a specific version. Once that’s been done, consider it hermetically sealed: you can’t touch it anymore.

http://pub.dartlang.org/doc/package-layout.html      Package layout conventions
Many packages are library packages: they define Dart libraries that other packages can import and use. These public Dart library files go inside a directory called lib.
Most packages will define a single library that users can import. In that case, its name should usually be the same as the name of the package,
 Entrypoints—Dart scripts with a main() function—cannot go in lib.    !!!!!!!
much of a package’s code is internal implementation libraries that should only be imported and used by the package itself. Those go inside a subdirectory of lib called src
you should never import from another package’s lib/src directory. 
Web files:    Also, and this is important, any Dart web entrypoints (in other words, Dart scripts that are referred to in a <script> tag) go under web and not lib
Command-line apps:   can be run directly from the command line. These can be shell scripts or any other scripting language,   .... put it in a directory named bin.
Example:  Standalone example programs that use your package, of course!
This is an important place to consider using package: to import files from your own package. That ensures the example code in your package looks exactly like code outside of your package would look.
Tool: Mature packages often have little helper scripts and programs that people run while developing the package itself. Think things like test runners, documentation generators, or other bits of automation.

Assets and Transformers  http://pub.dartlang.org/doc/assets-and-transformers.html  The pub serve and pub build commands use transformers to prepare a package’s assetsto be served locally or to be deployed, respectively.  Ou!!  Seven screens... I leave this in side now.. hope not need this ever... BUT: I can put my empty folder structure here!

Commands:   Build:  generates the assets for the current package and all of its dependencies, putting them into a new directory named build.
Pub also automatically compiles your Dart application to JavaScript using dart2js.
Cache:  lists information about packages currently downloaded into your system cache
Get:  Check later... must be all clear...
Publish;  All files in your package will be included in the published package, with the following exceptions:  If you aren’t using Git, all “hidden” files (that is, files whose names begin with .


To be on the safe side, pub publish will list all files it’s going to publish for you to look over before it actually uploads your package. GREAT!! I CAN "ALMOST" PUBLISH...
Options
--dry-run or -n

With this, pub goes through the validation process but does not actually upload the package. This is useful if you want to see if your package meets all of the publishing requirements before you’re ready to actually go public.  
Upgrade:   gets the latest versions of all the dependencies   TL:DR  lol 
Serve: This command starts up a development server, or dev server, for your Dart web app.
Hope never need this... 
So going now to "try" publish.. to 0.0.02.

lauantai 7. joulukuuta 2013

Import files from other folders (parallel folders) in Dart. How to?

How can I import (NOT part/partOf) dart files from parallel folders?
|lib/src/myLib.dart
|web/myProg.dart     How can myProg import myLib ?
DartEditor have some problems in parsing URI:s.. i think..?

?? import '/C:/Users/Public/daw_pubtest/...'  lol   seems strange!  I have tried several hours to guess, how this is done. NEVER would have guessed this /C:   -thing.

http://stackoverflow.com/questions/12951989/how-to-reference-another-file-in-dart
Here.. in second answer was this:
import 'someDartFile.dart';
If you have on Windows a library at: K:\SomeDir\someFile.dart you will need to write:
import '/K:/SomeDir/someFile.dart';

http://stackoverflow.com/questions/12325488/importing-library-in-dart-on-windows
This page have same kind of answer.

Problems rise:  My heart is aching.  My mind is cloudy.  Coffee dont taste as it should.
Use this solution?  Is it nice?  Do's it work in my dawo package?
More reading:  Read these again.  Read issues.   7 webpages talk the same thing. Read.
Do.  Try it in your dawo package.. even if coffee tastes bad :(
Be a man..  and put all your 147 files in same folder :(
Read;  Pub layout conventions.. lib/src
Study other packages; How they did it.
Live in hope, that you are dumb.  I hope I have missed something very obvious. I confess, that I am not very eager to read instructions...
But I can use it test and example folder also.

I really hope that it is not this difficult.  If beginning Windows users must do this, so it is very big misery.
x   Waiting for better solution...
This can also be a security measure.. you can't let Dart mess freely in users folders..?


keskiviikko 4. joulukuuta 2013

What are you doing in package world? Just collecting errors.

Maybe I should delete all erraneous stuff immediately?  I keep separete folder: error_coll, where is now:  Dart_Web_Toolkit and google_Task_Api (My error).
Somehow I should get my mind over these errors to be able to work again...

Many of these errors seem to be related to my way of keeping My_package_testing_programs in subfolders. So it works if i put extra yaml-file to my collection_of_nine_separate_packages -folder, where i name again all packages, that are used in subfolders.
Second problem might be: maybe some of packages are dependent on older versions of other packages.  hop?  bot?
Reanalyze sources might correct something.

http://www.youtube.com/watch?v=Gs7MBnoFu9k

Was macht der Maier am Himalaja?1927


Got in editor:  57 problems, 297 warnings. 254 hints.  Mainly just testing packages from pub, very little anything own.  DartEditor is slow to analyze.  What to do?

pop-pop-win-1 have 17 problems, 132 warnings.
Package bot is empty. ( in bot_io and bot_web is needed stuff.. I suppose).
Multiple markers at this line.   - 'const' variables must be constant value.    aso.

my own dawo-package;  22 problems, 17 warnings.  AUTS!  it was here.
mainly because DartEditor can not find url:
Target of URI does not exist: 'lib/src/dawo_base_lib.dart'   AUTS!   AUTS!!


in polymer_dart_examples are many errors. So in my polymer_test.
These packages that i take in zip mode from github, should be updated more often.

So now dealing with these errors...  when do I get my package out? :(
.

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...

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.
.