Sitecore – WURFL or Sitecore Device Default Detection

Hi all! I return from my long blogging-hibernation. Lately, I encounter a little problem with mobile detection in Sitecore. Before that, yes, I am still working on the website of my company’s client and yes, though I really tired of this Sitecore stuffs, I still feel so curious about it. I hope through this post, you can find the best way to choose for your Sitecore site in detecting device.

As we know, WURFL is a powerful tool that makes your web page suit the device that opens it. We also know that Sitecore is powerful enough to let the developers set a different look and feel for a different device. I thanked so much to my client for they have provided us, the developers a good-customized-WURFL-system. Our client, that is mainly based in the continent far away customized the 51Degree to suit their needs. I don’t want to write how to do such because greater people than me have written about it in their blog (example: the great mentor – at least for me – Alex’s blog.)

Then using the module that our client have made, we can differentiate the site look and feel on various devices. Well, for now, we just differ between mobile, tablet, and our beloved big screen computer. Well, it works just great. Our client make a fine module and I like it! Well, somehow there is a problem, what if the device have a different user agent and that user agent is not registered, yet? Also the update can be automatically done.

In contrast, you know that most of the devices have a common thing in their user agent. Really? What is it? For example, there will be words like “mobile”, “Blackberry”, “Android”, “iP”, etc. You can add the devices and don’t have to write a module like what my client have done. It can detect automatically, and easily. Really? Yes. So, I tried this, too! The result is just great! Fine and really nice. The goodness is that you can detect most of devices easily because they “must have something in common” on their user agent. What’s the disadvantage? If you add a new device, well, be sure to update all of the items in your Sitecore, which can be so many even though you only update the default value of the template.

In the last two paragraphs, it shows like I am telling you that Sitecore default device detection using user agent is a classic way that cost us more effort than using the WURFL way to detect device. Well, I’m afraid I have to say that is true. Since 51Degree offers a free lite package to use, we can just create a module that will need to be updated once or twice for a long time. We don’t have to really create a new device and trouble us with all the task to assign the layouts and sub-layouts to our Sitecore items.

Well, it is up to you to choose. But I am sure there are more things to consider than just what I wrote in here. Be free to comment.

May, 29 2013 update:
For some reason, the device detection system on my local is having problem. Sometimes it works out, sometimes it don’t. I tried to check the values of IsMobile and width (these two rules are those who are used in detecting mobile device in my project). It shows values that match the rule, but somehow it keeps showing the default layout setting from Sitecore. Will update on the way to prevent it.

XML (2)

Setelah lama ga posting, akhirnya saya kembali! 😀

Ternyata oh ternyata, ada yang lain dengan XML. Ternyata format untuk XML bisa ditentukan. Jadi stuktur datanya jelas. Nah, gimana caranya? Itulah makanya ada DTD dan XML Schema.

Kemarin aku dikasi software Altova XMLSpy sama dosen aku untuk praktikum. Nah software itu membantu sekali untuk membuat XML Schema dan DTD karena memang ada fitur auto generatenya. Tapi sebaiknya jangan pakai itu dulu.

DTD dan XML Schema itu memang digunakan untuk menetapkan apa isi file XML seharusnya. Tapi keduanya berbeda di sintaks dan penggunaan.

DTD itu memang mendefinisikan, namun ga pakai tipe untuk tiap variabelnya. Misalkan aja untuk DTD kita ga nentuin apakah itu string, integer atau yang lain.

Berbeda dengan DTD, xml schema masih sedikit dipakai dan sintaksnya juga lain sekali. Xml schema jelas tampak mampu mendefinisikan tipe variabel untuk file xml. Jadi semakin nampak xml itu sebagai struktur data.

Okay, demikian dlu untuk sekarang. Semoga berguna. Kalau untuk syntax dan lainnya, saya rasa saya tidak perlu menuliskan di sini karena sudah cukup lengkap diberikan w3school. 🙂

have a nice day… See ya!

XML (1)

Again, about data. This time, data that sent through. Data that is now favorite to be used between systems. Data that anyone can see without have to configure their computer. Data representation that is booming right now, XML.

This time I want to talk the relationship between XML and web services that is really close in relationship. I think if they were human, they must have kiss everyday. But, let me give a simple view about web service here.

Web service is a service given by a system through http. Why http? Because all ISP won’t block it. http is the best to use to communicate right now although not so safe.

Okay, now XML, why that? XML can be used in any platform. A service will be called and do a called method, or, well, we can say that it will do a service once told. Just like a servant huh? The result of service will be sent by in a xml format to make whatever client that receive it, can use it.

Xml is data representation. Inside you didn’t make it like the html content. There are tags, but not like the html. We can extend it, that’s why it can be a data structure. Because it is data structure, it can be read and used.

So let me clear this one in a short conclusion. Xml is now a must-know-thing in IT and it is used in Web services because easy to transfer and translate.

Posted with WordPress for BlackBerry.