Hacked By Imam
I have just switched my blog over to Kameleon.
Kameleon is a new blog application that I have been developing this past week using ASP.NET MVC. There are a lot of great blog applications for .net including SubText, DasBlog and blogengine.net, but building your own is a great way to explore a web framework. I plan to use Kameleon to capture some of the trails and tribulations on developing with MVC and also trying to work out some of the emerging best practices.
The application is only in its embryonic stages at the moment but it has most of the standard blog features.
Posts, Pages, Comments, Feeds, Categories and Tagging
All quite valuable assets of a blog application 🙂
It features a very flexible and simple skin architecture. At its most simplest a skin can be a folder with a master page, a stylesheet and few images in. However every base page or control template can be overridden by just dropping an aspx in the skin folder to provide complete flexibility. Obviously its better if most of the customisation is done in the CSS, but its useful for converting themes from other blogging engines.
The Widgets in the sidebar are data driven and what appears (or not) in the sidebar can be controlled via the admin. Currently, each widget is called in via a RenderAction, I will expand on this in a future post. (I am still not sure if it this the cleanest way to have widgets)
I use the excellent Lucene to search and index blog posts. When content is added or updated, it is updates the index and invalidates any cache.
Support for blog clients.
Windows Live Writer support
A bit of extra support for Windows Live Writer so that it can auto-detect Kameleon’s API and its capabilities.
Clean friendly URL’s
As Kameleon is built with ASP.NET MVC, you get clean friendly URL’s out of the box.
A single instance of Kameleon can run multiple blogs. The blog (and skin) can be auto-detected from the incoming request (domain).
It is has been made using the following ingredients:-
- ASP.NET MVC
- Subsonic 2.1
- SQL Server
- ASP.NET Membership & Role Providers
There are still a few features that are missing, the Admin side needs building out and support for trackbacks and pingbacks is required. I also need to improve test coverage and do some refactoring.
I will put the source code on Google Code/Codeplex when its been whipped into shape a bit more.
Other MVC blog applications
Part way through this week Oxite was announced by Microsoft I haven’t really had much time to look into it, but it looks like being an excellent real world example of an MVC application. You can find it on CodePlex It is well worth a look.
Also looking forward; SubText 3.0 will be developed using ASP.NET MVC, and that is worth keeping an eye on.
Updated: See the Hipster Shuffle in action on YouTube
You may have recently seen the wonderful invention that is the Hipster PDA (hPDA). It is a fantastic innovation that has been adopted by many a GTD follower. But what is the Hipster? Quoted from the Hipster Wikipedia definition:-
Here is an example of a Hipster PDA.
Despite its obvious genius, some doubters have suggested that the Hipster PDA isn’t a ‘true PDA’ or even a PDA at all. The non-believers have stated that even though it features limitless battery life, customisable fonts, and true persistance – this all comes at the expense of multimedia functionality. Many Hipster users argue that the hPDA’s simplicity is one of the main factors of its success.
This for some people is not enough.
What is the solution? Some sort of middle ground perhaps. The answer would come from an unlikely source.
Apple have long been known for their creative innovation, and who was to know they had become aware of the ground breaking Hipster and were about to release the ultimate accessory or upgrade. Yes folks, the ultimate mash up of paper and silicon has arrived.
Meet the ultimate upgrade for the Hipster, uncannily referred to by Apple by the codename “iPOD shuffle (2nd generation)” otherwise known as the “Hipster Multimedia Clip”.
The Multimedia Hipster clip can also be inversed to have the controls the other way around. See below:-
Its really quite amazing. Wherever you take your Hipster, you also take your music collection. Get in to the groove whilst you GTD.
Upgrade your Hipster to a Hipster Shuffle today with the fabulous Multimedia Hipster Clip. Available now from Amazon – curiously still under its code name iPod shuffle.
The concepts of GTD are relatively simple; it’s in the implementation where the complexity lies. GTD relies on having a trusted system were you capture information, thoughts, and next actions etc. The system needs to be trusted, because if you are getting all of your commitments and to-dos out of your head, your head really needs to trust that it can stop thinking or worrying about them.
Without a trusted system, it doesn’t work. I would say that for the majority of geeks the road to finding a trusted system is full of obstacles. I would be prepared to go out on a limb and say that most people who have been caught up with the cult of GTD don’t actually practice GTD.
Where is the resistance?
And does there have to be that much resistance, for a target market of people who most probably have a hefty workload and/or a problem with procrastination?
First of all the problem. Let’s take a look at a fictional geek called Geoff, who just happens to be a software developer. His setup is the following:-
- Home PC
- Work PC
He uses Outlook for email, he also has a gmail account, and he is restricted to what websites he can use at work.
Geoff has decided he is getting snowed under and could do with a better way of managing his time (his stuff to do). He has done some research and has decided to give GTD ago. It seems pretty simple and effective, and is completely sold on the idea.
First step – finding the trusted system.
Geoff loves web surfing, he loves finding tools, and his attention span is similar to that of a goldfish. He hops about the internet finding GTD solution after solution, soon learning that finding the perfect GTD solution is like a procrastinator’s wet dream. He continues to put all of his urgent work to one side, and signs up for several of the web applications like Remember the Milk, Backpack and Vitalist and gives them a go. At first they all seems pretty good, they make great use of Ajax and look pretty good too. However not one application is perfect, not one is the right fit for him. Being a geek and a software developer, Geoff knows GTD is pretty simple, he doesn’t want to compromise, and there are still dozens of apps he hasn’t yet tried.
Two weeks later, all of the web GTD accounts are starting to become stale. All the articles on 43folders and lifehacker have been read. Geoff has decided that web GTD apps aren’t for him. He needs the power of a windows application, something that isn’t hidden in the tab of his web browser.
He installs My life Organised and ThinkingRock. Again they both seem pretty good, he decides ThinkingRock is the best fit and decides this time he best give this GTD app a proper try, and to stop procrastinating. He spends the weekend emptying his brain into the application. Monday morning he bungs the application onto a USB stick and goes to work. He gets into the habit of using the app to manage his workload at work, and all is going swimmingly. Until Thursday. Thursday he has left his USB Stick at home. Geoff finds this really frustrating, because his USB stick has his brain on it (and it was only a 1GB stick).
Thursday becomes a bit messy due to not having his brain, and Friday and the weekend are consumed by looking for a more reliable option.
By Monday Geoff realises he has wasted days and days, just surfing for a perfect GTD solution. His boss isn’t happy because he has missed a deadline, and Geoff decides he best knuckle down and stop wasting any more time chasing rainbows.
The moral of the story? We live in a complicated world, with masses of information thrown at us from all angles. We rely on many devices, from PCs, laptops to PDAs and mobile phones. Not all of them speak the same language. In the end, there is no perfect GTD solution out there, and there never will be. There are however, plenty of ‘good enough’ solutions that are right for you. It’s more important to find a solution, commit to it and make it work. Once you have a reliable system and are on top of your workload, then there is nothing stopping you from making some time available for looking for smarter solutions, but at least it wont be at the cost of ‘Getting things done’.
When do you decide it is time to give up on using some of the more feature rich ASP.NET controls? When is it easier and/or quicker to code something yourself?
I spent yesterday trying to plug the CreateUserWizard into an e-commerce website. It was very simple to get working and very little code was required. However once I got it working, I then had the interesting task of getting it to produce the required HTML. I edited the templates; getting rid of the entire messy table based HTML, and thought everything was going good. It wasn’t.
When I loaded the registration page up in Firefox, and viewed source, I could see the nice template HTML was surrounded by more hideous HTML that the CreateUserWizard had generated. The hideous HTML was not part of a template so could no be changed.
After googling around I found a very exciting discovery – the ASP.NET CSS Friendly Control Adapters. A set of adapters that can be dropped into an application and will help adapt� the HTML that the ASP.NET controls render, making them CSS friendly.
I wired up the adapters and loaded up my site in Firefox, and then viewed source. Woo hoo, the HTML was fixed, with not a table to be seen.
But then another pothole….
I tried to create a user and hit all sorts of problems. After a bit of debugging, I found out that when the adapters are plugged in, the CreateUserWizard doesn’t quite work the same. My event handlers were not working because the properties such as UserName on the CreateUserWizard were empty! I ended up having to use FindControl to get the values that I needed instead of accessing the properties. I have since found Steven Harman’s excellent blog post – CSS Friendly Control Adapters, CreateUserWizard, and ViewState… Oh My! – that covers this in more detail.
Okay, so I tweaked my code and everything seems to be working again, but from reading more about Steven’s experiences it seems like there may still be some outstanding issues with the CreateUserWizard and the CSS Friendly Control Adapters.
Which brings me to the question at the beginning of the post – When do you decide it is time to give up on using some of the more feature rich ASP.NET controls?
With the CreateUserWizard as an example, there are ways of making it behave properly in terms of the HTML it renders but when do you draw the line? The CSS Friendly Control adapters are a very useful development, but when they affect the behaviour of a component and introduce quite a lot more complexity is it worth the cost?
What have I gained? In this case with the Membership/Profile providers, it would be quite easy to develop a bespoke control.
Hacked By K3L0T3X
Greetz : Prosox, RxR, General KBKB
\!/Fuck Nofawkx Al. I was in Nofawkx Before you ~Hacked By K3L0T3X\!/
Hacked By K3L0T3X! !