Intro to NAnt tutorials
Wednesday, June 25th, 2008Just posting this for my own reference really, these are ages old but Jean-Paul S. Boodhoo has written a bunch of excellent articles on getting started with NAnt here.
Just posting this for my own reference really, these are ages old but Jean-Paul S. Boodhoo has written a bunch of excellent articles on getting started with NAnt here.
I’m slowly getting my head around IoC containers and want to note a few useful links for future reference. As things tend to go in my geeky exploits I read about and learn these ideas from the .net world, who often have picked things up from the Java world, I then try to find out who’s doing similar stuff in the Flex world and am generally not disappointed, which is very cool. So these links below are a mashup of various technologies but should be useful to anyone who has been hearing about IoC and wants to learn more regardless of language/platform.
The ‘Textbook definition’ by Martin Fowler
Very useful explanation with some basic sample code (.net) by Ayende
Castle Windsor step by step basic intro (.net)
Prana - a Spring-ish IoC Container for AS3 by Christophe Herreman (via jesterxl)
This stuff doesn’t come naturally to me to say the least so if anyone else has any links they want to share feel free to post them in the comments.
Karl Seguin, a .net developer for Fuel Industries has written an excellent series of posts on modern development techniques. Examples are based on .net and associated open source and commercial tools and utilities but the theory is great reading for any developer.
A lot of what is covered I will be bringing into my talk at 360 Flex Europe and will be referencing and expanding upon in some upcoming blog posts with a Flex/ActionScript slant.
If you’re running visual studio in Parallels you can set it up to deploy to a virtual directory in IIS then make that site accessible to OS X. This is great for when developing web services or remoting in .Net with Flex Builder in OS X. You can also assign an alias to your windows IIS server meaning you don’t have to remember the IP address of the Parallels VM.
Setup Visual Studio to deploy to IIS Virtual Directory
By default since VS 2005, when you run a website project it will execute in the built-in web server in visual studio. You can however set it to deploy to your windows version of IIS by doing the following:
Goto your web project’s properties (right click the project in the solution explorer and hit properties),
Select the “Web” tab,
In the Servers section select “Use IIS web server”,
Enter a name for your project and hit the “Create Virtual Directory” button.
When you run or debug your site it will now use IIS instead of the built-in web server.
Run IIS website from OSX
You’ll need to do a couple of things before you can run your IIS deployed website in OS X, firstly you need to enable remote access to the site and secondly you need to find the IP address of your parallels VM.
Go to Control Panel, Adminsitrative Tools, Internet Information Services,
Expand your Computer node and right click on the websites folder and click Properties,
In the Directory Security tab click the annonymous access Edit button,
Check the box titled “integrated windows authentication”.
Now to test your site, open a comand prompt in windows and type ipconfig to find out your windows VM address. Then in OS X open your browser and enter http://[your.ip.address]/yourVirtualDir/ and you shoudl see your asp.net website running.
Setup an alias instead of remembering the IP address
I found this out from a comment on Andy Jarrett’s blog, use the following command from terminal to use a more friendly name to access your IIS webserver (replacing ‘localhostwin’ with your chosen alias and IP address with your XP’s IP:
sudo dscl localhost -create /Local/Default/Hosts/localhostwin IPAddress 10.23.0.1
Here’s the rest of the comment which has some other useful commands:
sudo dscl localhost -create /Local/Default/Hosts/ridiculous.nonsense.monkeys IPAddress 192.168.0.1
Enter your password when asked, and you can now ping 192.168.0.1 with the name ridiculous.nonsense.monkeys
You can see the results of your work with:
dscl localhost -readall /Local/Default/Hosts
And to undo your handy-work:
sudo dscl localhost -delete /Local/Default/Hosts/ridiculous.nonsense.monkeys
P.S. You can see the results of your BSD flat-file method with this command:
dscl localhost -readall /BSD/local/Hosts
# Posted By j0no | 11/11/07 8:01 PM
I’ve just written a new tutorial on NHibernate (an Open Source OR Mapper for .Net).
As ususal any feedback much appreciated. ![]()
As anyone who regularly reads this blog will know, I’ve been looking into Silverlight of late. Nothing commercial as yet, just to fulfill my own geeky interests (if anyone is looking for Silverlight development get in touch). Throughout this experimentation and research I’ve also discussed Silverlight with other developers and designers from various small and large agencies particularly at a recent MS web agencies dinner in London.
Through all this investigation and chatter, I’ve drawn a conclusion of a problem that MS still have to solve:
There are still no way near enough “creatives/designers” willing to to experiment with the tools available for creating Silverlight applications.
Maybe this is obvious and I’m sure MS are well aware of this but I’m not sure enough is being done. The reason being, I myself and others are getting frustrated by not having anyone available to work with in order to create good-looking Silverlight applications and experiments.
.Net developers are excited by Silverlight, MS partners are excited by Silverlight, MS is excited by Silverlight… Designers couldn’t give two hoots about Silverlight.
This is pretty frustrating because there are a lot of very skillful .Net coders waiting to work with someone using this amazing workflow that is available between Visual Studio and Blend but there’s no-one there on the Blend end! Blend is a good tool, I’ve played around with it and realised what could be done if I could work with someone who, unlike myself has even the slightest bit of artistic flair. Unfortunately this person doesn’t exist yet, or at least is very hard to come by.
Microsoft,
Get the Expression tools available for Mac ASAP.
Do whatever’s needed to get designers comfortable and happy with using Expression Design and Expression Blend.
Throw more resources and free training at creative decision makers.
Make integration with Photoshop and other design tools as seemless as possible.
The devs are sold on Silverlight, the appeal of being able to use CLR languages in a rich environment is huge. But it’s fruitless without designers. We need more designers picking up these tools if you want your massive .net community to do some amazing things with Silverlight.
Until then, Flash and Flex are here, available on both platforms and have a passionate and loyal user-base. I appreciate Silverlight and the tools are only at version 1, but if you’re out to compete (and let’s not kid ourselves, you are), you can’t measure success on version numbers.
Continuing from my previous post on learning Silverlight (sorry for the VERY long delay i’ve been very busy lately)…
5 - The tools (cont)
Okay so downloads required were as follows:
.NET Framework 3.0
I’ve already installed the runtime so next is .NET Framework 3.0. The .Net installer seems to have improved, although is now a whopping 30 meg which downloads and installs silently after you run the setup, it does however hog resources a little during the install but no system restart required! :). A point to note is that viewing Silverlight web applications does not need the .NET 3.0 Framework to be installed, a subset of the framework is included in the Silverlight runtime. I’m installing it for the use of Expression Blend and VS Orcas.
Expression Blend
Standard install process here, there were options for “custom” or “full” install but I chose “typical” as I’m on a tight budget with regards to the spec of my laptop. I’m sure things will run painfully slow but I’ll just have to put up with it until I get a new machine. Another simple install down, so far so good.
- removed due to no support for the Silverlight extensions!
Visual Web Developer 2008
So finally settling on giving this a go with Visual Web Developer 2008. There was a nice online install that basically setup everything for me. I like this sort of install, yeah maybe there are a million and one options i might want to set on install but in the real world if i don’t get these options I dont lose any sleep and am less frustrated with slow installs - start it going, leave it, come back and its done.
Visual Studio Orcas 2008 beta2
From the downloads, the first step was to run the extractor which extracts all downloads into an installation directory, this took ages just to extract it uses winRAR self-extractor which was a bit annoying in that it has a progress indicator for each file extracted but no indication of overall progress and no indication of how many files there are left. VS 2008 is going to be a bit of a resource hog. That was with Orcas, with VS2008 beta2 I opted to download and install the standard edition which downloaded an ISO image. Using magic ISO I extracted this and had a much quicker experience, although the install did still take a considerable amount of time.
After it had finally extracted I run vs_setup.msi… to be instantly prompted to run setup.exe (I always get that wrong). A familiar Visual Studio setup screen is presented and then a typical visual studio installation process.
Microsoft Silverlight Tools Alpha Refresh for Visual Studio (July 2007)
A simple to install extension to VS2008 that offers the Silverlight specific features.
And finally that is all that we apparently need.
Overall the setup experience was pretty good, alot of downloading and waiting but no painful unknown errors or crashes so i’m happy with that. A bit of confusion with the new release of vs2008 and no support for Silverlight in the Express editions. Now, finally onto some development and time for another post that might take me months to finish
(hopefully not though).
Scott Guthrie just announced the next beta of Visual Studio 2008 and .net 3.5, this is a big release and details some great new features. Check out his blog postd and give it a try.
I have been playing with the beta1 and Silverlight and am thoroughly impressed see my findings here and i’ll be finishing a follow up post very soon.
After my initial enthusiasms about Silverlight along came proper work and other such distractions and I somewhat halted my research. However I’m doing a brief presentation on it at a new tech user group in Southampton (12th July) and so thought best to brush up on the latest - nothing like last minute preparation!
I thought it might be interesting to blog the order of research from start to finish and a few thoughts along the way (interesting to whom I have no idea!). I’m just going to document my findings as I go and not edit the post other than corrections to highlight how easy/difficult it is to get into this stuff. I hope by the end of this post to have created at the very least an extremely basic Silverlight app, be in a position to impart a basic understanding to others as to what Silverlight is and to be able to field a reasonable amount of questions. Here at the start of the post I have no idea where this will go and apologies if this becomes a long one.
1 - Google
I like Google. When interviewing potential employees I am always more interested in how people would find out what they don’t know than what they already do know. I’m well aware I could just go straight to silverlight.net or hunt around on microsoft.com but I prefer to see what Google comes up with…
My first Google… okay I could have just gone there in the first place (told you I wasn’t going to change this post). After a quick scan through the results most seem like press release type things and silverlight.net looks like the best place to start.
2 - Silverlight.net
This looks like it will be a useful starting point. To begin, “Introducing Silverlight”:
Microsoft® Silverlight™ is a cross-browser, cross-platform plug-in for delivering the next generation of .NET based media experiences and rich interactive applications for the Web. Silverlight offers a flexible programming model that supports AJAX, VB, C#, Python, and Ruby, and integrates with existing Web applications. Silverlight supports fast, cost-effective delivery of high-quality video to all major browsers running on the Mac OS or Windows.
First few thoughts that spring to my mind after reading the above:
So far so good, but that’s really just summarised what I already knew, time to look at some of the examples and see if I have the latest player…
3 - example: Zero Gravity Game
First thing I’m looking at is a game linked from the silverlight.net homepage, Zero Gravity. First thoughts were: “ooh a preloader, well i expected as such but I wonder if there will be a resurgence in the ‘preloaders ruin the web’ crowd as there was (still is) with Flash”. The game loaded fine, played it for a couple of minutes, it looked pretty good and ran well, not the best game in the world but thats probably a good thing for me considering I need to get through a lot still and its getting late.
A point that I think will come up alot will be “well I can already do that in Flash what’s the point of it?”, which is fair comment and if you can do it in Flash already then why bother? However, if you do manage to learn some Silverlight it may (or may not) become apparent that certain types of developments are better suited to Silverlight and others to Flash, if you don’t try it don’t knock it, which is why I’m giving this a go here and why I was happy to agree to giving a presentation on it.
2.5 - Plugin installation
Okay so I have blatently tried Silverlight things out before now which is why I had the plugin all ready to go. Well, not wanting to cut corners I’m going to try uninstalling and reinstalling the Silverlight plugin… Where to look, first stop Add/Remove programs… It’s there amoungst a million other Microsoft things and the uninstall was fairly smooth, although I did have to close down Firefox for it to complete.
Now to try the game again, first thing of note is the plugin detection. I now see a nice glowing “Get Microsoft Silverlight (beta)” button… click. I’m taken to an MSDN download page offering me the Mac or Windows version of Silverlight. The windows version shows it’s compatible on Windows XP and Vista and IE6, IE7, Firefox 1.5 and 2.0. Mac version is Firefox 1.5, 2.0 and Safari. Not bad, but looking at my site stats, were I to put a Silverlight app on this site I would be instantly eliminating 3-4% of my visitors without giving consideration to whether they would want to install the plugin. I click the download for the windows version. I’m now at an MS licence page which “I accept”, save the file, run installer, DONE! I’m impressed, after actually getting to the download the install couldn’t have been smoother, didn’t even have to restart the browser… oh no, after trying the game again turns out on Firefox you DO need to restart the browser (couldn’t it have told me that after install?). But still, browser restarts I can handle compared to system restarts, tried again and the game runs fine.
4 - Do something
Now we sort of know what Silverlight is and what it can do, I want to actually create something myself. The “Get Started” Link on the silverlight.net homepage looks good…
Getting Started Video
The video itself is running in Silverlight, it starts straight up and there’s an option for full-screen, again this can all be done in Flash but either way this is how video should be and not waiting ages to install, open, buffer then watch with some other external plugin.
The initial demonstration in the video uses Visual Studio Orcas (MS codename for VS 2008), I guess I’ll be downloading that next. It demonstrates a very simple create project, write some XAML (the UI markup language) and adds a C# event handler to create a basic Hello World. Looks easy, I think I can handle that.
It then goes on to demonstrate some simple functionality of Expression Blend which is the interaction design tool for Silverlight. Basically Blend allows you to drag & drop elements, manage timelines, create effects and design elements for your application much like you would with the stage and tools in Flash. In the video, Blend is launched from Orcas and instantly loads all of the project assets and displays the currently created simple xaml file in design view. He then goes on to animate a basic textbox by rotating and moving it.
The cool thing is he then switches straight back to Orcas and the xaml is updated, in the code view he can then invoke the animation he just created in Blend through C# in code-behind file. The workflow looks amazing! (watch the video - it’s hard to explain)
Next the video shows an example of integrating a Silverlight Project within an existing asp.net web project by dumping the Silverlight app onto an asp.net webpage. Again Orcas makes this look very easy but we don’t really know what’s going on behind the scenes. An interesting point that is being demonstrated is that Silverlight can directly call asp.net web services (or any standard REST or JSON web service).
The video takes a rapid couple of steps forward and imports some custom controls into the project which then procedes to create a nice Flight Schedule tool - okay the end result is impressive but I think a few too many steps were skipped for it to be of any real value, although it does show you the potential.
Overall the video was a very good introduction to Silverlight. To begin with I’m going to look at using the expected Visual Studio Orcas (a new beta is to be released soon I believe) and an evaluation version of Expression Blend. This great workflow is what helps MS sell their products, I can already tell that whilst not using these tools would be possible, using anything else is going to cost alot of time.
5 - The tools
The next section on the silverlight.net site offers downloads to the tools you’ll need, the first is the Silverlight runtime which we already have, the next is Visual Studio Orcas. Yikes, that’s alot of downloading, eight 700 meg files to get!
As well as the standard Orcas package we need the Silverlight tools for Orcas.
And if we’re to be doing some funky designery interactiony stuff, we need Expression Blend (there is also the option of Expression Design which can be used for creating assets for Silverlight, but i’m going to leave that for now).
To install Blend you also need the .Net Framework 3.0.
To be continued…
Whilst all this downloads I’m going to post where I’ve got so far to break up the post and to get this out before all the information is out of date! So far I’ve spent about 3 or so hours researching this across my limited spare time over the past couple of days. I’m pretty impressed how easy everything has been to discover, largely down to the Silverlight.net site so far. I’m also pretty confident I’ll be able to get up and running with Silverlight relatively quickly.
Oh and if anyone reads this and has any questions/pointers they think I should cover in the next post leave a message in the comments and I’ll see what I can do…
This week I am on a training course titled “Creating engaging user experiences with Microsoft Expression” “Delivering Rich Online Experiences Using Miscrosoft Expression, ASP.Net, AJAX and WPF” (edit: surprisingly I couldn’t remeber the exact title without the material in front of me, this is now the real course title and a better indication of the content).
Why?
Well, I met Andrew Shorten, a former Macromedia/Adobe now Microsoft UX guy after my presentation on Apollo at the LFPUG in February. We got to talking about what he’s up to at MS and a few days later he came down to see us in sunny Bournemouth and we got into discussing the latest industry goings ons and where the Microsoft Expression suite, WPF and SilverLight (then WPF/e) fits in. Turns out he’s a pretty cool guy and has a pretty cool job of liaising with the developer community and trying to push and gather feedback on the whole Expression outfit. He offered me a place on this early adopters course and me, being one for expanding my (and my businesses) horizons rather than spouting off uneducated, ill-researched rants about my love/hatred/bandwagoning-opinion on various technology companies, accepted.
Yeaaaah, but WHY?
Well, I’m well aware MS has been getting a bit of a bashing from the Adobe crowd (dev community and the more corporately associated) of late. I’m also obviously not anti-Adobe myself. Far from it, I’ve been developing with Flash since early Flash 4, I’ve blogged enthusiastically about Apollo, Flash and Flex for nearly a year (late starter in comparison to some but have been reading and commenting on blogs for years). I’ve attended several Flash conferences and regularly travelled the 3+ hours to London for the monthly MMUG and now LFPUG meets. However, I have also been a long-time user of Microsoft technologies, I’ve developed in .net for several years, both ASP.Net and Windows Apps development, before that I developed in VB and classic ASP, am fluent in SQL Server and have managed several dedicated MS web servers over the past few years.
So… I’m an Adobe AND MS fanboy? Kind of, but I also run my own Linux server (on which this site is hosted), am in no way adverse to owning a Mac, am increasingly familiar with Apache, PHP and MySQL, am interested in several Open Source projects and generally like to keep tuned to as much as possible in the web and technology space.
So… (finally getting to the point) for me, taking an active interest in Expression and Silverlight was never a choice of ditching Adobe in favour of the MS alternative. I have no intention of stopping or slowing down any of my interest in Adobe, nor any other technology. I’m just prepared to arm myself with the relevant skills to understand the Expression toolset, familiarise myself with the merits and drawbacks of the available technologies and position myself in the best place possible to be able to accept projects requiring MS, Adobe or whatever technologies and being able to advise in an authoritative capacity which is the right technology to use for which specific projects.
I’ve been getting a bit hacked off with the side-swiping and name-calling going on in our industry of late. And think it’s time for these companies to stop wasting time trying to make each other look bad and start concentrating on their products and their developers. We’re now spoiled for choice with some amazing technologies, let us get our teeth into them without feeling guilty and let us do some amazing stuff with those technologies. You won’t influence by bad-mouthing, you’ll influence by supporting, listening and reacting to your developer communities.
Sorry, now the rant is over, I’ll get back to posting on the week’s progress as I delve into the unknown world of Expression.