July 2007 - Posts

I will be the first to admit that I am a bit late catching on to the whole Subversion and CruiseControl.Net revolution. In the past my project managers rarely found any value in these tools, and I will admit it is still rare to find a project manager who does. After being introduced to CVS a few months back I started investigating various development tools, not only to improve productivity but also to learn.

SubVersion The first product I started looking at in earnest was Subversion. About 3 months ago I installed the Subversion server on the SBS 2003 server running at home and spent some time reading the online manual and setting it up. I am amazed at how simple source control has become, especially considering that I run two notebooks and have different copies of projects around on either at any point in time. The simple file based method of managing code turned out to be a lot less time consuming then I initially thought. I also now use Subversion to keep copies of important documents and other files up to date, and TortoiseSVN's seamless integration makes the process a simple joy. Moving code around has also become easier since there is no source control binding to be concerned about when not near the source control server. Backup is also simplified by just having to back up the SVN repository. Since both SVN and TortoiseSVN are open source, there is no cost implication on implementing these two applications, and provide a easy method to manage not only single developer projects but most importantly teams of developers working on various projects. My first stop when creating a new project has become Subversion, and within 10 minutes I have complete source control configured, working with the least amount of headaches.

CruiseControl.Net Two weeks ago I started implementing CruiseControl.Net. I was previously introduced to CC.Net by Craig who uses it extensively for some time now. After the quick learning curve to understand the CC.Net configuration file, I had my first project running, compiling, and publishing within an hour. Currently my CC.Net server monitors around 20+ projects, each linked to my SVN repository, building everything I need the moment I check in new code. I use the VS Express Studios extensively and find that both Subversion and CC.Net fills the gap created by VS Express as far as source control and code publishing is concerned. By using CC.Net to compile and publish the final code, full use of the ASP.Net Publish utility can be made. I also appreciate not having to load a full copy of the VS Development Environment on my server, making it much simpler to use. I actually came up with a simple and easy solution to update my CC.Net configuration as well. The configuration file is stored inside my Subversion repository and CC.Net monitors a project which will simply check out the new configuration file if it detects a change, and because of it's ability to restart automatically when a new configuration file is submitted, it loads any changes I have made or adds any new projects I may have created. It also means that if I have to recover my server for any reason, the latest configuration file is already sitting in source control, and I will basically be able to pick up from where I left off.

This weekend I decided to look into the world of NAnt, NUnit and FxCop. I've spent a lot of time reading and trying to determine which of these tools I should implement and how. I do believe NUnit and FxCop goes without saying, and integrating these into CC.Net seems simple enough. My dilemma is currently whether I should use NAnt to compile or continue using MSBuild. I am not entirely pleased with having to use solution files in CC.Net to fire the MSBuild process, however I am not finding enough information about NAnt online to make it a primary choice, in fact the few samples I have tried to implement failed miserably. I need step by step samples, and currently the lack of these is frustrating me slightly. I have also never used FxCop or NUnit before, however I believe the learning curve is worth the time investment. Hopefully some time this week I will find the answer to these questions and by the end of August have a new and improved development methodology going.

I've been a software developer now for almost 8 years. Before then use to play around with code, but my core focus used to be sales and software/hardware support. I have always learnt as I go, never really considering the real impact of what I do. I am not sure if it has to do with me growing older, or just me becoming more aware of how much I enjoyed what I am doing, but around a year ago I decided it is time I started giving back to the community. I got more actively involved where I can, particularly in training other developers, and future developers. I also wanted to be able to share my knowledge with others.

I also consider myself a Microsoft Evangelist. I started out in ASP, moved on to DLL's using VB and later full VB programming using VB 6. I was a bit slow on the uptake for .Net, however got involved in developing a system using VB.Net, and then started playing with C#. I now mainly code using C# and the .Net Framework too, and I am also busy studying for my MCTS qualifications. I have a lot of respect for what Microsoft has achieved in the last few years, and although I am not blind to other technologies, including PHP, Delphi, Ruby on Rails and the various other flavors of coding languages, I remain a proud Microsoft Developer.

Both online and offline I have been actively involved in SA Developer.Net as well as contributing to DotNet.org.za. Though my own blog and my development blog I've tried to provide information and tools to others, every opportunity I have. I have also built a close relationship with Microsoft offline and try and be involved in as many projects as possible, including hosting the SA Developer.Net events in KZN and being a Microsoft Community Distributor.

I was busy following up on some of the SA Developer.Net forum posts this morning, one of my tasks as Forum Moderator, and suddenly realised that something was missing. The normal feeling of satisfaction I used to feel when contributing, in any way, was not there anymore. I have felt disorientated lately with a lot of my online activities, and often feel like I am a single fish swimming uphill. My reasons for being involved has always been for the feeling of accomplishment and the feeling of satisfaction when someone has learned something, or was able to take something away through something I have taught or resolved.

After taking some time to consider this, I've decided to take a sabbatical from my online activities. I most likely will end up blogging more often then before, but my involvement in any of the community forums I am involved in is going to be put on ice. Maybe I need to do some soul searching, or maybe I just need a break from what has become an unsatisfactory daily routine. I know I want to remain involved in the development community, and I am hoping a leave of absence will allow me to clear my head and get my focus, and passion back.

The power of AJAX is brilliantly demonstrated through the AJAX Control Toolkit. Once I got started with converting two of my key sites to AJAX, I also utilized the Control Toolkit to bring some flair to the design of the site, and also found it compliments the business processes brilliantly, reducing the amount of pages required to develop simple screens like adding or removing users. In this post I want to highlight some of the toolkit extensions I am using and my thoughts on it all.

The control toolkit itself offers both new controls for ASP.Net and also extensions to the existing controls. New controls in the toolkit includes the Accordion Control, ModalPopup Control, and the Tab Control. It also offers extensions to the standard textbox and other controls, including the TextBoxWatermark, MaskedEdit, ConfirmButton and ValidatorCallOut. These controls and extensions are all AJAX enabled and makes huge strides towards closing the gap between Windows and Web Development. I have barely touched the service in using the Toolkit and new controls and extensions is already in development. The Toolkit is free like AJAX and hosted on CodePlex.

Calendar Control

The toolkit calendar control is an extension to the textbox, allowing various ways of popping up a client side calendar for date selection. If like me you've spent hours looking for a free ASP.Net date control then you will love using implementing this control into your site. With no complicated registration code needed, you simply include the extension in your page and set a few required properties. Navigation of the control itself is simple and by pre populating the referenced textbox with a date will ensure the control defaults to the same date. I am impressed with the amount of thought that went into designing this control and now use it consistently whenever I need dates entered in a web page. More on this control and some samples are available here.

ConfirmButton Extension

The ConfirmButton can be linked to any IButton control, and is simply a JavaScript confirmation popup. Something that again in the past had to be implemented using JavaScript, now built into any page that reference the Control Toolkit. Not much more needs to be said about this control, a must have on any page that captures information, processes edits or even deletes information. More about this control can be found here.

MaskedEdit Extension

The masked edit extension specifies formats for data input on textboxes. It also provides a brilliant time entry method for any website, allowing for switching between AM and PM when entering time. It allows the format of data to be enforced even before the use starts entering data, ensuring data is captured correctly. Even brilliant for phone numbers and e-mail address. No more regular expression validations all over the place. It can also be used along with the Calendar Control to ensure that the correct date format is captured before submitting a form. More on this control can be found here.

ModalPopup Control

The modal popup control allows for dynamic popup's in web pages. I have to admit that this has become one of my favorite controls, especially on Management pages where adding and editing of data needs to occur. Community Server has been utilizing this feature in it's list management section under administration, and if correctly configured the popup's can be managed from code. Each popup basically exists as a hidden panel on the page, which is displayed on request. Add another AJAX UpdatePanel inside this Popup and you can do PostBacks inside the popped up window, and effectively any add or edit form, within reason, can utilize this control. I found creating list management screens a breeze, avoiding having to create 2 or 3 pages to just allow editing of category or item lists that only have 2 or 3 columns of data. You can see this control in action here.

Warning: I do not recommend using this control for big form, as it can become a bit tricky to manage when a form has more then 10 fields.

Tab Control

Last but not the least is the Tab Control. Fairly self explanatory the ability to have client side tabs can make any management dashboard a joy, being able to select a tab and focus on specific details or sections of a screen. With the latest release of the toolkit design mode support was added to the control and it is also one of the controls a utilize frequently inside pages. Have a look here at how the control can be used.

Conclusion

In this post I have only listed the controls I have used in the projects I have worked on. The ability to mix and match these controls, for example having ModalPopup's inside the Tab Control, makes it extremely easy to great a rich and interactive user interface for any type of site, highly recommend in management or dashboard type application. I am hoping to start exploring the rest of the Toolkit soon, and will admit I've had a hard time trying to implement some of the other controls, however once the learning curve is complete, the power of this Toolkit should not be ignored. I provides developers the power previously only found in high end 3rd Party Components, for free.

After some issues with venues, SA Developer.NET KZN has finally been able to confirm another series of events for the month of July.

July 2007: KZN SA Developer Social Event @ St. Tropez

When: 7 July 2007 14:00-16:00
Venue: St. Tropez, 199 Essenwood Rd, Musgrave, Durban
Topic: Social
Objective: Get together because we can
RSVP: Please RSVP here or by e-mailing severanc3 at gmail dot com before the 6 July to confirm booking

July 2007: KZN SA Developer.Net TechReel @ IT Intellect, Musgrave

When: 19 July 2007 18:00-20:00
Venue: I.T. Intellect, Shop 405b Level 3, Musgrave Centre, 115 Musgrave Road, Musgrave
Presenter: Willie Roberts
Topic: TechReel Session - Topic to be provided closer to the time
Level: None
RSVP: Please RSVP here or by e-mailing severanc3 at gmail dot com before the 19 July to confirm catering

July 2007: KZN SA Developer Social Event @ St. Tropez

When: 21 July 2007 14:00-16:00
Venue: St. Tropez, 199 Essenwood Rd, Musgrave, Durban
Topic: Social
Objective: Get together because we can
RSVP: Please RSVP here or by e-mailing severanc3 at gmail dot com before the 21 July to confirm booking

Technorati Tags: , , ,

ajax-poster-photo-logoIn the last 2 month I have completed 2 project using AJAX. Both project required integration into external systems, the one into AccPac, and the other into Oasis, a sample management system based on FirebirdSQL and  TCP/IP communication with a third party service. Both project were written in C# and ASP.Net 2.0. I have been suitable impressed with the power of AJAX and the various ways it can be implemented into a website. Website interfaces are finally becoming as powerful as their Windows counterparts, allowing interactive and quick interfaces. For this post I briefly want to cover the components of AJAX I have been utilizing and my thoughts on each.

The AJAX Controls

Surprisingly the AJAX itself only consists of 2 controls, an ASP.Net UpdatePanel and a ScriptManager. It also provide a UpdateProgress Control for interactive feedback during AJAX processing. The power of AJAX lies in the way these are configured and used within a web page. Both sites I converted utilize MasterPages, and I found the best method for integration to be placing the ScriptManager inside the Master, while utilizing a ScriptManagerProxy along with the UpdatePanel inside the content pages. The concept of MasterPages is definitely something I want to cover in future, as it is possibly one of many powerful features of ASP.Net 2.0, especially when used along with well built CSS Stylesheets. The AJAX Framework can be downloaded here.

The ScriptManager Control

This is the heart of AJAX. The ScriptManager contains all the client side scripts utilized by AJAX to render controls and code client-side instead of on the server directly. To utilize any of the AJAX controls in ASP.Net the containing page needs one ScriptManager control, and in the case of MasterPages, this control can be placed inside the MasterPage itself. A convenient extension to the ScriptManager is the ScriptManagerProxy control which allows content pages to utilize the already defined ScriptManager inside the MasterPage.

The ScriptManager allows developers to handle various events that are fired when AJAX is in use, including the ability to do exception handling, asynchronous callbacks and even implement custom scripts. Details about the ScriptManager is well documented here.

The UpdatePanel Control

This control is what makes AJAX work. My approach in designing or implementing AJAX has been extremely simple. First develop the page working, using the standard ASP.Net Controls and PostBacks. At this stage ensure that everything on the page is working, including all PostBack code and event handlers. Once the page is working 100%, split the page into logical section or groups. My rule of thumb is to keep each grid inside it's own UpdatePanel, with any forms inside another. Filters and Search Selection also have their own UpdatePanels. The reason for this is that the true power of AJAX is only seen when the UpdateMode of the the UpdatePanel is set to Conditional. With this set only the content of the Panel itself will be sent to and from the server, instead of the complete page. By logically breaking down the UpdatePanels, the amount of traffic is significantly reduced and allows for a powerful and extremely interactive web page. Details about the various properties and methods of the UpdatePanel can be found here.

At this point I would like to point out that I have noticed a trend among developers to wrap complete pages in UpdatePanels, or even to wrap the whole Content Section of a MasterPage within one. This does not offer any improvement over standard PostBacks, as the complete content of the content sections will still be sent to the server. Avoid this practice. Plan your AJAX implementation on a per page basis, since certain parts of pages does not always require AJAX. A good example is a form that doesn't require any PostBacks, and utilize the UpdatePanel around the Submit Buttons to improve the overall page performance.

The UpdateProgress Control

This control provides the eye candy all developers love. By adding an UpdateProgress Control to a page and linking it to a specific UpdatePanel, Please Wait... messages can be displayed to the user while the page is being processed. There is not much more to mention about this control, however correctly applying it to a control provides a professional look to any search or processing events that may fire during the execution of a page.

Conclusion

I have been absolutely impressed at the ease and simplicity around implementing AJAX into existing web pages. As part of the Tutorial Center, which I will be updating again shortly, will include the implementation of AJAX. My only concern is abuse of the technology, something I have already seen among developers. Like all aspect of Web Design and Web Application development, the simple rule of less is more should always apply, and I urge anyone implementing AJAX to plan the implementation carefully. A well planned AJAX implementation can truly prove to be a powerful asset in any web projects, pushing it into the new age with style and professionalism which could previously only be achieved through lines of JavaScript, lot's of Flash or a Windows Application.