Aesthetics Mar 18 2006
Few minor updates to the blog software yesterday evening, resulting in only a few visual changes, but giving me even more power over the design. After the last round of changes I made I still wasn’t satisfied with the level of customization that could be achieved, but now I think that pretty much anything should be possible with it! For the time being I’ve kept the changes modest, over the next few days and weeks I’ll be making some design changes to the blog, and also hopefully launching a few sites using the software, all with differing designs ;-)
Technorati Tags: el, eldiablo, scrawl, blogging
TV Akimbo Mar 17 2006
Sweet, check this out. Now if only they’d bring it to the UK, and perhaps add a few more big name shows - the idea is rock solid though, especially with their own hardware.
More on this, and a few other interesting things I’ve come across but not had time to blog about, later (when I’ve got time to blog about them).
GWritely Mar 9 2006
Ooh, a favourite of mine, Writely, acquired by Google. Can’t say I’m surprised, it was such a quality service that it was only a matter of time before one of the big boys decided “hey, that’d be a nice feather in our cap”. Add to that Google’s apparent desire to crush Microsoft, and you’ve got the recipe for one nice acquisition. No figures banded about from what I can see yet though, it’d be interesting to see how it stacks up to a few other interesting sales over the last few months. Glad to see current service is unaffected, as it’s something I use regularly (dare I say, almost rely on?). Also, smart move locking down registrations for the time being, should ensure that there’s no degradation in the service due to the obvious interest spike this will create. Exciting times, and congratulations to the guys and gals over at Writely.
Technorati Tags: el, eldiablo, writely, google, microsoft, “web 2.0”
Buffy up for grabs Mar 4 2006
Just over a day left until this Buffy boxset goes to the highest bidder on eBay. Worth well over £200, but at the minute it’s at just a meagre £102 - this could be a bit of a bargain for the die-hard Buffy fan! There’s still time to put your money where you mouth is and grab a limited edition slice of Buffy ;-)
Technorati Tags: el, eldiablo, buffy, ebay
Scrawl updates Mar 4 2006
Big updates last few days to the software I use for this very blog. Firstly, an almost complete rewrite of the software itself (Scrawl), turning it into a fully blown content management system, allowing far greater customization. I can now use Scrawl to host multiple sites, mapped to different domains, and each site allows static content to be added, new blogs to be created, posts to be added, aswell as comments and blog categories too. I still have feeds available for each blog, and an XML-RPC interface so that I can write this very post, and all my others, from within Performancing. On top of that, the way Scrawl has been restructured makes it nice and easy for me to write new plugins, to host other types of content, such as reviews, polls, charts, stats, anything I can think of!
The style can be fully customized - expect the style of this blog to change over the coming days as I play with it, and each site hosted on the Scrawl software can have its own design. I plan to host more sites, for different projects and ventures, using the software.
It uses a nice model view controller architecture now, using my recent additions to xFramework to great advantage, and then it uses Xml and Xsl transforms to display the data. All in all, much better, faster, and more reliable!
So that’s it really, the only downside was the url change required, however the old url now redirects to this page (the RSS feed url redirects to the blog HTML page too however). But with the new system, I can change my blogs design as many times as I want, aswell as add features and updates, without affecting any of the core stuff, like the post data, or the url structure. Scrawl is here to stay, and soon I want to allow people to use it for their blogs, sites, project pages, anything. If you have an idea of what you might want to use Scrawl for, do get in touch.
Technorati Tags: el, eldiablo, scrawl, blogging, coding, dotnet, mono, performancing
Ride the 'Vine Mar 4 2006
So I see that Newsvine has launched. Sweet. I’ve been involved in the beta test going on for the last eight weeks or so, and now the site, its features, and its content, is available to all. Such a great idea, and with a really nice implementation, it’s feature set has already grown since when I first started using it, and with more improvements planned, it’s got a bright future. Come on in and ride the ‘vine!
Technorati Tags: el, eldiablo, newsvine, blogging, web-2.0
Formatting issues Mar 4 2006
Just updated Scrawl to fix some formatting issues I was having earlier with new posts and line breaks. Hopefully the posts will now appear a little better formatted. Also, the Technorati post I made earlier should now include my Technorati scriptlet (my picture, and a link to my profile), as I have claimed my blog!
Technorati Tags: el, eldiablo, scrawl, technorati, blogging
Technorati madness Mar 4 2006
Just need to claim my blog again because the url has changed, easiest way to do this is to wang this script in a post, so here it is!
You may now go about your business again.
Technorati Tags: el, eldiablo, technorati, blogging
PimpBox launches! (kindof) Mar 2 2006
PimpBox is up and running! It’ll take a little while for us to define a style, and add features - but in the meantime, keep it here to see the latest updates as they happen!
CommentsModel-view-controller Feb 21 2006
As I’ve been playing with Ruby, and Ruby on Rails recently, I’ve started to realise that the MVC pattern is the easiest way to work when writing web apps. The level of abstraction that it brings is brilliant, and simplifies things ten-fold. So I decided to write a nice little controller mechanism for .Net/Mono. It’s available in the xFramework repo, under the xFramework.Common.Web library. I plan to add other stuff in here in time (useful base classes for modules/pages, controls perhaps), but for now, this just deals with controllers.
The idea is simple, you simply pass all control of an app to the xFramework ControllerHandler - you can do this in your web.config. Inside the “system.web” node, under the “httpHandlers” section, add a new entry pointing to the xFramework ControllerHandler. It’s full type is “xFramework.Common.Web.Structure.Controllers.ControllerHandler,xFramework.Common.Web”. You can limit the controllers to being accessed at certain locations, or certain tiers of your web app, with the path attribute, or you can use “*” to redirect all requests to the controller handler. Likewise, you can limit the controller handler to only accepting GET or POST methods, or again, use “*” to handle all requests. For this example, we’ll stick with the catch-all.
You can then simply write an IController implementation, and so long as it resides in a library within the bin path of the web app, it’ll be available for calling. There is currently a problem with writing controllers in the App_Code area of .Net 2.0 web projects - they are compiled on the fly, which makes it harder for the reflection loader to pick up the controller types. Easiest solution is to define them all in a separate class library, and then reference that library from within the web site.
Back to our example - there are a few things that an IController must implement. Get/set properties are required for the string Action property (which contains the string name of the action called when a request is made), also, a get/set property for an HttpContext is needed - this allows direct access to the context that the HttpHandler had when it raised a request to a controller. A get accessor on a property called “Name” must be present, and this is a pretty more important one - the name here defines that the controller will “answer on”. More in a second. A get/set string[] property for holding the parameters passed to an action should also be present, and finally, a get property named “UnhandledAction” should be defined. This is a delegate, and should either return an “UnhandledActionHandler” pointing to a method that will be called when no matching action can be found for a request (useful for catch-all’s on a controller etc), or simply define this property as returning null to have the application exception when no matching action is found instead.
In terms of defining the actions on a controller that can be called and requested - simply define a public method, and your away! Any public method on the controller will be accessible - so long as the parameters passed in match those of the method, then it’ll be called. Simple type conversion (as all parameters on an http request start life as a string) will take place, and so it is incredibly easy to create simple controllers.
Ok enough waffle - let’s define a simple controller:using System;
using System.Web;
using xFramework.Common.Web.Structure.Controllers;
namespace Controllers
{
public class MyController : IController
{
#region Private Variables
private string _action;
private HttpContext _context;
private string[] _parameters;
#endregion
#region IController Members
public string Action
{
get { return _action; }
set { _action = value; }
}
public HttpContext Context
{
get { return _context; }
set { _context = value; }
}
public string[] Parameters
{
get { return _parameters; }
set { _parameters = value; }
}
public string Name
{
get { return "mycontroller"; }
}
#endregion
#region Actions
public void Add(int i1, int i2)
{
int result = i1 + i2;
Context.Response.Write(result.ToString());
}
#endregion
}
}
So this is fairly simple, and in most web applications it’ll be easy enough to just define a BaseController (taking care of those boring action/parameters properties), and then have each individual controller simply defining their own action methods. But in this case, running this on a web app, and browsing to http://localhost/mywebapp/mycontroller/Add/½ will result in “3” being output. Maybe I should mention the url format - like I mentioned earlier, the name is used to define what the controller will “answer on”, and how we can call it. Next up the action name, and after that, parameters (if any). So it breaks down like this:
http://[host]/[web app]/[controller name]/[action name]/[parameters]
If we were to add a new method to the above controller example:public void Version()
{
Context.Response.Write("1.0.0.0");
}
then we could access this by browsing to http://localhost/mywebapp/mycontroller/Version. This would output “1.0.0.0”.
As you can see, this is really easy to use, and works fairly well. The API is still a moving target (the UnhandledAction business still isn’t in svn, should be next few days) however it’s a nice way to define endpoints for web app data - for example, all these controllers could return Xml - tie this up with some nice Xsl transforms, and you’ve got a web site using the MVC pattern, that’s well defined, and easy to understand.
I’m currently playing around with an app using all this, so expect bug fixes etc to follow - but if anyone has comments, or indeed patches/improvements, or as always, anything they want to contribute to xFramework, do let me know.
Technorati Tags: el, eldiablo, code, c#, dotnet, mono, mvc, controllers, model-view-controller, xframework
Page 21 of 31 | Next page | Previous page