Welcome!

Microservices Expo Authors: Jason Bloomberg, Karthick Viswanathan, Elizabeth White, Mehdi Daoudi, 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
    Many organizations are now looking to DevOps maturity models to gauge their DevOps adoption and compare their maturity to their peers. However, as enterprise organizations rush to adopt DevOps, moving past experimentation to embrace it at scale, they are in danger of falling into the trap that they have fallen into time and time again. Unfortunately, we've seen this movie before, and we know how it ends: badly.
    These days, APIs have become an integral part of the digital transformation journey for all enterprises. Every digital innovation story is connected to APIs . But have you ever pondered over to know what are the source of these APIs? Let me explain - APIs sources can be varied, internal or external, solving different purposes, but mostly categorized into the following two categories. Data lakes is a term used to represent disconnected but relevant data that are used by various business units wit...
    There is a huge demand for responsive, real-time mobile and web experiences, but current architectural patterns do not easily accommodate applications that respond to events in real time. Common solutions using message queues or HTTP long-polling quickly lead to resiliency, scalability and development velocity challenges. In his session at 21st Cloud Expo, Ryland Degnan, a Senior Software Engineer on the Netflix Edge Platform team, will discuss how by leveraging a reactive stream-based protocol,...
    Today most companies are adopting or evaluating container technology - Docker in particular - to speed up application deployment, drive down cost, ease management and make application delivery more flexible overall. As with most new architectures, this dream takes significant work to become a reality. Even when you do get your application componentized enough and packaged properly, there are still challenges for DevOps teams to making the shift to continuous delivery and achieving that reducti...
    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...
    Enterprises are moving to the cloud faster than most of us in security expected. CIOs are going from 0 to 100 in cloud adoption and leaving security teams in the dust. Once cloud is part of an enterprise stack, it’s unclear who has responsibility for the protection of applications, services, and data. When cloud breaches occur, whether active compromise or a publicly accessible database, the blame must fall on both service providers and users. In his session at 21st Cloud Expo, Ben Johnson, C...
    Many organizations adopt DevOps to reduce cycle times and deliver software faster; some take on DevOps to drive higher quality and better end-user experience; others look to DevOps for a clearer line-of-sight to customers to drive better business impacts. In truth, these three foundations go together. In this power panel at @DevOpsSummit 21st Cloud Expo, moderated by DevOps Conference Co-Chair Andi Mann, industry experts will discuss how leading organizations build application success from all...
    ‘Trend’ is a pretty common business term, but its definition tends to vary by industry. In performance monitoring, trend, or trend shift, is a key metric that is used to indicate change. Change is inevitable. Today’s websites must frequently update and change to keep up with competition and attract new users, but such changes can have a negative impact on the user experience if not managed properly. The dynamic nature of the Internet makes it necessary to constantly monitor different metrics. O...
    The last two years has seen discussions about cloud computing evolve from the public / private / hybrid split to the reality that most enterprises will be creating a complex, multi-cloud strategy. Companies are wary of committing all of their resources to a single cloud, and instead are choosing to spread the risk – and the benefits – of cloud computing across multiple providers and internal infrastructures, as they follow their business needs. Will this approach be successful? How large is the ...
    Agile has finally jumped the technology shark, expanding outside the software world. Enterprises are now increasingly adopting Agile practices across their organizations in order to successfully navigate the disruptive waters that threaten to drown them. In our quest for establishing change as a core competency in our organizations, this business-centric notion of Agile is an essential component of Agile Digital Transformation. In the years since the publication of the Agile Manifesto, the conn...
    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.
    The nature of the technology business is forward-thinking. It focuses on the future and what’s coming next. Innovations and creativity in our world of software development strive to improve the status quo and increase customer satisfaction through speed and increased connectivity. Yet, while it's exciting to see enterprises embrace new ways of thinking and advance their processes with cutting edge technology, it rarely happens rapidly or even simultaneously across all industries.
    Most of the time there is a lot of work involved to move to the cloud, and most of that isn't really related to AWS or Azure or Google Cloud. Before we talk about public cloud vendors and DevOps tools, there are usually several technical and non-technical challenges that are connected to it and that every company needs to solve to move to the cloud. In his session at 21st Cloud Expo, Stefano Bellasio, CEO and founder of Cloud Academy Inc., will discuss what the tools, disciplines, and cultural...
    With the rise of DevOps, containers are at the brink of becoming a pervasive technology in Enterprise IT to accelerate application delivery for the business. When it comes to adopting containers in the enterprise, security is the highest adoption barrier. Is your organization ready to address the security risks with containers for your DevOps environment? In his session at @DevOpsSummit at 21st Cloud Expo, Chris Van Tuin, Chief Technologist, NA West at Red Hat, will discuss: The top security r...
    "NetApp's vision is how we help organizations manage data - delivering the right data in the right place, in the right time, to the people who need it, and doing it agnostic to what the platform is," explained Josh Atwell, Developer Advocate for NetApp, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
    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 ...
    One of the biggest challenges with adopting a DevOps mentality is: new applications are easily adapted to cloud-native, microservice-based, or containerized architectures - they can be built for them - but old applications need complex refactoring. On the other hand, these new technologies can require relearning or adapting new, oftentimes more complex, methodologies and tools to be ready for production. In his general session at @DevOpsSummit at 20th Cloud Expo, Chris Brown, Solutions Marketi...
    Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
    Today companies are looking to achieve cloud-first digital agility to reduce time-to-market, optimize utilization of resources, and rapidly deliver disruptive business solutions. However, leveraging the benefits of cloud deployments can be complicated for companies with extensive legacy computing environments. In his session at 21st Cloud Expo, Craig Sproule, founder and CEO of Metavine, will outline the challenges enterprises face in migrating legacy solutions to the cloud. He will also prese...
    DevOps at Cloud Expo – being held October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real r...