December 2007 - Posts

DNN and LINQ - Show Module List

This short tutorial is how to use ASP .NET 3.5 features inside DotNetNuke and how it can helps you to simplify a lot of things that usually created manually. This first tutorial is about showing list of modules inside a page using LINQ. This is an update version of my last tutorial on DNNWiki.net here.

The article cover :

  1. How to load DNN menu (or tabs) and bind it in a bindable control
  2. How to use DNN ClientAPI to inject confirmation window to a button control (or whatever web control you like)
  3. How to load DNN modules and bind it in a bindable control
  4. How to delete module
  5. How to clear DNN site cache

But this article only cover number 1 and 3 by using LINQ.

In my last article, I used DotNetNuke API. But you can do it in many ways as follow :

  1. Create your own store procedure or just calling DNN existing stored procedure
  2. Using DotNetNuke API itself
  3. Alternatively, by using LINQ

I will not cover the first way since you can do it easily by analyzing table structure inside DotNetNuke or by analyzing existing DotNetNuke stored procedure.

I just want to show you the different way using LINQ.

In my last article, I used this approach when populating Tabs to a dropdownlist control :

gettabsusingdotnetnukeapi

But since i'm gonna using LINQ, i can change it like below :

gettabsusinglinq

The result is the same, but using different way. Yes, that's tricky just to validate using TabPath. But for simplicity, it's ok. You can play with LINQ more extensively. For doing this, you have to know the table structure for each fields that refer to a DotNetNuke functionality. For example, DotNetNuke API has a lot of function that encapsulated inside a method or function like IsSuperTab, IsAdminTab. How they are different each other ? To understand this, you have to read documentation and the source code. Actually, in LINQ there are no such things like that. The solution is you have to create your custom LINQ provider or create your Extension method.

To populate list of modules inside a page, i use this code :

getmodulesusingdnnapi

By using LINQ-way, i can use this approach :

getmodulesuisnglinq

Again, this LINQ code is remove the complexities when validating some information. You can add m.Module.AllTabs == false || m.Module.IsDeleted == false in WHERE clause to make it same as code before. Here, LINQ doesn't provide encapsulate mechanism as I explain before. You have to know every fields functionality in your table. Create your own LINQ provider or create Extension method.

Oh btw, this is the .dbml file that i've been created for this tutorial (i named it DNN.dbml):

dnndbml

This DNN.dbml will generate DNNDataContext class that you can use it in your application. For example :

linq

The different is, now i can play with LINQ without having to know the SQL syntax to load records (and also other LINQ features). LINQ generate T-SQL nicely and do as expected IF you create right LINQ construct. So far playing with LINQ inside DotNetNuke is really having fun and provide greater flexilibity.

Next, I will explore DotNetNuke API using LINQ.

Stay tune.

Share this post: | | | |
Posted by agung | 1 comment(s)
Filed under: ,

DotNetNuke 4.8 released

Yes, it's true. You can download it here.

Quick list of changes in DotNetNuke 4.8 are (based on http://support.dotnetnuke.com/) :

Performance Bug DNN-1553 PurgeEventLog is very slow
Admin / Host Functions Bug DNN-1009 Recycle Bin
Admin / Host Functions Bug DNN-3602 Scheduler update button adds additional records in Schedule table
Exception Management Bug DNN-5199 Poor design and performance in CBO.vb GetOrdinals function
Exception Management Bug DNN-5198 Poor design in critical path function CreateObject in CBO.vb
Admin / Host Functions Bug DNN-5344 Skin Preview on Page Settings, Host Settings
Performance Bug DNN-5432 Page state persistence set as memory stops user interaction with website
Admin / Host Functions Bug DNN-5548 Scheduler stop/start events being logged...
Performance Bug DNN-5639 Scheduled Task queries are slow
Localization / ML Bug DNN-6850 ControlTitle not localized if it's blank
Admin / Host Functions Bug DNN-6111 GetSchedule( TypeFullName,Server) returns incorrect NextStart date.
Localization / ML Bug DNN-6223 New options do not have help Text assigned
Installation / Upgrade Bug DNN-6241 Configure Database Connection\Test Database Connection
Admin / Host Functions Bug DNN-6702 Skin Designer bug
Friendly / Standard URLs Bug DNN-6713 HumanFriendlyUrls: Changing TabName or parent cause 404
Friendly / Standard URLs Bug DNN-6716 Human Friendly Urls Not Working With Turkish Locale
Friendly / Standard URLs Bug DNN-6718 Humanfriendly URLs doesn't work sometimes with querystring parameters.
Admin / Host Functions Bug DNN-6819 getExternalRequest is broken after saving Host Settings
End User Functions Bug DNN-6820 self assigned Roles and RSVP requires log off and log on
Localization / ML Bug DNN-6700 Errors during adding locale not 'catched'
Admin / Host Functions Bug DNN-6894 Error in Security Roles when in "Textbox" mode
Core Modules Bug DNN-6731 Problem with the Account Login module and Friendly Url's
File Manager Bug DNN-6756 Scheduled File Synchronization
Control Panel Bug DNN-6762 'Page Functions' and 'Common Tasks' tables dont center properly in firefox 2.0.0.9
RSS Bug DNN-6769 DotNetNuke.Services.Syndication.RssHandler.GetRssItem() generates wrong links
Admin / Host Functions Bug DNN-6770 DotNetNuke.Common.Utilities.SiteMap.BuildSiteMap() generates wrong URL.
Installation / Upgrade Bug DNN-6741 Errors in scripts when databaseowner not dbo
Admin / Host Functions Bug DNN-6744 Can't create new Portal, if Alias is Subdomain
Admin / Host Functions Bug DNN-6747 No dll when creating module package.
Admin / Host Functions Bug DNN-6780 Token Replacement no longer working
Admin / Host Functions Bug DNN-6795 Email notification sent when user is deleted
Friendly / Standard URLs Bug DNN-6708 HumanFriendly Urls breaks search (at least sometimes)
Admin / Host Functions Bug DNN-6709 Host File Manager
Performance Bug DNN-6817 Bug Server Specific Schedules
Admin / Host Functions Bug DNN-6818 Schedule History "Duration" column is mislabeled
General Bug DNN-6824 TokenReplace emits wrong message if access restricted
Templates Bug DNN-6830 Creating new pages adds multiple duplicate modules.
Admin / Host Functions Bug DNN-6786 Friendly URL Rules - can save blank record
Admin / Host Functions Bug DNN-6801 DeleteUser fails if user has been assigned permissions
General Bug DNN-6811 AJAX not enabled for SkinObjects
Admin / Host Functions Bug DNN-6864 Scheduler errors in event log after installation
Admin / Host Functions Bug DNN-6774 Submit Sitemap error
Security Bug DNN-6881 Logoff redirects to home
Admin / Host Functions Bug DNN-6773 Unneccessary Exceptions in FillModuleInfo and FillTabInfo
Admin / Host Functions Bug DNN-6810 Pane Container attributes removed before all modules processed
Exception Management Bug DNN-6855 Moving dnn:ACTIONS in container crashes error handling
Performance Bug DNN-6845 Moving Viewstate consumes Memory
Performance Bug DNN-6846 Unneccessary Actions are added to the Actions collection
Admin / Host Functions Bug DNN-6660 url tracking not working for links to internal tabs using linkclick
Installation / Upgrade Bug DNN-6752 Installation stalls with bad db user
Data Access (DAL) Bug DNN-6784 GetPortalRoles sproc is incorrect
Admin / Host Functions Bug DNN-6788 Newsletter: Language filter correction
UI / Usability Enhancement DNN-6825 Enable LanguageSelector Control to handle Languages and Locales
Admin / Host Functions Enhancement DNN-6771 DotNetNuke.Common.Utilities.SiteMap.BuildSiteMap() generates obsolete URLSET element
Dependencies Enhancement DNN-6743 IIS7 Integrated Pipeline support
Security Enhancement DNN-6857 ensure browsers do not remember sensitive data such as usernames and password
Localization / ML Enhancement DNN-6405 Localization.GetString throws NullReferenceException when key is nothing
Admin / Host Functions Enhancement DNN-733 Newsletters - Send Action
Admin / Host Functions Task DNN-5498 Outdated Text added to GlobaslResources.resx
Admin / Host Functions Task DNN-5544 typo in EditProfileDefinition.ascx.resx in Introduction_Add.Help
Admin / Host Functions Task DNN-5496 Spelling Issue SQL
Release Packaging Task DNN-6045 GeoIP file is outdated
Localization / ML Task DNN-6499 "PasswordRetrievalDisabled" missing in resource file

Share this post: | | | |
Posted by agung | with no comments
Filed under:

I'm at Microsoft National Innovation Day 2007

Yes, this is true ! Yesterday at December 13rd, 2007 at Jakarta Ritz Cartlon Hotel, Microsoft did National Innovation Day 2007. The key point it, Microsoft choose some of ISV that can be nominated as innovation star on 2007 based on some category. If you don't know the Microsoft Local Software Economy (LSE), then you should read it. It's a great idea to make micro ISV growth together with Microsoft support. The ISV Empowered program is also great for micro ISV or start up company.

For me, it's a reward. This is the same when the first time i've got my MVP reward. Honestly I don't know the judgment criteria, so I think this is blessing for me in 2007.

This is an honour for me to got this reward.

And very nice to meet all of them in the same booth at Ritz Carlton, Jakarta. This is some of the photos that i've been collected :

result

This is the Innovation Star 2007 result :

Bintang Inovasi 2007

isvs

Together with Sangkuriang Studio, Dycode, and PE College, we are one from more than 1000 micro ISV in Indonesia which managed. And don't tell me that i'm using unmanaged code now, it's all managed since established (you can say it 'manage by default'. :-) ). :) But *cough cough* yes, some of our code is unmanaged, but if we want to communicate with COM only. :)

isvs2

This is when the award is given.

Btw, do you want to know our team ? Here we are :

team1  team2

Small, but effective and productive by using DotNetNuke as web application framework.

And this is, *cough cough*, the grandmaster : 

team3

And this is the reward :

plakat

You know, this is the first time in Microsoft event they have an ISV promote DotNetNuke and be proud of using DotNetNuke t-shirt design by myself. Everybody ask us and want to know us because ... we are different. And very proud to be different. Hey, did I tell you that our team is small ? :)

Don't grow your company based on employee number, but increase the revenue by doing more product installation, more services, and more features. :)

Share this post: | | | |
Posted by agung | 19 comment(s)

Yahoo Messenger for Vista

Ya, sebagaimana issue yang terjadi beberapa tahun yang lalu, ternyata memang Yahoo mengeluarkan versi Messenger yang running khusus di Vista.

YM-Vista

Download saja disini : http://messenger.yahoo.com/windowsvista.php

Share this post: | | | |
Posted by agung | 1 comment(s)
Filed under:

WROX - Beginning DotNetNuke Skinning and Design

Ya, ini baru terbit di WROX. Judulnya adalah "Beginning DotNetNuke Skinning and Design" yang dibuat oleh Andrew Hay bareng Shaun Walker. Buku ini merupakan paket dari WROX DotNetNuke Series. Dan sudah ada di meja untuk dipelajari oleh BataviaSoft Skin Designer. Kita punya semua buku yang berhubungan dengan DotNetNuke baik yang diterbitkan oleh WROX, APress, dan yang lainnya.

buku

Saya kutip singkat summary dari buku itu :

"The skinning engine of DotNetNuke has strengthened over the last several years, making it a highly successful way to customize the look, feel, and user experience of a web site. Featuring a Foreword by DotNetNuke creator Shaul Walker, this book takes you through the process of designing a custom skin for a DotNetNuke site and shows you how to apply web design features to that site."

Apa yang akan Anda dapat pelajari dari buku ini adalah sebagai berikut :

  • Bagaimana cara mendapatkan, memodifikasi, dan menerapkan skin yang sudah ada
  • Tips dan trik saat bekerja dengan skin pada DotNetNuke agar bisa lolos uji validasi HTML
  • Memahami cara bagaimana melakukan instalasi menu dari pihak ketiga
  • Mengetahui bagaimana melakukan personalization, AJAX, Silverlight, dan teknologi sIFR
  • Memahami cara memaksimalkan kontrol DotNetNuke di dalam situs Anda

WROX DotNetNuke series sendiri sejauh ini sudah dan akan menerbitkan buku :

  • Professional DotNetNuke 4 (sudah terbit)
  • Beginning DotNetNuke Skinning and Design (sudah terbit)
  • Professional DotNetNuke Module Programming (belum terbit)

Take a look those books.

Share this post: | | | |
Posted by agung | with no comments
Filed under:

Kompetisi INDC Skinning

Wah, baru liat ada image keren nih yang isinya kompetisi mengenai skinning tapi dalam bahasa gaul. Liat aja :

helpgeek

Hayu atuh, kapan nih pada ikutan ?

Catatan : Detailnya disini : http://cabeijo.com/blogs/helpgeek/archive/2007/10/31/helo-geek-indonesia.aspx

Share this post: | | | |
Posted by agung | 3 comment(s)

Simulasi Domain di Windows Vista

Saat membuat website, seringkali kita dihadapkan pada kebutuhan simulasi atau pembuatan contoh atau prototype suatu website kepada client, atau mungkin sekedar untuk presentasi suatu solusi yang sedang kita tawarkan ke dalam suatu alamat website real seperti www.yourcompany.com.

Nah, yang paling sering kita lakukan adalah kita mensimulasikan itu pada sistem operasi berbasis Windows Server bukan ? Bagaimana jika sistem operasi biasa saja tapi bisa melakukan hal itu ? Baiklah, kita mulai saja.

Pertama, masuk ke Command Prompt menggunakan mode Administrator. Lalu arahkan pada folder C:\Windows\System32\drivers\etc

Kemudian ketik : Notepad hosts

Sesaat kemudian akan ditampilkan aplikasi notepad yang membuka file hosts

cp

Editlah pada bagian terbawah untuk memasukkan IP local Anda dan nama domainnya (apa saja tersera Anda). Berikut ini contohnya :

hosts

Saya menggunakan contoh domain :

www.citigroup.com, www.citibank.com, dan www.citifinance.com.

Note: Ini hanyalah contoh simulasi saja, kesamaan nama domain hanyalah kebetulan saja.

Test terlebih dahulu dengan PING www.citigroup.com. Jika hasilnya reply, maka berarti proses penambahannya sukses. 

Setelah itu, saatnya Anda membuat website baru pada IIS7. Bukalah IIS7 melalui urutan menu : START --> RUN, lalu ketik INETMGR dan tekan Enter.

Kemudian buatlah website baru dari jendela IIS7 tersebut. Klik kanan pada Web Sites dan pilih Add New Web Site... Yang menarik di WIndows Vista adalah kini Anda bisa membuat lebih dari satu website pada satu IIS. Bandingkan dengan XP yang hanya bisa 1 saja (kecuali dengan tambahan tools lain). Artinya, Anda bisa membuat lebih banyak lagi simulasi yang mendukung skenario bisnis.

addwebsite

Isikan informasi yang dibutuhkan sebagai berikut :

  • Web Site name : citigroup.com (atau apapun nama yang Anda mau)
  • Application Pool : Classic .NET AppPool (atau DefaultAppPool, sesuaikan dengan kebutuhan)
  • Physical Path : <isi dengan path sesuai dengan lokasi aplikasi Anda>
  • IP Address : 127.0.0.1 (atau isilah dengan IP yang saat ini aktif di komputer Anda)
  • Host Header : www.citigroup.com (sesuaikan dengan isian pada file hosts)

websiteconfigure  websitehost  

Dan sekarang Anda sudah bisa mem-browse aplikasi web Anda menggunakan nama domain.

That's it. :)

Note : Windows Vista sendiri mendukung multiple website sementara Windows XP tidak. Jadi agar bisa mensimulasikan lebih dari satu website pada Windows XP maka Anda bisa menggunakan IISAdmin .NET untuk lebih mempermudah lagi. Dan sekarang, IISAdmin .NET terbaru sudah mendukung Windows Vista dan dengan fitur yang lebih baik. Anda bisa mendownload di http://www.jetstat.com/iisadmin/ 

Hope this help.

Share this post: | | | |
Posted by agung | 3 comment(s)