What is Project Banana?

by Pascal Parent 31. December 2008 18:12

Is Project Banana yet another Content Management System (CMS)? Not really, I like to call it a Website Management System (WMS), it controls the way the website gets rendered like a CMS, however it does more then that. It is built on Microsoft technologies, ASP.NET and C#, and I have not decided on a pattern or methodology as yet though I have tried a few and found that all have their pros and cons, the possibilities are:

  • ASP.NET Web Forms, the most common and the least flexible, not a contender.
  • ASP.NET Web Forms with Model View Controller, the Microsoft Pattern and Practice’s bridge between Web forms and Rails (MVP) commonly known as the Web Client Software Factory and one of the three contenders.
  • AST.NET Dynamic data, not even a consideration.
  • ASP.Net MVP Framework is the other contender, however it also is still in BETA and I have other serious reservations regarding it.
  • A custom ASP.NET Web Forms based approach using IOC, the last contender.
  • A hybrid of the above

So what can you expect from Project Banana?

  • Enables rapid website development, build the public UI using existing data retrieval and configuration methods and voila!
  • Modular, plug in another module must be effortless all that needs to be done is the public UI.
  • Easy to maintain content
  • Enterprise strength

The wish list

  • Off line content management
  • Database agnostic
  • Capable of managing multi-lingual websites
  • Hassel free upgrades
  • Mono compatible?

Basically, none management systems or libraries out there do not meet my requirements so I am writing my own. I have started the “Core Module” 4 times already and I will discuss it in future posts the pros and cons of approaches in my Project Banana™ what I have learned series.

Additionally, my boss asked me if I would eventually make Project Banana open source and I feel there are ramifications and thinking to do about that subject. However, chances are that I will never make it open source, if anything I might make it “source opened” Microsoft style using the Microsoft Permissive License (Ms-PL).

The decision to keep it in house at this point is business driven, I would like Project Banana to be a development experience in good, flexible and reusable patterns. I would also like it to open new opportunities for myself so to make it open source at this stage would not be wise, time will tell.

Why the Project Banana™ what I have learned series, then? Because I believe that the ASP.NET community has given me a lot and it is my turn to give back.

I also hope my post will get better trough out the new year.

Finally I wish you a happy and fruit full new year, may all your wishes come to bear.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags:

Project Banana

Do gaming machines make good development machines?

by Pascal Parent 31. December 2008 00:12

Last week I was asked by a friend if gaming machines make good development machines. Well, the answer is a resounding YES they do at least on the hardware side but there is more to it, much more! Most developers I know also know that I have a gaming machine, so I suppose I now need to explain why? Because I cannot stand for Crysis, Crysis Warhead, Far Cry 2 or Unreal Tournament 3 to stutter at 1600 by 1050 with everything on high and 4x anti-aliasing and there you have it. I am a gamer and so is my wife, hence the gaming machine. However, there are a few concerns regarding the use of a gaming machine as a development machine.

First and foremost is the Operating System, my OS of choice for gaming is Windows Vista x64 and that will land me into trouble, I just know it. Seriously,   Windows Vista x64 SP1 is stable as a rock, just make sure you have the right drivers for your hardware and if you are about to buy new hardware make sure that a Vista x64 driver is available. The catch is to run Windows Vista x64 with at least 4GB of RAM so your game machine not only needs to have a high end graphics card and fast hard drive but also plenty RAM. As discussed in my previous post, you do not need a gaming machine to develop on but it seriously helps.

So what is the catch? Well a developer will most probably need to load Microsoft SQL Server and friends, a Web Server, MSMQ and even MySQL Server if not more, most of these take valuable resources from the gaming machine and often render it mediocre at best for games. The obvious solution is to disable the services and shut down any unnecessary programs running in memory. Though that all good and helps a lot, the OS configuration for a gaming and a development machine are different, the development machine OS of choice should be Windows Server 2008. Additionally, the gaming machine does not like clutter where as most development machines I know are filled with it.

So is there a solution, dual boot? Dual boot has always been problematic with me and I’ll avoid it at all costs. I went a different route, I have different “boot” drives for different use. I have a hard drive with Vista SP1 x64 for gaming, a Windows Server 2008 hard drive, a Windows XP SP3 hard drive, a Linux (openSUSE) hard drive and so forth. So what of licensing, well I suppose that could become a problem, however the gaming hard drive has the Microsoft OEM Vista x64 licence that came with my PC. The rest are licences from my MSDN Subscription, if you do not have an MSDN  Subscription I recommend you get one.

i get asked if it is not a lot of work to change the drives, the answer is in Mobile Racks, I personally use Vantec’s EZ Swap and it has served me well over the past few years. The nice thing about the Vantec EZ Swap is that you can get the Cartridge separately at a lower price, thus avoiding to have 5 full kits of which you only use one.  I use 80GB hard drives and install the selected OS on it, all my data lives on a separate 400GB hard drive mounted in the PC, thus making it available to all my OS installations.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags:

Hardware

Do you need a gaming machine as a development machine?

by Pascal Parent 30. December 2008 18:12

The first concern is do you need a gaming machine at all, I ask this because a lot of the guys I know that have asked me this question are not gamers and as for myself, I asked myself the question too. My wife and I both needed a machine but did we need 2 gaming grade machines? Could I justify the cost of a second full gaming machine? The truth is I didn’t, I bought a mid-range laptop instead and I am not sorry and here is why.

Here below is my 3 types of requirements:

  Gaming Development Office
CPU The faster the better >= 1.8GHz Core Duo >= 1.5GHz Core Duo
Cooling Liquid is better Air Air
Case Full aluminium with air duct Any thing really Any thing really
Motherboard Over-clockable Must have a E-SATA port Needs network and USB
RAM 4Gb over-clockable Minimum 4Gb 1Gb
Video Accelerator The latest GT or GTX preferably over-clockable Anything Direct X 10 capable. Anything Direct X 10 capable.
Hard Disk The faster the better Lots of space for those Virtual machines 80Gb is plenty
Sound No less than an X-Fi will do It needs to work Optional
Screen One 2ms 22 inch LCD 2 of any screen works for me Anything as long as it works and it’s visible
Operating system Windows Vista x64 Windows Server 2008 x64 Windows XP Professional
Cost > R15,000 ($1,500) > R7,000 ($700) > R5000 ($500)

As you can see the requirements are vastly different and so are the price tags. You can expect to pay more than R10000 ($1000) for the box alone, excluding the Screen, Keyboard, Mouse, … That is the price of a nice laptop!

I feel that a good development machine should be able to run the .NET development environment comfortably and be able to simulate any other situation one might encounter using Virtual Machines. So the 3 major requirements are hardware virtualization, disk space and RAM. Though I do state that Windows Server 2008 x64 is my preferred development operating system I have to admit that I only use it at work. The reason is that personal machines are usually used for other things too. Microsoft Windows Vista Business x64 is the ideal all around operating system, particularly for development and general use. One word of caution though, make sure the drivers are available before buying the hardware.

Eventually, I ended up buying a laptop, mostly because I also do digital photography and needed something portable. It’s an HP Pavilion dv6000 series with 4GB of RAM, a 160GB Hard Disk, an Intel Core Duo T7100 1.8GHz and a 128MB Mobile Intel GMA X3100. To be totally honest, I can do all the above the only thing that I miss terribly is an E-SATA port but I could buy an Express Card for that. I also have a couple of external hard disks for the “larger” files.

So do you need a gaming machine as a development machine? the answer is no but do gaming machines make good development machines? See my next post to find out.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags:

Hardware

Essential ASP.NET developer's toolbox

by Pascal Parent 26. December 2008 22:12

There are a few articles around the “ideal” toolbox to develop ASP.NET applications, however each developer has his or her own preferred tools and I thought that I would share with you my favourite tools. Here they are in no particular order:

  • Microsoft Windows Vista x64, is there another operating system out there for ASP.NET developers? Yes, Microsoft Windows Server 2008 x64, but not on my laptop.
  • Microsoft Visual Studio 2008 SP1 Professional, though any flavour will do Express (the free version) has amazed me recently particularly the fact that it runs well on a 1.6gz Atom processor with a Gig of RAM. However, Professional now comes with an array of standard tools that should not be dismissed, starting with Unit Testing. SP1 adds better JavaScript debugging and integration as well as a UI for many of the new tools but more importantly a faster HTML designer. And then there are the add-ons I could not live without:
  • The browsers:
    • Microsoft Internet Explorer, being one of the 2 “exceptions” when it comes to browsers is essential to have the big 5 to test but more importantly to have the 2 exceptions Internet Explorer and the dreaded Safari. With Internet Explorer comes a few useful tools:
    • Mozilla Firefox, during development I exclusively use Firefox (and IE to check if something is broken), Firefox also has a few really good add-ons:
      • FireBug, my life would end without it! From JavaScript debugging to Network monitor and so much more!
        • YSlow will tell me why the site is slow, the reports are great.
        • FireUnit a new kid on the block Unit Testing for JavaScript.
      • ColorZilla click, point and voila the RGB colour of the HTML element.
      • Dummy Lipsum creates dummy text using Lorem Ipsum
      • FireShot allows me to capture entire web pages as graphic files (PNG, GIF, JPEG, BMP) for future reference.
      • Html Validator to check how badly I break the HTML rules
      • IE Tab allows me to open an Internet Explorer tab in Firefox
      • JSView opens external files (JS, CSS, …) in a code view window.
      • MesureIt a pixel ruler.
      • Quick Locale Switcher for when I work on localizable web applications.
      • Web developer is a set of tools for developers, too many to mention.
    • Google Chrome, the general rule is: “If it works in Firefox it will be fine in Chrome and Opera”, however it does not hurt to check, the same applies to Opera.
    • Apple Safari, need I add more, I hate this browser but it exists and I can not ignore it.
  • Paint.NET, I do not have the need CorelDraw Graphic Suite or Adobe Creative Suite so Paint.NET does the trick just fine.
  • Internet Information Services 7 is an essential tool for .NET development.
  • Microsoft Virtual PC 2007 SP1 for when I want to try something fancy without the risks.

This list is not exhaustive but it’s a good beginning. Next in this series “The database dilemma”

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: ,

Project Banana | General

Optimising ASP.NET over the wire

by Pascal Parent 18. December 2008 03:12

I am currently optimising a web site that I am writing, aptly called "Project Banana™", the requirements are quiet steep as it is a site management system and needs a lot of user interactivity, Web 2 stuff if you will. I will be discussing my finding so far in a series of postings, starting with this one.

When I started with this I promised myself not to change the look and to keep or improve functionality, you will see how I faired over these posts.

The HTML

I started with a layout I got from a graphic designer friend, Neels Van Den Berg of Evoke Media, his HTML comprised of tables, spacer blank pixels and graphics for effects. The first thing I did was to throw out all the unnecessary tables as well as images and replaced them with styled div's or styles, I have more than halved the size of my HTML doing this. So my first advise is: Use Div's with styling instead of tables where possible. And I know it's a lot of work but it is all worth it in the end.

Images

Avoiding unnecessary large images is vital to a fast site however even more important is using the right compression for the right purpose. A simple guide line would be that pictures (non photo) that do not require more than 256 kb be GIF with optimisation on colour depth. Where as photographs should either be JPG or PNG. Compression should always be set to the maximum before loss of quality. These simple guide lines will gain you a few valuable kilobytes.

Cascading Style Sheet

Put all your styles in a (or more but not too many) separate CSS files this will allow you to reuse stiles and keep consistency across the site but more importantly you can “minify” the files when you deploy them to the production server gaining you more valuable kilobytes. Call all your CSS files from the Master Pages, the less they are the more the “minify” and “GZip compression” will have effect. Also if you can archive a visual effect in CSS rather than using images do it.

AJAX (or the JavaScript factor)

Firstly, when it comes to optimising ASP.NET over the wire, on fact is certain! The Microsoft controls are evil! So, throw away all those over the top bloated Microsoft Composite Web Controls such as the Menu, Tree, DataGrid controls and the supper heavy (83 kb) Microsoft Ajax Library and toolkit they download resources that will never be used. In stead use the repeater in association with Jquery or another and plugins to that library. The good thing about JavaScript is that the source code is always available, so no surprises. Bottom line use a JavaScript library such as Jquery, Moo tools, Prototype, DOJO, Ext JS to mention but a few. Additionally, put your reusable JavaScript in a JS file and “minify” and "GZip" the files when deployed to the production server. Also when using .NET make use of Master Pages it will ensure browser cashing. Furthermore, combining and compressing the JS files using the modified script manager will gain you more bytes then you bargained for, go to http://weblogs.asp.net/bleroy/archive/2008/07/07/using-scriptmanager-with-other-frameworks.aspx for more information.

Web Services

When using web services use Json, it nearly ½ the size of XML and JavaScript understand Json natively, therefore all the JavaScript libraries should too. The good news is that ASP.NET has a Json library and if that does not help James Newton-King has the answer in the form of Json.NET including features like LINQ to Json and the ability to convert JSON to and from XML

Server Side

Set compression “ON” on the web server.

ASP.NET

The second evil from Microsoft in ASP.NET is the forever useful viewstate. truthfully, if a .NET control does not need state, as is usually the case, set the viewstate to false. It is by far the biggest bloater of HTML pages ever. As useful as it might be as dangerous it can be. And now for the one we all forget, to set the Debug to false in the Config.web file and compile as release before we deploy to the production server. This will allow for browser caching and a faster application as it no longer needs to run the debug data.

Testing

Test all sites on Microsoft Internet Explorer 6+, Mozilla Firefox 2+, Google Chrome, Opera and the even the dreaded Apple Safari. Apple Safari is one of the two oddballs it does not follow the same font convention as the others. The other problem child is Microsoft Explorer, if you are going to have layout or JavaScript issues, it's going to be here. Firefox, Opera and Chrome seem very happy, if it works in the one it seems that it will work in the other two. During my development cycle I tend to use Firefox and Internet Explorer mainly for the developer tools that are available which I will be discussing in Part 2 of this series as a part of the Essential ASP.NET developer's toolbox.

Conclusion

Monitor how much data is downloaded for the site during development and fix any bloats immediately. It will avoid lots of issues later, make the site more responsive and save bandwidth, something very important here in South Africa where petrol is nearly cheaper than a few Megs. In some cases 1 Mb can cost up to 2 Rands (about 20 cents US)makes 1 litre of petrol = 4 Mb. South Africa is also a country where a 56kb analogue modem is still common place.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: , ,

Project Banana | Optimisation

Scott Hanselman in Johannesburg

by Pascal Parent 17. December 2008 02:12

Scott Hanselman in JohannesburgLast night I was at a presentation by Scott Hanselman at Microsoft in Johannesburg, what a blast. I have never had so much fun listing to a technical presentation ever. The insight into MVC was great but better yet is little cracks of it. If you are in Cape Town don't miss him.

On another note, it is shameful that less than 2 years before the largest event to be held in South Africa, South African officials are still difficult to impossible to live with, I know that our country is undergoing major changes but come on you got to read this. It is completely unacceptable and officials mustn't blame race or the apartheid that would be lame. They must just remember that tourism represents a large amount of our GDP and it has dropped by an estimated 37% for next year.

Come on South Africa, let's get it together.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: ,

General

The Vista experience

by Pascal Parent 17. December 2008 01:12

I was very skeptical about Windows Vista, everything I read about it was rather negative. But being a good developer I just had to try... Here is my Vista story...

First I time tried to install this beast was on a respectable desktop PC, AMD 4600+, 1gig of RAM, 2x Geforce 6600 GT SLI (2x Screen Attached), Geforce 5200 (1x Screen attached), 200 Gig SATA II, SoundBlaster X-Fi, DVD-RW, DVD Combo, a Pinnacle PCTV analogue 550, a Logitech Webcam and a Logitech Cordless Desktop MX 5000 Laser (Bluetooth). All in all not a bad mobo. Well, installing Vista is easy and remarkably short. Everything when well until I had to install the drivers. Please note that all the driver I had found at the time where Beta except if mentioned otherwise. The first driver I installed was the Geforce drivers (RTM) that went rather well, then I installed the X-Fi (Beta) drivers. That's when all hell broke loose, the Geforce drivers would not initiate anymore if I re-installed the Geforce drivers, the X-Fi would not initiate, and forth and so on... Until Vista gave up and I could not boot anymore. So I gave up... That was Early February.

But I suppose I never learn, I saw an Acer laptop (Celeron based) running Vista Basic, and after having removed all the unnecessary junk that Acer loads, I was impressed by the operating system speed and usability. OK so many things have changed but was it worth a try? I have an HP Compaq laptop (Turion 64 based) and HP has all the RTM Vista drivers for it. So I launched myself and, after Ghosting the drive just in case, installed Vista Ultimate from scratch.

A week later, I have had 1 problem, and since I have not researched it I will not mention it yet. Otherwise, it's stable except for the Sleep and Hibernation modes. Those two keep crashing the OS. It fast enough, it's cool. But then again (even though I installed it) I have not used Visual Studio 2005 yet.

The fact is that most of my drivers work well and in particular my finger print reader works better with Vista.

I'll keep you updated, so far so good...

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags:

Software

The paperless office, the unachievable dream.

by Pascal Parent 17. December 2008 01:12

Honestly, you have heard it, I have heard it, it's out there and it's called the paperless office.

The truth? I think it might be an unachievable dream. Mind you I am all for saving the forests, in fact I preach about recycling everything. But, lets face it, humanity is not about to let go off paper for a while to come. Why, you may ask...

Well, paper was invented, in the form of papyrus, by the Egyptians more then 2.000 years ago. And we have been using it for most of that time, even if it only arrived in Europe much later, the damage was already done. It's been in our daily life for millennia's. You can not get rid of an imprint like that in a decade or two, it's in the genes.

Furthermore, paper is generally lighter and far cheaper than, say, a laptop or similar device. What about a palmtop (PDA)? The same applies, besides have you ever tried to read a book (e-book or PDF) on a PDA? Well it's not easy. I should know I read Orson Well's "The time machine" on my iPaq, I kid you not. Also PC's, laptops, PDA's require energy, paper on the other hand does not. It also does not emit light, only reflects it, thus making reading a more pleasant and satisfying experience.

The bottom line is simple: How many time have you printed an email, a contract or other documents to read it, or file it? Reading on paper still makes sense to us, until it does not, we will carry on and the paperless office, as technically possible as it is, it is only a dream.

We are only human after all.

But maybe with the adoption of the PDA, Mobile Phone, laptop, ... Maybe it may yet happen. But they will have to get lighter and more portable.

In the meanwhile how about putting a little extra note on the footer of each email you send? Something that read likes this: Please consider the environment before printing this e-mail and/or attachment/s. It will raise awareness if nothing else.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: ,

General

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 The ASP.NET Guy