Friday, October 2, 2015

Here are a few caveats to using Aria Templates in your web application

Abstract

This post discusses my experience as a first-timer with Aria Template,  what type of challenges I faced, and the lessons I learned that the reader could benefit from.


You may have already known about the robust and awesome way of having templates using Aria Template. If not, check out this short guide here. It indeed looks fancy, sounds like it can help you a great deal but it comes with some warnings.

MIME Types

Most web servers nowadays don't just serve all types of files when requested through a URL. Only the ones that they are configured to serve. Aria template files are saved with .tpl extension, and it also loads one of its internal file with .cml extension in the bootstrap code so you will have to configure your web server software (IIS, apache, nginx etc) to allow those extensions as text/html.


Template Path confusion

Aria turns what you provide in classpath into a relative path to your .tpl file. In my experience, I had thought the following classpath would represent /home/userarea/Profilesnapshot.tpl

{{Template classpath:'home.userarea.Profilesnapshot' }}

But it was actually looking for the said tpl file in /js/home/userarea/Profilesnapshot.tpl where 'js' is same directory where area templates JS file was included from.

Also, the last part of the classpath (in this case Profilesnapshot) should have the first letter upper case (same goes for the template file name).


Conclusion

Be prepared to spend at least 5 hours scratching your head, and trying to figure out why something is not working. Also, if your team has many red-tapes or is one of the ones that are "too busy to improve", it is not easy to sell Aria to them. Not to mention the grouchy admins who will give you all sorts of trouble when you ask them to add new MIME types to the web server.

5 comments:

  1. fahadash.com has always been inspiring and i choose to go smallmoneyloans.blogspot.com when I need 3 year loans urgently

    ReplyDelete
  2. Great post, it was nice to see this article. It was really appreciable. Thank you so much for sharing such an informative article. Get more info about mobile app development company

    ReplyDelete
  3. kepuasan dalam bercinta bisa diraih oleh kedua pasangan asal selalu menjaga stamina sebelum beraktifitas seksual, namun akhir-akhir ini banyak wanita yang mengeluh karena banyak pria yang tidak bisa memberi kepuasan lantaran mereka mengalami disfungsi ereksi sehingga alat vital tidak dapat ereksi ketika mau berhubungan intim, dengan hadirnya pil biru asli cod di cikarang bisa memberikan segalanya bagi pasutri yang ingin mencapai klimaks ketika berhubungan badan baca seterusnya . kebutuhan biologis memang sangat penting untuk anda perhatikan karena jika sampai hal ini kita diamkan maka bisa mengakibatkan retaknya hubungan keluarga hingga dapat menimbulkan penceraian. jual permen soloco cod di karawang barat solusi terbaik bagi pria yang tidak bisa mengonsumsi jenis tablet karena rasanya yang pahit. permen soloco memiliki rasa coklat yang kebanyakan disuka oleh pria maupun wanita dengan rasa yang khas. klik disini . kini klg di semarang tengah banyak anda jumpai ditoko obat yang menjual obat-obatan khas untuk pria akan tetapi keaslian produk harus anda ketehaui sebelum anda membelinya ditempat tersebut info lebih lanjut .

    ReplyDelete