My screencasts are consistently popular, so I thought I’d create another which talks about a slick usage of my favourite JS framework, Ext JS. In this screencast, I show how to display images stored on a server directory using a PHP JSON backend which provides data to an Ext DataView. I then allow deletion of these images and uploading of new images in an Ajax-style fashion, with no page refreshes.
This approach can be useful when editing a complex form - the details of a product you’re selling on your ecommerce site, for example - and you want to upload images without having to repopulate the other form fields when the page reloads, as it would with a standard file upload.
You can view the screencast here or download the full download the source code. I use loeppky’s BrowseButton extension for Ext 2, which you can read more about at his forum post. I hope you enjoy the screencast which is provided in association with Plastiscenic Ltd.
I love it when a plan comes together (a tale of Monorail, ActiveRecord and ExtJS)
October 8th 2007, 11:10 pm in .NET, Ajax, C#, Castle, JSON, Javascript, Monorail, Screencasts.
I’ve blogged before about the enabling features of Monorail and Active Record, part of the Castle stack. Another piece of software which is making my development life a pleasure is ExtJS - a collection of javascript goodies created by Jack Slocum and his team - and when these three things come together, watch that coding fly…. I’ve created a screencast in which I demonstrate how easy it is to build a paging, sorting, filtering, AJAX-powered grid using ExtJS and Castle, and you can watch it here. It’s 20 minutes long but filled with goodness - and a couple of hacks (forgive me :). Don’t forget to check out all my past screencasts too.
UPDATE: As requested in the comments, you can MonorailExt1 VS Project directory of this.
HotSwap for Monorail - In Action
September 23rd 2007, 12:08 pm in .NET, Agile Development, C#, Castle, Monorail, Screencasts, Windsor.
Ayende quickly posted something called HotSwap, which is a little snippet of code which uses a FileWatcher, Windsor, and on-the-fly code recompilation to increase your productivity. With ASP.NET, building your code changes causes an appdomain restart, and you will typically have to wait a few seconds for the appdomain to come back up before the browser will display your changes. This basically means that when working with ASP.NET, there are no quick code changes - you always have that four second wait till you see the effects.
HotSwap resolves this by building your code for you when it detects a change. Using Windsor it can swap out the old assembly containing your code and replace it with a new dynamically created assembly containing your new code - all automatically. The key advantage of this is that it’s all done in-memory, and none of the DLL files in the bin directory change. This means that you won’t trigger an appdomain restart and your changes can be seen almost instantly!
I was really impressed and excited by this approach so I did a very quick screencast on the topic. I was using the Castle RC3 MSI, and created a project with Windsor integration enabled. This code only works for your controllers at the moment, but a lot of the time that’ll be where you need this kind of productivity boost.
Ayende - cheers for this, and I’m sorry if I pronounced your name wrong as I’ve only seen it written down!
UPDATE: I’ve uploaded the HotswapTest Project from the screencast. You’ll probably need the Castle RC3 MSI installed to build it.
This screencast takes a break from the theme of the past few in the series and examines two of the projects within Castle’s Contrib project - CodeGenerator and ActiveWriter.
http://colinramsay.co.uk/screencasts/5/
The Monday morning blues mean this cast is a little less fluent than the others, but I hope you find it useful. Read on for some of the code snippets used in the screencast. (more…)
In the fourth screencast in the series, Validation and Much More, I talk about how to add validation to your objects and how to show validation failures to the user. There’s more on FormHelper and I introduce the PropertyBag and Flash. This is a consolidation episode, where I take the work we’ve done so far and fill in some of the common blanks. It’s very much reliant on having seen the previous screencasts as I am using the same Visual Studio project throughout.
http://colinramsay.co.uk/screencasts/4/
One point of relevance: the use of ActiveRecord with Monorail is completely optional. I’ve used it here because I feel they integrate well, but if you’ve got another persistance framework which you’d prefer to use then that’s possible too!
This screencast shows many of the small but very useful aspects of Monorail, and shows off the awesome binding abilities of FormHelper. For the next screencast I plan on taking a break from the normal series and into the Contrib project to talk about ActiveWriter and the CodeGenerator, projects which can make working with Monorail even easier!
Databinding and ActiveRecord - Screencast Three
April 19th 2007, 12:30 pm in .NET, Monorail, Screencasts.
The third screencast in the series talks about the Databind attribute in Monorail, which allows you to bind values to objects. I also extend the example to use ActiveRecord, and save the databound object to a database.
http://colinramsay.co.uk/screencasts/3/
It begins to highlight some of the more advanced uses of Monorail, and introduces the Castle implementation of the Active Record pattern. In the next screencast, I’ll be consolidating on the topics I’ve covered so far and address some of the real work problems which Monorail can easily solve.
One point of relevance: the use of ActiveRecord with Monorail is completely optional. I’ve used it here because I feel they integrate well, but if you’ve got another persistance framework which you’d prefer to use then that’s possible too!
Don’t forget to watch Getting Started with Monorail and Using Monorail, the first two screencasts in the series.
In this screencast, Using Monorail, I demonstrate some of the features of Monorail, such as layouts, rescues, filters and basic databinding to create a login form and a restricted area within a website.
http://colinramsay.co.uk/screencasts/2/
Even I got a bit confused about usage of HtmlHelper and FormHelper in RC2, but I think I made clear that FormHelper was where the action is at. Next time I’m going to talk about basic ActiveRecord stuff andsome more databinding. Don’t forget to check out my first screencast, Getting Started with Monorail.
Getting Started with Monorail - Screencast One
April 17th 2007, 2:44 pm in .NET, Monorail, Screencasts.
I’ve decided to create a series of short screencasts on Castle and Monorail. This first one, Getting Started with Monorail, covers the bare essentials of getting your first project up and running.
http://colinramsay.co.uk/screencasts/1/
It shows downloading and installing the Castle MSI, creating a new Visual Studio project, and getting something up on the browser. It really is basic but it was a necessary introduction to the others which I plan on doing. Sorry for the poor sound quality during some sections, and do listen out for a greeting from my cat within the first few sections.
Next time round I plan on doing something practical with Monorail, including databinding, layouts, filters, and some of the built in helpers.