dear all

baru liat film di http://railsenvy.com/ - lucu - tapi biasanya, yg
lebih pusing saat switch database tuh bukan di aplikasinya, tapi
justru di migrasi databasenya, mo pake pascal/vb/php/python/perl.

#in english
database migration is a pain in the ...

On 5/23/07, Arie Kusuma Atmaja <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> Selamat Siang..
>  Maaf ini saya cross posting ke id-ruby, id-python dan id-php, karena kalau 
> tidak
>  salah ingat kemarin dulu [10] pernah Pak Widi Harsojo dan Pak Andry S. Huzain
>  membicarakan tentang ruby dbi ini di id-ruby. Pak Andry sampai pernah kasih 
> codes
>  gabungan antara ruby dan java (JRuby), dan Pak Widi cerita dari beliau waktu 
> itu
>  sedang sibuk di client beliau. Jadi, dengan begini, mungkin saja dari Pak 
> Widi
>  langsung yang bergumul dengan ini atau juga dari teman-teman lain bila ingin 
> ada
>  yg ditambahkan atau dikoreksi dipersilahkan saja ya. Teman-teman yang di 
> id-python
>  juga kalau ada more inside stories tentang DBI di python dipersilakan banget 
> ya.
>  Terima kasih.
>
>  Steven Haryanto wrote:
>  > Edwin Pratomo wrote:
>  >> saya juga punya case lain yg mirip. DBI.
>  >> mengapa DBI sukses di Perl tapi tidak di bahasa lain?
>  >> ada analisa?
>  >
>  > kalau sekilas melihat, yang terjadi juga mirip2x dan malah mungkin
>  > terkait secara kausal: librari seperti DB abstraction dll terlambat
>  > diadopsi menjadi standar karena ketiadaan repositori sentral a la CPAN.
>  >
>  > yang paling parah mungkin di php. dari awal2x sudah ada support utk
>  > masing2x db included di php. tapi PEAR::DB (dan keseluruhan PEAR) itu
>  > telat didevelopnya, sehingga udah ada 3rd party libraries seperti ADOdb
>  > yang popular, tapi statusnya gak official. sementara di buku2x,
>  > tutorial2x web, orang masih ngajarin utk melakukan mysql_connect(),
>  > pg_connect(), dll...
>  >
>  > di python dan ruby kayaknya gak separah php. di python librari2x akses
>  > db memang udah dikembangkan sendiri2x dan sejak lama oleh para
>  > developernya masing2x, tapi rata2x sudah menyediakan interface yg
>  > komplian dengan DB-API 2.0 yg jadi standar. di ruby juga kayaknya ada
>  > DBI? (utk ruby mungkin bisa ada yg kasih more inside stories...)
>
>  Di Ruby ada [ruby-dbi][1] sudah ada di raa sejak tahun 2001 oleh Michael 
> Neumann
>  lalu proses selanjutnya dimaintain oleh Francis Hwang. kalau search di 
> rubygems
>  malah ada gem dbi-dbrc yang butuh panggil 'dbi' / ruby-dbi tapi tidak 
> berpegang
>  pada ruby testing yg ketat, mirip seperti kasus sqlite yg jalan setelah ada 
> maupun
>  sebelum adanya swig tapi bukannya dikasih error malah tetap jalan, bedanya 
> kalau
>  sqlite tetap jalan, sedang dbi-dbrc error kalau tidak ada ruby-dbi (tentu 
> saja ini
>  jelas sudah).
>
>  Tolong terutama tentang swig dan sqlite kalau ada yang ingin komen 
> dipersilakan
>  ini, ini kasus nyata yg dialami stian bule kemarin, dia curhat ke saya 
> sqlite dia
>  melambat. Karena kalau di saya selalu cepat / tidak ada masalah. Di balik 
> layar
>  juga sebetulnya karena saya sangat mendukung gerakan [wikipedia offline 
> opensource
>  project][9] oleh stian ini (disamping projects lain seperti 
> [boxroom-stian][8] yg
>  langsung sangat saya dukung melalui git commit saja dan [DVD Ruby 
> Offline][7] ke
>  seluruh dunia yang rubygems dari mirror kemarin sudah saya kirim ke irfani, 
> untuk
>  Irfani dan teman2 anak2 binus saya mengucapkan selamat menjadi satu diantara
>  penggerak DVD Ruby Offline dan semoga sukses!).
>
>  Yang saya lihat mayoritas Rubyist yang juga Railers lebih suka pakai ORM yang
>  tersedia di dunia ruby maupun rails. Entah itu menggunakan activerecord yang
>  populer dari Rails, maupun og yang populer dengan adanya Nitro. Sementara, 
> bila
>  ada projects basis Ruby (bukan Rails), baru disini [ruby-dbi][12] yang 
> berperan.
>
>  Sekedar berbagi dan menambahkan, mungkin film joke parodi Mac VS PC oleh
>  http://railsenvy.com/ itu [5] tidak akan ada ceritanya kalau PHP punya 
> budaya DBI
>  ini juga kali ya? Karena kalau di Rails budayanya adalah ORM itu tadi, alias 
> apa
>  yang berhubungan dengan database sudah ada "bahasa manusia" nya, jadi mis. 
> ingin
>  "SELECT * FROM mantan_kekasih WHERE age = 19" di activerecord tinggal
>  MantanKekasih.find_all_by_age(19)
>  atau mis. ingin "INSERT INTO dan seterusnya" di activerecord tinggal
>  MantanKekasih.create(:name => "bantalan hitam", :age => 20) yg mana kalau ada
>  variable masuk activerecord sudah dibersihkan utk soal sekuriti (ambil saja 
> contoh
>  sering SQL Injection) jadi sudah aman. Tentang migration ke macam-macam 
> database
>  itu digunakan activerecord migration dengan perintah rake db:migrate. Jadi 
> ada
>  codes yang berbasis ruby untuk database / codes ruby ke database. Begitupula 
> dari
>  database ke codes ruby, ada cara memigratenya, lebih lengkap & jelasnya baca 
> buku
>  [Rails Recipes][11] tulisannya Chad Fowler.
>
>  Tapi terlepas dari itu semua, jujur dari saya pribadi, berharap DBI di Ruby 
> (yg
>  murni di ruby ya, bukan rails) bisa lebih friendly lagi. Saya pikir 
> kebutuhan ini
>  ditambah soal sekuriti tadi itu krusial bahkan baiknya ditaruh di level 
> rubygems
>  saja (jadi bukan sekedar tambahan di plugin saja) yang tujuan utamanya sudah 
> jelas
>  => supaya tambah produktif, atau kalau bahasa Pak Endy Muhardin, 
> Productivity Hack
>  nya Rubyist dan Railers. BTW dulu pernah Pak Edwin curhat ke saya tentang
>  ruby-firebird yg sudah lama tidak dimaintain (maklum saja kalau beliau 
> inilah yang
>  membuatkan perl firebird di CPAN [6]).
>
>  Links:
>  1. http://ruby-dbi.rubyforge.org/
>  2. http://www.kitebird.com/articles/ruby-dbi.html
>  3. http://raa.ruby-lang.org/search.rhtml?search=DBI
>  4. http://raa.ruby-lang.org/project/ruby-dbi/
>  5. http://railsenvy.com/2007/5/21/hi-i-m-ruby-on-rails-part-4
>  6. http://search.cpan.org/search?query=edwin+pratomo&mode=all
>  7. http://rubyoffline.wikidot.com/
>  8. http://repo.or.cz/w/boxroom-stian.git
>  9. http://repo.or.cz/w/zip-doc.git
>  10. http://tech.groups.yahoo.com/group/id-ruby/message/1476
>  11. http://tech.groups.yahoo.com/group/id-ruby/links/Buku_Rails_001179121944/
>  12. http://rubyforge.org/projects/ruby-dbi/
>
>  ####################################################
>  # in English
>  # as we know there are "bule" in id-perl and id-ruby
>  ####################################################
>
>  Sorry for this cross posting to id-ruby, id-python and id-php, because there 
> was
>  also a discussion about ruby dbi on id-ruby mailing list [10] between Mr. 
> Widi
>  Harsojo and Mr. Andry S. Huzain. Mr. Andry even gave his source codes ruby 
> and
>  java combination (JRuby) and Mr. Widi told he's been busy at his client's 
> place.
>  So I hope there will be much more additions from both Mr. Widi and Mr. Andry
>  and/or also from other friends of ours. I'm also pleased to hear more inside
>  stories about DBI in python. Thank you.
>
>  ruby-dbi [1] had been existed since 2001, created by Michael Neumann, then 
> in its
>  next development process maintained by Francis Hwang. If we search rubygems
>  there's even dbi-dbrc gem which needs to call 'dbi' / ruby-dbi but I can see 
> it
>  doesn't hold TDD that much, perhaps similar to sqlite which can run 
> eventhough
>  without swig and no errors being generated, meanwhile dbi-dbrc got errors if
>  there's no ruby-dbi installed (c'est bien sûr!).
>
>  I will be pleased to listen to you all our friends especially about swig and
>  sqlite. This is Stian's real case, he talked to me that his sqlite's getting
>  slower and slower. I didn't see that quite clear, because sqlite just runs 
> well on
>  my system / no problem. As I do support his offline wikipedia [9],
>  boxroom-stian [8] and DVD ruby offline [7] / I also want to say 
> congratulations to
>  Irfani as one of Ruby Offline Guy and his friends at Bina Nusantara Jakarta, 
> Good
>  Luck! I've sent all rubygems from rubygems' mirror yesterday to him.
>
>  From my observations, I can see most Rubyists who are also Railers would 
> prefer
>  use available ORM instead. Either activerecord which is popular from rails 
> world,
>  or og which is popular from nitro world. Meanwhile ruby-dbi [12] is used for 
> ruby
>  based projects (not rails). I can see our rubyist fellows use activerecord 
> (alone
>  without rails) for their ruby based projects (not rails).
>
>  As for this sharing and my addition, perhaps Mac VS PC parody [5] by
>  http://railsenvy.com would not exist if PHP got DBI culture, wouldn't it? 
> Because
>  Rails culture is that ORM. There is already a "human language" for its 
> database in
>  Rails (or activerecord for exact as AR could be used without rails). For 
> example,
>  we want to "SELECT * FROM ex_girls WHERE age = 19" in AR (activerecord) we 
> use
>  ExGirl.find_all_by_age(19) and blast it's already there available in closure 
> /
>  ruby block's iterator. Or perhaps we want to "INSERT INTO table et ce tera" 
> we (we
>  refer to use: rubyist and also railers) just use ExGirl.create(:name => 
> "Black
>  Pillow", :age => 20) whilst if there's variable existed before being 
> inserted into
>  ExGirl table it's already cleaned by AR, so it's already save from example
>  regarding SQL Injection concerning security. There's also a migration 
> facility to
>  various databases, in this ActiveRecord Migration, so we just use rake 
> db:migrate
>  and bang! database's changed! There is migration ruby codes facility _to_ 
> database
>  and there's also a migration ruby codes facility _from_ database, please read
>  Chad's book Rails Recipe [11] for detail explanation.
>
>  However, I frankly hope that DBI in Ruby could be much more friendly. I 
> think this
>  necessity should be at rubygems level (not just plugin) in order to be more
>  productive, or mimicking Mr. Endy Muhardin, Productivity Hack for Rubyist and
>  Railers. BTW Mr. Edwin ever talked to me about the old unmaintained 
> ruby-firebird
>  (I appreciate and can understand his will as he's the guy who made perl 
> firebird
>  at CPAN[6]).
>
>  Links:
>  1. http://ruby-dbi.rubyforge.org/
>  2. http://www.kitebird.com/articles/ruby-dbi.html
>  3. http://raa.ruby-lang.org/search.rhtml?search=DBI
>  4. http://raa.ruby-lang.org/project/ruby-dbi/
>  5. http://railsenvy.com/2007/5/21/hi-i-m-ruby-on-rails-part-4
>  6. http://search.cpan.org/search?query=edwin+pratomo&mode=all
>  7. http://rubyoffline.wikidot.com/
>  8. http://repo.or.cz/w/boxroom-stian.git
>  9. http://repo.or.cz/w/zip-doc.git
>  10. http://tech.groups.yahoo.com/group/id-ruby/message/1476
>  11. http://tech.groups.yahoo.com/group/id-ruby/links/Buku_Rails_001179121944/
>  12. http://rubyforge.org/projects/ruby-dbi/
>
>  --
>  Arie || ariekeren, YM!=riyari3, http://ariekusumaatmaja.wordpress.com
>  http://groups.yahoo.com/groups/id-ruby
>  BDD and its children are sexy! I now recommend you all to use them!
>  http://rspec.rubyforge.org/
>
>                    



-- 
Best Regards,
Herdian Ferdianto

Kirim email ke