Simple DB Profile Provider added to MultiCore
Posted on September 20th, 2009
The first take on a simple db profile provider has been added to the current release of multicore. That version is 1.0.2.0 and binaries/source are on github.
The profile provider works – has some limitations and will only work with string properties. When I get some more free time I’ll add support for other useful types :)
I also pushed source and released binaries to codeplex, for those more familiar with that you can find the code here.
As usual the wiki and source can be found on the main multicore site.
Tags: multicore, profile_provider
Filed under .NET, Software | No Comments »
Edge version of multicore released
Posted on September 9th, 2009
I’ve pushed up the first release of the “edge” branch of the multicore project.
This is basically an “un-released” version but is being tested in production so should have minimal bugs or issues …. (I said should!)
You can find the latest edge release notes here
http://wiki.github.com/typemismatch/multicore/edge-notes
Here is the direct link to the edge source
http://github.com/typemismatch/multicore/tree/edge
There is not a compiled release for edge … at this point.
Edge is trending to the 1.0.2.0 release.
Tags: multicore
Filed under .NET | No Comments »
DotNetMultiCore Goes Live
Posted on August 30th, 2009
I finally got this code to a point I think others might be able to find it useful.
So what is multicore? It is a wrapper library for cloud based technologies like Amazon’s Web Services and coming soon, (ish) – support for Microsoft’s Azure services.
The current library is written in c# and a compiled binary is also available. The current feature set includes:
- Amazon Simple DB Membership Provider for ASP.NET
- Amazon Simple DB Role Provider for ASP.NET
- A provider that wraps up Simple DB in a few easy to use commands.
- A stand alone wrapper for fetching/writing Simple DB data.
- Includes the Amazon SDB and SQS libraries.
This project is open source and is kept on github. See below for details and to follow the project.
Project home: http://www.dotnetmulticore.com/
The code is Mono 2.4 compatible if you need to use it on Ubuntu or some other Linux based server. There is an Edge branch available via github as well if you want to risk using the latest drop ;)
Filed under .NET | No Comments »
Don’t go Mono, go Ruby …
Posted on June 27th, 2009
I’ve always liked the Mono project and since its inception way back when I’ve dabbled with their technology. The thought of running .NET on linux was something I always wanted to do. Recently I had a real business need to have parts of an application run on UBuntu. Not only that but I hear plenty of clients make the wild claim that “hey, if we need to run on linux we’ll just use mono!”
Initially I looked at doing this in Ruby but the learning curve for my back end services was a little steep. No problem, I’ll keep development moving in C# but keep it simple 2.0 so that it can run on Mono. Over the last few days I setup some new UBuntu servers and tried to get some of these applications running. No luck. I even ran the analyser tool which tries to make sure everything is compatible… it was. All the calls I use are available in Mono but the results are different.
That alone is high risk. If I’m using the same basic calls then I really need the results to be the same on each platform. It then occurred to me that the entire principle of the Mono project is doomed to fail. It is and always will be a sub-par port of .NET.
The bottom line is, if you want or need your application to truly run cross platform then use a language with native support, from the beginning for those needs. There are many. You have choices like Java, Python or Ruby just to name some. C# for the time being is a Windows language.
I have chosen to slowly convert rather than port and will run back ground services as Ruby apps which once written in Ruby run anywhere Ruby is supported without problems. My websites however will remain asp.net mvc. I have had plenty of success with Rails but the new MVC for .NET is just too good :)
Just a side note: I’m sure plenty of applications can be built in Mono but they need to be built and tested in Mono from the beginning. The problem you’ll run into is many c# 3rd party components, if not most, are written and tested in .NET and you don’t really know if they’ll work on Mono. Again here I say – if you only use Mono fine but why not rather use a true cross platform technology rather than a continuous port.
Tags: mono
Filed under .NET, Software | No Comments »
First Azure Worker Role
Posted on June 1st, 2009
Here are some of my findings around Microsoft’s upcoming Azure platform. I initially thought Amazon had it in the bag with EC2 but to be honest, I’m tired of running my own servers. Google’s app hosting is ok, if you like Java or Python technologies – which I do but I thought I’d try the full Visual Studio approach :)
I’m using Visual Studio 2010 Beta 1. First gotcha, I wanted to run my work role and was told I had to be running VS as administrator … boo really? Wasn’t that a freaking Vista problem. This is Windows 7 RC1 people!
If you’re not running SQL Express you’ll need to reconfigure the local data storage services, which have those lovely hidden options buried in a .config file. Thanks to the link for the location. (Changing Development Storage)
Get it right and you’ll get this nice little local storage window the first time you run something:
When your role gets running, you can load up the fabric UI to actually get control of your own Azure cloud. All this without having to actually deploy to the cloud yet. Pretty neat. Remember that a role is basically like a console application in the cloud. Here is my little default application running, the output is just like a console window:
So what comes next? I’m going to try embed my Amazon Simple DB provider and S3 library into a real role and throw in some workflow for fun. Might as well push it right :) I’ll also be fetching some data from AQS. (Amazon Queue Service). I’ve read a fair bit about thread issues or at least limits on how many instances of a role can run.
Right now I believe you’re limited to 1 instance of a role which kinda sucks. You can have threads which is fine but still puts severe caps on application scale capacity.
Tags: Azure
Filed under .NET, Software | 2 Comments »
Rails, Grails and .NET MVC
Posted on May 3rd, 2009
We certainly do have a lot of choices when building applications these days! :) Here is a little insight into my latest project application choice. It might or might not work for you and it is not intended to be a guide per se since as good programmers know – pick what makes sense for your application.
I needed a new web application that was only going to be used for internal administration and so I could do something fun and not care about how it scales. Here are a couple key requirements so we can discuss over them. Firstly, I need page authentication and I have no need for a database since I’ll use SimpleDB so the DAL isn’t as important.
My initial thought was, lets just roll with Rails since in the last couple months I’ve been doing a lot of R&D using Ruby and Rails however I recently started some work on Grails and so the decisions begin.
Let me prefix first by saying I could have built this using .NET MVC and I believe that would have been the fastest way, sorry but it is – that isn’t bias for Microsoft just a fact especially since my skills lie heavily in that area … but I wanted something more fun :)
ASP.NET MVC
- Easy to use for sure, especially if you’re already a .NET developer.
- Tools are fantastic.
- Authentication is as simple as using the [Authorize] decoration on your controllers.
- Data is via an existing SimpleDB Provider I wrote.
- Doesn’t run well on anything but IIS
- No exposure to other technologies <- the fun part :)
Ruby on Rails
- I think Ruby is pretty easy to learn.
- The tools are getting better – don’t be a hero, use and IDE like NetBeans/Eclipse.
- If you have complex database requirements activerecord is going to be painful for you.
- I’ve found the community a bit broken with Rails, you can generally get help but not always the easiest to understand.
- Far too many depreciated gems floating around and even the Rails wiki is out of date.
- As for authentication, well nothing easy to find – does require more code than I’d like. Not sure what is best.
- SimpleDB access was OK but not great, relative name spaces break when importing classes while using Amazon libraries so that wasn’t cool. Had to hard code some paths.
Grails
- Just started R&D on this and I didn’t feel like jumping into Groovy although it is close to Ruby I’d rather learn one new thing at a time.
- Does have the huge benefit of running on the JVM and also being able to use existing java classes.
- Can be deployed on well established application servers, so that is great.
- Tools are ok, new at this stage but Netbeans seems to do the job.
- Authentication is ok, there is a good plugin but still requires far too much code for my liking compared to .NET
- I can’t find a Grails/Groovy SimpleDB library but there is one for Java so I guess I can just use that.
and then I found ….
JRuby
- Will allow me to keep on the learning curve with Ruby but
- Lets me deploy in single packages and do java application containers.
- Exposes me to more java technology.
- Tools are pretty good and I’m using NetBeans right now.
So that kinda sealed the deal. I wanted something fun and like Ruby so JRuby lets me keep that knowledge but also I get better exposure to Java technologies. You might wonder, “If you want Java exposure why not use JSP or similiar” … right, no thanks :) Keep it simple!.
I’ll post when I’ve deployed my first working JRuby application and I plan to run it on Tomcat/Ubuntu 9x.
Tags: grails, MVC, rails
Filed under .NET, Software | 2 Comments »
What kind of error handling is this?
Posted on October 17th, 2008
You’d be surprised the things that can be found during basic code reviews :) Once I found a pen I thought I’d lost … :) in all seriousness though, nothing drives me more crazy than seeing the following.
try { // some code } catch (Exception e) { throw e; }
I could scream! and actually it wouldn’t be the first time either. I don’t have a lot of patience for things like this.
If you aren’t sure what is wrong, let us take a closer look. For one, I came across this while actually hunting for a memory leak but I could never see an exception on any line except “throw e;” – because no matter what went wrong, the exception was caught and just thrown again and since the last line responsible is always the throw, I had to attach a debugger to find the real error.
The second problem is you haven’t actually accomplished anything, nada, zip, less than $2c of quality code here people – it doesn’t do anything. If you’re going to catch an error then DEAL with it.
I have seen some developers catch an error, log various details and then throw some kind of error again. Maybe there is a need for that but I doubt it can be justified very often. If something goes wrong you need to try fix the problem and continue normal operations so you users are unaware and if you can’t then fail gracefully.
Make sure too that you LOG errors – use any means necessary but just make sure the stack trace and some information about system state is recorded so you can fix fix fix :) – since its probably your fault it broke to start with.
And if you don’t have any error handling, get too it! Nothing could be worse than your users getting the yellow? screen of death :)
Here is something if you’re just beginning – I’ve always found these books pretty good for getting started, including some basics like the above.
![]()
Beginning Microsoft Visual C# 2008 (Wrox Beginning Guides)
Tags: .NET, Bad Code
Filed under .NET | No Comments »
I present, “Linq Alias Generator”
Posted on January 22nd, 2008
Here is a small project I thought others might find as useful as I have. We all know how hard it is to find a decently written schema these days especially when you inherit a project. Well why carry those ugly column names into code? This generator will create nice names for your columns while preserving the actual column name in the Linq To SQL dbml files.
This is an initial release so better things to come but it works for now. If you’d like to get involved there is a dedicated page here and a codeplex project as well.
Download from http://www.codeplex.com/linqalias/
Keep track of changes on my blog page here http://www.typemismatch.com/linq-alias/
Enjoy, -c
Tags: .NET, Tools, VS 2008
Filed under .NET, Software | 1 Comment »
MVC and Test Driven Development
Posted on December 13th, 2007
Well shortly after the release of VS 2008 Microsoft have released an MVC extension for Visual Studio. It is long overdue but never the less great to get! One funny point to note and maybe it’s just because the release is only CTP but the test framework of VS 2008 cannot test a controller out-the-box …. which is half the reason to use this pattern to start with :) … anyway, maybe it will be addressed in later releases.
Get it while its hot : http://asp.net/downloads/3.5-extensions/
Tags: .NET, MVC, VS 2008
Filed under .NET | No Comments »
Mafooku now integrates with Twitter!
Posted on December 5th, 2007
Yup we sure do. For those who use Mafooku to sell their products online, every product that hits the top 10 gets automatically sent to Twitter so those who follow Mafooku there can see your stuff. Of course since each product posted gets a turn on the home page everybody is getting some good coverage.
Twitter uses a REST based interface so connecting from .NET was pretty straight forward. Take a look:
Tags: .NET, ECommerce
Filed under .NET | No Comments »