Categories
Projects

One Incompatible Upload

Assalamualaikum semua! Apa khabar. And good night to your all!

Ok, so today I have uploaded a (almost) completely incompatible version of YourAgregator. Version 1 is still there but it will never work, due to change in the Datastore. This is my last week of holiday and this sunday I will go back to CFS IIUM, for my ICT course. And because I don’t have a notebook and even more important, time, the development of YourAgregator may slow down to a halt. And yet, even thought I only have about three days left, I’ve uploaded a new version of YourAgregator that is largely incompatible with the previous one that I’ve purged the datastore, meaning, you have to reregister.

Ok, so whats the big deal about this upload? Well… actually, not much. The large incompatibility is due to the change in the name of most table and their property. And because GAE does not have ALTER TABLE, I’ve decided to just to delete the whole database and start from scratch. Not that people (other than me) use it right?

But there are some notable change in this release. The first major change is the use of Jinja2 template instead of Django. There are not much different between them except for faster rendering and more expressive language. And also because of that, some page may not render perfectly. If you found any of that, please email me at admin@youragregator.com

Another change is, i’ve added rss page, and member page to the agregator and some modification on the feed page (now the Post page). To view the rss page, on the feedroll, on any post, there should be a link of the title of the rss. Click the “>” next to it.      Ok, so it’s not so obvious, but hei! I’m not a designer. And it get the job done… in a way. Ok, so you click it and the magical AJAX sistem will change your current page to the rss page. What shown in the rss page depend on the data given from the blog. It should show the description (if give), the author, the title(the domain if not given), the submitter, and 10 list of recently posted post. Click one of the post to go to the post page (not the post blog) and click on the submitter name to go to the member page.

If you go to the member page, you will find a very hideously incomplete-looking page. The reason it is incomplete-looking, is because it is incomplete. The reason it is hideous, is because of me. This page will show you a large smile picture, a description and a link to show post submitted by that man. The large smile picture is suppose to be a profile picture. You can edit it by going to youragregator.com instead of it’s agregator and click on your username on the top right of the screen (next to the ‘logout’ button).

Now, the post page (previously the feed page). There are various changes in the post page. Notably, the ability to clone the blog post! But that’s not really what it does. In the feedroll, the blog description has a 500 character limit and only allow inline text element such as anchor, strike or bold. Previously, the post page use the same data as the feedroll. Now, the post page use different data with limit of 3000 characters and allow more element. So, the post page look much like the real post but without some formatting. The link to the real post is given at the bottom of the page. Plus, the agregator now allow tags in the post. On the post that contain tags, list of tags is shown at the bottom of the post page.

The feedroll also has several change. Firstly, the search function has been re-enabled. And because YourAgregator is running on free quota, and indexing takes a lot of database operation, the site can only handle about 6 to 8 blog submission per day. So, lets hope I can find a credit card somewhere, then we could turn on billing. Also, now the feedroll has the ability to filter by submitter, feed and tags. That allow me to put the tags link on the post page, and ‘view post’ hyperlink on the rss page. And also because of that, the index for the post table has increased and thus, increase the write operation required to add a feed and thus again, reducing the amount of feed submission available per day.

Another incompatible change in YourAgregator is the niceness system. Previously, a new post’s niceness is defaulted to the submitter’s niceness, and the submitter cannot nice his/her own post. Now, the post’s initial niceness is not defaulted to the member’s niceness, but to it’s rss feed’s niceness if it has one. Otherwise, the default niceness is the submitter’s niceness. This means a rss feed itself now has a niceness and it is defaulted to the submitter’s niceness. You can rate the rss feed at the rss page. The submitter can also rate his own post and rss submission. I’ve made the decision to allow it to allow the member to specify which post has more priority over another post. Previously a submitter cannot say which of his post has higher priority that another post.
Last but not least on the modest list of changes is the support for the PubSub protocol. The PubSub protocol, created by Google for Blogger has the ability to push new blog post to subscriber. In this case, the subscriber is YourAgregator and the new blog post is new blogger blog. In another word, when an rss is updated, the update is sent to YourAgregator immediately. Previously, YourAgregator need to periodically check for changes in the rss to know about new post, if any. Now, on certain RSS or Atom feed, notably blogs on Blogger, any new post will be sent to YourAgregator almost immediately after the blog owner publish it. This reduce YourAgregator’s need to check the blog and reduce the time need for the post to be indexed in YourAgregator.

And…. that pretty much concludes this update. And this will probably be the last update before my semester. Hopefully I may have some time to do some bugfix, but most probably nothing will change for the next 4 month. And hopefully, I can manage a visa card, and register for Amazon AWS, and all those index problem  will be increased but the capacity will surely increase. So that’s it, happy new year, goodbye and Assalamualaikum.

Categories
Projects

YourAgregator 2nd TODO list.

YourAgregator 2nd TODO list.

  • Build a layout system
  • Add a blog (main blog not agregator blog)
  • Heavy design work on the main page.
  • Terms and Policy
  • Add a system where moderator can ask question to new member.
  • Feedback to moderator.
  • Documentation.
  • Ability to rearrange page order in menu.
  • Manage interface redesign.
  • Moderator can host media file.
  • Category
  • Add error status when cannot get rss.
  • Redesign top menu
  • Different color for post with different rating.
  • Ability to make agregator, public/private.
Uploaded change

  • Add max/min value to the Styler.
  • Add an about page.
  • Theme gallery
  • Refactor the media file.
  • Make use of Jinja2
  • New niceness system
  • Make use of hubsub protokol
  • Make a feed page.
  • Agregator page’s url modification. Help in googlebot scraping.]

Far Fetched Idea
  • Forum
  • Agregator’s blog
  • Plugin
  • Admin’s email
  • Analytic
  • Add custom domain support.
Categories
Projects

The Plan for YourAgregator

Hai! Assalamualaikum semua! Ok, so today, I’m going to try to write in english. That’s because currently, YourAgregator has been indexed in Google, and at the same time, this blog seems the most referenced blog about YourAgregator. Because YourAgregator does not have an About page (yet), and anything about YourAgregator will be referenced to this blog, I’ll be talking in english from now on, on anything that involve YourAgregator, because YourAgregator is (currently) written in english.

It must be because of the domain. I should’ve also buy domain for numerologyprobability.

Ok, so the purpose of this post is to help me to visualize the future of YourAgregator and also to help me stay on track on YourAgregator. So, you can say that this is the second TODO list for YourAgregator. Ok, so let’s get started, so first let’s see what we currently have in YourAgregator, and at the same time, review what is YourAgregator actually is.

Intro!
The logo….. I’m not good at designing so don’t say a word.
For the first timer in this blog and for those of you who does not understand Malay, YourAgregator is a platform for making something like meta blog, blog agregator, news page or you can describe it as a news based community site. The name YourAgregator came from the word agregator, simply because what the site does is that it agregate rss from various user submitted source and show it in a web page.
Agregator test is an agregator that is used for testing YourAgregator.
So, basically, a user can create an agregator hosted in YourAgregator much like a person can create a blog hosted at Blogger. An Agregator also has members much like a blog has followers. Even so, an Agregator is not meant to be a personal site like a blog. It is meant to be used by a community of certain interest, in which the person who create the agregator act like a moderator.
The concept is, when a community, like, for example, the student of IIUM (Intenational Islamic University Malaysia) need a place where they could find recent news about IIUM or maybe about their member, they could create an Agregator called “iium-news”. Using this agregator, IIUM student can join in this agregator, and submit their blog to be indexed in YourAgregator. When the IIUM student update their blog, the blog update will be shown in “iium-news”. Beside blogs, member can also submit RSS link, let say, for example the RSS of IIUM official website. That way, when the IIUM post news on their website, member of “iium-news” will get notified.
The moderator (and some other member if granted permission by the moderator), carry the role of making sure the rss submitted and member request is relevent to the Agregator’s interest. By default, the moderator need to approve a person before the person become an official member and able to submit rss. And by default, an RSS submission need to be approved by the moderator before it is indexed by YourAgregator. This make sure that no totally irrelevent post get indexed by YourAgregator.
Besides that, YourAgregator has a special ranking system which I call ‘niceness’. The goal is that, member who contribute more to the agregator has more ‘niceness’ and therefore has more power to rank post. Basically in this ranking system, when a member click ‘nice’ on a post, the post ranking increase according to the member’s ‘niceness’ and at the same time the member’s ‘niceness’ increase. This means that member who often rank post will have higher ‘niceness’ and therefore has more credibility to rank a post. For convenience, a post initial niceness is equal to the niceness of the member who submitted it. And of course, you cannot ‘nice’ your own post.
The nice button
 The rate of increase of a member’s niceness will become lower, the more the person rate. Infinitely, a member’s niceness will never exceed 100. This prevent a member from becoming over-powered. 
That’s It
That pretty much explain the concept of YourAgregator. Up to now, YourAgregator also has some other service such as a chatbox. In terms of configurability, YourAgregator’s moderator can edit the css of their Agregator. But some of the css will be overridden to prevent abusive use. The moderator can also edit the header, the sidebar, the footer and create custom ‘page’, if they need it.
For now, what’s lacking in YourAgregator is mostly good design. In fact, YourAgregator has no theming system, allthough it does have a Styler that help a little in modifying the css. The theeming system can easily be done, albeit most probably buggy. Talk about bugs, YourAgregator probably has lots of bug. But due to the lack of tester, we may never know most of them. Anyway, YourAgregator do have a feedback button. Another thing that is missing in YourAgregator is a forum. It’s a community site without a forum, lol!. But by putting too much feature in it, I’m afraid YourAgregator may be exceed what it suppose to be, an Agregator.
Anyone into designing?
Inspite all that, the biggest problem is that YourAgregator is hosted on Google App Engine, with all it’s mighty restriction. To make it worst, paypal cannot convert MYR to USD, and to make a foreign currency in the local bank, the minimum deposit is RM1000. I’m a poor kid! Local hosting provider in another hand, do provide RM 35 to RM100 a year for a shared hosting. But that’s with a maximum processor speed of 50Mhz to 100Mhz. That’s 26X slower than my computer! I can’t imagine it ran django with mongo db. That will need at least 256MB ram to run. So, the plan was to use Amazon Ec2 free trial. Unfortunately, I do not have a credit card to verify, so currently I’m stuck with Google App Engine. 
The red bar is the result of 7 blog submission. 
GAE or not, YourAgregator is still online, and I intend to keep it that way. And the plan is to make it mature enough, make some money with it and pay hosting with that money! And to do that, we need to make sure It is user friendly, from the frontpage!
Obviously, this will need a lot of work. A little notice ‘Hi! It’s seems that you are not logged in. (More message will be written)’ shows a lot. This frontpage should show “Welcome to YourAgregator!, a site for news based community. Login or Signup to create or join agregators!” or semething like that with ton’s of graphics. Ok, so the user logged-in….
The login page is probably the most beautiful page in YourAgregator. Probably because of the login providers logo. Other than that, there is the confusing, request password reset and register a new account.
Categories
Projects

Another Update.

Hai! Assalamualaikum semua! Dalam post ini saya akan membentangkan tentang update youragregator yang terbaru. Sebenarnya dari pagi tadi lagi dah siap segala upload, tapi pasal ada program harini, jadi pengumuman ini dihasilkan pada hari ini.

So, apa yang terbaru dalam YourAgregator? Yang pertama sekali ialah perubahan domain, yakni:

http://youragregator.appspot.com
sudah menjadi
http://www.youragregator.com
so, AgregatorTest boleh di akses dengan domain
http://agregatortest.youragregator.com

Itu sahaja. Disebabkan perubahan ini, sesetengah authentication (Facebook) sudah misconfigured, menyebabkan korang takleh login menggunakan service provider tersebut. Tapi takpe, masalah ini masalah kecil, dan mungkin sudah diselesaikan pun.

Yang kedua, kemunculan chat support dalam YourAgregator:

Yes, chat support sudah wujud. Ia tidak menggunakan shoutbox atau segalanya, just plain python, datastore and google channel api. Dan disebabkan itu, dan juga kerana youragregator di-hostkan atas free quota, hanya ada 100 orang boleh daftar chat sehari. Kalau kamu refresh, kamu dikira mendaftar semula. So, kalau kamu refresh 100 kali, orang lain takleh chat.

Selaindaripada itu, ada banyak caching yang dilakukan dibelakang tabir. Dan juga, search sudah dimatikan. Kenapa? Kerana:

Yang merah to.

Apabila search di-onkan, youragregator hanya boleh terima dalam 7 blog submission, pastu quota habis. Jadi disebabkan itu, search dimatikan.

So of course saya rasa ada benda yang pelik, memandangkan sampai 50,000 database ops hilang begitu aje. Ok, mungkin pasal ada 2 additional write untuk setiap additional indexed property, tapi kalau satu blog pakai 50 write sekalipun, patut boleh submit 1000 blog. Apapun, setelah search dimatikan, sekarang dia boleh terima 75 blog submission. Kira ok-lah kan? So, buat masa nie, just terima seadanya ok?

So… that’s it-lah. Tak ada apa-apa yang lain pun, Twitter authentication dah boleh pakai, dan caching patut melajukan keadaan (agaknya). So, bye-bye lah. Assalamualaikum.

Categories
Projects

An (almost) Emergency Bugfix

Ok, so harini saya akan mengupdate tentang upload terbaru YourAgregator. Pada upload yang kali ini, kebanyakannya adalah bugfix dan feature yang dianggap baru pun, yang baru dibuat sejam lepas adalah Feedback form.

So, apakah yang menyebabkan saya mengupload YourAgregator yang ini? Cerita nye begini…..

Pada suatu hari…di pagi yang indah… seorang geek sedang membuka chrome, untuk melihat status google app engine. Kemudian, dia melihat di section log, untuk mengenal pasti sebarang server error yang wujud. Alangkah terkejutnya budak tersebut apabila terdapat masalah apabila seseorang telah cuba untuk melogin menggunakan account twitter tetapi gagal! Setelah mencuba mendebug-debug masalah tersebut, budak tadi masih lagi tidak berjaya menyelesaikan masalah tersebut ;-( sob…sob…sob…

 Sedih kan cerita tadi? Dan disebalik itu, ada masalah-masalah lain yang antaranya yang paling kritikal ialah masalah dalam javascript untuk kita punya AJAX pages yang menyebabkan pengguna takleh join….dan login…..Saya tau, itu masalah yang sangat besar. Begitu juga dengan masalah lain seperti form untuk create agregator tak berfungsi…Masalah besar lagi. So, disebabkan serangga-serangga itu, saya mengupload YourAgregator dengan fix-fix berkenaan. So sekarang kalau korang login (dah boleh dah), korang akan jumpa login page yang lebih cantik seperti ini:

Yang pasal masalah twitter tu, saya masih lagi sedang mencuba, mungkin dah boleh dah (CeTry sekarang). Kemungkinan besar, masalah tu timbul sebab domain kepada login page tu tak diubah, yakni :

Takleh gini bang.

So twitter tak kasi sebab token yang diregister kat twitter berdaftar kat domain youragregator.appspot.com, bukan subdomain-nye. Tapi sampai sekarang takleh jugak. Kenape? Ntah. Masih lagi menjadi misteri. So buat masa ni, korang kena login pakai Facebook atau Google atau Yahoo lah. Nak buat macam mana….

Dan juga, disebabkan segala masalah ni, saya telah buat satu page khas untuk report masalah, kalau korang tengok kat agregatortest, bahagian atas kiri, ada link untuk ‘Feedback’. Kat situ bolehlah korang berleter panjang-panjang.
Banyak ruang tu! Boleh komen banyak-banyak!
Korang tak perlu login pun untuk buat feedback. Disebabkan itu saya perlulah letak recaptcha kat situ. Hanya nama dan report yang wajib diletakkan. email tu optional, so bolehlah korang luahkan perasaan kat situ. 
Satu lagi, korang perasan tak kat atas kanan gambar nie, kat perkataan AsdacapCap dah jadi link. Link nie, kalau korang tekan, korang akan jumpa satu page yang…macam tak siap. Itu pasal, ia memang tak siap pon. Asalnya saya nak siapkan perkara tersebut dulu, tapi memandangkan serangga-serangga kali ini agak kritikal, So saya upload versi yang tak siap dengan bugfix dulu.
Oklah, itu adalah update kali ini, bugfix. Lain kali, mungkin kita akan ada chat support atau messaging system, atau domain yang baru, tapi yang pasti. lama lagi nak siap. I’m just a person who is lazy and often play battlefield. So, cau dulu ya! Bye Bye! Assalamualaikum! 
Categories
Projects

Tambahan 1600++ baris code.

Assalamualaikum semua! Alhamdulillah, setelah bertungkus lumus selama 3-4 hari, saya telah (separuh) berjaya mengupload versi baru YourAgregator. Ya benar! post ini berkaitan dengan YourAgregator, kalau anda tak mau tau langsung tentang YourAgregator, bolehlah balik semula ke Facebook, atau jika anda tak tau apa itu YourAgregator, bolehlah melawat AgregatorTest iaitu agregator percubaan rasmi untuk projek ini.

Baiklah, mari kita mulakan dengan status update. Seperti yang ditulis dalam tajuk pada kali ini, update ini telah menambah lebih kurang 1600 baris kod (termasuk baris kosong), kedalam kod keseluruhan YourAgregator. Ya walaupun 1600 itu tidak sebanyak mana tetapi kepala saya agak stress mendesign kod tersebut, so kita highlightkan nombornye sikit. Walaubagaimanapun, 1600 kod tersebut merangkumi hanya dua file, yang bermakna, 1600 itu untuk satu update sahaja. Ya benar, untuk versi yang kali ini hanya ada satu ‘feature’ yang ditambah, yang lain hanyalah tweak dan bugfix. Apakah yang feature yang dilihat besar ini? Sabar… let’s save the best for the last. Dan mari kita mulakan dengan update yang kecil dahulu dengan satu snapshot frontpage YourAgregator.

Jadi, apa yang berubah? Kalau anda tak tahu apa yang berubah, tandanya anda baru pertama kali melawat frontpage YourAgregator, kerana frontpage ini dilengkapi dengan design yang baru. Walaupun tidak selawa mana, ataupun mungkin lebih tepat, tak lawa langsung, tetapi sekurang-kurangnya ada perubahan jugak. Penggunaan gradient itu mungkin keterlaluan, tetapi sekurang-kurangnya frontpage ini tidaklah terlalu plain.

Seterusnya, kita lihat pula pada salah satu page dalam manager interface iaitu page untuk edit ‘page’. Kalau anda tak tau apa itu ‘page’ tandanya anda ketinggalan post tentang update yang lepas, kerana dalam update yang lepas, benda baru yang saya letak di update yang lepas adalah ‘pages’ iaitu muka surat yang admin boleh buat untuk ditonjolkan di frontpage menu. Dan dalam update ini, kita dapat lihat, form untuk edit ‘pages’ sudah dilengkapi dengan rich text editor dan rich text editor tersebut di ‘theme’ dengan theme yang lebih seragam. Saya tau, perkara ini terlalu kecil sehinggakan tidak perlu untuk diletakkan di blog post, tetapi secara terus terang saya katakan, dalam update ini saya hanya ingat tiga perkara sahaja iaitu, design frontpage, form yang ini dan 1600++ baris code tesebut. Rasanya hanya tiga perkara itu yang saya buat untuk update ini.

Ok, tanpa kita membuang masa, mari kita melihat apa yang dimaksudkan dengan 1600++ code tesebut. Kita mulakan dengan screenshot AgregatorTest .

Ok, kalau anda tak pernah melawat AgregatorTest, mari saya terangkan apa yang berbeza, designnya. Designnya telah berubah. Itu gunanya 1600 kod tersebut? BUKAN! Fikir realistik sikit! 1600 baris tu! penat saya buat, dan akhirnya keluar begini aje? 1600 kod yang terlibat tersebut adalah sejenis css editor untuk agregator. Yakni, yang ni:

Ya bahagian yang kat atas tu. Saya bagi editor ini nama “Styler”. Ia berfungsi seperti blogger punye theme editor tetapi ia boleh digunakan terhadap mana-mana css selector. Of course, kamu takleh tekan apa yang kamu nak edit pastu boleh terus tukar background, css yang asal perlu diedit terlebih dahulu untuk meng-set selector mana yang boleh dan patut diedit dengan editor ini. Kalau anda tak faham, bukak agregator anda, tekan manage, pastu style, pastu  tekan edit css (bukan edit style using Styler), pastu tekan butang reset. Css anda akan di-reset dengan css yang default yang dilengkapi dengan comment khas diatas yang digunakan untuk menentukan element mana yang boleh diedit menggunakan Styler. Setelah di-reset, baru tekan ‘edit style using Styler”.

Kenapa saya tak bagi tekan terus element yang nak diedit? Sebab, css ini agak sensitive. Buat aje, display:inline, nantu jadi macam-macam, so bahagian menentukan element mana yang boleh diubah saya serahkan kepada designer yang berkemahiran, yakni yang faham css, dan css mereka, mereka boleh jadikan sesetengah element boleh diedit dengan Styler, so pengguna-pengguna novice bolehlah edit pakai Styler tanpa merosakkan layout.

Dengan menggunakan styler anda boleh mengedit lebih kurang 30 css property. Tapi, of course sebenarnya tak banyak mana, sebab sesetengah property ada dia punye ‘shorthand’ contohnya margin jadi margin-left, top, bottom, dan right so, ia dikira empat css property bukan satu. Antara css property yang saya suka adalah border-radius, box-shadow, text-shadow dan font-family. Of course, sesetengah browser yang lama (IE 8 kebawah), tak support css property tertentu, so pandai-pandailah korang.

 So, itulah feature baru untuk YourAgregator. Masih ada lagi banyak ‘rough edge’ dalam Styler. Tapi memandangkan sesuatu agregator itu bukannya selalu di-design, untuk update yang akan datang, saya akan lebih menekan tentang interaksi antara member, dengan buat satu page, untuk member edit description, letak gambar, message orang lain, dan mungkin ‘chat’. Anyway, jawatan designer sukarelawan masih lagi terbuka dengan luas, so, sesiapa nak tolong den, bolehlah comment atau email di asdacap@gmail.com. So, apapun, cau dulu ya! Assalamualaikum! bye bye!

Categories
Projects

Another Upload

Assalamualaikum semua! Apa khabar! Ya! benar! say masih hidup lagi haha!

OK, so macam biasa selepas baru upload versi YourAgregator yang baru saya akan buat blog post tentangnya. Memandangkan kali ini saya mengambil masa lebih daripada 3 hari untuk mengupload versi kali ini, pasti banyak benda baru kan? SALAH!!! Tidak banyak benda baru yang diletakkan. Kebanyakan benda-benda yang baru pun di-commit pada hari ini. Jadi apakah yang menyebabkan delay yang sebegini?

DOJO JAVASCRIPT FRAMEWORK

 Selalunya kita dengar tentang jQuery kan? Tapi kita jarang dengar tentang Dojo. So satu hari saya cuba try tengok webpage dojo. WOW! adalah pendapat saya yang pertama tentang dojo. Membandaingkan dojo dengan jQuery ibarat membandingkan Qt dengan gtk. Dojo membunyai BANYAK kebolehan seperti Deferred dan Object Store dan yang paling hebat (bagi saya) ialah senarai widget-widget nye yang nampak sangat professional! Maka timbullah satu semangat dalam diri saya untuk memasukkan dojo ke dalam YourAgregator dan kemudian baru saya faham kenapa jQuery lebih famous berbanding dojo.

Satu perkara yang saya sangat suka tentang dojo ialah dia punye Rich Text Editor. Seperti yang tertulis di YourAgregator TODO list, salah satu benda baru yang saya nak letakkan di YourAgregator ialah kebolehan untuk submit hanya satu post, bukannya rss. Dan disebabkan description post tersebut sepatutnya boleh ada benda-benda seperti ‘link’ dan ‘bold’, tugas meng-edit description tersebut paling sesuai dilaksanakan oleh Rich Text Editor. Maka mulalah perjalanan saya untuk meletakkan dojo-punye rich text editor kat submit_page. Namun setelah meletakkan Tab Layout (dari dojo) satu masalah timbul. Tab layout takleh auto resize macam jQuery punye Tabs. SO kita kena letak fixed height kat Tab Layout. Ok, boleh diterima. Saya letak fixed height. Kemudian baru saya letak dojo Editor. Ok, so far so good. Editor keluar cantik. TAPI editor takleh diletakkan di tempat textarea.  Saya fikir, takpe…takpe…editor dia cantik…Nanti kits buat manual post ok. Test-test ada masalah lain yang keluar. Error ‘the id=’bla-bla’ has already been registered’ (lebih kuranglah). Ha? Ape ke heh? dojo Editor tak keluar? And so mari kita debug masalah ni, masalahnya ialah YourAgregator telah menggunakan teknik ajax untuk load submit page (yang saya cerita kat post lepas). Dari situ, tekan ‘back’ akan menyebabkan dia load agregator pakai ajax, dan memusnahkan page yang lepas. Tapi segala javascript object masih lagi intact. Tambah lagi dengan dojo framework yang sangat integrated itu. Namun apabila kita bukak balik submit page tersebut, kita cuba register editor dengan id yang sama, dengan yang dah ada dalam dojo punye registry. So keluar error tersebut dan editor tak keluar. Begitu juga dengan tab layout (kalau tak silap saya). Tapi takpe…takpe… dojo punye Editor cantik… So saya pun buat macam-macam, publish-subscribe event dan akhirnya keluarlah editor tersebut dengan berfungsi.

….must…..resist…dojo….

Of Course saya tak cerita pasal lima error yang keluar setiap kali saya bukak page tersebut, tapi bila dia dah render elok, kita biar ajelah. Saya jugak tak cerita pasal masalah dojo.require kat dalam Ajax page yang mana membuatkan saya men-dojo.require kat agregatorbase walaupun widget tersebut tidak dipakai. Tak termasuk dengan kelajuannya yang ‘mendebarkan’. Tapi satu yang pasti. Lawa kan? Nampak professional, jika dibandingkan dengan sekarang….

something is not right.

Ok, mungkin tabnye nampak lawa sikit, tapi form-nye tak seragam. Kemudian, saya cuba untuk pakai dojo DataGrid. tapi ada masalahnya pasal itu dan itu dan kemudian, dua hari berlalu. Bottomline…Banyak giler problem! Dan disebabkan tak ramai yang pakai dojo, tak banyak maklumat tentang dojo kat internet. Documentationnye pun tak membantu sangat. So saya fikir, wow susah giler. Highly unconfigurable. Banyak benda yang terpaksa di buat-hack. So akhirnya saya berhenti menggunakan dojo dan revert balik pakai plain HTML dan jQuery serta JWYSIWYG editor.

So itulah ceritanya yang membuatkan saya lambat. Hujung minggu ni banyak masa dibuang dengan memahami dojo, mencari solution di internet dan Battlefield Play4Free. Tapi, bukan takde perubahan langsung.

Pertama, member boleh submit post sahaja bukan rss (seperti di atas).
Kedua, admin boleh buat page sendiri, siap dengan ajax loading. dan menu.

Ketiga, kat main webpage, ada senarai agregator yang berdaftar.

“Description? Do you need it?” kalau agregator ni masuk kat google, kat bawah link nanti keluar “Description? Do you need it?”. Description digunakan (atau akan digunakan )  sebagai meta description.

Sudah tentu, kalau anda try untuk buat ‘page’ yang baru anda akan rasa sangat kecewa dengan form yang sangat mengelirukan serta tidak kena pada tempatnya. Jangan risau, tiga hari yang akan datang didedikasikan untuk bugfix dan design. So, itu sajalah perubahan yang boleh dilihat. Antara perubahan lain adalah sedikit optimization yang sepatutnya membuatkan agregator load cepat sikit.

So, itu sahaja! Dengan itu, bye-bye sesiapapun yang sedang membaca! googlebot pun boleh! Assalamualaikum!

Categories
Projects

YourAgregator! TODO list

TODO

  1. A middleware for agregator and member (for consistency).(on testing)
  2. A decorator for member only.(on testing)
  3. Move the commment template to javascript (reduce server workload and increase responsiveness). Did that, for 5% performance, it’s not worth it.
  4. Hash hack backup plan for ajax page.
  5. Add a favicon.ico.
  6. Ubah kedudukan perkataan ‘post’.
  7. Set default kepada recent.
  8. Use jQuery UI accordian in the submit page.
  9. Add suppost to submit just Post instead of RSS.
  10. Rasanya ada bug sikit. Cuba submit blog hzaid tak boleh. Kenape yek? (ada sikit bug, patut dah dibetulkan. ini disebabkan ada agregator lain yang ada rss yang sama link.
  11. When auto approve is on, when user join or submit, show the correct message.
  12. Fix the ‘at’ None problem. Done a fix but don’t know if it work.
  13. META tags.Did some.
  14. Unified menu for all pages and remove the back button.
  15. Make the rss reloader allow hyperlinks and .
  16. Make a decorator ‘mainpage-only’ the opposite of ‘indomaindecorator’
  17. A central page in the main webpage that list all available agregator.
  18. Database optimization using db.Models.values()
  19. Allow admin to make ‘pages’. 
  20. In manage-mamber, kat permission field, render elok sikit 🙂
  21. The feed table in manage-submission, make select all button and load only part of the data and make pages for the table and make sorting.
  22. On agregator, when no data and when search is not empty, prompt user that that is a search result.
  23. More caching!
  24. Better user information (photo, inbox)
  25. Messaging sistem.
  26. Forum…maybe
  27. Make the reloadrss reload rss with the same url only once.
  28. Heavy design work on the main page.
  29. Major overhaul on the theming system.
  30. Improve template speed.Allow admin to make ‘pages’. 
  31. Chat support in agregator.
  32. Make an option to open a dialog when the user click join so user can send message to admin saying something.
  33. ROBOT.txt
  34. Somehow, view post only from some rss or someone.>make advance sort/limit
  35. In manage-submission, when delete rss feed, prompt to delete post too or handle the dereference of feed or agregator will crash.
Sebarang cadangan?

Categories
Projects

I’m not going bla-bla.

Hai! Assalamualaikum semua!

Seperti biasa hari ini, saya akan sekali lagi menceritakan perubahan-perubahan terbaru terhadap projek terkini saya iaitu YourAgregator!. Dalam dua hari ini ada dua perubahan yang saya anggap agak besar, yang lain itu semuanya hanya ‘bugfix’ dan ‘tweak’ tapi yang dua ni ialah ‘feature’. Apakah ia? You guess it…..COmment(s).

Boleh reply kat comment orang lain.

Ya benar, comment ini sudah online, walaupun susah digunakan dan bermasalah. SO macam mana nak pakai ini comment? First, bukak agregator macam biasa, pastu ‘hover’ korang punye mouse kat post yang berkenaan, nanti keluar load, pastu dia kata ‘0 comment’. Tekan teks tu nanti dia bukak page lagi satu yang khas untuk meng-komen. Pastikan korang ialah member, kemudian commentlah. Tapi benda ni masih lagi bermasalah disebabkan pelbagai perkara contohnya GAE punye database tu tak ACID complient menyebabkan ada sikit delay lebih kurang 5 saat (agaknye) untuk change tersebut propagate ke seluruh server. Itu bermakna mungkin akan ada sikit ‘glitch’ macam bila korang tekan ‘more comment’ nanti keluar balik comment sebelum ini (bila dah upload, baru dia nak buat hal…). Refresh aje, nanti ok lah.

Kok ada dua si?

Satu lagi perubahan yang (bagi saya) agak besar ialah kombinasi AJAX dan window.history serta view khas, yang, menyebabkan korang tak perasan apa perbezaannya.So, mari kita dive in balik kat agregatortest.youragregator.appspot.com/home. Bila dah load, perasan tak yang urlnye dah ubah daripada /home kepada /agregator?.

Sekarang korang tekan mana-mana comment, macam post blog ni yang lepas “I’m going bla-bla” ada 38 comment kan (saya sorang aje yang comment)? tekan comment tu. Perasan tak yang ada loading gif sebentar?

kemudian baru dia bukan page tersebut.  Anyway, pastu tengok yang korang punye url dah bertukar kepada /feed_page?feed=50

Dan yang paling penting, korang perasan tak yang semua ni berlaku tanpa refresh? Haha! Itulah dia. Benda ni adalah untuk mengimprove user experience. Dan kalau korang tekan butang ‘back’ (kat chrome bukan kat webpage). Nanti dia tidak pakai reload, sebaliknya dia pakai AJAX untuk load balik agregator. Setakat ini benda itu agak simple dan berguna untuk tiga page aje iaitu, agregator, feed_page(yang ada comment) dan submit_page. Tapi dengan adanya asas untuk teknik ini, kita boleh buat macam-macam page lagi dan kita boleh bagi admin buat page sendiri macam ‘rules and regulation’ atau ‘abaout iiium-news’. Tapi semua itu masih angan-anganlah… mungkin ambil masa lagi seminggu (atau tiga hari) untuk saya buat benda tu. Tambahan lagi, benda ni masih lagi baru (sebahagian daripada HTML5) dan perlukan browser yang baru untuk berkesan. Tapi buat masa ni, saya akan fokus untuk ‘membersihkan’ kod yang agak bersepah, dan kemudian akan ada sikit bugfix. Apapun, saya rasa baik saya buat sikit TODO list untuk feature dan kerja yang akan datang….kat post yang lain.

Categories
Personal Projects

I’m going bla-bla

Assalamualaikum semua. Apa khabar? Saya di sini migrain baik-baik sahaja.

So, our topic for today is bla-bla, that is, I’m going to say anything I want to say.

So, of course, perkara pertama yang saya akan katakan mestilah tentang perkembangan YourAgregator!. Sejak post yang lepas, ada dua perkara berubah yang dah online, yakni, penggunaan subdomain untuk mengenal pasti agregator anda dan kebolehan search. Dan hari ini, saya buat sedikit percubaan untuk sistem ‘comment’ yang membuatkan saya migrain giler nak mampos! agak keliru camne nak buat nie.

Tapi mari kita mulakan dengan perubahan yang dah online yang paling besar yakni penggunaan subdomain untuk mengenal pasti agregator. Untuk memudahkan penjelasan, mari kita lihat satu contoh yang mudah yakni agregator ‘agregatortest’:

dulu 
http://youragregator.appspot.com/agregatortest/home
sekarang
http://agregatortest.youragregator.appspot.com/home

Nampak? Ya benar, perubahan ini agak besar sehingga hampir kesemua ‘view’ terpaksa di modify sedikit, kerja yang sangat leceh. Kenapa diubah? Sudah jelas, untuk memperlihatkan bahawa setiap agregator itu tidak mempunyai kaitan sangat dengan YourAgregator melainkan di host oleh YourAgregator yang dirinya di host di Google App Engine. Kenapa tak buat dari awal?…….sebab saya tak tau boleh buat camtu :-)…..Satu lagi perubahan di bawah laut, ialah setelah meneliti sistem subdomain ini, baru saya tahu yang subdomain takleh ada huruf besar… ya saya tahu, saya cuai sedikit. Dan disebabkan itu, saya terpaksa menambah satu db-indexer index untuk case insensitive comparison yang mana memerlukan agregator field tersebut diupdate yakni field nama agregator. Malang tidak berbau, saya dah set dari mula yang field nama agregator tersebut ialah primary key kepada entity tersebut yang menyebabkan anda tidak boleh ubahnya melainkan anda delete terus agregator tersebut dan kemudian buat balik dengan nama baru…. saya tahu saya cuai lagi. Dan memandangkan saya nak buat lagi satu option untuk membolehkan admin mengubah nama agregator di management interface, saya ubah primary key table agregator kepada field autonumber tambahan yang menyebabkan segala agregator yang sedia ada, fail to work….kasihan….so saya delete ajelah semua agregator dengan feed-feed yang takkan berguna kalau takde agregator tersebut. Alang-alang, saya delete aje semua database, lagipun ada 3 agregator aje, kesemuanya untuk testing purpose….

So disebabkan itu, saya buat balik agregatortest yang baru dan letak rss-rss macam biasa kecuali blog huda ziad, pasar rss tu dia sendiri yang letak. Hasilnya, apabila anda melawat aregatortest, anda tidak akan jumpa blog update huda ziad. Kalau dulu, pasal blog dia selalu update, kita boleh tengok banyak post dari blog dia…

Ok, selain daripada itu, saya juga tambah field kat table Feeds untuk link ke RSS. Hasilnya, saya boleh buat macam nie…. jap saya ambik screenshot….

yang kat kotak merah tu.

Itu aje? Well… we need to start from somewhere, right? Anehnya, untuk sesetengah rss (iium website), yang tak support link tersebut, hanya keluar perkataan ‘at’. Saya dah buat template tu supaya tak keluar langsung kalau takde link, tapi nampaknya ada sedikit bug di sini. Nanti saya betulkan ok?

Satu lagi perubahan yang dah online yang agak BESAR….. ok, mungkin hanya ‘besar’ ialah kebolehen untuk search.Mari kita lihat lagi screenshot:

Sebarang pertanyaan? Kenapa saya letak kat situ? Well… nak letak kat mana? Sebenarnya ia terletak kat bahagian header yang boleh diubah melalui manage. So konseptnye ialah admin boleh letak search input tu kat mana-mana yang dia suka, kat footer pun boleh. Apa yang ia buat ialah apabila tekan enter kat situ javascript akan meng-ajax semula senarai post-post, macam tekan butang kat atas senarai post, camtulah, benda same aje. Cuba bukak agregatortest, pastu submit korang punye blog, jadi tak? Saya tau saya punye jadi. Oh ya, search engine itu mungkin mengambil masa untuk index korang punye post. Dan lagi satu, perubahan kecil yang membawa kesan besar ialah, RSS yang baru diapprove akan di-scan serta merta, selepas ia diapprove. So, kalau korang submit kat agregatortest yang saya dah set untuk autoapprove, korang tak payah tunggu 6 jam lepas korang submit blog korang, refresh aje beberapa kali.

Ok, untuk (hampir) sepanjang hari ini, saya sedang cuba untuk buat sistem comment. Hasilnya adalah:

Ok, so what’s the problem? (1)st  Its ugly. (2)nd Yang mana satu comment? (3) Cam tak cukup ruang (4) It’s  slow. Jangan risau, comment tak online lagi, saya masih memikirkan macam mana nak letak comment ni. Cam mana nak menampakkan macam comment. Pasal, as you can see… It suck!… and in super early alpha state. Saya terpaksa berfikir macam mana nak buat comment ini pasal, you see, kita boleh comment kat comment yang lain. Itulah konseptnya. Tapi sekarang nak letak butang ‘reply’ pun saya tak tau nak letak kat mana, pasal ia terlalu mengambil ruang. Saya terfikir nak buat page khas untuk comment, tapi camne orang nak tau yang ada comment? Kan? Dan nampak macam sistem AJAX ini sedikit bermasalah, dan kalau nak tau, setiap satu comment itu mengambil masa dua saat untuk load. Dan satu comment memerlukan 3 request. Pertama, check kalau ada reply untuk comment ini. Kalau ada ada ambil reply. Kedua, check kalau ada comment yang seterusnya, kalau ada, Ketiga, ambil comment tersebut. Hah! camtuhah sistemnye. Yang tak siap lagi pasal masalah style.

So, ilham yang seterusnya ialah, esok, kita buat satu page khas untuk satu Feeds, dan kat page tu bolehlah buat banyak-banyak reply. Tapi kemudian macam mana nak buat back button? Macam mana nak update lepas orang post comment? Nak refresh? Amboi! Ambil jalan mudah!. Camne pulak kalau comment tu ialah reply kepada comment yang lain? Camne? Camne? Camne?

Anyhow, itulah masalah saya, bagi comment (kat blog ni bukan kat agregatortest) kalau korang ada cadangan yang bernas atau kurang bernas pun boleh. Sape-sape yang nak submit blog kat agregatortest boleh join, pastu submit blog korang. Saya dah set auto approve. Dan kalau korang tekan ‘nice’ kat post korang nanti keluar “Damn! an error occured” tu pasal korang cuba ‘nice’ post korang . Mane aci! So tak boleh! Pergi nice post orang lain. Error message yang proper sudah dibuat tapi belum upload. Dan sesiapa yang berminat untuk buat design untuk default agregator, boleh join agregatortest, comment saya (kat blog ni bukan kat agregatortest) nanti saya bagi ‘manage_style’ permission. Ataupun korang boleh buat agregator sendiri (login kat youragregator.appspot.com, kat home ada link untuk ‘Create your own agregator’), korang akan dapat ‘superuser’ permission, buatlah design korang. Siapa yang ada permission boleh manage agregator melalui hyperlink “Manage” kat userbar (kat atas kanan page). Kalau takde hyperlink ‘Manage’ maknenye korang tak cukup permission. Ok, bye bye! Assalamualaikum semua!