iPhone Theme for BlogEngine

I’ve created a simple iPhone Theme for the BlogEngine, using both Style Sheet, with a few tweeks, from the iUI Project Members, and a simple javaScript accordian by dezinerfolio.com

 

Just places iPhone folder in the Themes directory of the BlogEngine. 

iPhone.zip (29.91 kb)

This is the first pass at an iPhone theme, there are still features I’d like to put in, such as Previous and Next links, Pages, Categories, but not had time to do that at the moment. 

Further information on CSS for the iPhone can be found here

Free Project Management Gantt Project

Ever need access to a free Project Manager Gantt Chart application, well I found one today

Gantt Project 

GanttProject is a free and easy to use Gantt chart based project scheduling and management tool. Our major features include:

  • Task hierarchy and dependencies
  • Gantt chart
  • Resource load chart
  • Generation of PERT chart
  • PDF and HTML reports
  • MS Project import/export
  • WebDAV based groupwork 

It's simple to use and very easy, who need Microsoft Project? 

Remember, Remember to finish off – When is DONE?

As a developer how often do you say to someone that some development is DONE?

To you as the developer, in your head, you have covered everything you need to, well you think you have, so it is DONE.  What would the Project Manager say to your work, would it be Done?  But worst of all what would the end users say, what is done to them?

All three DONE’s above is totally different

Developer DONE:   “Done all I can do to make it work and I think it is all working as per the requirements.”

Project Manager DONE:  “We have unit tested, and everything fits the requirements.” 

Users DONE:  “I have an application that works!”

So to help the process along here are a few things that the developers need to consider before saying anything is done.

 

Browser Validation 

Does the Web application working in all Browsers, not forgetting how much time you need to spend developing a web application

Remember to test in IE6, IE7 & IE8, not forgetting Firefox, Safari, and Chrome, and what about those mobiles?  Who is the end user and what will they be using?

 

Maximum Characters

Will the application break if the number of characters goes over what the database can handle for that field?

 

Resource Files

Always remember the text you type in will be changed, you can count on it, so make sure everything is held in the resource file?

 

Unit Testing

Okay, stop laughing, when do you have time to write unit testing in your application?  Or more to the point if you application is not running using MVC the user interface is going to be a bugger to test.

 

Environment Validation

Don’t just presume that the configuration file is going to contain the correct information, perform validation check on start up to ensure that you have all the information you need to get the application going.  Otherwise when it goes off to production you can bet that those operators will change the configuration file and things will start to fall over. 

 

Sanity Check 

Just before you tell your project manager you are DONE, just get one of your colleagues to try out your code just in case you may have missed something.

 

What does the Enter Key Do?

Check and recheck to see what happens when you press the Enter Key on each page, as developers we might miss the Enter key, but you’ll find the most end users will us the Enter key then they are Done on that page.

 

Reusability

Has the code been written so it can be reused at a later stage?  You don’t want to always have to reinvent the wheel, when you already have one made. 

 

Comments

As a rule of thumb I always have the warning message set within Visual Studio letting me know if I have missed out any comments.  Also a little tool worth getting is the Ghost Doc by Roland Weigelt, as this will save you so much time.

 

Markup Validation

Check to make sure all your Markup is validated, this is quite simple, just run your website at http://validator.w3.org/ 

 

Sign off

Release to ownership of your code, get someone to take responsibility of the next phase, get someone to sign off your code. 

 

 

These are only a few things to consider when you think you are DONE, as a rule of thumb I never tell anyone I am done, I wait until someone else says it is done.

 

Another good source for producing High Quality Website can be found here

Knowing when something has gone wrong

I don't know about you, but when I am looking after a website I like to know if something has gone wrong on the website, mainly so you can fix it as soon as it happens and resolve the issue before the user of the website gets feed up and goes somewhere else.

Within ASP.NET you can configure the Global.ASAX Application_Error to capture an exceptions that are happening on you web site, so why not catch the exception and then e-mail it to the administrator of the website.

The example below works well with BlogEngine, as it uses the prebuilt settings and more importantly the Async sending of emails.

void Application_Error(object sender, EventArgs e)
    {
        
            Exception objErr = Server.GetLastError().GetBaseException();
            string err = "<b>Error Caught in Application_Error event</b><hr><br>" +
                    "<br><b>Error in: </b>" + Request.Url.ToString() +
                    "<br><b>Error Message: </b>" + objErr.Message.ToString() +
                    "<br><b>Stack Trace:</b><br>" +
                              objErr.StackTrace.ToString();
 
            System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
 
            string from = BlogSettings.Instance.Email;
 
            mail.To.Add(BlogSettings.Instance.Email);
            mail.From = new System.Net.Mail.MailAddress(from, from);
 
            mail.Subject = String.Format("Error in the Site - {0} Error", BlogSettings.Instance.Name);
 
            mail.Body += String.Format("{0}<br/><br/><a href='{1}'>{1}</a><br/><br/>", System.DateTime.Now.ToString(), Request.Url.ToString());
            mail.Body += "<b>Error Caught in Application_Error event</b><hr><br>" +
                          "<br><b>Error in: </b>" + Request.Url.ToString() +
                          "<br><b>Error Message: </b>" + objErr.Message.ToString() +
                          "<br><b>Stack Trace:</b><br>" + objErr.StackTrace.ToString();
            mail.Body += "Server Variables<br/><br/>";
 
            foreach (string x in Request.ServerVariables)
            {
                mail.Body += x + " - " + Request.ServerVariables[x] + "<br/>";
            }
 
            Utils.SendMailMessageAsync(mail);
    }

The Compare Contract

 

With the release of .NET FX SP3.5 SP1, comes a bug in the Compare Contract, so watch out when you are coding for the IComparable interface.

Full details can be found on the Microsoft BCL Team Blog.

Just as a test I have also built the test application and it does what it says on the tin.

 

The Compare Contract.zip (5.92 kb)  (Source is in VS 2008)

BlogEngine Maintenance

One thing I have found frustrating about the BlogEngine, when you are developing is I have to go on the the server to recycle the application pool if I need to refresh the object loaded in memory.

In addition I wanted a way to find out how may posts, pages and files the BlogEngine held in the application.  Also find out the amout of hard disc space they used would be useful.

So I went ahead and wrote a Maintenance section 

Installation is quite simple copy the admin/Maintenance folder in to the admin/maintenance folder.

Ammend the web.sitemap to include the maintenance

<siteMapNode url="~/admin/Pages/Maintenance/" title="Maintenance"  description=""  roles="administrators"/>

When you login as an administrator you will find the maintenance section appear.

maintenance.zip (3.83 kb)