Friday, July 01, 2005

Flash Demo: Netbeans + J2EE1.5 + EJB3.0 + GlassFish

Demo
ดูแล้วน่าสนใจยิ่ง

ยังไม่ได้อ่าน spec ของ EJB 3.0 เลย
แต่คุ้นๆว่ามีการนำ annotation มาใช้เยอะมาก

ใน flash demo มีตัวอย่าง
ของ servlet เรียกใช้ session bean
ชอบตรง annotation ที่ทำหน้าที่
คล้ายๆ Injection
(container จะรู้เองว่าควรเอา
object หรืออะไร มา set ให้)

Note:
GlassFish คือ Opensource
Application Server ของ Sun
(เดิมคือ Sun Applicatoin Server 9
ซึ่งให้ใช้ฟรีใน version PE )

Related link from Roti

Eclipse Bug Report in verse

Eclipse Bug number 100918

Shade Of Grey

Lyrics: mvm
Music: sung to the tune of the hit by "The Grateful Dead"

I guess it's just a shade of grey
When my editor dropdown opens I might realize
Just might realize
But those grey stripes
That easy slice
Gonna stay with me a while

But out in Motif
Well it's like a tractor factory
Out in the streets
They just don't use yellow

Bout seven list items high
All their dreams have been realized
Are being verticalized
And those grey strips
Just light up and shine
When I hit ctrl+e or touch that mouse of mine

etc...

Related link from Roti

Wednesday, June 29, 2005

Jdk1.5 & "Revenge of the Sith"

จาก Kirill Grouchnikov's Blog
The real story about how Anakin Skywalker became Darth Vader

ใครลองทำ "บ้านทรายทอง" บ้างสิ

Related link from Roti

Art of Science Competition

at princeton university
Link

"dynamic asset allocation problem in railroads"

"Transgenic Neural Stem Cells"

Related link from Roti

Monday, June 27, 2005

Forrest (Publishing framework)

ช่วงนี้นั่งทำเอกสาร tutorial อยู่
ก็เลยมองหา tool มาช่วยเขียน
จำได้ว่าพวก Apache ใช้มาตรฐาน xdoc
ในการทำเอกสาร ก็เลยตามเข้าไปดู

ไปเจอโปรเจค Forrest เข้า
Apache Forrest is a publishing framework that
transforms input from various sources
into a unified presentation
in one or more output formats

ก็เลย load มาทดลองใช้ดู

การใช้งาน ก็ง่ายดี
เริ่มต้นด้วยการสร้าง project ใหม่
ด้วยคำสั่ง forrest seed
โดยเจ้า forrest จะสร้าง directory, template file
ต่างๆให้



จากนั้นเราก็เข้าไป edit เอกสาร
ซึ่งใช้ format xdoc
และถ้าต้องการ generate web site ก็เพียงแต่สั่ง
forrest run เจ้า forrest ก็จะจัดการ
generate ให้เรียบร้อย

นอกจากนี้ยังสามารถ start เป็น web application ได้ด้วย
โดยสั่ง forrest run
เจ้า forrest ก็จะทำการ start jetty ให้
บน port 8888 ทำให้เราสามารถแก้ไขเอกสาร
พร้อมกับดูผลลัพท์ได้ทันที

หลังจากลองใช้สักพัก ก็เริ่มโลภมาก
อยากได้ feature source highlight
โดยกะว่าจะเพิ่ม tag พิเศษที่ชื่อ <javacode>
จะได้เอาไว้ render source code ให้มีสีสรรสวยงาม
ก็เลยค้นเอกสาร forrest
จึงรู้ว่า เจ้า forrest ใช้ cocoon เป็นฐานราก
Cocoon implements these concepts around
the notion of 'component pipelines',
each component on the pipeline
specializing on a particular operation.
This makes it possible to use a Lego(tm)-like approach
in building web solutions,
hooking together components into pipelines
without any required programming.

ใน pipeline ของ cocoon จะมี component
อยู่ 3 แบบก็คือ
  • generator ทำหน้าที่สร้าง xml sax event
    ขึ้นจาก source ต่างๆ ไม่ว่าจะเป็น file system
    ,jdbc, xml database, etc..
  • transformer ทำหน้าที่ตามชื่อ
    โดยรับ input เป็น sax event
    และให้ output เป็น sax event
  • Serializer ทำหน้าที่แปลง
    sax event ออกเป็น final format
    ซึ่งอาจจะเป็น html, pdf, svg, office document, etc..

forrests เปิดโอกาสให้เรา customize pipeline ได้
ก็เลยกะว่าจะ implements เจ้า Java2HtmlTransformer
ขึ้นมาเอง และก็ add เข้าไปใน pipeline ของ forrest เสีย
โดยเอา library java2html มาใช้

Related link from Roti

del.icio.us direc.tor

feature ใหม่ ของ del.icio.us
ชื่อ direc.tor
เป็นพวก AJAX อีกแล้ว
ที่น่าสนใจก็คือ เขาเขียน "How does it work?"
อธิบายการทำงานไว้ด้วย

Related link from Roti

The NetBeans Collaboration Project

Sun ปล่อย opensource ออกมาอีกตัวแล้ว
คราวนี้เป็น NetBeans Collaboration Project
ซึ่งเดิมเป็น feature ใน Sun Java Studio Enterprise 7
ซึ่งลักษณะการทำงาน ก็เป็นพวก IM
ที่เปิดโอกาสให้ developer chat กันได้
โดยผ่าน collaboration service ที่ java.net
ให้บริการอยู่

ได้ดู flash demo แล้ว
ชอบ feature ในส่วน share code
ที่เปิดโอกาสให้ร่วมกันแก้ไข source code กันได้พร้อมๆกัน
โดยระหว่างแก้ source code ของอีกฝั่ง
จะเปลี่ยนเป็น guard box ไว้ (lock เพื่อป้องกัน conflict)
จนกว่าจะแก้เสร็จ (หยุดพิมพ์)

Related link from Roti