Wimos [Internet News and Bussines]

Wide Article for News and Bussines in Internet


Archive for the ‘PHP’


How to use Smarty resources

Have you ever faced the situation, that the content of a variable is a Smarty template like string, and you want to fetch or display it? I worked on project where we decided that our language file entries will be Smarty templates, because we need the flexibility of the template engine (sprintf was not enough). The problem is, that by default Smarty’s fetch/display method accepts a template file name. Of course we could write the text to a temporary file, but it would be bigger hack than PHPNuke. Fortunately Smarty has the mechanism to solve this problem via defining custom resource types. (more…)

Popularity: 6% [?]

Maximalkan Processor dan Memory, minimalkan akses hardisk

Wuihh memory sekarang ngeri, harganya tambah murah aja. Sekarang bukan aneh lagi komputer desktop memorinya 2 GB, bahkan processor pun sudah mencapai 8 core, yang 4 core pun sudah banyak di pasaran.

Tapi ada satu kendala bagi aplikasi yang menjadikan database sebagai tempat penyimpanan data mereka. Jika datanya sedikit mungkin belum terasa, tapi kalau datanya banyak.. baru terasa.

Apa yang terasa ?? Terasa lambat maksudnya. Kenapa ?? Karena data tersebut disimpan di harddisk. Dan sudah kita ketahui bahwa Hardisk adalah media penyimpanan yang berbentuk mekanik. Maka wajar bila terjadi “leher botol” disini. (Hehehe.. bahasa Indonesia bangeet).

(more…)

Popularity: 12% [?]