Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Programming Books Media Book Reviews IT Technology

Practical Mono 110

hisham writes "At first glance, you would think that Practical Mono is yet another introductory book about C# and Mono, but all of that drastically changes the moment you look at the book's table of contents and see the variety of topics it covers and the lengths to which the author goes to describe the more important details." Read the rest of Hisham's review.
Practical Mono
author Mark Mamone
pages 402
publisher APRESS
rating Excellent
reviewer Hisham Mardam Bey
ISBN 1-59059-548-3
summary Takes the readers from an introduction to .NET, Mono, and C# to their most advanced features using a real world approach.


The book gently eases the into what .NET and Mono are giving a historical background for each. What I found very interesting is the fact the author takes time to explain about .NET in the real world, and ties this to Mono to give the reader a clear idea of how any why Mono was started and what the reader can do to participate in this effort.

Since a lot of people using Mono might be coming from a traditional .NET environment, the author expects those people to be used to certain development tools. To that effect, the second chapter in the book is dedicated to introducing the reader to development tools that can be used with Mono, especially Mono Develop. This gives the reader some heads up about what can be used instead of their conventional development tools and makes sure you start off on solid grounds.

Having gotten the user all set up and ready for action, the book then moves on to introduce the author to C#. This is a subtle introduction that eases the user into what C# is and how the language works. Chapter 3 comes in very handy when you want to brush up on your C# skills or are new to C#. the author continues to give the reader more information about C# in a more detailed fashion in Chapter 4, "Learning C#: Beyond the Basics". This chapter goes into some nitty-gritty detail about C# classes, exceptions, and all round more advanced C# topics.

Chapter 5 moves into the more exotic areas of .NET that deal with the CLR, IL, assemblies, and the general assembly cache (GAC). This chapter is very helpful if the reader wishes to acquire in depth info of how the .NET environment works. Other discussed topics here are garbage collection, application domains, and the class library. This is one of those chapters that make this book an excellent recommendation for both novice and advanced users of C# and .NET.

The first 5 chapters have made sure the user is very knowledgeable about what Mono is, what .NET is, what C# is, and how all of them relate to each other. They have also explained C# and introduced the reader to its syntax and advanced features. Starting with Chapter 6, the "Practical" bit from the books title starts to kick in quite strongly. If its a book with both theoretical and real world information that you want, then the coming chapters are really going to quench your thirst.

Chapter 6 goes right into the heart of on of .NET's most desired features, Windows Forms. The author explains what Windows Forms is, what GDI+ is, how to implement a good user interface, and gives real world examples of how to do all of that introducing the reader to Windows Forms' various controls. A nice section that is mentioned in several chapters is the "Whats New in Version 2.0?" section that informs the reader about what to expect in the new version of .NET in regard to that particular topic.

Because the author knows that not all people will be using Windows Forms to design their graphical interfaces, he goes into GTK+ and Glade and takes up a complete chapter explaining what they are and how they can be used instead of Windows Forms. Chapter 7 serves as a gentle introduction to the GTK+ and Glade world, and makes sure the uses knows how to pick between Windows Forms and the GTK+ / Glade combination.

After finishing Chapter 7, the user has a very good idea about how to design a complete graphical user interface using freely available tools (Windows Forms in Mono, and GTK+ / Glade using GTK# in Mono). The author now moves on to describe ADO.NET, a heavily used feature of .NET which is also available through Mono. This chapters enlightens the reader and explains all aspects of using ADO.NET in applications to connect and utilize databases. The particular example is geared towards installing MySQL. Explanation is given both for Linux and Windows, which also shows that Mono can be used as a .NET alternative on Windows.

Since XML is constantly referred to as a "hot topic", the author does not let us down and dedicates a complete chapter to discussing XML and Mono. If the reader is new to XML, then he / she will be pleased to find out that an explanation to what XML is and its history is given at the beginning of Chapter 9: Using XML. The chapter deals with looking at XML documents and traversing them. The author shows us a real world example by applying this knowledge to create an RSS feed class library.

Chapter 10 is for those of us with enthusiasm for networking and remoting. This chapter, "Introducing Networking and Remoting", starts by explaining what networks are and their general concepts, then dives into how we can do networking related programming in .NET. We apply this knowledge later on and create an RSS feed handler.

Another heavily used feature in .NET is ASP.NET. Chapter 11: Using ASP.NET, explains what ASP.NET is, how it works internally, and how to use it. This chapter shows the reader how to set up a web server for ASP.NET (both the XSP web server and an external web server) and moves on to show the user how a web service can be written. A lot of readers will find this chapter very useful as web services seem to be an increasing and expanding field right now.

Finally in Chapter 12: Using Advanced Mono Techniques, the author dives into such topics like performance tuning, reflection, and using threads. Advanced readers will particularly like this chapter as it handles some of the "harder" more demanding features of .NET.

This book not only serves as a great learning experience that shows you how things are done in the real world, it also as a general good reference for C#, .NET, and Mono and several of their features. Definitely one you should have in your bookshelf right by your work desk.

I enjoyed reading Mark's book, and I would recommend it to people that are either getting into .NET / Mono or have some experience but would like to further it."


You can purchase Practical Mono from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.

Practical Mono

Comments Filter:
  • Nope... (Score:5, Funny)

    by connah0047 ( 850585 ) on Monday January 30, 2006 @01:47PM (#14600247)
    At first glance, you would think that Practical Mono...

    No...at first glance, I think this is a book about how to get the kissing disease easier.
    • Shame on you. I can't believe you would turn down such an opportunity. Especially when the first step is, "Find a girl!" :-P
    • No...at first glance, I think this is a book about how to get the kissing disease easier.

      Learning C# will make it more likely to kiss girls?

      I am SO confused.
  • by TheRealMindChild ( 743925 ) on Monday January 30, 2006 @01:47PM (#14600248) Homepage Journal
    "Once, I thought I had mono for an entire year. Turns out I was just really bored"
  • by DoofusOfDeath ( 636671 ) on Monday January 30, 2006 @01:50PM (#14600271)
    I see that this is book is of industry-standard quality, then:
    Having gotten the user all set up and ready for action, the book then moves on to introduce the author to C#.
  • Subject says it!
  • That sounds along the same lines as Practical Herpes!
  • by gasmonso ( 929871 ) on Monday January 30, 2006 @01:51PM (#14600285) Homepage
    "If you are an experienced C# developer looking to move to Mono for Linux support, this is NOT the book for you. It is a very basic level introduction to development using Mono and C#. It also contains several editing and content mistakes including misplaced screen shots, and simple factual errors such as describing INSERT and UPDATE as DDL and SELECT as DML (they are all DML). Frankly I expected more from APress."

    This was taken from a review on Amazon that people may find useful.

    http://religiousfreaks.com/ [religiousfreaks.com]
  • MonoDevelop? (Score:2, Insightful)

    by aCapitalist ( 552761 )
    Since a lot of people using Mono might be coming from a traditional .NET environment, the author expects those people to be used to certain development tools. To that effect, the second chapter in the book is dedicated to introducing the reader to development tools that can be used with Mono, especially Mono Develop.

    Bahaha. Mono is a deployment option for windows developers. Nobody in their right mind uses MonoDevelop when they can use VS.NET
    • Not always.

      We are using Mono for an internal Research and Development effort where we are operating under a few constraints:

      1. As cheap as possible.
      2. Open source where possible.
      3. Relevant to our programs that have commercial solutions available to them and where acquisition decisions aren't under our control.

      What that means is that for our R&D effort, we are not going to be able to use VS.NET, but we have programs that will require our development team to be familiar with C# and the .NET fr

    • Particularly because running the two on the same platform is a bit hard. Mono runs on windows, sort of, if you want to. But forget about getting any of the mono tools working on windows. And lets be fair, most people currently developing on visual studio are unlikely to run anything else than windows. So even if they wanted to, there's no way for them to even try out monodevelop short of installing linux.

    • "Since a lot of people using Mono might be coming from a traditional .NET environment"
      Because most of the Linux community considers Mono a waste of resources and cohorting with Satan...
  • Starting with Chapter 6, the "Practical" bit from the books title starts to kick in quite strongly. If its a book with both theoretical and real world information that you want, then the coming chapters are really going to quench your thirst.

    Whoa, for a minute there I thought this was a book about WINE. [winehq.com]
  • by cyberjessy ( 444290 ) <jeswinpk@agilehead.com> on Monday January 30, 2006 @01:55PM (#14600310) Homepage
    From the review, it seems that the book deals with very few Mono specific stuff, like XSP and gtk#. Everything else is common to both MS .Net and Mono. Which makes me wonder, what is the real worth of buying this book. There are so many excellent books available for .Net (Microsoft Press has some excellent titles. Generally I have found MS Press books to be excellent on MS topics), which will take you through the basics and even to tricky details of the CLR and IL. The remaining Mono specific stuff can be gathered from the Internet.

    So why buy this book? I would have bought one, if it talked more about Mono specific stuff. Like compatibility problems, challenges when building for .Net and Mono, more Linux specific stuff etc etc.
    • by CyricZ ( 887944 ) on Monday January 30, 2006 @02:22PM (#14600509)
      It could very well just be an attempt to squeeze more sales out of an existing .NET book by including a small amount of Mono-specific information.

      Then again, such extensions may not be overly practical. Developers writing software for the general public will often want their applications to also run on Windows, and hence they will ignore the Mono-specific capabilities.

      But also, if it takes much effort to move programs from .NET to Mono, many might just stick with targetting .NET. Others might say to hell with both, and use Java instead.

      Indeed, I would not purchase this book if it is 95% generic .NET material, and 5% Mono-specific. It'd be far better to get a book that is 100% Mono-specific, with perhaps a page or two introduction to .NET (and recommendations on books covering only .NET).

    • Because if I want to learn to program in .NET, why do I have to start with .NET then cross over to Mono? Why not learn on Linux to start with?
      • Indeed, an audience for this book would be existing programmers who are curious about .NET as a platform. Mono is as good as a choice as any to learn the concepts of CLR without Windows specifics. Further a book like this might help answer the viability of mono/.NET as a cross-platform alternative to Java.

        No need to run Windows, just apt-get install and within a few minutes you're running your first C# application. I hear Eclipse even has a C# plugin...
    • For you people looking for Mono-specific stuff, accu.org seems to "highly recommend": Mono - a Developer's Handbook by Edd Dumbill & Neil Borstein http://www.accu.org.nyud.net:8090/bookreviews/publ ic/reviews/m/m003690.htm [nyud.net] (CoralCDN:ized link)
  • by Anonymous Coward
    Here's a practical Mono question:

    If I need high performance out of something in C#/.Net, I can always write it in native C++ and package it up as a COM object. What would be an analogous concept in Mono? How does the Mono framework support native, unmanaged code?
    • (disclaimer: I haven't actually done this...)

      I imagine you'd use P/Invoke, just like you do under Windows. COM is no longer the preferred way to integrate managed/unmanaged code.

      --S
    • Mono has support for P/Invoke: // foo.cs // build with "mcs foo.cs -unsafe"

      using System;

      using System.Runtime.InteropServices;

      public class foo {

      [DllImport ("libc", EntryPoint="getenv")]
      private static extern string getenv(string s);

      public static void Main ()
      {

      Console.WriteLine ("Your home directory is {0}\n", getenv("HOME"));

      }

      }
    • If I need high performance out of something in C#/.Net, I can always write it in native C++ and package it up as a COM object.

      I don't see the point. C# on .NET is not that slow. I could understand needing to use native C++ if you were running something that was several times slower, but there really isn't that much difference between C# and C++. The use of unmanaged code is to allow legacy C++ code to run on .NET, and to allow all sorts of 'unsafe' things to be done. Performance is not a good reason to d
      • The use of unmanaged code is to allow legacy C++ code to run on .NET, and to allow all sorts of 'unsafe' things to be done. Performance is not a good reason to do this.

        So would a 3D video game's graphics or physics run acceptably fast in managed code (e.g. C# or managed C++) compared to unmanaged code?

        • People keep bringing up game programming, but its a poor example. Games are usually not written to be maintainable over the long term, and as such tend to use very ugly code to wring the last bit of performance out of the hardware (though this is getting more rare now as the GPU becomes more of a bottleneck than the CPU). If you're doing processor-specific scheduling, asm inner loops, etc, C# won't offer you the same level of performance. However, C# will get you most of the way to the same level as clean,
        • So would a 3D video game's graphics or physics run acceptably fast in managed code (e.g. C# or managed C++) compared to unmanaged code?

          Yes. Much of the 'management' can be optimised out by code analysis at runtime. I have seen reports of C# physics application running pretty close to C++ speed.
  • ". . . have made sure the user is very knowledgeable about what Mono is, what .NET is, what C# is, and how all of them relate to each other."

    In the same manner that the first 5 chapters of The Feynman Lectures on Physics makes one very knowledgeable about physics.

    Teach Yourself Programming in Ten Years [norvig.com]

    KFG
  • Finally in Chapter 12: Using Advanced Mono Techniques, the author dives into such topics like performance tuning, reflection, and using threads.

    Then what the hell are the basics? OK, I can just about let reflection pass, but a developer doesn't deserve to get above the rank of Junior or Beginner until they understand threads and performance tuning.

    Bob
  • This review is interesting, but very hard for the non-.NET indoctrinated to follow. Specifically, many terms go undefined, which is a particular problem for the review of a book aimed at MONO beginners. For example, what are:
    CLR
    IR
    GAC (I know what it stands for, but what does it do?)
    Since Chapter 7 is apparently about ADO.NET, it would be nice to give the reader a little sense of what this is.
    • Read the friendly book, my friend, that is why it was written!
    • CLR = Common Language Runtime. Basically, the .Net runtime environment. The Java equivalent is the JVM (Java Virtual Machine.)
      IL = Intermediate Language. This is the code generated by .Net compilers, and executed by the CLR.
      GAC = Global Assembly Cache. This is a special area for system-wide assemblies. They don't need to be in the same directory as the main assembly for a given program. Assemblies in the GAC also automatically recieve full trust.
  • ..is my big hassle with it. I installed SuSE 9.3 on a spare machine (yes I know v10 is out now), and nothing I did seemed to be able to get Mono to compile. I followed all the help/man pages, both on the mono site as well as Novell's site. Google, both web and newsgroups, was no help either.

    Maybe once I get some free time I'll wipe the machine and try again with SuSE 10, since I've heard that the Mono packages come bundled with it. I'll cross my fingers and hope that all the dependencies get satisfied
  • Mono . . . Aw, it's not for you. It's more of a Shelbyville idea.
    • Whoever modded me down as offtopic needs an attitude adjustment, or if humourous asides posted in /. are now offtopic, we might as well shut the damn server off now as that's 95% of the posts.

      Guess someone doesn't like Mondays :)
  • I was suprised when I got my ASP.NET application running without changes on my Linux Web Server. It turns out that most of .NET is implemented except for omissions like 'Enterprise Services' (Active Directory) in its place they have an LDAP namespace which you can use to talk to any LDAP-compatible directory (i.e. Novell Directory, Open LDAP, etc)

    But as a webdeveloper using ASP.NET you can consider it 'cross-platform', ASP.NET 1.1 is fully compliant and most of ASP.NET 2.0 is though you have to use the 'gmc
  • The Monoppix Project [monoppix.com] makes a Knoppix-based Live CD with the complete Mono development environment included. So if you want to give it a hassle-free try, go ahead!

"The medium is the message." -- Marshall McLuhan

Working...