Welcome!

Microservices Expo Authors: Derek Weeks, Liz McMillan, Elizabeth White, John Katrick, Pat Romanski

Related Topics: Microservices Expo

Microservices Expo: Article

The Hype About .NET

Eclipsing .NET

You've heard the hype about .NET. You've read a couple of vague articles about dynamic discovery and invocation, service-oriented architecture, and how SOAP and a handful of other XML standards are forever changing the software industry. These ideas have intrigued you and you're interested in learning more - or at the very least, you recognize the importance of being able to add these acronyms to your resumé. In either case, you want to explore the world of .NET, but are unable or unwilling to fork over a thousand bucks for Microsoft's Visual Studio .NET product. This article is for you.

The Eclipse Project
Visual Studio .NET is not the only option for exploring .NET in a commercial-quality integrated development environment (IDE); it's just the most expensive one. On November 5, 2001, IBM released the Eclipse project (with an estimated value of $40 million worth of software) to the open-source community. The project is now maintained by the Eclipse organization (www.eclipse.org). This open-source software provides a core, extensible infrastructure for building software development environments. It also provides a basic user interface and an open API that supports the extension of the product through its plug-in mechanism. Eclipse provides a framework for producing customized software development environments that can either be used internally by an organization or repackaged and sold commercially. In fact, the Eclipse framework is the foundation for IBM's new suite of WebSphere Workbench tools.

What does all of this have to do with .NET development? When you combine Eclipse (an open-source IDE) with Microsoft's .NET SDK (a free download) and the C# plug-in for Eclipse provided by Improve Technologies (also open-source), you have a comprehensive .NET application development platform that costs no money, and uses less than 400MB of hard disk space!

This article will walk you through the process of setting up a free C# .NET development environment on a Windows 2000 machine (the recommended platform) and deploying a simple C# application. This combination of tools will also work on Windows 95/98, XP, and NT 4.0 (the .NET SDK currently limits you to a Windows OS).

Environment Setup
Before starting, check Table 1 to be sure your system has the appropriate resources for this configuration.

Although the minimum and recommended values listed in Table 1 are accurate, you'll be much happier if you have more horsepower available. I'm running this configuration on a P4 1.6GHZ Dell Inspiron with 512MB and plenty of free hard drive space.

 

 

Assuming your system has the appropriate resources, you will need to download two components:

1.   The Eclipse 2.0 IDE (www.eclipse.org/downloads/index.php):Windows OS.

2.   The .NET Framework SDK ( http://msdn.microsoft.com/netframework/ downloads/howtoget.asp): Be sure to get the SDK, not just the runtime framework. You can download the SDK as a single 130MB file (setup.exe), or ten 13MB files and a batch file (setup.bat).

Once you've downloaded Eclipse and the .NET SDK, you can install the software. To install Eclipse, simply extract the Zip file in the parent directory where you would like to store Eclipse (it will create a new directory called "Eclipse"). To install the .NET SDK, run the setup file and follow the prompts to install and register the appropriate components. (You may be prompted to first install Data Access Components 2.7 and Microsoft Internet Information Services, but these components are only needed for ASP.NET development.)

Eclipse Primer
The Eclipse IDE (shown in Figure 1) is divided into two basic levels: the Workspace and the Workbench:

  • Workspace: Files, packages, projects, source control connections
  • Workbench: Editors, views, and perspectives

 

 

This division isn't readily apparent, and isn't labeled within the IDE, but it is an important distinction to understand when working with Eclipse or an Eclipse-based tool.

The Workspace is very team-centric, focusing on projects and file resources as well as providing integrated source-control capabilities for these resources, such as CVS or Rational's ClearCase. The Workspace is also somewhat transient in that it reflects the current state of the local projects, source, and compiled files that are in active memory. The Workspace also consists of currently active Workbench elements (explained below). When you close Eclipse, it saves the current state of the local Workspace, allowing developers to restart Eclipse and pick up right where they left off.

The Workbench consists of the visual artifacts that sit atop the Workspace resources and provide distinct views and role-based perspectives of the underlying projects and resources. The user interface paradigm is based on editors, views, and perspectives:

 

  • Editor: An editor is a component that allows a developer to interact with and modify the contents of a file (source code, XML file, properties file, etc.). This is the standard text area where application source code is modified within an IDE. Figure 2 is a screen shot of the C# editor, which we will install later.

     

     

     

  • View: Views provide metadata about the currently selected resource. This data is pertinent to, but not directly related to, the actual contents of the resource (the contents would be accessed via an editor). The outline of a resource's contents; the status of compilation, resource, and element properties; and the organization of a resource within a package or project are all examples of views within Eclipse.
  • Perspective: A perspective represents a configuration of related editors and views, as well as customized menu options and compile settings. Eclipse comes with three standard perspectives (CVS, Install/Update, and Resource), and the ability to plug in additional ones as needed. Switching between perspectives brings up different editors, views, and menu options. Perspectives are either tailored to a particular task, an application development role, or both.

    Installing the C# Plugin
    To install the Improve Technologies C# Plug-in, we will use the built-in update feature, the Eclipse update manager. To do so, you will need Internet connectivity, and to follow these steps:
    1)   Open Eclipse by running eclipse.exe in the base of the eclipse directory.

    2)   Open the Update Manager perspective (Help -> Software Updates -> Update Manager).

    3)   In the "Feature Updates" view (bottom left), right-click in the view window and select: New -> Site Bookmark...

    4)   Fill the Name field with "Improve's Eclipse Plugin Site", and the URL with "www.improve technologies.com/alpha/updates/site.xml". This XML file describes the plug-ins available for download from Improve Technologies, and will allow you access to those plug-ins now, and in the future.

    5)   A new bookmark, "Improve's Eclipse Plug-in Site," has been added. Expand it untill you find the newest Improve C# plugin feature ("C Sharp Feature x.x.x"). If you select the feature, its description will be displayed in the "Preview" view. You can read the license agreement by clicking the link.

    6)   In order to install the feature, click the "Install" button in the "Preview" view: click "Next" for each page; and then "Finish". On the last page ("Feature Verification"), click on the "Install" button. Eclipse will automatically install the feature, and you will be asked whether you want Eclipse to reboot or not. Say yes.

    7)   Once Eclipse has rebooted, you can check that the feature has been installed: expand the item "Current Configuration" (in the "Install Configuration" view), and you will find the feature in the list of the installed features. If you expand "Configuration History", you will see all the previous configurations. You can save a specific configuration so you can restore it later: right-click on a configuration and click "save".

    8)   The last step is to configure the new Eclipse C# perspective to use the .NET C# compiler that was installed with the .NET SDK earlier. To configure the C# compiler, navigate to the Eclipse Workbench preferences (Window -> Preferences) and select the C# Preferences item. This preferences window should now look similar to Figure 3. To specify the C# compiler (csc.exe), click the "Browse" button and navigate to the Microsoft .NET/Framework directory. On Windows 2000, that directory is C:\WINNT\Microsoft.NET\Framework\v1.0.3705\csc.exe. (The name of the directory under the Framework directory may vary depending upon what version of the .NET SDK you have installed.)

     

     

    Sample C# .NET Application
    Now we'll walk through the creation of an Eclipse project containing a single C# program. We'll verify our success by executing the completed program, and finally, we'll touch on a few of the available application development tools (keyword content assistance, task view usage, and file-level compiler arguments) that come with Eclipse and the C# plug-in.

    To begin, we'll open a new project. As with any good tool, there are several ways to do this. You can click the "New Wizard" button directly (leftmost button below the menu bar), select the New Wizard drop-down (the drop-down arrow on right-hand side of New Wizard button), or use the menu bar (FileNewProject). The New Project window should now be open. Select "Simple" on the left and "Project" on the right. Click the "Next" button, assign a unique name for the project, and then click the "Finish" button.

    Next, use the File menu or the New Wizard to create a new C# file. If you use the New Wizard drop-down or File menu, select the "Other" option (this is the equivalent of clicking the New Wizard button directly). Whichever path you take, the New window will provide two categories: C# and Simple. Select the "C#" category on the left and "C# File" on the right. Click the "Next" button and provide a name for the C# file. We'll use "CSharpTest.cs" for this example ("new_file. cs" is provided by default). Also, be sure that the correct project name is provided in the Container field. Finally, click the "Finish" button.

    Now it's time to actually write the program. Enter the code displayed in Listing 1. When run, this code constructs a simple object with a single instance field of type DateTime containing a value corresponding to the current system time and date. The program output consists of a brief text greeting followed by the current time and date.

    To save the file, click the disk icon at the top, use the menu system (FileSave), or hit Ctrl-S. When you save, Eclipse will also attempt to automatically compile the program (unless you turn this option off in the C# Preferences window). If there are any compilation problems, they will be displayed in the task view below the C# editor. Once you have resolved those issues, you are ready to execute the application. To do this, simply double-click on the CSharpTest.exe file that appears under the project you created. The result should be two lines of text. The first line displays a simple greeting and the second displays the time and date. To end the program, simply hit the return key.

    Finally, there are a couple of features in Eclipse that you may find useful:

     

  • Compilation settings: Eclipse stores file-level compiler settings, including compiler arguments, output file type, and the specification of required .NET modules.
  • Content assistance: Hitting Ctrl-Space activates the C# plugin's content assistance dictionary. This dictionary is currently limited to keywords only (version 2.0.1).
  • Task view: In addition to displaying compiler problems, the task view can be manually manipulated to serve as a way of tracking progress, and recording project notes. You can create tasks for yourself, assign priorities to your tasks, check them off when complete, and filter them to display only certain kinds of tasks. Think of it as a virtual sticky pad that is associated with your Eclipse Workspace.

    Conclusion
    Web services are hot! (That's why you bought this magazine.) The .NET platform offers some intriguing possibilities for the development of XML Web services, and it's a good idea to explore it now and become familiar with the basic constructs. Unfortunately, the price tag on Visual Studio .NET is high, and setting up Visual Studio is a pain in the neck. The Eclipse Workbench, together with Microsoft's .NET SDK and Improve Technologies' C# Plugin, provides a powerful combination of tools that allows you to experiment with C# .NET application development, using a full-powered IDE - without paying a penny. Enjoy!

  • More Stories By Kyle Gabhart

    Kyle Gabhart is a subject matter expert specializing in strategic planning and tactical delivery of enterprise technology solutions, blending EA, BPM, SOA, Cloud Computing, and other emerging technologies. Kyle currently serves as a director for Web Age Solutions, a premier provider of technology education and mentoring. Since 2001 he has contributed extensively to the IT community as an author, speaker, consultant, and open source contributor.

    Comments (14) View Comments

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    Most Recent Comments
    paul brown 12/04/03 06:42:49 PM EST

    in eclipse 2.1 with the c# plugin does it?

    where can i get the plugin files instead of using the update manager...i will try see if it makes a difference

    thanks

    Kyle Gabhart 11/24/03 11:21:47 AM EST

    As far as ASP.NET is concerned, neither Eclipse with a plugin, nor SharpDeveloper support ASP.NET. I recommend that you give WebMatrix a look: http://asp.net/webmatrix/default.aspx

    Linux is another story altogether. None of these solutions (Eclipse, #Develpoer, WebMatrix) will work since they all rely upon the .NET Framework SDK which has not yet been ported to non-Microsoft platform. To get the updates, check out the Mono Project: http://go-mono.com

    Cheers,

    Kyle Gabhart
    www.gabhart.com

    Michael 11/21/03 08:34:36 AM EST

    I would like to use this on Linux,
    But need more help setting it up.

    Anyone done this?

    Also How do you develop ASP.NET with this environt.

    Thanks
    Michael

    Kevin Moll 09/09/03 03:30:13 PM EDT

    Interesting..Need to evaluate to see if this works.

    Enrique Zamudio 07/30/03 08:52:00 PM EDT

    I tested the eclipse-c# plugin on Mac OS X. I couldn't install it with the update manager, but I got the plugin from Improve S.A. and dropped it in the plugins folder, and it works fine. I'm using DotGNU's Portable.NET and it can compile simple C# code withou any trouble.

    C#Coder 06/10/03 10:48:00 PM EDT

    SharpDevelop is a nice effort, but way too buggy for anything serious.

    George Dinwiddie 03/11/03 11:04:00 AM EST

    Why would it be hard to use seriously if NUnit isn't supported? Because once you try test-driven development, you don't want to go back to more primitive ways of working.

    So, has anyone used NUnit with the C# Eclipse plugin? At the line "using NUnit.Framework;" I get the error "error CS0246: The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?)."

    mark nuttall 01/03/03 08:33:00 AM EST

    Im wondering if NUnit integration has been attempted with Eclipse. If not, it would be hard to use C# in Eclipse seriously

    NUnit is a port of JUnit which comes built into Eclipse for Java development.

    Why would it be hard to use seriously if it isn't supported? How many developers really use JUnit let alone NUnit or anything like it? Yeah, it would be great if it did or does. And I'm glad it is important to you.

    Romu 11/28/02 03:46:00 AM EST

    See

    http://www.icsharpcode.net/OpenSource/SD/default.asp

    Romu 11/28/02 03:45:00 AM EST

    See link.

    Marcus Berglund 11/15/02 04:07:00 AM EST

    Does anyone know if there are any differences when setting up eclipse to do c# on other operating systems? (using mono or rotor).

    Gail 11/12/02 02:14:00 PM EST

    You should be able to access Listing 1 from the link at "Source Code" to the right of the article.

    Somik Raha 11/12/02 01:50:00 PM EST

    Hi,
    Im wondering if NUnit integration has been attempted with Eclipse. If not, it would be hard to use C# in Eclipse seriously.

    Regards,
    Somik

    Somik Raha 11/12/02 01:47:00 PM EST

    Hi,
    Nice article. I couldnt find listing 1 in any of the links..
    Also, when I run a program (double clicking on the exe created), it does not seem to wait for me to press enter. Is there anything I need to do to set that ?

    Regards,
    Somik

    @MicroservicesExpo Stories
    Some people are directors, managers, and administrators. Others are disrupters. Eddie Webb (@edwardawebb) is an IT Disrupter for Software Development Platforms at Liberty Mutual and was a presenter at the 2016 All Day DevOps conference. His talk, Organically DevOps: Building Quality and Security into the Software Supply Chain at Liberty Mutual, looked at Liberty Mutual's transformation to Continuous Integration, Continuous Delivery, and DevOps. For a large, heavily regulated industry, this task...
    Modern software design has fundamentally changed how we manage applications, causing many to turn to containers as the new virtual machine for resource management. As container adoption grows beyond stateless applications to stateful workloads, the need for persistent storage is foundational - something customers routinely cite as a top pain point. In his session at @DevOpsSummit at 21st Cloud Expo, Bill Borsari, Head of Systems Engineering at Datera, explored how organizations can reap the bene...
    Kubernetes is an open source system for automating deployment, scaling, and management of containerized applications. Kubernetes was originally built by Google, leveraging years of experience with managing container workloads, and is now a Cloud Native Compute Foundation (CNCF) project. Kubernetes has been widely adopted by the community, supported on all major public and private cloud providers, and is gaining rapid adoption in enterprises. However, Kubernetes may seem intimidating and complex ...
    Gaining visibility in today’s sprawling cloud infrastructure is complex and laborious, involving drilling down into tools offered by various cloud services providers. Enterprise IT organizations need smarter and effective tools at their disposal in order to address this pertinent problem. Gaining a 360 - degree view of the cloud costs requires collection and analysis of the cost data across all cloud infrastructures used inside an enterprise.
    You know you need the cloud, but you’re hesitant to simply dump everything at Amazon since you know that not all workloads are suitable for cloud. You know that you want the kind of ease of use and scalability that you get with public cloud, but your applications are architected in a way that makes the public cloud a non-starter. You’re looking at private cloud solutions based on hyperconverged infrastructure, but you’re concerned with the limits inherent in those technologies.
    Gone are the days when application development was the daunting task of the highly skilled developers backed with strong IT skills, low code application development has democratized app development and empowered a new generation of citizen developers. There was a time when app development was in the domain of people with complex coding and technical skills. We called these people by various names like programmers, coders, techies, and they usually worked in a world oblivious of the everyday pri...
    Our work, both with clients and with tools, has lead us to wonder how it is that organizations are handling compliance issues in the cloud. The big cloud vendors offer compliance for their infrastructure, but the shared responsibility model requires that you take certain steps to meet compliance requirements. Which lead us to start poking around a little more. We wanted to get a picture of what was available, and how it was being used. There is a lot of fluidity in this space, as in all things ...
    The dynamic nature of the cloud means that change is a constant when it comes to modern cloud-based infrastructure. Delivering modern applications to end users, therefore, is a constantly shifting challenge. Delivery automation helps IT Ops teams ensure that apps are providing an optimal end user experience over hybrid-cloud and multi-cloud environments, no matter what the current state of the infrastructure is. To employ a delivery automation strategy that reflects your business rules, making r...
    The notion of improving operational efficiency is conspicuously absent from the healthcare debate - neither Obamacare nor the newly proposed GOP plan discusses the impact that a step-function improvement in efficiency could have on access to healthcare (through more capacity), quality of healthcare services (through reduced wait times for patients) or cost (through better utilization of scarce, expensive assets).
    Admiral Calcote - also known as Lee Calcote (@lcalcote) or the Ginger Geek to his friends - gave a presentation entitled Characterizing and Contrasting Container Orchestrators at the 2016 All Day DevOps conference. Okay, he isn't really an admiral - nor does anyone call him that - but he used the title admiral to describe what container orchestrators do, relating it to an admiral directing a fleet of container ships. You could also say that they are like the conductor of an orchestra, directing...
    Cloud Governance means many things to many people. Heck, just the word cloud means different things depending on who you are talking to. While definitions can vary, controlling access to cloud resources is invariably a central piece of any governance program. Enterprise cloud computing has transformed IT. Cloud computing decreases time-to-market, improves agility by allowing businesses to adapt quickly to changing market demands, and, ultimately, drives down costs.
    For DevOps teams, the concepts behind service-oriented architecture (SOA) are nothing new. A style of software design initially made popular in the 1990s, SOA was an alternative to a monolithic application; essentially a collection of coarse-grained components that communicated with each other. Communication would involve either simple data passing or two or more services coordinating some activity. SOA served as a valid approach to solving many architectural problems faced by businesses, as app...
    SYS-CON Events announced today that Synametrics Technologies will exhibit at SYS-CON's 22nd International Cloud Expo®, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Synametrics Technologies is a privately held company based in Plainsboro, New Jersey that has been providing solutions for the developer community since 1997. Based on the success of its initial product offerings such as WinSQL, Xeams, SynaMan and Syncrify, Synametrics continues to create and hone in...
    Some journey to cloud on a mission, others, a deadline. Change management is useful when migrating to public, private or hybrid cloud environments in either case. For most, stakeholder engagement peaks during the planning and post migration phases of a project. Legacy engagements are fairly direct: projects follow a linear progression of activities (the “waterfall” approach) – change managers and application coders work from the same functional and technical requirements. Enablement and develo...
    The “Digital Era” is forcing us to engage with new methods to build, operate and maintain applications. This transformation also implies an evolution to more and more intelligent applications to better engage with the customers, while creating significant market differentiators. In both cases, the cloud has become a key enabler to embrace this digital revolution. So, moving to the cloud is no longer the question; the new questions are HOW and WHEN. To make this equation even more complex, most ...
    Recent survey done across top 500 fortune companies shows almost 70% of the CIO have either heard about IAC from their infrastructure head or they are on their way to implement IAC. Yet if you look under the hood while some level of automation has been done, most of the infrastructure is still managed in much tradition/legacy way. So, what is Infrastructure as Code? how do you determine if your IT infrastructure is truly automated?
    Every few years, a disruptive force comes along that prompts us to reframe our understanding of what something means, or how it works. For years, the notion of what a computer is and how you make one went pretty much unchallenged. Then virtualization came along, followed by cloud computing, and most recently containers. Suddenly the old rules no longer seemed to apply, or at least they didn’t always apply. These disruptors made us reconsider our IT worldview.
    As people view cloud as a preferred option to build IT systems, the size of the cloud-based system is getting bigger and more complex. As the system gets bigger, more people need to collaborate from design to management. As more people collaborate to create a bigger system, the need for a systematic approach to automate the process is required. Just as in software, cloud now needs DevOps. In this session, the audience can see how people can solve this issue with a visual model. Visual models ha...
    Containers are rapidly finding their way into enterprise data centers, but change is difficult. How do enterprises transform their architecture with technologies like containers without losing the reliable components of their current solutions? In his session at @DevOpsSummit at 21st Cloud Expo, Tony Campbell, Director, Educational Services at CoreOS, will explore the challenges organizations are facing today as they move to containers and go over how Kubernetes applications can deploy with lega...
    Nordstrom is transforming the way that they do business and the cloud is the key to enabling speed and hyper personalized customer experiences. In his session at 21st Cloud Expo, Ken Schow, VP of Engineering at Nordstrom, will discuss some of the key learnings and common pitfalls of large enterprises moving to the cloud. This includes strategies around choosing a cloud provider(s), architecture, and lessons learned. In addition, he’ll go over some of the best practices for structured team migrat...