Archive for the ‘Mono/.Net’ Category

Lost in a Sea of Web Frameworks

Wednesday, February 7th, 2007
Advertisement

If you aren’t going to do your own web page design then going online to a place like Edezines.com to find a web site design firm can be a good idea. You’ll want to set yourself up as a web site with a design worth re-visiting, so web design can be rather important for keeping a site afloat.

So I’ve been trying to learn Python and have successfully written a couple small scripts. For the couple of small web sites/services I’ve written, I used CherryPy mostly because I know someone who is active in the CherryPy community.Coming from PHP and ASP.NET, Python’s offerings of web frameworks are a bit confusing. Here is my impression of the general landscape of the 3 platforms:

  • PHP – A language which survived without widely adopted frameworks for many years. While many frameworks are gaining popularity, most major PHP applications are their own framework.
    Examples: Drupal (a CMS) and Horde (a framework and suite of web applications)
  • ASP.NET – The web framework bundled with Microsoft’s monolithic .NET platform. Supports multiple languages and even implementations (go Mono!). A few alternative web frameworks exist for .NET (Castle Project), but it seems much more popular to just build components on top of ASP.NET.
  • Python – While I’m still learning a lot about Python, it seems Python has a wide variety of frameworks which range from a complete web application stack including database and kitchen sink (Zope) to just a widgets toolkit (ToscaWidgets) or just an HTTP/object-dispatching framework (CherryPy).

Then there are the various Javascript/DHTML/AJAX client side frameworks which can replace the interface portions of the above platforms and frameworks. It seems to me these UI frameworks have caused PHP-sans-a-framework to remain popular because the server-side code becomes a simple data broker for the complex UI widgets.

Python is obviously a bit different than PHP and ASP.NET. While using a framework seems the norm (unlike constantly rolling your own in PHP), there’s no 1-framework-to-rule-them-all like ASP.NET.

Luckily my web applications have been very simple, so CherryPy by itself has worked fine. I may even go the hackish route of just using a Javascript UI framework to keep my Python code simple. I’ve been trying to learn a little more about TurboGears and ToscaWidgets as well, but so far I haven’t needed a full framework.

cssh: C# Shell

Wednesday, December 20th, 2006

The other day I found myself writing a shell script in PHP because I refuse to learn bash’s archaic syntax.  I’m actually a lot happier with PHP as a shell scripting language than a web application language.  However, I’ve always wanted a scripting language with the power of Mono/.NET.

So yesterday I quickly threw together cssh: C# Shell.  You can’t use it as a real shell like bash, but it does allow you to write quick little C# programs that can be run like a script.

Basically the shebang (#!) tells your shell to run your script via cssh.  cssh then strips out the shebang line, prepends a Class and a Method declaration, appends a return 0; as well as a couple closing brackets (}), and executes it in memory using Microsoft.CSharp namespace and Reflection.

In all it took about 60 lines of code to write.  You can download a zip file with the source and a binary if you’re interested.  It should compile and execute just fine under both Mono and Windows/.NET, although Windows lacks shebang script support.

While this was an interesting exercise, I’m not sure its worth pursuing.  C# isn’t a scripting language, so to make it really useful you’d want to make some language modifications.  I think I’m going to take a look at boo or python instead of continuing to develop cssh.  Although I do love my semicolons…

Novell/Microsoft in Linux Lovefest

Thursday, November 2nd, 2006

In case you haven’t heard, Microsoft and Novell just entered into a partnership which is extremely beneficial to Linux. Instead of me trying to explain it, read Miguel de Icaza’s post, Joe Audette’s post, and/or the official Press Release.

Update: From what I can tell this is actually a bad thing.  Seems Microsoft just wants to start getting money out of Linux vendors for patent protection.  I don’t know… go read groklaw or something for a much better comentary. :)

ODBC Test Tool

Tuesday, September 12th, 2006

Today I find myself once again fighting Crystal Reports. It claims that it can’t connect to the ODBC datasource I created for it since it can’t use Npgsql. Just to prove it wrong I quick hacked together an ODBC Test Tool in SharpDevelop. Sure enough, the ODBC connection works just fine.

Here’s a zip of ODBCTestTool which contains the source code and compiled executables under the bin directory. It requires .NET 2.0, and I doubt it runs on Mono since it uses ODBC.

Oh and I didn’t include any license information, so I guess its public domain. Have fun.

SchoolWorks on Linux: Part 1 of Many

Wednesday, September 6th, 2006

Now that SchoolWorks has officially been released, I guess I can begin posting about my attempts to get it running on Linux.

First of all SchoolWorks is school administration software (or SIS) built using:

We also used the following support tools:

While Visual Studio and ASP.NET can be frustrating at times, the only part of SchoolWorks that I avoid like the plague is working with Crystal Reports.

Recently I’ve been trying to build SchoolWorks using Mono on Linux. I’ve successfully built Mono (libgdiplus + mono + mcs + xsp) on my personal Debian Etch, but I haven’t gotten much of SchoolWorks to compile yet.

The first missing feature was Decimal.TryParse which we use a lot in SchoolWorks. I submitted (my very first!) patch to the mono-devel mailing list in hopes of getting support for Decimal.TryParse added.

I’ll try to keep posting my progress as it should be interesting to SchoolWorks users as well as .NET/Mono developers.

Never Use Crystal Reports Again

Wednesday, August 23rd, 2006

I’m sick of being suckered into using Crystal Reports because it comes free with Microsoft Visual Studio. Crystal Reports and its API are easily the most buggy, most poorly designed, and worst documented I’ve ever worked with.

So I thought I’d dump a list of some alternatives I’ve stumbled across – both open source and proprietary reporting solutions:

  1. ComponentOne Reports – Proprietary, but I’ve used it and it works (for .Net)
  2. Microsoft Reporting Services – Builtin to Visual Studio 2005
  3. SharpReport (demo video) – Part of the excellent open source SharpDevelop IDE
  4. JasperReports – The famous open source reporting package (Java)
  5. fyiReporting – Open source (GPL) reporting for .Net
  6. OpenReport – Looks like a powerful XML > PDF/HTML engine (GPL)
  7. DataVision – Open source Java reporting
  8. Eclipse BIRT – Open source Java reporting from the excellent Eclipse project
  9. JFreeReport – Yet another open source reporting solution for Java
  10. Agate Report – Brazillian open source PHP reporting solution with a designer written in PHP-GTK+. You have to see it to believe it!

Please post other reporting solutions, or reviews of the ones I’ve listed, in the comments below.