IT Gulf Coast MVC Presentation

I have been preparing for a talk on ASP.net MVC for a local technology oriented group, IT Gulf Coast. My presentation is today at 11:30 and covers MVC and why it is a worthy framework to use. This talk fits my interests well; I am hooked on MVC and want others to be hooked as well!

As a developer, it is difficult to think ‘out side the box’ in a manager mind set. When I think of MVC I think of the code differences and the change in syntax. A manager needs to think of the cost saving and time spent developing (and testing).

Armed with that knowledge, I have created a presentation revolving around parallel development, SOC (separation of concerns) and the beauty of having full control over output. I will be comparing MVC to it’s old brother, Web Forms.

IT Gulf Coast September 2010

ASP.NET MVC is the premiere web development framework for the Microsoft
platform, and represents a significant departure from standard ASP.NET and
ASP web development. This new paradigm in development is perfect for both
established and new shops, and Derek will show us how this new framework
frees your developers from repetitive and error prone web development while
also providing best in class security, scalability, and features. He will
also discuss how adopting an MVC framework allows multiple developers to
avoid stepping on each other’s toes, as well as the many other business
benefits of the MVC approach. This presentation will focus on benefits to
your business rather than the technical ins and outs of source code, so
don’t miss it!

About the Presenter
Derek Gates is an independent software developer and consultant focused on
usability for web and mobile applications. With nearly a decade of
experience writing top notch user experiences, Derek is that rare software
engineer that understands users and can put together interfaces that are
both functional and pleasurable to use. Check him out at: http://jink.us/

Pressing The Optimizations…

Installing WordPress is incredibly easy.  Optimizing it just as easy.

Being a pursuer of optimized pages, I started checking for ways to optimize the output of WordPress.  By following Yahoo! Best Practices guide I surmise that the biggest factors in page load are:

  • Reduce HTML elements.
  • Join, Minify Javascript and CSS files.
  • Cache files if server side calls are expensive. Use GZIP compression on files.
  • Use GZIP compression on files.

Reduce HTML Elements

A complex page means more bytes to download and it also means slower DOM access in JavaScript. It makes a difference if you loop through 500 or 5000 DOM elements on the page when you want to add an event handler for example.

This step is quite easy. This is dependent on the theme chosen, which controls all of the output for the blog. I am currently using the Green-Park 2 theme designed by Andreas Jacob. Andreas is incredibly talented and has designed this theme to be lightweight from the ground up.

I am designing a theme which includes many of the tricks Andreas used in Green-Park 2, such as the addition of CSS3 effects that degrade down to CSS2.

Join, Minify Javascript and CSS files.

For themes or plugins that use large CSS or even multiple Javascript files this is a life saver. Joining these these smaller files into one larger file speeds up the page load. Reducing the amount of requests the browser has to perform is key to speeding up the page, creating connections and requesting files takes time. To add more insult to injury, most browsers limit concurrent Javascript file downloading when they are from the same domain.

Both Javascript and CSS can be reduced in size, a process called Minifying. Javascript and CSS can have comments removed, white space removed and other tricks to reduce file size. The resulting small file functions the same but is downloaded quicker due to less characters in the files.

Joining and minifying is usually a manual affair, performed by the owner of a blog. This becomes a pain when CSS needs updating or Javascript has to be changed or updated. My weapon of choice for manual minifying is the YUI Compressor codebase, which is a Java program to handle minifying a file at a time. To do this online, check out the Online YUI Compressor (not run by Yahoo!).

For automatic joining and minifying on WordPress I use the plugin WP Minify Plugin. This plugin uses the Minify codebase which uses JSMin for it’s Javascript minification. Minify supports swapping out JSmin for YUI, which I have yet to do. Another option for minification is the PHP Speedy system, which a WordPress plugin has been started, but not available for WordPress newer than 2.7.

Cache files if server side calls are expensive.

WordPress is incredibly powerful, but can be bogged down by PHP calls on every page load. This is usually insignificant to worry about, but when lots of visitors visit the blog those PHP calls can increase page load by a significant amount. A way to fight this slowdown is to cache the generated files and serve those generated files. On this blog I use WP Super Cache, which performs the caching automatically.

Use GZIP compression on files.

Gzipping generally reduces the response size by about 70%. Approximately 90% of today’s Internet traffic travels through browsers that claim to support gzip.

GZIP is an easy way to reduce page load size. The WP Minify Plugin enables this when joining and minifying Javascript and CSS. The caching by WP Super Cache GZIPs all of the page content, enabling compression where the Minify plugin can’t.

Getting Started

I’ve been taken in by the WordPress camp.  For too long I’ve avoided this blogging system, afraid that a badly crafted back-end would be a cause of headaches.  With the install completed, my initial fears were for naught.  WordPress is an incredibly easy to install and configure blog system.  Within 15 minutes of configuration and FTP uploading, this blog was alive.