Datasheet
11
Chapter 1: Defi ning the Language Environment
Using F#
In many cases, you need to work with data in new ways in today’s applications. For example, most
systems today come with multiple processors, but most programming languages don’t use this capa-
bility very well. F# is a new language that joins other functional languages such as ML (
http://
en.wikipedia.org/wiki/ML_programming_language
), OCaml (http://caml.inria.fr/), and
Haskell (
http://www.haskell.org/). A functional language differs from an imperative language such
as C# or Visual Basic.NET in that it works with equations. You can’t assign values to F# identifi ers — the
value of an identifi er always remains the same. However, you can interact with that identifi er in a
number of ways to analyze the identifi er and deduce new results from existing data.
The reason you want to add F# to your repertoire is that it lets you use those multiple processors in your
system with extreme effi ciency. Because an F# identifi er never changes value, it doesn’t matter which pro-
cessor works with it. You don’t have to worry about state information either. The lack of tracking baggage
means that F# applications are quite fast, too. In short, F# adds a new dimension to your application
development environment that differs from many other languages you use. You can fi nd a good over-
view of F# at
http://www.devsource.com/c/a/Languages/Exploring-the-New-F-Language/.
Multiple Platform Scenarios
Multiple platform scenarios are becoming more common as companies merge and developers see a
need to explore open source. Fortunately, you can still use C# for your project while also working with
Java and back-end servers such as IBM WebSphere. Although the tools are a bit hard to fi nd, vendors
such as Mainsoft (makers of Visual MainWin,
http://www.mainsoft.com/products/index.aspx)
can make things work in a multi-platform environment. You can read a review about Visual MainWin
at
http://www.devsource.com/c/a/Add-Ons/Mainsoft-ASPNET-AJAX-Linux/.
Fortunately, you have a number of options in a multiple platform environment. Although Visual
MainWin allows complete sharing of code between platforms, you could also rely on Web services
or other techniques when the need for code sharing is minimal and you don’t require the ultimate in
application speed. Vendors also provide a number of bridging tools, such as JNBridge (
http://www
.jnbridge.com/
) that offer a middle bound between the full cross-compiler solutions and Web
services.
No matter what kind of multiple platform solution you use, it does affect the language environment
to some extent, which means you must include this requirement in your decision. Even a full solution,
such as Visual MainWin, does require some changes on the part of the developers in your organization
to accommodate the tool. When working with a Web service, the developers on your team will have to
create a completely different kind of application.
Many multiple platform solutions are available, so don’t accept the fi rst solution you see. For example,
many developers are unaware that you can turn a COM+ application into a Web service. In this situation,
you could gain a speed advantage by accessing the COM+ application locally and using the Web service for
remote access. You can even turn your C# application directly into a COM+ application and then make the
resulting COM+ application accessible as a Web service (see the technique at
http://www.devsource
.com/c/a/Using-VS/Designing-COM-Applications-with-a-Web-Service-Appeal/).
15962c01.indd 1115962c01.indd 11 1/23/09 5:45:00 AM1/23/09 5:45:00 AM