Archive for the ‘Development Tools’ Category

Creating Roles in Windows XP

Monday, June 16th, 2008

I’m trying to setup a dev environment for an Intranet application we’re working on and needed to test users for displaying role-based content (namely admin edit buttons etc). So I needed to create some test users and roles. The site will ultimately be hosted on a Windows server and the users will use their domain logins from Active Directory so I needed to replicate this.

Anyway my dev environment is Windows XP and there is no obvious way to create roles (or Groups), to access this simply click Start, Run and enter compmgmt.msc and click go to launch the Computer Management Console.

From here you can administrate users and groups under the “Local Users and Groups” folder.

Mac bandwagon

Tuesday, December 11th, 2007

So, I’ve been sucked in and caved. I now own a brand new 17″ 2.4ghz MacBook Pro.

I’ve been getting familiar with it for a few days now, keeping my HP laptop for work whilst familiarising myself with the mac way of doing things out of hours. It’s been an odd experience, I finally understand how it feels to be clueless using a computer as I’ve had very little previous exposure to the Mac way of doing things.

First impressions though are very good, I picked the machine up with Tiger installed and after reading a load of people’s issues with the Leopard upgrade I opted for a clean install and wiped Tiger completely. Seems to be working well so far except for the trackpad seems to stick for a second or so randomly after typing.

I’ve just about managed to setup the bare-bones I need to use this as my daily machine, although I’m sure I’m missing a few essentials which I’ll find out in the coming weeks.

So far I have:
Eventually managed to get on my wifi, I had to change the security settings as I couldn’t get onto 64bit WEP which was a pain, now using 128bit WEP at home and WPA at work (WPA seems to be better for stability and security).
Setup Mail.app to run with my MS Exchange account (which I didn’t realise I could do).
Installed Flex Builder 3 beta 2 which appears to run quite nicely.
Installed Firefox as I don’t really like safari too much.
Installed CoRD which is a very cool remote desktop tool, far better than the MS remote desktop client i was used to.
Installed adium IM client and imported my MSN and GTalk accounts (very nice free IM software).
Installed Parallels and installed XP which is now running Visual Studio 2008 beta 2.

Everything seems to be running nice and fast with no issues to report as yet, so I’m pretty happy with the switch :).

Why the switch?

In the new year we will be doing alot more RIA work at Moov2 (in fact we’re going full-blown RIA development agency but more on that later), as a result I needed a better spec machine as the trusty old HP choked a bit when running visual studio, flash and flex builder. I was very tempted to go for a Rock laptop as they look great and are very powerful machines. But I was also tempted by the draw of a Mac as all the cool kids seem to be switching these days and I’m very easily tempted by something new and unknown to me. After all I’ve been using windows machines for some 17 years since windows 3.0 and I really wanted to try something new. I’ve got a Linux box running Suse but I personally don’t think Linux is quite ready for day-to-day use as a development machine due to the lack of polish and wide-support. However my Linux box, which hosts this site, is by far the most reliable machine in the office. This is possibly to it’s detriment as whenever I do need to use it I’ve completely forgotten all of the commands as it’s such a long time between uses!

Anyway back to why the MBP, I have no real issue with Microsoft. I’m not ashamed to admit I love .Net (particualrly now there’s the whole alt.net movement), am impressed with the Silverlight/WPF workflow (and the potential future opportunities MS will bring to the game). I’m comfortable in a lot of the MS server environments, somewhat prefer SQL Server to MySQL and nowadays find XP rock solid (I’ve never been too fussed with Vista though).

But, after a bit of research as to the performance of my windows-only tools of choice in Parallels, I opted for the Mac as with Parallels there’s really no reason not to get the best of both worlds.

I’ve setup Parallels to run XP in full-screen mode in one of my Leopard ’spaces’ so I can switch between full-screen windows and OSX with the press of a button, however I’m surprised at how little time I spend in windows other than to use visual studio. Being able to tab between Flex Builder in OSX and VS in windows is great and I can even test my flex/.net projects in OSX whilst debugging the .net in windows.

All in all i’m very happy with the purchase and only hope Apple sort out some of the Leopard issues some others are having asap, because I don’t want to have made the switch just as everyone else starts bailing!

New .Net Tutorial “Introduction to NHibernate”

Sunday, November 11th, 2007

I’ve just written a new tutorial on NHibernate (an Open Source OR Mapper for .Net).

As ususal any feedback much appreciated. :)

New Flex Builder 2 Pricing - UK too!

Friday, November 9th, 2007

Ted Patrick just announced new Flex Builder 2 pricing, great news. But the skeptic in me had to check the UK pricing as we all know what happens. Well I’m happy to say the UK version appears to be in alignment with the US version!

Flex Builder 2 for less than £150!

I haven’t checked any other products are aligned in price, nor do I remember if Flex was equally priced before but it’s still good news.

Silverlight Adventures - part 2

Sunday, August 19th, 2007

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:

  • Silverlight Runtime
  • .NET Framework 3.0
  • Visual Studio Orcas
  • Visual Web Developer 2008 - due to the massive download required i opted for the Express edition of visual studio for now - by all accounts the express edition doesnt allow the Silverlight extensions to be installed… back to downloading vs2008 standard again! NOTE TO MS - make this clearer please
  • Visual Studio 2008 (in the time its taken me to finish this post the beta2 has been released)
  • Silverlight Tools for Orcas
  • Microsoft Silverlight Tools Alpha Refresh for Visual Studio (July 2007)
  • Expression Blend

.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.


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.
- removed due to no support for the Silverlight extensions!

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.
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.
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.

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 :P (hopefully not though).

VS 2008 and .net3.5 beta 2 released

Friday, July 27th, 2007

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.

Silverlight adventures

Thursday, July 12th, 2007

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:

  • “cross-browser” - which browsers? Guess: IE (duh), Firefox, Safari(?)
  • “cross-platform” - which platforms? [educated]Guess: not linux. Does this include devices?
  • “.Net based” - I’m aware the Silverlight plugin doesnt support full on .net, how much does it support? Which version?
  • “AJAX, VB, C#, Python, and Ruby” - sounds good
  • “and integrates with existing Web applications” - hmm I’d be interested in seeing an example of this that makes it mean more than just marketing talk
  • “fast, cost-effective delivery of high-quality video” - I think this is where they will get one up on FMS due to licensing costs (more research needed) and video quality (although I’ve read recently about the latest Flash update including an improved video codec (comparisons needed)
  • “all major browsers running on the Mac OS or Windows.” - ha Mac first, is that to make a point or was it in alphabetical order? :P

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…

What is an AIR database?

Saturday, June 23rd, 2007

As mentioned in my last post I want to explain to the un-database-initiated what a database in AIR is and how it differs to other databases you might have heard of or experienced.

Database Support In AIR
Adobe have recently added support for databases in AIR through support of SQLite. From the SQLite website:

SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.

What this means is that SQLite enables database functionality within a single system file without the need for a running database server or complex database applications. The real merit to this is that it is highly deployable and as such is a great addition to AIR. To better understand this it might pay dividend to see how this is different to traditional databases.

Other Common Databases
If you work in web development the liklihood is you will have worked with or at least heard of SQL Server and/or MySQL. These are the most commonly used databases in web development so we’ll start here to help understand SQLite.

SQL Server and MySQL are Database Management Systems (DBMS), in that they work on a schema of tables of data and identifying relationships between those tables. This is very much the same in SQLite, you store your data in tables (think spreadsheets) and you can link (”relate”) those tables to each other through the use of “keys” (more on this in a later article).
However, SQL Server and MySQL are Database Servers - they are hosted on a network accessible resource (I.e a server), requests are sent to the database server and information is returned. SQLite differs here because an SQLite database resides on the client machine in a single file and all database operations are carried out on that specific file.

Interactions between a MS SQL Server/MySQL database and an SQLite database are much the same in format (the surprisingly titled ‘Structured Query Language’) but SQLite interactions are carried out on a file whereas SQL Server/MySQL are carried out on the server. Understanding this difference will be key in assessing when to make use of the built in support for SQLite and when to use traditional DBMSs which will still require the use of a server-side language (e.g. php, .net or java).

When to use SQLite
So database server databases reside on servers (woah :P) and SQLite databases are files on the local filesystem. So are they viable alternatives or are there use-cases for one and use-cases for the other? There absolutely are different use cases for each approach:

Database Servers
Where all users need to share the same information - E.g. Forums and community sites
Users aren’t necessarily going to be accessing from the same machine - E.g. Remote vs office working
High volume of data transactions - single file local databases aren’t going to cut it with millions of data transactions. Modern database servers can handle much higher loads.
Concurrency Requirements- On a local database file with SQLite your database is either being accessed and therefore locked (I.e. one transaction at a time). database servers have much more advanced complex record locking and update mechanisms which are useful again for high volumes of data requests and updates.

SQLite
Disconnected Working - E.g. For applications when offline working is required
User preferences - Where the user audience need not know each others details E.g. layout settings
Local Processing - If alot of work is being done at the database that doesn’t need to be publicly shared E.g. summary reporting, calulations etc.

Best of both worlds
SQLite in AIR allows you to take your data driven applications and make use of local resources and avoid unecessary remote server calls. SQLite will not completely eliminate the need for remote code and databases but it will certainly help to enhance the desktop application experience. Database servers allow for shared access to data and distribution of data, combine this with SQLite for local, disconnected data access and you can really add value to your rich internet desktop applications.

AIR Databases 101 - Flash/Flex developers haven’t had this database stuff before!

Sunday, June 17th, 2007

In a recent conversation with Neil the significance of database access in ActionScript dawned on me. Whilst this feature has undoubtedly been driven by requests from those with previous experience of databases, there must be a huge amount of Flash/Flex devs who’ve never had to worry themselves with the wonderful world of DBMS’s (”Database Management Systems” or “databases” for the non anal). So I thought I’d put together a number of introductory posts on the essentials of databases.

Adobe AIR

A couple of things to note first: I have not touched databases in AIR before now, in fact despite the number of posts on Apollo, i’ve not touched Apollo/AIR in any decent capacity before now (purely due to the rare commodity of time). However, I am pretty well versed in other common databases namely MS SQL Server, MySQL, Oracle and of course, Access (barf).

Another thing to note is: to all you guys who spend all day every day creating amazing, interactive, fun and flashy things in Flash and Flex… databases might seem a bit dry. In fact sod that, they are dull as dishwater, paint drying and grass growth in comparison. However, if you’re planning on making some kick-ass AIR applications and don’t want to rely on webservers, server-side scripting and hard to setup and manage database servers and/or want to make use of the nice offlineyness in AIR, bear with it because it will be a very useful string to your AIR RIA (gotta love these acronyms) bow.

So what are these essentials of which I speak?
The below is a rough list of topics I’m going to cover. I’m starting from a real “assume no knowledge” level so please feel free to wait for the later articles if you’ve already some exposure to databases. I’m hoping to get these out over the next few days but if you have any comments, questions or suggestions please fire away and i’ll try to include as much as i can. I’m going to be creating plenty of simple examples using Flex3 (although this is already proving troublesome as my poor old laptop can’t hack it - but i’ll sort something out). Anyway, on with the planned topic list.

  • What is a database? - duh! Okay to put it a better way, how do databases in AIR compare to other databases that I’ve heard of?
  • What’s in a database (an AIR database) - Tables, Views, Triggers, Indexes
  • SQL - The mother tongue of nearly any database you’re likely to use.
  • Normalisation - ugh! initially this wont seem important and certainly not interesting. As soon as you want to start doing more advanced databasey stuff - you have to get this.
  • Database best practice - this is yet to be defined in the AIR world, however there are many databases in application best practices we can draw from other languages and databases to get us started.

As mentioned, if you think there’s anything unclear or you think I’ve missed let me know and I’ll try to cover it. First topic coming up shortly…

Expression Training Day 1 - Afternoon

Tuesday, April 17th, 2007

Okay so it’s time to get our hands dirty and actually play with one of the tools: Expression Web!

To be honest this was kind of an anti-climax for me. Expression Web is a good HTML editor. That’s about it. I’d go so far as to say a very good HTML editor if you do design web pages for ASP.Net development… but don’t DO the actual ASP.Net development (i.e pass it on to a developer). It has some nice features and I might start using it over Dreamweaver as a general HTML editor depending on how the next Dreamweaver release pans out. Expression Web seems to generate clean, compliant code (note: I didn’t thoroughly check the compliance yet but all seemed good). It has a nice easy integration with ASP.Net controls for layout and it also has nice CSS integration. Other than that I wasn’t particularly bowled over, maybe it’ll shine more as we move into some of the other technologies over the coming week. Another point that may be of interest to some is that Expression Web supports dwt (dynamic web templates or Dreamweaver templates) and master pages, both of which allow the creation of consistent layouts without having to rewrite the page’s framework. I think Expression Web will be a great tool for the designer who sees their design through to a CSS’d HTML layout and primes said layout to be passed onto a .Net developer with the proper controls intact and ready to roll.

Things I’d like to see in Expression Web (may already be there but I couldn’t find it) is more support for languages other than HTML and .Net. This hums of old Microsoft without it. Expression Web is a very good HTML editor, it really wouldn’t be bad for MS to include syntax highlighting etc for other technologies such as PHP or even Classic ASP (you can Save As but that’s about it). Also integration with Source Control is an absolute must, I’m not sure if it would integrate with a shell client such as TortoiseSVN (the folder view seems to be a standard Vista folder display so maybe it does - I don’t use Vista yet) but to not offer support for Visual Source Safe on a released product that supports .net controls doesn’t make sense to me. Another annoyance for the feedback team is that when using the “Add new style” panel, you might spend several minutes putting together the right style by selecting the available options (ideal for those learning CSS) but if you haven’t got a valid HTML header available in the currently open document you have to close the style panel with no option for saving or recalling it.

We also looked at building Vista Gadgets. These are quite cool because of their simplicity, you basically design a small interface in html, add some code with JavaScript which has access to some desktop api’s and you then package it into a zip (or .gadget) file with an xml file detailing the structure of your gadget and a settings file if required. It reminded me a little of how you package an Apollo app but with zipping instead of compiling. If you get a chance to play on a Vista machine, find a Gadget and dig around the folder’s source files, it’s very simple and I can see a lot of benefits of such a simple system… A quick search also found a HUGE amount of useless gadgets which I feel may be hiding some of the better ones.

Expression Training Day 1 - Summary
Overall: Not Bad
The morning sessions got me excited and very much buying into Expression and Silverlight, unfortunately the afternoon was a little slow and judging by the high skill-level that was in the room the pace was way off. Even though this stage of the course has already been radically reduced based on the feedback from the first time the course was ran, it was still very uninspiring. We were shown some amazing WPF and Silverlight demos and then crawled through some basic HTML editing for the rest of the day. I think it would be ideal for people new to web design but in a room full of experienced developers from some of the capital’s top agencies (and me :P) it wasn’t the right content, particularly based on the pre-reqs that were on the course notes.

BUT THAT IS OKAY - I feel I must point out that whilst I may have grumbled a little in this post, this is only the first day of the course and only second time that this course has ever been ran. Microsoft (by way of Jon and Andrew) are massively keen on ‘getting it right’. This is why I’m still enthused by the MS offering as they seem to be focusing their efforts towards the developers and are hungry for feedback in striving to perfect developer support and improve their products and uptake of said products. Reading back it sounds almost like I’m just airing my dirty laundry with the course, apologies if that is how it reads because the intention is to provide feedback and also share the Expression learning experience. I’m still very much looking forward to tomorrow and the rest of the week.