Jsf – Facelets – Richfaces. part 1
It’s almost 2 months I did’nt update my blog
. Here we go. As the title suggest, I want to write about Jsf, Facelets, and Richfaces. But for as part 1 of all (don’t know the exact number hahaha) I’m just writing about preparation that is tools and resources needed to make simple things simple. It’s ok if you don’t know what all of this stuffs (jsf, facelets and richfaces) because soon we’ll understand by learning
. Let’s go!
Here’s tools required and used to make our work simple. Download and install.
- JDK 1.6, always needed because we’re learning java right?
- Netbeans 6.5, JEE version
- facelets support for netbeans 6.5
- richfaces support and palette for netbeans 6.5
To install facelets support, richfaces support and palette go to Tools – Plugins in netbeans, open Downloaded tab and click “Add Plugins..” button, select all .nbm files downloaded and click “Install”. Read the rest of this entry »
Simple CRUD – SpringMVC & Hibernate3
It’s been 5 months as I’ve been working with Java Technology. Yes, I’m just a newbie. I’ve been working as bug fixing support team for medical system which is built using struts 1, spring Ioc, and hibernate. It’s painful for me because the legacy code is huge and almost with no comment. In reality I almost never do coding with underlying framework but medical system framework itself. Although it’s painful it’s a good starting point for me to learn Java Technology.
In idle time I encourage myself to learn other java technology and try to put it in code at weekend. For this opportunity I want to share creating simple CRUD application using SpringMVC and Hibernate3. Simple CRUD application that we’re going to build only consist one entity class (Person). Actually what we’re going to build is similar to Simple CRUD – CodeIgniter. Let’s begin. Read the rest of this entry »
Simple CRUD – CodeIgniter
A couple months ago i have developed PHP application. That’s was the first time (and the only one) i used CodeIgniter. The development itself only took a short period, thanks to helpful plugins and libraries such as excel_reader, jpgraph, dompdf and many more. At this moment, i want to share my humble knowledge in creating simple PHP application.
As the title suggest, we are going to create simple CRUD (Create Read Update Delete) application using CodeIgniter framework. The application that we are going to build is not a complex application (that’s why we call it “simple”) but consists of features such as pagination and simple validation.
Here, i’m using CodeIgniter_1.6.3 and MySql 5. Let’s begin. Read the rest of this entry »
Java Transaction Design Strategies

Java Transaction Design Strategies
Bulan ini gw berhasil membaca secara keseluruhan buku berjudul “Java Transaction Design Strategies”. Buku ini membahas Transaction dengan mengambil contoh implementasi di EJB dan Spring. Melalui tulisan ini gw coba merangkum isi buku tersebut.
Secara garis besar, buku ini membahas 2 point: transaction model dan transaction design pattern. Sebelum membahas tentang 2 point tersebut, buku ini membahas transaction properties dan JTA and JTS yang menurut gw merupakan basic untuk mengerti transaction dalam java.
Transaction properties yang dibahas dalam buku ini:
- Atomicity. suatu transaction harus commit/rollback atas seluruh proses yang dilakukan dalam single unit of work (SUW).
- Consistency. ketika proses transaction berlangsung, database integrity (constraint) tetap terjaga.
- Isolation. suatu level penguncian transaction dari transaction yang lain, misal data yang sedang diupdate oleh transaction A dilock sehingga transaction B tidak bisa mengakses data tersebut.
- Durability. setelah commit sukses dilakukan maka dijamin seluruh proses transaction selesai (seluruh data telah tersimpan secara permanen).
JTA (Java Transaction API) merupakan kumpulan interface untuk proses pengaturan transaction. JTS (Java Transaction Service) merupakan low-level code yang implement JTA. Analogi dari JTA dan JTS adalah JDBC dan database driver. JTA (analogi JDBC) merupakan kumpulan interface yang siap pakai sedangkan JTS (analogi database driver) merupakan low-level yang umumnya tidak perlu diketahui detailnya. Selanjutnya mari bahas secara garis besar tentang transaction models dan transaction design patterns.
TRANSACTION MODELS
- Local Transaction Model. transaction diatur oleh resource manager. Contoh penggunaan DBMS, maka DBMS sendiri yang mengatur transaction sedangkan developer mengatur connectionnya.
- Programmatic Transaction Model. transaction diatur menggunakan JTA. developer perlu menulis code untuk pengaturan transaction. menggunakan interface javax.transaction.UserTransaction, developer menggunakan method begin() (memulai transaction) dan commit() atau rollback() (mengakhiri transaction).
- Declarative Transaction Model. transaction diatur oleh framework/container. developer hanya perlu menyiapkan konfigurasi transaction misal melalui ApplicationContext.xml (Spring) atau ejb-jar.xml (EJB).
TRANSACTION DESIGN PATTERNS
- Client Owner. pengaturan transaction dilakukan di presentation layer. umumnya digunakan jika applikasi perlu melakukan remote akses ke backend service atau jika applikasi mengandung fine-grained service (terlalu banyak pemanggilan service layer code dalam sebuah proses transaction).
- Domain Service Owner. transaction design pattern yang digunakan pada umumnya. pengaturan transaction dilakukan melalui Domain Service.
- Server Delegate Owner. spesial case dari Domain Service Owner, mengandalkan Command Pattern atau Server Delegete Pattern dimana pengaturan transaction dilempar ke server dengan mengirim command.
Kira-kira itu yang bisa gw rangkum dalam tulisan ini. Lebih jauh, silakan download (http://www.infoq.com/books/JTDS) dan baca bukunya karena ternyata buku sebagus ini gratis (ebook-version).
My favorite mozilla add-ons
Brangkat dari pertanyaan seorang teman, add-ons yg lu pake apa aj hen?. Nah gw coba tuliskan disini add-ons yg menjadi favorite versi gw…
- TabKit. Setiap tab di mozilla defaultnya akan muncul berderet ke samping (1-row). Nah dengan add-ons ini tab jadi lebih rapih karna bs multi-rows, grouping dan tab coloring.
Tab Kit
- SaveComplete. Menu Save Page As… di mozilla masih kurang menurut gw, klo save halaman web kadang ga sama hasilnya (ada aja yg ga disave), nah ini solusinya.
- CacheViewer. Buat ngeliat isi cache, berguna bgt klo apa yg dah pernah didonlot keapus, tinggal cek ke cache jd ga harus donlot lagi.
CacheViewer
- StumbleUpon. Khusus bersurfing ria dikala waktu luang, banyak hal menarik yang gw temuin pake add-ons ini. try yourself.
StumbleUpon
- Firebug. Add-ons ini umumnya gw pake buat debuging dlm web development dan kadang buat bljr or nyolong teknik dr web lain
Firebug
What’s yours??