Monday, October 29, 2007

.NET Day 1/ Hari Pertama .NET utk aku

Hahahaha.... Hari ini aku berjaya membuat web app pakai .NET dlm C#.. simple² jer...
buat ajax calendar pulak tu..
pastu belajar la apa yg dipanggil script manager.. update panel..
bawah ni gambarnya..
sila focus kat url & page size.... besar gile file yg dirender... kat tempat aku nih mesti page tak kuar langsung...
.

Friday, September 21, 2007

Tip-tip hibernate


  1. Gunakan version yang terkini walaupun beta and banyak feature² baru menarik dan berguna.. senang cerita gunakan Hibernate 3.
  2. Buat semua associations lazy(Hibernate 3 telah setkannya secara default) dan pilih utk join atau fetch secara eager utk spesifik use-case.
  3. Definasikan strategi pengurusan session terlebih dahulu. Mungkin, kita akan menggunakan
    1. satu session per request,
    2. session per request with detached objects,
    3. session per application transaksi acros multiple request, dll.
  4. Definisikan startegi flush terlebih dahulu.
    1. Hibernate auto-flush
    2. definisikan sendiri synchronization points di mana flush ke db diperlukan
  5. Definisikan strategi caching terlebih dahulu utk
    1. data transaksi
    2. data yg dillookup tetapi berubah² utk dlm short period.. gunakan open source product spt OSCache.
  6. Cachekan entiti-entiti anda dan pastikan ia turut diaplikasikan kepada association mapping spt(set,map,bag,list)
  7. Pilih join yg betul utk entiti one-to-many, many-to-many associations, set nilai saiz batch
    utk koleksi sekiranya anda mendapatkan data secara eagerly.
  8. Gunakan optimistic concurreny melalui kolum version sekiranya boleh. Timestamp pun boleh juga. tetapi tidak dijamin. selebihnya translate lah sendiri..
  9. Understand the lifecycle of identifier creation. If you are using sequences or other database-generated identifiers, your identifiers won't be set until the new entity has been saved to the database. If you use the identifier as part of your equals() and hashCode() implementation, this means that if you add the entity to a Set before you save it, you won't be able to find it again after it's saved. I've gone to UUIDs assigned in the constructor of the entity instances for this reason, and it makes life much easier. I've heard that some people, faced with this, have made their hashCode() implementation always return the same number for every instance of an entity. While this technically fulfills the contract of hashCode() it's hardly optimal.
  10. Set your IDE up with a reference to the Hibernate source code of the distribution you are using so you can trace into it. Not only will it help you understand what's causing the behavior you're seeing, but it will help you understand how Hibernate works.
  11. Understand the 2nd level cache (and understand that the Session is your 1st level cache). Understand how it caches your entity data (as a Map of identifier to Array of field values) and collections (it just saves the identifiers and re-constitutes the objects from the entity cache).
  12. Go buy Hibernate in Action. It covers Hibernate 2.1 but the ideas are the same, there are just some new features in 3.0.
  13. Speaking of new features, look at Filters. I haven't had a chance to use them yet, but the mere fact that they make the effective date problem so easy makes them a huge win. They can also let you find the number of records in a collection, etc. without having to load the whole thing, very nice.
  14. Baseline your first working setup with memory and CPU profilers and also with a SQL profiler like IronTrack SQL, then re-run your test cases with the profilers for every configuration tweak to see what the effects are.

Tuesday, September 11, 2007

http://openjnlp.nanode.org/app-list.html

http://openjnlp.nanode.org/app-list.html

Looking for Smart Client Container for java

Currently, I am looking the smart client container which support on-line and off-line mode.. The smart client is actually combination of thin and rich client.. The web browser is not a smart client.. becoz it never go to school :D.. the smart client should adopt with the SOA..

finally i found the smart client container for java, it also for me..

http://smartcc.sourceforge.net/

but... :(

then, i found another demo of smart client container for java

http://www.vlsolutions.com/en/products/docking/demos.php

I hope i can implement Smart Client + SOA in the future project :D

Who is the Follower, Who is the Leader

Last few days, i got a seminar. All is about IT Technologies.. That event was made me feel good if i could managed myself into their world.. I really impressed with 1st demo and 2nd demo. Actually, I was really like the topic than the demo actually. 1st Topics is Enterprise Pattern and Testability. The presenter was impressed me by one of his demo that i called the refactoring process. Actually, That demos was including Nunit. oppp.. not Nunit but their unit testing so called.. The presenter was show their ability to refactoring the codes from top-down code into the nice code with unit tests together. Nice codes means.. it difficult to say about nice codes.. may be u can googling the meaning of "Nice Codes".. I was impressed that demo.. It was like booooom.. wah... nice.. nice...nice.. It was like a master of kungfu show the powerful movements...

But.. when i was on the way to my home, my brains was thinking about the moving of another new world but.. The key is... who is the leader.. who is the follower... of these concepts. So... it made me to stay in the current line and will not plan to moving into the another world...

Morale of the story..
next time, I will only impress when i see the successful real-world scenario project which is brought a lot of complexity into the system.. actually, the simple demo always not covers the difficult or complex parts.

Wednesday, September 5, 2007

Blinq.. for ASP .NET Fan club

Today, i found new framework. It Is Blinq.
Actually, Blinq is a tool for generating ASP.NET websites for displaying, creating, and manipulating data based on database schema.

More details on the below link
http://www.asp.net/downloads/sandbox/blinq/

erm... My Code gen can do same workloads.