Zac Bowling’s Blog

Human Code Generator

Archive for the ‘Mono & .NET’ tag

Mono Licences and Microsoft

with one comment

This is fairly funny.
http://lab.msdn.microsoft.com/productfeedback/…

Resolved as Not Reproduced by Microsoft on 2004-07-30 at 16:11:56

Unfortunately, because of legal restrictions, we are unable to download and compiler mono source.

If you can give a more reduced test case, we may be able to look at it.

From a few people I know on the inside (who shall remain nameless) tell me that Microsoft won’t allow anyone to even look over any code from most open source projects out there because they are afraid of the trouble they might get in (SCO anyone?). I understand that in a broader perspective.

Mono too has a policy that if you seen the Microsoft Shared Source released code (like shared source version of the .NET runtime, codename Rotor) that we might not be able to accept any contribution that you submit. With the several scary clauses in the shared source license that prevent commercial use and redistribution, who wouldn’t be scared about getting caught with that clause?

However, I really don’t get why Microsoft has a problem with the reverse, by taking a look at Mono’s source code I mean. More specifically, our framework class libraries. All of them are released under MIT X11 based license. I don’t think there exists a more liberal license in wide scale use (Its just like public domain, minus the act of really releasing as public domain). Its even less restrictive then the original BSD license and Microsoft has openly looked at BSD released code in the past without issue.

The source code to the class libraries is literally sitting there, open for the picking. Of course you need a runtime to make use of the libraries and if you don’t care for ours (maybe because you or your company is unnecessarily scared of the LGPL), you can use Microsoft’s or DotGNU’s perfectly good runtime for that part. You could even break out Mainsoft’s C# compiler (check out their grasshoper project), and compile all our C# based libraries to Java byte code instead.

It would be awesome if they could use our class libraries to compare to their own code when bug tracking, or when considering new features for .NET and to use as a base line when they are afraid of making breaking changes. Maybe if all else fails on that front, instead of looking at the source, just test against our binary releases.

Shoot, maybe even someday, I would love to see some microsoft.com email addresses submitting bugs reports in our bugzilla. It would sure would be nice to see someday, since I see our contributors posting bugs to Microsoft’s product feedback all the time.

I don’t know. Just a thought.

(Might be good to point out too that any opinions expressed above are purely mine. The above might not reflect the opinions of Novell, the Mono Project, or any of the other contributing developers, even though I know a few people who feel nearly the same way.)

Written by zbowling

January 23rd, 2006 at 3:40 am

Posted in Personal

Tagged with , , ,

I’m A Programmer, Not A Computer Guy

without comments

This blog post is amazingly funny .

Everything in this blog post, at one point or another, I could so relate to. Everything up to the second to the last paragraph is right on for me. Its a must read.

Favorite quote: “That’s programming in a nutshell: long arms, good coffee, and a natural aversion to rat fur. ”

Written by zbowling

January 16th, 2006 at 3:45 am

Posted in Personal

Tagged with , , ,

imeem

with 2 comments

I love this app on my windows box. imeem. If you are into social networking software, this is one of the best. They do some absolutly amazing things with GDI+ with SWF on Win32.

IMEEM LOGO

They just released their new mac client. It runs on top of Mono and binds to cocoa using a new interface they designed called Dumbarton (released under LGPL). Good work guys!

Now, since you got Todd Berman from (but not limited to) MonoDevelop over there now, I expect a native GTK# interface soon too… :-)

Written by zbowling

January 10th, 2006 at 4:36 pm

Posted in Personal

Tagged with , , ,

Just one thought…

without comments

Don’t drink near with an open iTunes account. You may find you purchased lots of really crappy music and the entire 2 seasons of battlestar glatica that you can’t return.

Anyways, I’ll post something cool soon like maybe Tomboy on WIN32 soon or something. Work has me working all the time… you know how it goes… Hope the break gives me some time to get cracking and focused on getting stuff out the door soon…

Written by zbowling

December 20th, 2005 at 7:06 pm

Posted in Personal

Tagged with , ,

The XPCOM Plan

with 9 comments

I can’t stop thinking and working on this XPCOM stuff. It’s getting pretty amazing. I’m learning some very core things to COM and various C++ compilers as well so I’m moving all the work I’ve been doing into a new library now called Mono.Interop to handle C++, COM, and XPCOM. I’m trying to make it possible to both early bind and late bind to XPCOM and soon COM. Late binding is very easy, but early binding is going take some time and its much more complicated in terms of trying to maintain some cross platform ability (and sometimes cross C++ compiler safety). Nothing looks impossible or unobtainable and in some cases, it looks like we can do some stuff that no body else can do in other langauges do (like Java and C++), when interoping with XPCOM and right into C++ for that matter.

I’ve got a 11 page document so far of how it works and the design architecture I’m plaining and using for accessing, invoking, reflecting, and exposing to XPCOM. I’m leaving room for COM at the same time so everything can dual purpose someday (even though for the moment, I personally have no interest into accessing COM since .NET does it right now and COM isn’t cross platform). There is a lot of work to be done to make it work for some aspects. Some parts are easier then others like early binding versus late binding and invoking into C++ (since all of XPCOM and most of Mozilla’s use of it is written in C++).

Its a massive undertaking. Not really in the total ammount of code but in the complicated nature of the code and the maintiance of it. From hosting Mono in a wrapper to expose objects back into XPCOM (which XPCOM has some emerging ideas for a new technique of mixing GC systems that I need to look at soon), to a semi-dynamic pinvoking library generated with Reflection.Emit to access xpcom components directly for early binding (which has to be done this way to handle the different name managlings of the various C++ compilers to keep it from being compiler specific). Some other issues that have to be worked on are handling versioning issues of XPCOM components, reflection into XPCOM to build wrapper assemblies (like tlbexp.exe in MS.NET), and a few other massive issues that I can even explain here without writting a full page document on the topic.

Anyways, after I get done researching and get my total vision down on paper of what I want it to do in the end someday, I’m going to get together a basic set of goals that need to be meet and at least some short term goals. I’ll commit my prototypes and post the design/architecture documents when I’m done. After that, I’ll get some feedback and get to work on making it real!!  :-)

Written by zbowling

November 19th, 2005 at 3:31 pm

Posted in Uncategorized

Tagged with

XPCOM and Mono/.NET

with 2 comments

I wasn’t the first. Shaver (from Mozilla) had this idea as well and started a bit on it. I’m talking about XPCOM. I’ve done enough work to say that I’m working on it. I’ve taken Shaver’s orginial code, got it to work in Windows as well, extented it, re-did the makefiles, changed the coding conventions (sorry Shaver) and documented some of the code.

Anyone that doesn’t know, XPCOM is a product of the Mozilla project. All of Mozilla/Firefox is based on it so its crossplatform. Its very similar to COM in Windows. Making XPCOM work with Mono/.NET gives us access to many of the features in Mozilla natively and eventually to even write components that are expossable back into XPCOM. Not only does it give us access to Mozilla but XPCOM is capable of being self hosted so its possible to use it for its other benifits, such writting componets in Perl, Python, Javascript, Java, C and C++ and interop with them at a native object level (like writing a component in VB6 and consuming it in VB.NET with MS’s COM).

How does it work? Well XPCOM supports a method descriptor system, a sort of reflection, that tells you about a object dynamicly. We get this information at runtime when creating a new object and we create a virtual class object version of that using Reflection.Emit, that represents the object in XPCOM.

To access something in XPCOM, its very similar to way you can call the Activator object and create a new instance of a com object and it will run the com wrapping system for you. Also, in MS .NET, there is a tool called “tlbexp.exe” that creates a physical assembly for the COM wrapper, so you don’t have to call the methods on the COM object via reflection and you can build directly against something. I’m currently working on a facility to do this same exact concept with XPCOM and have a simiple tool wrapper that writes the assembly to file.

I’m also working on how we can expose back into XPCOM from Mono using a combination of the Mono embedding api and custom attributes to wire and map everything up.

Some aspects are pretty hard. There were a lot of design concepts I could of really used, however I felt it was best to mimic the way COM works with .NET in Windows.

Don’t get confused. XPCOM is not COM nor a drop in replacement. COM objects that run in Windows don’t work magicly under XPCOM. Its very very different in many ways and very very similar in others. However from the Mono/.NET, its not going to be much different to get used to from COM.

More info later!!!

Written by zbowling

November 11th, 2005 at 4:20 am

Posted in Uncategorized

Tagged with ,

First thoughts: C# 2.0\.NET 2.0\VS2005\MSSQL2005

without comments

Been going through the class libraries in 2.0 like crazy this weekend. Also manged to get Visual Studio 2005 and Sql Server 2005 installed in the process. I managed to tear it apart a bit.

Here are some random first impressions:

  • Direct serial port access is a nice feature thanks to the new “SerialPort” class..
  • Little bit thrown off from partial classes in C#. I can see how this was a nice feature for Microsoft to remove the designer generated code for VS 2005 to a different file but I couldn’t figure out why this would be useful anywhere else. That was until I went and looked in my source control and found 9 major instances where they come to be very nice. For example, when you have a private embedded class in some class or where your want to seperate the properties, methods, and everything else.
  • Active Directory Application Mode (ADAM)? Thats neat. Look at that later.
  • SqlBulkCopy is nice and well needed feature.
  • System.Text.DecoderFallback and System.Text.EncoderFallback! I could of used this months ago. In our current model, this is going to be a little bit tough to make work for Mono.
  • Visual Basic joins C# with support for variable paramaters in a function declaration using the “params” keyword or “ParamArray” in VB, but I’m not sure if this is new but if your langauge doesn’t support it then you get a nice little mapped class parameter called “ParamArrayAttribute”. By the looks of it, its not a really high preformance class and its not CLS compliant (so don’t expose them public).
  • System Windows Forms has a BackgroundWorker. Something just like a async call wrapper or something. Figure that out later.
  • Generics, Generics, Generics!
  • Visual Studio has some nice features. Refractoring built-in, a quick code sniplet thingy, better InteliSense (show a ton more), Windows forns desinger is neater, less buttons…
  • ASP.NET now ouputs XHTML by default and get this, its compliant out of the box. You can even switch it to a strict mode. Props to the ASP.NET team for that one.
  • No more Server and Client versions of the GC. Its all one now.
  • SQL Server 2005 now supports XML datatypes (not so bad, but its going to be hard convincing people that the database doesn’t store the data as text and parse it like that)
  • SQL Server 2005 hosting the CLR is nice but it really doesn’t preform as fast as TSQL does for writing stored procs.
  • TSQL stored procs now support try and catch blocks and you can expose stored procs as soap methods in line. (uuhhh.. wahoo?? I guess?)
  • SQL Server 2005 supports a new multiple active recordset system. You maybe able to lower the number of needed open connections to MSSQL now. (more information)

I think that covers some of it. Time to code!!!

Written by zbowling

November 6th, 2005 at 11:59 pm

Posted in Uncategorized

Tagged with

AJAX

with 2 comments

I’ve been working on some custom designs that take advantage of an AJAX design pattern. It’s really not anything new, just a specific collection of stuff we already had. I’m sort of really amazed it’s getting the press it’s getting as its nothing that hasn’t been applied in various ways before.

I wrote something very similar to AJAX over 5 years ago for a chat system I designed that worked purely on DHTML and Javascript. My idea used DHTML to insert a script tag into the body somewhere with a url pointed to dynamically generated external javascript page which encoded the data going back in the that page’s query params. The cool part is that I could write in the server code to generate the javascript that would modify anything on the users’ browser I wanted to change in the return post. Still works to this day in almost all web browsers (if you can ignore the nasty click sound in IE on every timer post every few seconds).

I have heard a lot of theories to why these technologies took so long to develop or why it wasn’t adopted earlier. Its sort of odd since these technologies have been around for a while and I’ve seen lots of similar models in the past 7 years since DHTML started to come alive. I know a lot of developers that have looked at the technology and noticed it wasn’t the best choice for a lot of the traditional reasons why trusting the client to do things right is a lesson in pain.

The major reason why interest is picking up is Google. Google has the man power and the time to invest in working out the kinks and making it work pretty well. I’m not saying AJAX doesn’t rock but don’t get yourselves caught up in all of its good sides without taking in all the down sides. AJAX breaks the common nature of the web that we expect. You might have trouble with search engines, back buttons in your web browsers, bookmaking pages, browsers getting slower and slower after loading many queries into memory into one page session without clearing (very rare but I’ve seen it), and various DHTML incompatibles from all the browsers. Also AJAX can increase your bandwidth dramatically and make it hard on dial up users (yes, a few are still around). You also have to plan for handling disconnections and server side errors and timeouts when you can’t dynamically update the page while the user is disconnected for a moment. (See more: Wikipedia: AJAX Pros, Cons, and Criticism)

However, if done correctly, you can take advantage of AJAX without hurting yourself. Take consideration of all the possibilities so in case the user can’t support something, you have a fallback. It’s good to design for it in the beginning. One of the best models to do that is (gulp) ASP.NET.

This may be a shocker to some that know how much I love .NET/Mono. Personally, I’m not truly fond of ASP.NET, being a big headed traditionalist for the old fashion amount of control I’m used to getting in languages like ASP, PHP, and Perl. I absolutely don’t think that ASP.NET is bad (although 1.x’s use of non webstandard compliant “features” out of the box is a little annoying). I like having full control of everything from top to bottom which is why I use PHP a lot. I guess that’s mostly because I have the extra time to develop every single aspect the way I want in most of my projects (yes I know I can do the same ideas in ASP.NET but I just like PHP). ASP.NET does offer some very practical design patterns minus a few nasty edges. I have to admit when a site gets as large as I’ve seen in some cases, ASP.NET give you some nice usage options. So, I’m going to swallow my pride here.

If you are going to design a site that you want to model to use AJAX at some point, the best technologies I have found to do the job are technologies that support some type of customizable custom control system and support some type of event driven (or event like) system like ASP.NET does. While I don’t really like postback controlling my forms, a technique similar could be modeled to handle live updates over AJAX, as well as handle legacy users with a method like traditional postback. A few implementations for AJAX do this for you and even some custom controls do this in their own way already.

However, ASP.NET’s built in model could be modeled towards it, its going to be really hard avoiding some types of issues just from the nature of AJAX. I don’t think that you can do it perfectly without doing everything out manually which may turn into a very massive project you didn’t expect.

Written by zbowling

November 2nd, 2005 at 2:14 am

Posted in Uncategorized

Tagged with

Language rainbow

with 6 comments

One thing I find myself doing recently is choosing languages when it comes to different projects on the CLI. For stuff I distribute or might be seen by other developers, I lean towards C#, but for my own projects the decision can vary.

There a lot of chooses that all compile to the CLI. All of them doing something a bit different then the rest but really not all that different in overall abilities and structure and everything integrates so well because its all the same class libraries and runtime. I really doesn’t matter if its be Boo, VB.NET, C#, Nemerle, Delphi.NET, JScript, J#, IVKM converted Java, (dare I say) Managed C++, IronPython, IronPHP, PHP4Mono, IL (yes even plain IL is nice), and so many more (see http://dotnetpowered.com/).

A lot of this is elementary to most of us on how you can intermix langauges on the CLI but its hard to find a practical reason for mixing of languages in a single project. I’ve been doing just that.

I love using boo for all my testing, its takes less typing and isn’t so strict. Its also so easy to change quickly to test everything in just a little different way. It can get a bit confusing on some stuff but its entire design is premo for getting it done quickly and making it work (as the slug on the site says: “a wrist friendly language for the CLI”). It’s so nice having a language that compiles and runs in a single command because I can script that into my test scripts.

I still believe in writing all my backends in C# of course for all my interfacing and business logic, however for my data layers, lately I’ve been using Nemerle because of the great runtime macro abilities. and its cut and dry abilities for handling collections and arrays.

For the GUI side, depending on the project, I’ve been working on using PHP4Mono and interoping into other languages with SOAP like ColdFusion and Java using JSP and just plain C# or VB (depending on who is going to work on it after me).

I’ve only gone over a few of the languages I use but really before I do anything, I always evaluate the options and the best languages. Sometimes I choose to use something like Python, Perl, Java, PHP (traditional) and even C or C++, but the CLI offers a new level of integration options that really rocks when you are like me and have more then one favorite language.

Resources:

Written by zbowling

October 31st, 2005 at 9:39 pm

Posted in Uncategorized

Tagged with ,

Does VisualStudio Rot The Mind?

with 2 comments

I found this while surfing. Charles Petzold dives deep into what the VisualStudio IDE has done for us in the past 10 years and what we might see in the future.

DoesVisualStudioRotTheMind?

[Talking about IntelliSense]… And I think it’s making us dumber. Instead of finding out exactly the method I need, or instead of trying to remember an elusive property name, I find myself scrolling through the possibilities that IntelliSense provides, looking for a familiar name, or at least something that seems like it might do the job.

I feel the same way. I loved VisualStudio the first time I tried it and I couldn’t believe the amount of time it saved me. I used it in VB and C++ and I moved right into C# when .NET came out. I have written a bunch of code in VisualStudio over the years, but now that I’m involved in Mono more and more, I’m on my Linux desktop more then ever. The first time I opened up a text editor to start writing C# without VS was almost painful.

It was simply amazing how dependent I found myself on it. I couldn’t remember basics. I realized I used to InteliSense my way to everything and couldn’t remember exactly where anything was. The lack of color coding was a little confusing right off but I quickly learned how to get around that and set that up in VI. I challenged myself to write a relatively simple application without intelisence and see how far I would get in an hour and when I was done, I barely had 2 classes. I kept it up and picked up things naturally. I started to learn how to navigate MSDN/Monodoc in a few seconds and how Google was the best at finding more complete answer then what Intelisense tells me. I was also shocked to find myself writing out a bunch of stuff that VS did for me. I got to learn the compiler, library signing, and all the ins and outs of deployment. It brought my understanding so much farther in such a little amount of time. I also found out that I had done somethings completely wrong in the past, just being blind to what was going on infront of me.

Its like when I program in PHP. I learned all sorts of techniques since there isn’t a good equal to VS for PHP. I found that going to “http://php.net/(some function name)” I could get the documentation page very quickly and that helped a bunch but at the same time I learned the function and after a few times, it was written into my brain.

Python is the same way. I learned to navigate pydoc like a champ.

We need to improve our help systems in Mono. It sort of sucks when we have to look up some function like “System.Windows.Forms.
DataGridPreferredColumnWidthTypeConverter.ConvertFromInvariantString”.

Anyways..

Going to have something up on MonoAddict.com soon though  :-)

Written by zbowling

October 29th, 2005 at 7:27 pm

Posted in Uncategorized

Tagged with

.NET 2.0/Visual Studio 2005/SQL Server 2005

with 2 comments

Anyone that doesn’t already know, Microsoft’s Visual Studio 2005 and Microsoft’s MS SQL Server 2005 are downloadable via MSDN subscription downloads. Uninstalling VS2005 beta (so far at 3 hours waiting for it to finish) so I can install the new version in its place.

Yahoo… (Sorta)…

Written by zbowling

October 28th, 2005 at 11:19 am

Posted in Uncategorized

Tagged with

MythTV

with one comment

Still waiting on my laptop to come back from Alienware. Going crazy. Got desperate and ordered all the parts to build a fairly cheap PVR using MythTV (~$600 from Newegg.com).

Specs:

After installing Ubuntu (had a live CD from Hoary and ‘apt-get dist-upgrade’ to Breezy), I installed all the relevant drivers. ATI Radeon was an AIW and I wanted to use GATOS for the driver but unfortunately, GATOS can’t do video capture in my version of X. Not to mention GATOS tv out seemed to be out of sync with my TV. Installed the ATI binary drivers and they worked (no tv in though in AIW :-( ).

Thankfully I planned ahead and got the FlyVideo out. It was a $40 TV card (not great but it seems that all the super low end and the super high ends cards seem to be supported but very few mid range TV cards will even work in V4L, but I’m guessing that’s because of the time and effort it takes to work on these cards and the limited number of real vendors of the chipsets).

Took some work to get the little saa7130/4’s chipset to work under Linux. Tuners are a big issue in configuring on since the vendor changes tuners all the time with the FlyVideo’s. Had to write a shell script to rmmod the kernel module, modprobe it in with a different set of parameters, run a test to see if I had a signal, and then loop if it failed to detect. After an hour I figured out I had the 39th or 42nd tuner (can’t figure out which but both seem to work) in the list of tuners know in the kernel module.

Tvtime works no problem from the apt in Ubuntu. I tried the packages for MythTV but they seemed not to work for me. I tried to use the last stable of MythTV but it was broken as well. I then tried the latest SVN version of MythTV. Success!

Just for kicks I tried Freevo but it was a pain to setup. I’ll stick with MythTV for now. I’m also looking into ways I can make a basic PVR in Mono using remoting for a backend/frontend communication system. I just wish I had a bunch more time to tinker on this. Works for now but I hope to get back to it.

Written by zbowling

October 27th, 2005 at 10:21 am

Posted in Personal

Tagged with , ,

New toys

with 9 comments

Ok. I got a new laptop. You might remember my rants about my laptop order from Dell. I waited over 2.5 months to get that laptop and they never shipped. So ordered an Alienware. A $5,000 dream machine.

Its been a month since I ordered and I just got it. Turned it on and used it to upload a couple pics, and then about 6 hours layer I decided to stretch its legs and try half life 2. Played great for 30 minutes, then *CLICK*, no video. Apperently the video card wasn’t screwed down tight or there was poorly soildered connection somewhere. All I know is that the mother board and video card are damanged ($2100 worth of parts). I called and no questions ask, they are taking the machine back and sending me a new one. Dell would of given me the third degeree.

While I still don’t have a good machine yet, but at least I don’t feel like I’m getting up the rear like I did with Dell.

In the mean time, I just ordered a new Soekris board. Going to get Mono on it. Might tinkering with getting mono running on iPod linux later thats to the new working port on the ARM processor. Hehehe

Written by zbowling

September 20th, 2005 at 12:07 am

Posted in Personal

Tagged with , ,

PDC Pics!

with 6 comments

Written by zbowling

September 14th, 2005 at 9:45 pm

Posted in Uncategorized

Tagged with

Hello from the PDC.

with 5 comments

Your first wrap up of the PDC event here!

I’m two floors above where the event took place. Miguel just left and Gonzola, Chris, Joesph, Todd, and a few other dudes I’m forgetting are right here with me all drinking it up. We are all wearing our new mono tshirts and having a ton of fun. :-P The turn out was AMAZING!! Lots of people showed up!

Well I need to get back to drinking with the dudes because I’m getting shuned here on the laptop. More to come!

Written by zbowling

September 13th, 2005 at 11:40 pm

Posted in Uncategorized

Tagged with

Dilbert cracks me up. . .

with 3 comments

Every now and then, I get around to reading Dilbert and I’m amazed about how true it is:

Written by zbowling

September 12th, 2005 at 12:47 am

Posted in Uncategorized

Tagged with

Heading to LA!

with 5 comments

Got my travel plans in place and I’m starting to get excited. Going to be in LA for Tuesday and Wednesday for the Mono meeting in LA (just a short walk from the Microsoft PDC conference). If you are going to be at the Microsoft PDC conference, I urge you to come on over. Directions and information about the meeting here. It starts at 6 and goes until 9:30 so it should fit into the PDC schedule nicely.

Written by zbowling

September 9th, 2005 at 6:34 am

Posted in Personal

Tagged with , , ,

iPods ROCK!

with 4 comments

Ok. Its a little late I know. I just got my first iPod and I have to say “IT JUST ROCKS!”. Got a 30gig iPod Photo. I’ve have had other, smaller MP3 players before, but nothing even comes close. When Apple sets out to do something, they do it right. I might start tinkering with iPod stuff in the svn a bit later today, after I transfer all my music and go nutty with iTunes for a bit. :-)

Written by zbowling

September 4th, 2005 at 10:50 am

Posted in Uncategorized

Tagged with

ColdFusion and .NET

with 8 comments

Lately I’ve been looking at methods of interfacing ColdFusion and .NET for some projects I’m working on. I’ve got some interesting ideas so far. Some more-traditional methods and some less-traditional methods but not necessarily just ugly hacks.

The most interesting challenge is the fact that the new versions for ColdFusion (6.0 - 7.0) are based entirely on Java, making ColdFusion MX nothing more than a custom tag library for JSP with a language parser for cfscript syntax (based on Mozilla’s javascript libraries- it looks like). You even have the ability to mix and match JSP in your CFML code. ColdFusion also has the ability to call Java classes (very nicely), COM objects (only on Windows and it’s know for all sorts of issues), SOAP (which has trouble with complex types from .NET hosts -in my experience) and CORBA.

Another option, most out of legacy support with older versions of ColdFusion, is to write custom tags for CFML in C++. This method doesn’t provide all the same features you can get from the Java side. Its abilities with C++ have seem to have come to a hold since very old versions of ColdFusion, and it’s know for having Unicode issues as well.

There is another ColdFusion clone project called BlueDragon which claims to support .NET objects just like Macromedia does with Java, as well as host on top of .NET and Java both, not only Java like the Macromedia version does.

What does one do when plagued with integration solutions? I’ve given it a lot of thought and have some interesting solutions.

  • Web services
    This option is one of those more traditional ones I was talking about. After testing I had limited success with complex return types from my .NET clients. While I was able to see complex types from Java, PHP and other CFMX services, from .NET the classes all seem to break. However, the output variables seem to work but it gets nasty when you need to represent something very complex or large, and it’s a lot of overhead.
  • Java /w Webservices
    Just like above- but instead of having ColdFusion absorbing the Webservices with its own engine, do it all in Java, and then expose that to ColdFusion. This would give you the ability to type your complex types correctly, and even do some java interfacing in the middle. This method adds to the complexity by adding Java to your already complex .NET and CFMX solution. I feel okay with it, but its a hard thing to sell.
  • Stored Procedures in MSSQL
    Depending on the requirements of your project and a willingness to have some very complex stored procs, you can write all your shared business logic into stored procedures in the database. This may work for some of the systems effected in your solution, but for what I need, I don’t believe it’s going to be possible.
  • .NET based extended stored procedures in MSSQL 2005
    If you are willing to wait or use beta software, you could write custom extended stored procedures using .NET in Sql Server 2005. This still borderlines on being a hacks. For now at least, I don’t believe it’s a viable solution.
  • Use Java
    If you have the ability, you could write everything in Java. Macromedia ColdFusion is dedicated to Java, so it’s the most elegant solution, but depending on other constraints it’s not always possible.

    You can also write all your shared business logic between your ColdFusion and .NET layer in Java. Then you can use IKVM or J# and compile/convert the Java to .NET and integrate that in to your .NET layer, and use the Sun compiler/runtime for the CFML layer.

  • Use BlueDragon
    BlueDragon is a clone project of ColdFusion that has the ablity to host CFMX code with .NET and integrate with .NET like the Sun verison does with Java. However, BlueDragon is a clone and does a number of things differently. It’s not as well tested. Something to keep in mind if you’re moving an existing solution over and making a site work with BlueDragon.
  • Custom ASP.NET Webhandler/CFHTTP
    Another integration idea is to write a custom web handler, and proxy the content from your cfm pages through .NET, while caching and replacing content in the page by .NET. You can do the inverse using the CFHTTP tag in ColdFusion as well. Again, a not-so-elegant solution that doesn’t do any code level integration, but gives you a quick and simple solution with minimal chance for errors.
  • CORBA
    Use CORBA.NET and integrate a remoting-like solution. This is far from being a clean and well supported solution, but its possible.
  • C++
    Write a wrapper in C++ from .NET to CFMX using the ColdFusion C++ interface. This method is very complex and chuck-full of potential hang ups.
  • Wrap up your objects in COM
    This solution only works on Windows, and CFMX is known for having COM issues. .NET is better at it, but it’s far from being superior.

What to do? What to do?

Written by zbowling

August 20th, 2005 at 4:23 pm

Posted in Uncategorized

Tagged with

Secure execution.

with 5 comments

I couldn’t find a good reason for why I would need code level security, yet in Mono, until recently you couldn’t execute assemblies on another machine without direct user involvement on most of the primary platforms that Mono targets when designing a very basic distributed processing system.

In Windows, assemblies you might not know or have complete control over can directly be executed off a network share, from a webpage in IE (like an activeX control or COM object), or even on a webserver if you are hosting assemblies for use on a webserver. The ability to overwrite assemblies can be a concern in some cases as well. Microsoft made .NET handle this pretty well and has thier setup working for the vastly more complicated maze they have because of the amount of integration. .NET has in everything now and it’s included with every recent version of Windows.

Mono is growing on its ability to do the same, but didn’t start out in the same boat. In a Linux environment, very few pecies of software are going to be based on Mono and the framework comes pre-installed on very few systems. If Mono is installed, it usually supposed to be there and its entire setup is usually understood when its there. Also in Linux, it remains very difficult to execute an assembly without direct user interaction in the process. Hosting of assemblies for Mono for ASP.NET is still very limited right now as well, but if anyone where to do so, other methods of maintaining security are possible in Linux like in many other shared virtual hosting environments do already, because most systems for that are provided at a operating system level. It’s almost a fact that Mono can be almost as unique and Linux makes it a hard target and why security is still very high with Mono.

So where do security risks come up when you could just run Mono under and a secured user in Linux? It’s a very good question. The anwser is when you have code that can execute in the same application domain as a semi-trusted assembly. Only one Mono process for everything and some code might need higher security where other code maybe only partially trusted for execution. Mono then has to delgate how stuff runs. The case might come up when you might have a purchased component and you can’t review it’s source or when the assemblies could be loaded from a uncontrolled source like in the case of a distributed transaction system or when you might call and load an assembly dynamicly like with auto updated software or anything you can come up with.

The solution: Code Access Security (CAS), and good user policies is the most intelligent solution. If you can review the source, you can’t trust the code so you have to protect yourself. CAS is amazing. Conceptually if you think about it, the assembly would have to call base class libraries in the framework if it was going to do anything insecure, but in Mono you control everything. You have the source of the code its going to call, and you provide the framework for it. Because of that, anywhere it may call in the framework to do something, you can catch it. That is what CAS is.

Another system would be running a secondary app domain in another process with higher security and tunneling messages back and forth over some type of interprocess communication system (like .NET remoting or dbus). Security can almost be assured in this case but will cause a major drag in performance to make it work.

What does this mean? Mono has security in mind. What could be better when you are trying to prove to someone in managment that Mono is truely enterprise worthy? :-)

Written by zbowling

June 12th, 2005 at 9:27 am

Posted in Uncategorized

Tagged with