Welcome!

Microservices Expo Authors: Yeshim Deniz, Pat Romanski, Todd Matters, Mark Leake, Stefana Muller

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
    Cloud Expo, Inc. has announced today that Andi Mann and Aruna Ravichandran have been named Co-Chairs of @DevOpsSummit at Cloud Expo Silicon Valley which will take place Oct. 31-Nov. 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. "DevOps is at the intersection of technology and business-optimizing tools, organizations and processes to bring measurable improvements in productivity and profitability," said Aruna Ravichandran, vice president, DevOps product and solutions marketing...
    "When we talk about cloud without compromise what we're talking about is that when people think about 'I need the flexibility of the cloud' - it's the ability to create applications and run them in a cloud environment that's far more flexible,” explained Matthew Finnie, CTO of Interoute, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
    For most organizations, the move to hybrid cloud is now a question of when, not if. Fully 82% of enterprises plan to have a hybrid cloud strategy this year, according to Infoholic Research. The worldwide hybrid cloud computing market is expected to grow about 34% annually over the next five years, reaching $241.13 billion by 2022. Companies are embracing hybrid cloud because of the many advantages it offers compared to relying on a single provider for all of their cloud needs. Hybrid offers bala...
    A common misconception about the cloud is that one size fits all. Companies expecting to run all of their operations using one cloud solution or service must realize that doing so is akin to forcing the totality of their business functionality into a straightjacket. Unlocking the full potential of the cloud means embracing the multi-cloud future where businesses use their own cloud, and/or clouds from different vendors, to support separate functions or product groups. There is no single cloud so...
    Containers, microservices and DevOps are all the rage lately. You can read about how great they are and how they’ll change your life and the industry everywhere. So naturally when we started a new company and were deciding how to architect our app, we went with microservices, containers and DevOps. About now you’re expecting a story of how everything went so smoothly, we’re now pushing out code ten times a day, but the reality is quite different.
    "We are a monitoring company. We work with Salesforce, BBC, and quite a few other big logos. We basically provide monitoring for them, structure for their cloud services and we fit into the DevOps world" explained David Gildeh, Co-founder and CEO of Outlyer, in this SYS-CON.tv interview at DevOps Summit at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
    21st International Cloud Expo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Me...
    If you cannot explicitly articulate how investing in a new technology, changing the approach or re-engineering the business process will help you achieve your customer-centric vision of the future in direct and measurable ways, you probably shouldn’t be doing it. At Intellyx, we spend a lot of time talking to technology vendors. In our conversations, we explore emerging new technologies that are either disrupting the way enterprise organizations work or that help enable those organizations to ...
    In 2014, Amazon announced a new form of compute called Lambda. We didn't know it at the time, but this represented a fundamental shift in what we expect from cloud computing. Now, all of the major cloud computing vendors want to take part in this disruptive technology. In his session at 20th Cloud Expo, Doug Vanderweide, an instructor at Linux Academy, discussed why major players like AWS, Microsoft Azure, IBM Bluemix, and Google Cloud Platform are all trying to sidestep VMs and containers wit...
    The taxi industry never saw Uber coming. Startups are a threat to incumbents like never before, and a major enabler for startups is that they are instantly “cloud ready.” If innovation moves at the pace of IT, then your company is in trouble. Why? Because your data center will not keep up with frenetic pace AWS, Microsoft and Google are rolling out new capabilities. In his session at 20th Cloud Expo, Don Browning, VP of Cloud Architecture at Turner, posited that disruption is inevitable for comp...
    For organizations that have amassed large sums of software complexity, taking a microservices approach is the first step toward DevOps and continuous improvement / development. Integrating system-level analysis with microservices makes it easier to change and add functionality to applications at any time without the increase of risk. Before you start big transformation projects or a cloud migration, make sure these changes won’t take down your entire organization.
    There's a lot to gain from cloud computing, but success requires a thoughtful and enterprise focused approach. Cloud computing decouples data and information from the infrastructure on which it lies. A process that is a LOT more involved than dragging some folders from your desktop to a shared drive. Cloud computing as a mission transformation activity, not a technological one. As an organization moves from local information hosting to the cloud, one of the most important challenges is addressi...
    What's the role of an IT self-service portal when you get to continuous delivery and Infrastructure as Code? This general session showed how to create the continuous delivery culture and eight accelerators for leading the change. Don Demcsak is a DevOps and Cloud Native Modernization Principal for Dell EMC based out of New Jersey. He is a former, long time, Microsoft Most Valuable Professional, specializing in building and architecting Application Delivery Pipelines for hybrid legacy, and cloud ...
    Companies have always been concerned that traditional enterprise software is slow and complex to install, often disrupting critical and time-sensitive operations during roll-out. With the growing need to integrate new digital technologies into the enterprise to transform business processes, this concern has become even more pressing. A 2016 Panorama Consulting Solutions study revealed that enterprise resource planning (ERP) projects took an average of 21 months to install, with 57 percent of t...
    Microservices are increasingly used in the development world as developers work to create larger, more complex applications that are better developed and managed as a combination of smaller services that work cohesively together for larger, application-wide functionality. Tools such as Service Fabric are rising to meet the need to think about and build apps using a piece-by-piece methodology that is, frankly, less mind-boggling than considering the whole of the application at once. Today, we'll ...
    In his session at Cloud Expo, Alan Winters, an entertainment executive/TV producer turned serial entrepreneur, presented a success story of an entrepreneur who has both suffered through and benefited from offshore development across multiple businesses: The smart choice, or how to select the right offshore development partner Warning signs, or how to minimize chances of making the wrong choice Collaboration, or how to establish the most effective work processes Budget control, or how to ma...
    Hybrid IT is today’s reality, and while its implementation may seem daunting at times, more and more organizations are migrating to the cloud. In fact, according to SolarWinds 2017 IT Trends Index: Portrait of a Hybrid IT Organization 95 percent of organizations have migrated crucial applications to the cloud in the past year. As such, it’s in every IT professional’s best interest to know what to expect.
    Both SaaS vendors and SaaS buyers are going “all-in” to hyperscale IaaS platforms such as AWS, which is disrupting the SaaS value proposition. Why should the enterprise SaaS consumer pay for the SaaS service if their data is resident in adjacent AWS S3 buckets? If both SaaS sellers and buyers are using the same cloud tools, automation and pay-per-transaction model offered by IaaS platforms, then why not host the “shrink-wrapped” software in the customers’ cloud? Further, serverless computing, cl...
    In the decade following his article, cloud computing further cemented Carr’s perspective. Compute, storage, and network resources have become simple utilities, available at the proverbial turn of the faucet. The value they provide is immense, but the cloud playing field is amazingly level. Carr’s quote above presaged the cloud to a T. Today, however, we’re in the digital era. Mark Andreesen’s ‘software is eating the world’ prognostication is coming to pass, as enterprises realize they must be...
    Colocation is a central pillar of modern enterprise infrastructure planning because it provides greater control, insight, and performance than managed platforms. In spite of the inexorable rise of the cloud, most businesses with extensive IT hardware requirements choose to host their infrastructure in colocation data centers. According to a recent IDC survey, more than half of the businesses questioned use colocation services, and the number is even higher among established businesses and busin...