Professional Documents
Culture Documents
18
Presented by
Presorted
Standard
US Postage
JUNE 5–6, 2006
PAID
St. Croix Press THE ROOSEVELT HOTEL
NEW YORK, NY
SEE PAGES 46-47
W W W . D O T N E T D E V E L O P E R S J O U R N A L . C O M
SUPERCHARGE
YOUR APPS WITH
THE POWER OF
LOCATION
INTELLIGENCE Enable Location Intelligent web services
110
Contact us at sales@mapinfo.com
DBA: “I suspect it’s your application server
code that’s causing the problem.”
App Dev: “It must be a database problem.”
Get a FREE “No more finger pointing” T-shirt. >> > > Learn more at www.radview.com/analyze
110100010110100010110100101010101000101101
00101010110100010110100011101001010101011
© RadView Software, Limited.All rights reserved. The Smart Choice in Web Application Testing
M a rc h 2 0 0 6 Volume 4 Issue 3
����
Inside DNDJ 10
EDITORIAL
SOA
���
��������������
��������������
��������
����������������
��������� ���������������������� �����������������������
����������������� � ����� ���������� � ���� ������ ��
������������������������������� ������
��������������������������������������� ���� �������������������������������
��������������������������������������������������������������������������������������
�������������������������������������������������������������������������������������������������������������������������������������������������������������������
�������������������������������������������������������������������������������������������������������������������������������������������������
Editorial
EDITORIAL BOARD
dotnetboard@sys-con.com
Editor-in-Chief
Derek Ferguson derekf@speakeasy.net
The Art of Progress
w
Executive Editor e’re not even at the end of “Even though I have for so many
Seta Papazian seta@sys-con.com
Group Publisher the first quarter yet, and years enjoyed the rare honor of working
Jeremy Geelan jeremy@sys-con.com 2006 seems already to have with top-rate technologists and writers BY JEREMY GEELAN
Mobility Editor
Jon Box jbox@psgi.net brought with it as much from all over the world, many of them as
Security Editor
Patrick Hynds phynds@criticalsites.com change in the world of Internet technolo- brilliant at writing as they are at technol- Jeremy Geelan is group publisher of
Open Source Editor gies as all four quarters of 2005 combined. ogy, I wouldn’t have the slightest hesita- SYS-CON Media and is responsible
Dennis Hayes dennisdotnet@yahoo.com
Product Review Editor Despite the headline-grabbing mega- tion in naming Derek Ferguson to be in for the development of new titles
Doug Holland doug.holland@precisionobjects.com
VB Editor deals of ’05, in ’06 the mid-market is still the top percentile of achievers within and technology portals for the
Keith Franklin keithf@magenic.com the engine room of technology M&A, with that group: a remarkably gifted com- firm. He regularly represents
Smart Client Editor
Tim Huckaby timh@interknowlogy.com 95% of deals valued at less than $600M municator and developer – it’s a winning SYS-CON at conferences and trade
BizTalk Editor
Brian Loesgen brian.loesgen@neudesic.com – and there have been dozens of them combo!” shows, speaking to technology
ADVISORY BOARD already. If anyone is in the slightest doubt as audiences both in North America
dotnetadvisors@sys-con.com Many fundamentals seem to be to the width and depth of Derek’s accom- and overseas.
Derek Ferguson derekf@magenic.com
Seta Papazian seta@sys-con.com changing too. Whereas private sector plishments during his four-year reign in
Jeremy Geelan jeremy@sys-con.com
Thom Robbins trobbins@microsoft.com compensation increased only about 2% the hot seat, just glance back through 4jeremy@sys-con.com
John Gomez John.Gomez@eclipsys.com over the 12 months ending December your back issues – or trawl through the
Scott Hanselman scott@hanselman.com
Dean Guida deang@infragistics.com 2005, there’s a sense already that in 2006 digital archives at http://dotnet.sys-con.
John Sharp johns@contentmaster.com
Jacob Cynamon jacobcy@microsoft.com salaries will maybe rise – IT sector salaries com – and remind yourself how amaz-
Chris Mayo cmayo@microsoft.com too, especially with the U.S. unemploy- ingly thorough his interviews were,
Gary Cornell gary@thecornells.com
Joe Stagner joestag@microsoft.com ment rate now having fallen below 5%. whether with the Father of C#, Anders
Peter DeBetta peter@debetta.com
Editor No matter how the economic cycles Hejlsberg (October 2002 and March
Nancy Valentine nancy@sys-con.com might ebb and flow, SYS-CON Media’s 2004), or the vice president of Microsoft’s
Online Editor
Roger Strukhoff roger@sys-con.com passionate coverage of the i-Technologies entire Developer Division, “Soma”
WRITERS IN THIS ISSUE that are increasingly shaping our busi- Somasegar (May 2004).
Wayne Citrin, Jerry Dixon, Jeremy Geelan, Dennis Hayes, nesses, our education, our society, and I know that I speak for Derek when I
James McCaffrey, Aaron Reed, Tim Stall, Brian Wilson
therefore our lives remains consistent. say that throughout those years he has
SUBSCRIPTIONS We have added AJAX Developer’s Journal considered himself privileged to have
For subscriptions and requests for bulk orders,
please send your letters to Subscription Department already this year, along with Web 2.0 been supported by such an outstanding
Subscription Hotline: subscribe@sys-con.com
Cover Price: $6.99/issue Journal; and we have redoubled our effort collection of Microsoft VIPs and regional
Domestic: $69.99/yr. (12 issues)
Canada/Mexico: $99.99/yr. Overseas: $129.99/yr. to offer high-quality education nationwide directors. It’s highly characteristic that
(u.s. banks or money orders). Back issues: $12/ea., through SYS-CON Events such as the he still in his day job – then at Expand
plus shipping and handling.
“Real-World AJAX” series of seminars (in Beyond – managed to find time to write
EDITORIAL OFFICES
SYS-CON Media 135 Chestnut Ridge Rd., March, April, June, and October [http:// code so well that in July 2004, Microsoft
Montvale, NJ 07645 ajaxseminar.com/]) and our innovative named him a Most Valuable Professional
Telephone: 201 802-3000 Fax: 201 782-9638
.NET Developer’s Journal (issn#1541-2849) is conference program: Web Services Edge (MVP) for the .NET Compact Framework.
published monthly (12 times a year) for $69.99 by
SYS-CON Publications, Inc.,135 Chestnut Ridge Road, 2006 Conference & Expo, Enterprise Open The last words of this editorial, as is
Montvale, NJ 07645. Source 2006 Conference & Expo, and Rich right and proper, come from Derek
Postmaster: Send address changes to:
.NET Developer’s Journal, Internet Apps + AJAX Conference & Expo himself:
SYS-CON Publications, Inc.,
135 Chestnut Ridge Road 2006 (http://events.sys-con.com). So, here we are in March of 2006, ready
Montvale, NJ 07645 As far as .NET Developer’s Journal for .NETDJ, Phase II. I look forward to
Copyright © 2006 by SYS-CON Publications, Inc.
All rights reserved. No part of this publication may be reproduced or
goes, there is change too, with our being able to read the magazine purely for
transmitted in any form or by any means, electronic or mechanical,
including photocopy or any information storage and retrieval system, esteemed Founding Editor, Derek enjoyment and – like any parent – to see if
without written permission. For promotional reprints, contact Reprint
Coordinator Dorothy Gil, dorothy@sys-con.com. Ferguson, moving to the position of the “child” I helped to bring into the world
Worldwide Newsstand Distribution
Curtis Circulation Company, New Milford, NJ
mobility editor in order to permit him to is able to exist and, hopefully, even thrive
Newsstand Distribution Consultant: live up to the requirements of his excit- in my absence.
Gregory Associates / W.R.D.S.
732 607-9941 - BJGAssociates@cs.com ing new position as an associate director Please continue to be in touch via
For list rental information:
Kevin Collopy: 845 731-2684, in the Information Technology Group at derek@sys-con.com. I look forward to
kevin.collopy@edithroman.com;
Frank Cipolla: 845 731-3832, Bear Stearns. The incoming editor-in- continuing to see everyone at various
frank.cipolla@epostdirect.com
All brand and product names used on these pages are trade names,
chief is known to all of you…but rather industry and Microsoft events. Bear
service marks, or trademarks of their respective companies. SYS-CON
Publications, Inc., is not affiliated with the companies or products than steal his thunder here let me allow Stearns obligations notwithstanding, I
covered in .NET Developer’s Journal. .NET and .NET-based marks are
trademarks or registered trademarks of Microsoft Corporation in the United him to introduce himself next issue. will of course continue to go anywhere
States and other countries.
Besides it is only fitting that the last that free pizza and soda is provided. :-)
SYS-CON Publications, Inc., reserves the right to revise,
republish and authorize its readers to use the articles issue of .NETDJ with Derek as E-i-C Thanks Derek! We look forward to
submitted for publication.
be an opportunity for me on behalf of seeing Mobility articles, news, and com-
SYS-CON Media to repeat what I have mentary featured strongly in .NETDJ in
declared elsewhere: the rest of 2006.
10 4
MCAD MCAD/MCSD Fuat Kircaali fuat@sys-con.com
Developing XML Training Guide President, SYS-CON Events
Web Services (70-316): Grisha Davida grisha@sys-con.com
Group Publisher
and Server Developing and
Jeremy Geelan jeremy@sys-con.com
Components Implementing
with Visual C# Windows-Based Applications ADVERTISING
.NET and the .NET Framework with Visual C# and Visual Senior Vice President, Sales and Marketing
Exam Cram 2 (Exam Cram Studio.NET Carmen Gonzalez carmen@sys-con.com
70-320) by Amit Kalani Vice President, Sales and Marketing
by Amit Kalani Miles Silverman miles@sys-con.com
Advertising Director
3
MCAD/MCSD
Robyn Forma robyn@sys-con.com
9
Enterprise Training Guide
Advertising Sales Manager
Solution (70-315): Megan Mussa megan@sys-con.com
Patterns Using Developing and Associate Sales Managers
Microsoft .Net: Implementing Kerry Mealia kerry@sys-con.com
Version 2.0 Web Lauren Orsi lauren@sys-con.com
8 2
Applied Programming Alex Botero alex@sys-con.com
7
Developing
Web Designers
Application Stephen Kilmurray stephen@sys-con.com
Frameworks in Wayne Uffleman wayne@sys-con.com
.NET
ACCOUNTING
Financial Analyst
Joan LaRose joan@sys-con.com
by Xin Chen
Accounts Payable
Betty White betty@sys-con.com
6
MCAD/MCSD Accounts Receivable
PROVIDED BY Self-Paced Gail Naples gailn@sys-con.com
Training Kit:
1
Developing MCAD/MCSD Self-Paced SYS-CON EVENTS
Windows-Based Training Kit: Microsoft President, Sys-con Events
Grisha Davida grisha@sys-con.com
Applications .NET Core Requirements,
National Sales Manager
with Microsoft Visual Basic.NET Exams 70-305, 70-315, Jim Hanchrow jimh@sys-con.com
and Microsoft Visual C#.NET, 70-306, 70-316, 70-310,
Second Edition 70-320, and 70-300 SUBSCRIPTIONS
Microsoft Corporation Microsoft Corporation 201 802-3012
888 303-5282
5
subscribe@sys-con.com
MCAD/MCSD
Self-Paced
CUSTOMER RELATIONS
Training Kit: Circulation Service Coordinators
Developing Web Edna Earle Russell edna@sys-con.com
Applications JDJ Store Manager
with Microsoft Brunilda Staropoli bruni@sys-con.com
Visual Basic .NET and
Microsoft Visual C# .NET,
Second Edition
Microsoft Corporation
������������������������������������
�������������������������������������
�������������������������������������������
������������������������������������������������������������������
��������������������������������������������
������������������������������������������������������������������
�
���������������������������������� ������������������������������
����������������������������������������������������������������������
������������������������������������������������������������������������
�������������������������������������������
��������������������������������������
4 ��������������������������������������������������������
����������������������������������������
4 ����������������������������������������������������������������
�����������������������������������������������������
���������������������������
4 ����������������������������������������������������������
�������������������������������������������������������� ��������������������������������������������
���������������������
4 ������������������������������������������������
����������������������������������������������������������������
������������������������������������ ��������������
���������������������
�������������
�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
BizTalk
i
f you need to integrate We’ll start with a discussion of Required Software
Microsoft BizTalk Server adapter architecture, run through If you want to follow the instruc-
(BTS) 2004 with other an example orchestration, build the tions in this article and use the
applications and data adapter, then deploy and run it. The associated sample code, you’ll need
sources, you’re going to need some creation and deployment of adapters to install the following software:
kind of adapter. BTS 2004 ships with can seem like an involved process, • A working development copy of
a few, including the file adapter and but once you get past the details in- Microsoft BizTalk Server 2004 or
the Web services adapter. Other herent in the creation of any BizTalk 2006, including Visual Studio .NET
adaptors, especially ones used to Server adapter, creating an adapter 2003 or 2005 with the appropriate
integrate BTS with popular enter- that bridges between BizTalk Server extensions.
prise software, are available from and J2EE is quite straightforward. • BizTalk Server 2004 SDK Refresh,
third-party vendors. However, if you which can be downloaded at www.
need a JMS (Java Messaging Service) Background microsoft.com/downloads/details.
adapter, or one that supports J2EE This article assumes you have aspx?FamilyID=8A1CA3AF-790C-
facilities such as JNDI (Java Naming passing familiarity with both BizTalk 4261-838A-9F0661C72887&displayl
and Directory Interface), JAAS (Java Server and JMS. It will also help if you ang=en.
Authentication and Authorization have some knowledge of how BTS • BizTalk Server 2004 Adapter
Service), and EJBs (Enterprise Java adapters are used, but you don’t need Wizard, which can be down-
Beans), you’re probably going to a deep knowledge of how they’re loaded at www.gotdotnet.com/
have to build one. This article shows constructed because the necessary Community/UserSamples/Details.
you how to construct a custom information will be presented below. aspx?SampleGuid=c95217fc-4f9f-
adapter that allows BTS to integrate The BTS orchestration used in 4fec-9d68-1aa9456b6ca0.
BY WAYNE CITRIN with JMS. You can also use these this example comes from the first or- • J2SE SDK (J2SDK), version 1.3.1 or
techniques to construct other kinds chestration example in the excellent later.
of adapters, including ones for Java book Microsoft BizTalk Server 2004 • JNBridgePro, which can be down-
APIs that come with custom applica- Unleashed (Sams, 2005), by Scott loaded from www.jnbridge.com. It
tions, or simply call Java libraries Woodgate, Stephen Mohr, and Brian comes with a 30-day free, full-fea-
from BizTalk Server orchestrations. Loesgen. I recommend reading the tured evaluation.
The example in this article shows example in the book and performing • A J2EE application server or special-
how to create a JMS adapter for the actions to create the orchestra- purpose JMS messaging server. This
BizTalk Server using JNBridgePro, tion, but I’m supplying the code for example uses BEA’s WebLogic 8.1
a Java/.NET interoperability tool. those who are not inclined to do so. application server, although it’s easy
to adapt this example to any other
application server or JMS server.
• Download and unpack the sample
code, www.jnbridge.com/biztalk/
JMSAdapterSample.zip. There
are three folders: jmsAdapter,
MyFirstIntegration, and Java clients.
You may place these folders any-
f1 Figure 1: BTS adapter architecture where on your machine.
Summing Up the
New ASP.NET Controls ASP + .NET 2.0 = productivity
Wizard Control
o
n the eve of the official HotSpotMode or a property for a
release of .NET 2.0, devel- The Wizard control expands on the postback value if using the post-
opers around the world premise of the MultiView and creates pack HotSpotMode. There is also
were anxiously waiting an extremely powerful WYSIWYG edi- a HotSpotMode property on the
and priming their PCs for tor for creating a classic wizard design. HotSpot object to allow you to
a speedy download from MSDN. And The screenshot of the Wizard control have multiple hot spots performing
who could blame them? Microsoft’s in Figure 1 is actually taken from differently.
.NET development platform has been design view rather than at run time
a hit with the developer community and gives you a feel for the rich visual BulletedList Control
ever since the first betas came out editing power of the Wizard control. The BulletedList control is simply
years ago. a way to provide easy generation of
Upon loading Visual Studio .NET dynamic bulleted lists. The control can
2.0 for the first time, many of us were be data bound to a data source and
like kids in a candy store. So much to gives you a number of bullet cus-
play with and so little time! Microsoft tomizations, including circle, square,
has really hit a home run with the numbered, alpha, roman numbers,
suite of new controls they’ve added and custom image.
to the toolkit, which are bound to
make your life a lot easier. So, without HiddenField Control
teasing you too much further, here’s a The HiddenField control allows you
rundown of the new controls you now to store data in a hidden field on the
have at your disposal with ASP.NET rendered HTML. Typically you’d use
2.0. The Wizard control contains a Col- view state, session state, or cookies to
lection of WizardStep objects that are do that, but if you can’t, then this is an
MultiView Control added to the Wizard in the order in alternative. You can modify the data
The MultiView control is essentially which you wish them to appear. Next, stored with the Value property. You can
a container class for another control, Previous, and Finish buttons are auto- also capture client-side changes to the
which is new in .NET 2.0 – the View matically added to each WizardStep to data via a ValueChanged event.
control. The View control is itself a allow for navigation between steps.
container class for other controls. FileUpload Control
BY AARON REED Only one View control from the Mul- ImageMap Control The FileUpload control is simply a
tiView is viewable at one time. You The new ImageMap control lets you replacement for the HTML version of
can use the MultiView’s SetActiveView easily create images with clickable hot the control. The .NET control runs in a
method or ActiveViewIndex property spots in a straightforward and simple very similar manner and has a HasFile
to specify which View will be visible at manner. The control itself is similar to property that indicates whether a file
a given time. the standard Image control with the was selected in the control. You then
The MultiView control is a great ImageUrl property containing the URL have access to methods and proper-
way to facilitate jumping between of the image displayed. However the ties such as SaveAs (saves the file to
edit and read-only modes of database ImageMap adds a few new properties: the server), FileBytes (size of the file),
records. It also has some great built-in • HotSpotMode: An enumeration FileContent (gets a Stream of the file
functionality to assist in creating a indicating whether to have mouse contents), and PostedFile (gets the
wizard look and feel. By adding a But- clicks navigate to a URL or generate HttpPostedFile object for the file itself)
ton, LinkButton, or ImageButton to a postback. to manipulate the uploaded file as
each View in the MultiView and set- • HotSpots: A collection of Circle- needed.
ting the CommandName and Com- HotSpot, RectangleHotSpot, and
mandArgument values, the MultiView PolygonHotSpot objects. These Substitution Control
will automatically navigate between objects derive from the HotSpot The Substitution control provides
Views as directed. Table 1 shows a object and contain properties for a you with a way to display dynamic data
simple view of those values. URL and target if using the navigate on a page while the rest of the data on
Security should never be an inhibitor to new opportunity: Forum XWall™ Web Services
Firewall has been enabling Fortune 1000 companies to move forward with XML Web
services confidently. Forum XWall regulates the flow of XML data, prevents unwanted
intrusions and controls access to critical Web services.
Visit us at www.forumsys.com to learn more about how you can take your next leap
forward without increasing the risks to your business.
fo r u m syst e m s ™ – t h e l e a d e r i n we b s e rv i c e s s ec u r i t y ™
ASP.NET
AUTHOR BIO: that page may be pulled from cache. Web site. The control hosts a Collec- ing, deleting, sorting, filtering, paging,
Aaron Reed is an assistant While the OutputCache directive may tion of MenuItem objects, which are etc. The 1.x controls are still there for
professor specializing in software indicate that your page is being pulled customizable with images or a variety backward compatibility, but the new
architecture and design and from cache, data connected to a Sub- of styles. You specify a NavigateUrl controls give you a much cleaner and
.NET development at Neumont stitution control will always be fresh. property for each MenuItem object in equally powerful solution to data-bind-
University in Salt Lake City, UT. order to allow for easy navigation. ing problems.
He has worked professionally SiteMapPath Control
in the industry for over 12 years The SiteMapPath control gives you TreeView Control Login Controls
as a lead architect/designer, an easy way to create customizable The TreeView is a flexible and .NET 2.0 comes packed with a full
development manager, and VP breadcrumbs for your entire site. You powerful tree control that can be data suite of controls aimed at assisting in
of development. When he isn’t simple create a site map XML file such bound to a data source. The TreeView the creation and maintenance of login
spending time reading up on as the one shown in Listing 1. The contains a Collection of TreeNode security for your Web application. With
the latest in software develop- SiteMapPath control will then read the objects that can be customized with the tools now available it is possible
ment, Aaron loves spending time XML file and based on the path of the images, NavigateUrls, checkboxes, to create a robust and customized
with his beautiful wife and three current page, it will create the bread- tool tips, different select actions (se- authentication system with no coding
children. crumb dynamically. lect, expand, select and expand), etc. at all.
The controls focus on the concept of
4 aaron@aaronreed.com MenuControl Data Source Controls .NET memberships. Memberships pro-
The Menu control is a great way to Data binding has been revamped in vide a built-in way to validate and store
add customizable pop-out menus to a .NET 2.0. The addition of several new user credentials. Memberships can be
controls that encapsulate the function- stored in SQL Server, Active Directory,
ality from the Connection, Command, or other sources as needed. .NET 2.0
and DataAdapter objects in .NET 1.x also provides a slick Web site admin-
make data binding in .NET 2.0 easier istration tool (shown in Figure 2) that
than it has ever been with little or you can use to visually modify security
no code required to bind controls to and performance settings for your Web
complex data queries. The SqlData- site including, .NET memberships.
Source pulls data from SQL Server, the A brief overview of the login controls
t1 Table 1: Values for MultiView buttons AccessDataSource pulls from Access used to handle these memberships is
databases, and the XMLDataSource listed here:
can pull from XML sources. • Login: The Login control con-
The ObjectDataSource control is tains text boxes for username and
added to allow you to pull data from password as well as a “remember
any type of object. This will be useful me” checkbox. The control is auto-
when manipulating or representing wired for authentication using
the data in code before binding it to a .NET memberships and no code is
control. required if you go that route. If you
Nearly all data manipulations can store your authentication in anoth-
now be handled in these objects. They er way, you can modify the control
f1 Figure 1: A Wizard control in design can handle selecting, inserting, updat- to run your methods.
• LoginView: The LoginView control
is a view that allows you to toggle
automatically between two different
sub views – one for authenticated
users and one for anonymous users.
This is very handy for content panes
that change information based on
whether a user is currently logged in
or not.
• LoginStatus: This control displays a
login link or a logout link based on
the user’s current state. The control
offers full visual customization.
• LoginName: This control displays
the name of the currently logged in
user.
• PasswordRecovery: This control
allows a user to retrieve his pass-
word based on an e-mail used in
registration. If the .NET member-
f2 Figure 2: Web site administration tool – adding a user ships are stored using non-revers-
���������������������������������������
��������������������������������������������
��������������������������������������������
�������������������������������������������������������
������������������������������������������������������������
��������� � ����������������������������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������������������������������� ������ �
���������� ������������ �����������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������������������������������������������
������������������������������������� ����������������������������������������������������������������������������������������
�������������������������������������������� ����������������������������������������������������������������������������������
��������������������������������
������������������������������������������������������������������������������������������������������������������������ ���������������������������������������������������������������������� ���������������������������������������������������� ������������������������������������������������������������������������������
� � � � � � � � � � � � � � � � � � � �
� � � � � � � � � � � � � � � � � � � �
SQL Server 2005
hese days, applications HTTP or the TCP protocol. They can AS Clause
w
eb sites are based on formance), you must persist the An Overview of Callbacks
a client-server model. state of the whole page. For exam- Callbacks are a new feature in
While the client (usually ple, all your JavaScript variables and ASP.NET 2.0. They let a client script
a browser) can use cli- controls without viewstate will be call the server without affecting the
ent-side script such as JavaScript to lost. rest of the page (to those who have
do simple tweaking of existing data, heard of AJAX or ATLAS, callbacks
getting new data requires a request to Especially as you move beyond have similar functionality). The pro-
the server. The server does the heavy just basic data entry forms, these cess is:
processing and makes a response problems become more critical. • On the client, a script calls the
back, which redraws the entire Web Examples abound of where you server, passing a string of data
page. Most development required want to just make a small request/ • At the server, a method uses that
these interactions to be atomic response for only part of the page, data, and returns a new string (that
so that each request to the server without re-creating the whole thing. you create) to a receiving function
returns a completely new page. Perhaps for an address section you back at the client
want a user to select a state from • This receiving function is then trig-
The Problem with Postbacks a dropdown, which in turns auto- gered
Postbacks, which are perhaps the matically populates another drop-
most common way to communicate down with all that state’s available These three simple steps enable
between the client and server, do cities? Perhaps you have optional us to implement powerful features.
exactly that. While this works, it has helper buttons such as “Calculate We can trigger the callback from any
several problems: Rate,” which needs to do the calcu- JavaScript function: onchange of a
• Posting back the entire page, as lation at the server. Or perhaps you dropdown, onclick of a button or
opposed to only what you need, have complex controls like a tree- hyperlink, onmouseover of an image,
sends a lot more traffic over the view that let the user cumulatively etc. We can pass any data to the
network. This hurts performance. request more data. While all of server and back by serializing it to a
• Posting back prevents users from these can be done with postbacks, string. We can then have the receiv-
BY TIM STALL doing anything while they wait for the problems with that approach ing function use the returned data to
the server to respond. encourage us to find a better way. set error messages, update control
• Because you’re re-creating the Fortunately there is one: ASP.NET properties, or even modify the DOM
whole page (which also hurts per- 2.0’s callbacks! (like adding dropdown items or table
rows)!
Let’s go over the technical imple-
mentation of the simplest callback,
and then show both some advanced
features as well as the limitations
of callbacks. First, any page with
callbacks must implement System.
Web.UI.ICallbackEventHandler (see
Listing 1).
This has two methods:RaiseCall-
backEvent and GetCallbackResult.
One approach is to use RaiseCall-
backEvent for internal plumbing
and let GetCallbackResult do the real
f1 Figure 1: A single page with multiple callbacks work. RaiseCallbackEvent is fired
Callback Postbacks
Pro • Doesn’t re-create the entire page • Access to the full-page response
• Lets you asynchronously contact the • Handles cross-browser issues
server from client-script
Con • Can’t set the response • Re-creates the entire page, which is slower
• Need to do your own serialization for request • Loses client-side state
• Not necessarily cross-browser compliant • Blocks user from doing anything else
Useful • You are updating only a portion of the page • Page-wide actions such as “Save” that read
When the entire page
• You want to keep client-side state
• You are redirecting away from the page
#endregion
Listing 5
public static object DeserializeFromXmlString(
Listing 2 System.Type t,
//SERVER string strXml)
{
protected void Page_Load(object sender,
// Requires namespaces:
EventArgs e)
// using System.IO;
{
// using System.Xml.Serialization;
SetupAlways();
}
XmlSerializer x = null;
StringReader sr = null;
private void SetupAlways()
try
{ {
//setup callbacks: sr = new StringReader(strXml);
string cbReference = x = new XmlSerializer(t);
Page.ClientScript.GetCallbackEventReference( return x.Deserialize(sr);
this, }
“arg”, finally
“ReceiveCallback”, {
“context”); if (sr != null)
string callbackScript = “function sr.Close();
CallServer(arg, context)” }
+ “{ “ + cbReference + “} ;”; }
Page.ClientScript.RegisterClientScriptBlock(
this.GetType(),
“CallServer”, Listing 6
callbackScript, var strData = “<EmployeeData>”
true); + “<Id>” + myID + “</Id>”
} + “<Name>” + myName + “</Name>”
+ “</EmployeeData>”;
Listing 3
//CLIENT Listing 7
function StartCallback() EmployeeData emp = (EmployeeData)Utilities.Deser
{ ializeFromXmlString(
//TODO: assemble the data to send to the typeof(EmployeeData),
callback strXml);
SUBSCRIBE ONLINE!
Regardless of their experience level, .NET
fully selected for their prime Developer’s Journal assumes that everyone
reading it shares a common desire to under-
technical content – technical www.sys-con.com/dotnet/ stand as much about .NET – and the busi-
ness forces shaping it – as possible. Our aim
details aren’t watered down with or Call is to help bring our reader-developers closer
OFF $83.88
Wholly independent of both Microsoft Corporation
6999
.NET and Web services, .NET Developer’s Journal
����������
���� �������
�������������������������������������������������������
��������������
�����������������������������������������������������
���������������������������������������������������������� �������������������
������������������������������������� �������������������������������
����������������������������������������������������������������������
������������������������������������������������
�����������������������������������������������
������������������������������� ��������������������������������
�������������������������������������������������������������� �������
�����������������������
�����������������������������������������������������������������
��������������������������������������������������������������� ��������������������������������
�������������������������������������������������������������� �������
����������������������������������������������������������������������� ����������������������
� � � �� ����������������������������������������������������������������
�����������������������������
������������������
��������������������������������������������������������������������� �������������������������������������������������������������� �������
������������������������������������������������������������������������ �������������������
������������������
���������� ��������������������������������������������
������������������������� ���������������������������
������������������������������������������������������������������������������������������������������� ��������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������� ���������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������������ �������������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������������� �������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������� �����������������������������������������������������������
����������������������������������������������������������������������������������������������������
����������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������
����������������������� �����������
��������������������������������������
��������������������������������������
����������������������������������������������������������������������������������������������������
������������������������ ��������������������������������������������������������������������������������������������������������
�������������������������������������������������������������������������������������������������
������������������������ ���������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������� ��������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������������� �������������������������������������������������������������������������������������������������������
�������������������������������������������������������������������������������������������������� ���������������������������������������������������������������������������������������������������
��������������������������������������������������������������������������������������������������� ��������������������������������������������������
�����������������������������������������������������������������������������������������������������
����������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������������
�������������������������������������������������������������������������������
�� �� ��
������������
����������������������������
������������� �����������������������������������������������������������������������������������������������������������
������������������������������������� �������������������������������������������������������������������������������������������������
�����������������������������������������������������������������������������������������������������
����������������������������������������������������� ������������������������������������������������������������������������������������������������������
�� �� �� ��������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������� ����������������������������������������������������������������������������������������������������
��������������������������������������������������������������������������������������������������� ���������������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������������� ���������������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������������� ��������������������������������������������������������������
�����������������������������������������������������������������������������������������������������
�������������������������������������������������������������������������
�� �� �� ������������
����������������������������������������
��������� ��������������������������������
����������������������������������������������� ��������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������
����������������������������������������� ���������������������������������������������������������������������������������������������������
����������������������������������������������������������������������������������������������� �����������������������������������������������������������������������������������������������������
����������������������������������������������������������������������������������������������� ������������������������������������������������������������������������������������������������������
����������������������������� ��������������������������������������������������������������������������������������������������
�������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������������������
�����������������������������������������������������������������������������������������������������
����������������������������������������������������������������� �������������������������������������������� ����������������������������������������������������������������������������������������������
��� �����������������������������
� ���������������������������������������������������������������������
i
f you work in a .NET envi- shot in Figure 2 I decode the Base64 as a JPEG image. If you can encode
ronment you have prob- encoded strings back to their original the image as a Base64 string, then
ably come across Base64 byte arrays, using both the built-in you can send the image just like any
encoded data. For example, .NET Framework method and my cus- other message. Another common
Base64 encoding is used in ASP.NET tom implementation, and display in example is sending an ASP.NET Web
for a Web application’s ViewState hexadecimal form. The complete pro- application’s ViewState value (which is
value, as shown in Figure 1. Base64 gram, which produced the screenshot a binary value representing the overall
encoding is also used to transmit in Figure 2, is presented in Listing 3. state of the application) over HTTP
binary data over e-mail. However, if (which is an inherently text-based
you are like most of my colleagues What Is Base64 Encoding? transport protocol). But why go to
(and me until recently) you do not Exactly what is Base64 encod- the trouble of Base64 encoding when
have a thorough understanding of ing? Base64 encoding is a scheme “ordinary” encoding already exists?
precisely what Base64 encoding is that encodes arbitrary binary data as By ordinary encoding I mean regular
and when Base64 encoding should be a string composed from a set of 64 hexadecimal encoding. For example,
used. In the this article I will explain characters. The exact character set can the 40-bit binary data above can be
exactly what Base64 encoding is, be any 64 distinct ASCII characters, represented as a hexadecimal string:
show you how to use the two primary but by far the most common set is 48 65 6C 6C 6F (where the spaces
.NET Framework methods that sup- “A” through “Z,” “a” through “z,” “0” are included just for readability).
port Base64 encoding and decoding, through “9,” “+,” and “/.” For example, The answer is that Base64 encoding
and present a lightweight, custom C# using this character set the 40-bit is more efficient than hexadecimal
implementation of Base64 encoding data: encoding in the sense that Base64
and decoding methods. This article encoding requires fewer characters to
assumes you are a .NET developer, 01001000 01100101 01101100 01101100 represent the same data. Notice that
tester, or manager and have interme- 01101111 the hexadecimal encoding of the 40-
BY JAMES
diate level C# coding skill. After read- bit data above requires 10 characters
McCAFFREY
ing the article you’ll have a solid grasp can be Base64 encoded as the string: while Base64 encoding requires only 8
of Base64 encoding as well as the abil- characters – a 20 percent reduction.
ity to write your own custom encoding SGVsbG8= Because Base64 encoding only
methods. I think you’ll find the ability uses 64 characters, any of the charac-
to use Base64 encoded data is a valu- The trailing “=” character is a ters can be represented with just 6 bits
able addition to your skill set. padding character as I will explain because 26 = 64. Or, put another way,
The best way to show you where shortly. After seeing Base64 encoding using 6 bits you can represent data in
I’m headed in this article is with a for the first time, most engineers have the range 000000b to 111111b, which
screenshot. If you examine Figure 2 an immediate question: Why would is 0d to 63d. This is the key to Base64
you’ll see that I start with the arbitrary anyone want to use Base64 encod- encoding efficiency. The best way to
string “Hello” and use it to generate ing? Base64 encoding is useful when explain how Base64 encoding works is
some binary data. After displaying the you want to transmit binary data over with a picture as shown in Figure 3.
starting binary data in hexadecimal a communication channel that is Suppose the first three bytes of
form, I convert the binary data to a designed to transmit character data. input to be encoded are 48h, 65h,
Base64 encoded string using a method For example, consider e-mail. The and 6Ch. In Figure 3 these values are
from the .NET Framework, and also e-mail protocol SMTP was originally shown in their binary representation:
using my custom encoding method. designed to send and receive only 01001000, 01100101, and 01101100.
Notice the encoding results are the simple text data. However, suppose The first six bits of input, 010010,
same. In the next part of the screen- you want to transmit binary data such have value 18d, which in turn maps
int numBlocks; // pad the resultChars array tail with ʻ=ʼ chars
int padBytes; if (padBytes == 0)
;
if ((value.Length % 3) == 0) else if (padBytes == 1)
{ resultChars[numBlocks * 4 - 1] = ʻ=ʼ;
numBlocks = value.Length / 3; else if (padBytes == 2)
padBytes = 0; {
} resultChars[numBlocks * 4 - 1] = ʻ=ʼ;
else resultChars[numBlocks * 4 - 2] = ʻ=ʼ;
{ }
numBlocks = 1 + (value.Length / 3);
if (last == -1)
byte[] resultBytes = new byte[numBlocks * 4]; padCount = 0;
char[] resultChars = new char[numBlocks * 4]; else if (last == s.Length - 1)
try
int numBlocks = s.Length / 4;
{
byte[] result = new byte[numBlocks * 3];
Console.WriteLine(“\nStart Base64 encoding demo\n”);
result[i * 3 + 0] = Console.WriteLine(“===============\n”);
(byte)((scratch[0] << 0x02) |
(scratch[1] & 0x30) >> 4) ;
string s1 = Convert.ToBase64String(b);
result[i * 3 + 1] =
Console.WriteLine(“ Using Framework the Base64 encoding
(byte)((scratch[1] & 0x0F) << 4 |
is: “ + s1 + “\n”);
(scratch[2] & 0x3C) >> 2);
string s2 = MyConverter.ToBase64String(b);
result[i * 3 + 2] =
(byte)((scratch[2] & 0x03) << 6 | scratch[3]); Console.WriteLine(“ Using custom method Base64 encoding
is: “ + s2 + “\n”);
} Console.WriteLine(“===============\n”);
else Console.ReadLine();
return 0; }
} } // Main()
m
ost organizations today and allow the engineer to study the
have internal applications electrical response based on certain
that span across differ- input signals without even touching
ent systems, networks, the soldering iron.
and technologies. These applica- ADI faced several ongoing chal-
tions would provide more value to lenges that impeded their online tool
customers if only the data that they development. First, tools were often
manage were exposed. In the past, tightly coupled around a particular
this was often difficult due to the product or small group of products.
inability of systems to communicate organizations to build service wrap- These tools provided value to the cus-
with one other. However with Web pers around existing functionality, tomer for a particular part but did not
service standards in place for sev- thereby getting more value out of scale to support multiple parts within
eral years now, services are finally existing systems. Finally, services a given product line. It would often
gaining acceptance throughout the are decoupled from consuming take many months before a new tool
industry. Consequently, service- applications, allowing them to be could be created for new or emerging
oriented architectures (SOAs) have built independently of one another. products.
finally come to fruition as compa- The remainder of this article will Another problem the com-
nies start to rethink how they build explain how the aforementioned pany faced is that the information
enterprise applications. concepts apply to a real-world SOA required building design tools for
In the past, organizations implementation recently built by customers resided within different
typically approached large-scale Analog Devices. existing internal applications and
development efforts as one mono- systems. As with most large organi-
lithic project. This was often due The Need for a Service-Oriented zations, ADI suffered from the dis-
to constraints of the underlying Architecture semination of data throughout their
technology as well as the difficulty Analog Devices, Inc. (ADI) designs, organization. The company needed
of making systems communicate. If manufactures, and markets high- a way to encapsulate the common
applications did communicate, they performance analog, mixed-signal, functionality required by all design
BY BRIAN WILSON
were invariably tightly coupled. and digital signal processing (DSP) tools and make it available for
The concept of SOAs has integrated circuits (ICs) used in signal reuse.
changed the model of large-scale processing applications. ADI’s target Finally, ADI was looking to
application design. Web service audience comprises design engineers leverage a third-party applica-
standards now provide the ability who evaluate semiconductor products tion to build simulation engines
for companies to build core services for many different applications. In that would provide the core value
that provide both business agility an effort to support these customers, for their online design tools. The
and functional reuse; as a result, the company constantly builds Web- product of choice was National
applications become thinner by based design tools to allow for prod- Instrument’s LabVIEW, a powerful
nature and rely on integrated ser- uct evaluation prior to purchasing. third-party application that pro-
vices to do the heavy lifting. These design tools simulate the elec- vides a sophisticated tool suite to
Web service standards also allow trical behavior of an integrated circuit build test and simulation applica-
Advertiser Index
ADVERTISER URL PHONE PG
�� ���������������������������
�������������������������
� �������������������������
� �������������������
� ������������ �
���������������������������������2�3���� ���������������
�� ��������������������������������������������
��������������������������� ��
��
�����������������������
���������������������������
�� ��������������������������������������������
�� ������������
���������������������� ��
��
�������������������������������������������������
����������������������������
������������������������������������������������� �� ��������������������
���������������������������������������������������������������� �� ������������
�� �������������
�������������������������������������������������������������������������������������������������������� �� ����������������������������������
�������������������������������������������������������������������������������������������������������� �� ���������������������������
������������������������������������������������������������������������������������������������� �� �����������������������
��������������������������������������������������������������������������������� �� �����������������
�� �� ����������������������������������
��������������������������������������������������������������������������������������������������������� �� �������������������������������������
������������������������������������������������������������������������������������������������� �� �������������������������������
���������������������������������������������������������������������������������������������������������
�����������������������������������������������������������������������������������������������������������
���������������������������������������������������������� �������� ����������������������������������
ALL RIGHTS RESERVED
� ��������������������������
�����������������������������������������������������������������
�������� ����������������������������������
���������������������������������������������������������������������� � ����������������������������
��������������������������������
�� �������� ����������������������������������
COPYRIGHT ©2006 SYS-CON MEDIA
������������������������������������������������������������������ � ���������������������������
�������������
������������������������������������������������������������������������� �������� �����������������������������������������������
����������������������������
������������������������������������������������������������������ � ����������������������������������������������
������������������
������������������������������������������ �� ����������������������������������������������
����������� � ����������������������������������������������
���
����
���
��
���
���� �����
���
�
���
���
��
����
���
���
�
���
��
���
���
���
���
��
�����
��
�
������������
������������
����������
�����������
�������������������������������������
����������������������������������������������� �������������
���������������������������������������������������������������������������������������������������������
����������������
�������������������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������������������
������
�������������������
���������������������������������������
���������������������������������������������
�������������������������������������������������������������������������������������������������������� ���������������������������������������������������
������������������������������������������������������������������������������������������������������������
�����������������������������������������������������
����������������������������������������������������������������������������������������������������������
������ ���������������������������������������������������
���������������������������������������������
������������������������������������������������������������������������������������������������������ ���������������������������������
�����������������������������������������������������������������������������������������������������������
�������������������������������������������������������������������������������������������������������������
���������������������������������������������������
���������������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������������������������
�������������������������������������������������������������������������������������������������������
�����������������������������������������������������������������
�����������������������������������������������������������������������������������������������������������������
������������������������������������������������������������������������������������������������������������ ����������������������������
������������������������������������������������������������������������������������������ ���������������������������
������������������������������������
�������
������������ ��������������� ����������� ������������
������ ��������� �������� ������
������������������������������������������������ ������������������������������������������������� ��������������������������������������������� �����������������������������������������������
��������������������������������������������� ����������������������������������������� ���������������������������������������������������� �������������������������������������
������������������������������������������� ������������������������������������������� ��������������������������������������������
������������������������������������������ ��������������������������������������������� ���������������������������������������������������
����������������������������������������������� ����������������� ���������������������������������������������
������������������������������������������������������������ �������������������������������������������������������������������
���������������������������������������������������������������������� ���������������������������������������������������������������
����������������������������������������������������������������� ������������������������������������������������������������������
����������������������������������������������������������������� ��������������������������������������������������������������������
������������������������������������������������������������������� �����������������������������������������������������������������
����������������������������������������������������� ����������������������������������������������������������������
�����������������������������������������������������������
������������������������������������
���������������
������������������������������
����������������������������������������
��������������������������������������
������������������������������������������������ ������� ��������������������������� �����������������
���������������������������������������
�������������������������������������� �����������������
������������������������������������������������ �������
���������������������� ����������������������� ���������������������
����������������������������������� ����������������������� �����������������������������
������������������������������������
ALL RIGHTS RESERVED
��������������������������������������
Book Review
t
he authors of this book, The chapter on remoting shows
Edd Dumbill and Niel how to display ASP.NET Web pages
Bornstein, are well using the Mono Web Server, XSP.
known in both the Linux It also covers sockets and remot-
and .NET communities, and are ing, and touches on security and
well suited to write a book on the cryptography. This chapter also
Mono project. Edd Dumbill also includes a short introduction to
coauthored Linux Unwired and database access using .NET, includ-
XML-RPC, and is an Editor at Large ing how to create, connect to, and
for O’Reilly books. Niel Bornstein work with MySQL databases, as
also wrote .NET and XML, and is well as disconnected databases.
now a consultant for Novel in the Although this section is well writ-
Linux and open source practice ten, anyone doing any significant
group. database programming will need
This book is one of the O’Reilly other books to fully understand
series of “Developer’s Notebooks,” how to use databases in .NET and
so it is basically a cookbook of Mono.
Title: Mono: A Developer’s Notebook
“how-tos” and is intentionally thin The final chapter is on
Author: Edd Dumbill and Niel M. Bornstein
on theory. This allows the book advanced topics, including config-
Publisher: O’Reilly
to concentrate on the details of uring and building projects under
ISBN #: 0-596-00792-2
exactly how to perform common Linux using config and make, a
tasks; for instance, the book gives Price: US $24.95 section with hints on writing code
the commands needed to download to work on both Windows and
and install Mono, and to compile such as working with files, strings, Linux, running Java code in .NET
and run a simple program on the and regular expressions, but these using IKVM, the Mono basic com-
three main supported platforms: are some of the areas where many piler, and compiling to take advan-
Windows, Linux, and Mac. The developers will hit their first snags, tage of generics.
format used in most of this book is and those snags are what this book The purpose of this book is
to present a “lab exercise” type of is designed to help with. It also to help developers get up to speed
BY DENNIS HAYES task, and then give the solution to covers two of the Mono tools, the on using Mono. It is an excellent
the task in two to four parts. After a disassembler for looking inside book for Linux developers who
Dennis Hayes is an independent description of a task, the first part assemblies, and NUnit for testing. want to learn enough .NET to
software consultant in Atlanta, GA, is a “How do I do that” section that The area with the most extensive get started. It is an excellent book
and has been involved with the shows exactly how to complete coverage is on how to use Gnome for Windows programmers who
Mono project for over three years. the task. The next section, “How it and GTK# for writing GUI interfaces want to get started with .NET on
works,” talks a bit more about how under Linux. The GTK# API is popu- Linux, because it gives details on
4dennisdotnet@yahoo.com the .NET classes work, things to lar with developers coming from a how to install and configure Mono,
watch out for, and often a bit of his- Linux background. The book covers and compile and execute pro-
tory about why a function behaves Linux Gnome tools such as Glade grams in a Linux environment. It
as it does. Some tasks also have a for layout, DocBook for help, Gecko, does this in a very cookbook style
“What about” section that covers GConf, drag and drop, and interna- that does not assume any previous
some “gotchas” or advanced appli- tionalization. When this book was knowledge of Linux. This book is
cations of the technique just dis- written, System.Windows.Forms was not for beginning programmers
cussed. Most tasks conclude with still far from complete, and so it is – it is too shallow and concise for
a “Where to learn more” section, mostly absent from this book. that. This book is meant for expe-
which references the MSDN library As you would expect from these rienced developers who just need
or Internet sites where more infor- two authors, XML is fully covered, a little help with some specific
mation and details can be found. including reading and writing XML tasks.
The book gives an overview of files, the DOM classes, validating I would rate this book a “must
Mono, C#, and the NET framework; XML with DTDs, and serializing have” for programmers getting
it is enough to get started, but and deserializing C# classes to and started with Mono and .NET on
everyone will need more complete from XML files. .NET uses XML in Linux, and the wallet-friendly price
references to complement this many ways, and this book gives a of $24.95 makes this book a real
book. The chapter on the .NET good overview of how to use most of bargain that will pay for itself sev-
framework only covers a few areas them. eral times over.
Website Today!
���������������������������������
���������������������������
24/7
����������������
������������������������������������������
���������������������������������������������������
����������
�������������������������������������������������������������������������������������
�������������
����������������������������������������������������������������������������������������
��������
������������������������������������������������������������������
��������������������
����������
���������������������� ��������������������������������������������������
������������������ ����������������������
������������������������������������ ������������������������������ ��������
��� ����������� �������������������������������������������������������������
�������������������� ������������������������������ �
������������������������ ��������������������������� ����������
������������������� ����������������� ������������������������������������������������������������������������������
������������������� ����
��������������������������� ��������������������������������
��������������������
�����������������������������������������������������������������������
������������������������������������������
Mono
t
he 1.1.13 version of Mono of access to Intel-based Macs is also Objective C user interface to the C#
has also been released. delaying the porting process, but the back end. There is an interesting
This version will be Mono team is beginning to get more article on it in at http://developer.
shipped with Novel/Suse access to Intel-based Macs. Fixing all apple.com/business/macmarket/
Enterprise products. It also serves as of this will take several months, but imeem.html. (The imeem applica-
a feature freeze point for the upcom- it is being worked on, and Mono will tion is free, and can be downloaded
ing major 1.2 release, with the soon run on Intel-based Macs. from their home page www.imeem.
exception of System.Windows.Forms For Macs running on PowerPC, com). They have also released the
(SWF) and libgdiplus, which are still there is an open source (LGPL) framework under the LGPL, and you
being developed. The 1.1.13 branch framework called Dumbarton, can download the source from their
will also receive back-ports of all which bridges Objtive-C and C#. It developers page, as well as find out
bug fixes until it is replaced with the was written by imeem in response more about it, at www.imeem.com/
1.2 version. 1.1.13 is mostly bug fixes to a need they had while writing developers.aspx.
(including hundreds in the SWF an application with a complex user
namespace). The main additions to interface that needed to run on both Pnet
this release are a completed 64 bit Macs and Windows. The application The new version of Portable.NET
S390 port, an implementation of the connects to a server and provides contains a lot of fixes and enhance-
new 2.0 System.Threading primi- ments in all parts of the project, over
tives, updates to System.Net.Mail 150 in all. More than a third of the
and System.Net.Mime, and typed changes were in System.Windows.
data returns for Sqlite 3. One major Forms, which received more than
enhancement is the inclusion of a 50 changes in this version. One big
printing framework for SWF. This change is that gcc4 can now be used
will not be really usable until Cairo for building Portable.NET.
is updated, but it is still a milestone I A complete list of the improve-
have been looking forward to seeing. ments and downloads of the pro-
More than 70 people worked on this grams and source code can be found
release. at http://dotgnu.org/pipermail/
Scott Hanselman does pod- developers/2006-January/000162.
BY DENNIS HAYES casts and he did one on Mono at html.
http://perseus.franklins.net/han-
Dennis Hayes is an independent selminutes_0005.mp3. Even more Odds and Ends
software consultant in Atlanta, GA, interesting, he has a screencast a wide range of services, such as LSharp is an open source Lisp-
and has been involved with the that shows how to develop using blogging, podcasting, chat, photo like interpreter for .NET. It started out
Mono project for over three years. Mono, then deploy on Windows, or sharing, and others. They felt that running on Microsoft.NET 1.1, but
develop on Windows, then run on the user interface for such an appli- has been updated to .NET 2.0, and
4dennisdotnet@yahoo.com Mono. The screen cast is at www. cation would be complex enough now runs on Mono, with a few rough
hanselman.com/blog/MonoAndIts using a native look and feel, without spots. More information, downloads,
ManyFacetsScreencast.aspx. It is a having users deal with a non-native and tutorials on using Lisp can be
small demo that uses only a simple look and feel. They needed a ver- found at www.lsharp.org.
console application, but if you have sion of Mac, and Windows, but were Sharpdevelop released beta 1 of
never seen a single .exe run on both OK with the Linux version using the SharpDevelop2. One big change is
Windows and Linux, it is worth Mono SWF interface. Their solution that this version is released under
checking out. was to use C# on the server back the LGPL, not the GPL you would
end, and to put as much code as expect. The reason for this is that
Mono on Mac on Intel possible into this back end. They Sharpdevelop is meant to be very
Does Mono work on the new then wrote separate interfaces for extensible, and LGPL allows exten-
Intel based Macs? Not very well, but Windows and Mac. They wrote sions to be closed source. Other
it will. Currently, only the JIT com- the Windows interface in C# using additions are support for code
piler works, and even that does not Visual Studio, SWF, and the Mac coverage and the Mono GAC. It
support garbage collection, so most interface in Coca using Xcode can be downloaded from www.
applications will crash after run- and Objective C. They then wrote icsharpcode.net/OpenSource/SD/
ning a while. There are issues with a framework called Dumbarton Download. It supports the .NET 1.1
stack definitions breaking calls to (named after a bridge in the San Framework, but requires the 2.0
DLLs, and many install issues. Lack Francisco area) that connects the Framework to be installed.