Welcome!

Microservices Expo Authors: Stackify Blog, Aruna Ravichandran, Dalibor Siroky, Kevin Jackson, PagerDuty Blog

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
    How is DevOps going within your organization? If you need some help measuring just how well it is going, we have prepared a list of some key DevOps metrics to track. These metrics can help you understand how your team is doing over time. The word DevOps means different things to different people. Some say it a culture and every vendor in the industry claims that their tools help with DevOps. Depending on how you define DevOps, some of these metrics may matter more or less to you and your team.
    For many of us laboring in the fields of digital transformation, 2017 was a year of high-intensity work and high-reward achievement. So we’re looking forward to a little breather over the end-of-year holiday season. But we’re going to have to get right back on the Continuous Delivery bullet train in 2018. Markets move too fast and customer expectations elevate too precipitously for businesses to rest on their laurels. Here’s a DevOps “to-do list” for 2018 that should be priorities for anyone w...
    If testing environments are constantly unavailable and affected by outages, release timelines will be affected. You can use three metrics to measure stability events for specific environments and plan around events that will affect your critical path to release.
    In a recent post, titled “10 Surprising Facts About Cloud Computing and What It Really Is”, Zac Johnson highlighted some interesting facts about cloud computing in the SMB marketplace: Cloud Computing is up to 40 times more cost-effective for an SMB, compared to running its own IT system. 94% of SMBs have experienced security benefits in the cloud that they didn’t have with their on-premises service
    DevOps failure is a touchy subject with some, because DevOps is typically perceived as a way to avoid failure. As a result, when you fail in a DevOps practice, the situation can seem almost hopeless. However, just as a fail-fast business approach, or the “fail and adjust sooner” methodology of Agile often proves, DevOps failures are actually a step in the right direction. They’re the first step toward learning from failures and turning your DevOps practice into one that will lead you toward even...
    DevOps is under attack because developers don’t want to mess with infrastructure. They will happily own their code into production, but want to use platforms instead of raw automation. That’s changing the landscape that we understand as DevOps with both architecture concepts (CloudNative) and process redefinition (SRE). Rob Hirschfeld’s recent work in Kubernetes operations has led to the conclusion that containers and related platforms have changed the way we should be thinking about DevOps and...
    While walking around the office I happened upon a relatively new employee dragging emails from his inbox into folders. I asked why and was told, “I’m just answering emails and getting stuff off my desk.” An empty inbox may be emotionally satisfying to look at, but in practice, you should never do it. Here’s why. I recently wrote a piece arguing that from a mathematical perspective, Messy Desks Are Perfectly Optimized. While it validated the genius of my friends with messy desks, it also gener...
    The goal of Microservices is to improve software delivery speed and increase system safety as scale increases. Microservices being modular these are faster to change and enables an evolutionary architecture where systems can change, as the business needs change. Microservices can scale elastically and by being service oriented can enable APIs natively. Microservices also reduce implementation and release cycle time and enables continuous delivery. This paper provides a logical overview of the Mi...
    The next XaaS is CICDaaS. Why? Because CICD saves developers a huge amount of time. CD is an especially great option for projects that require multiple and frequent contributions to be integrated. But… securing CICD best practices is an emerging, essential, yet little understood practice for DevOps teams and their Cloud Service Providers. The only way to get CICD to work in a highly secure environment takes collaboration, patience and persistence. Building CICD in the cloud requires rigorous ar...
    The enterprise data storage marketplace is poised to become a battlefield. No longer the quiet backwater of cloud computing services, the focus of this global transition is now going from compute to storage. An overview of recent storage market history is needed to understand why this transition is important. Before 2007 and the birth of the cloud computing market we are witnessing today, the on-premise model hosted in large local data centers dominated enterprise storage. Key marketplace play...
    The cloud revolution in enterprises has very clearly crossed the phase of proof-of-concepts into a truly mainstream adoption. One of most popular enterprise-wide initiatives currently going on are “cloud migration” programs of some kind or another. Finding business value for these programs is not hard to fathom – they include hyperelasticity in infrastructure consumption, subscription based models, and agility derived from rapid speed of deployment of applications. These factors will continue to...
    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 ...
    Following a tradition dating back to 2002 at ZapThink and continuing at Intellyx since 2014, it’s time for Intellyx’s annual predictions for the coming year. If you’re a long-time fan, you know we have a twist to the typical annual prediction post: we actually critique our predictions from the previous year. To make things even more interesting, Charlie and I switch off, judging the other’s predictions. And now that he’s been with Intellyx for more than a year, this Cortex represents my first ...
    "Grape Up leverages Cloud Native technologies and helps companies build software using microservices, and work the DevOps agile way. We've been doing digital innovation for the last 12 years," explained Daniel Heckman, of Grape Up in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    The Toyota Production System, a world-renowned production system is based on the "complete elimination of all waste". The "Toyota Way", grounded on continuous improvement dates to the 1860s. The methodology is widely proven to be successful yet there are still industries within and tangential to manufacturing struggling to adopt its core principles: Jidoka: a process should stop when an issue is identified prevents releasing defective products
    We seem to run this cycle with every new technology that comes along. A good idea with practical applications is born, then both marketers and over-excited users start to declare it is the solution for all or our problems. Compliments of Gartner, we know it generally as “The Hype Cycle”, but each iteration is a little different. 2018’s flavor will be serverless computing, and by 2018, I mean starting now, but going most of next year, you’ll be sick of it. We are already seeing people write such...
    Defining the term ‘monitoring’ is a difficult task considering the performance space has evolved significantly over the years. Lately, there has been a shift in the monitoring world, sparking a healthy debate regarding the definition and purpose of monitoring, through which a new term has emerged: observability. Some of that debate can be found in blogs by Charity Majors and Cindy Sridharan.
    It’s “time to move on from DevOps and continuous delivery.” This was the provocative title of a recent article in ZDNet, in which Kelsey Hightower, staff developer advocate at Google Cloud Platform, suggested that “software shops should have put these concepts into action years ago.” Reading articles like this or listening to talks at most DevOps conferences might make you think that we’re entering a post-DevOps world. But vast numbers of organizations still struggle to start and drive transfo...
    Let's do a visualization exercise. Imagine it's December 31, 2018, and you're ringing in the New Year with your friends and family. You think back on everything that you accomplished in the last year: your company's revenue is through the roof thanks to the success of your product, and you were promoted to Lead Developer. 2019 is poised to be an even bigger year for your company because you have the tools and insight to scale as quickly as demand requires. You're a happy human, and it's not just...
    "Opsani helps the enterprise adopt containers, help them move their infrastructure into this modern world of DevOps, accelerate the delivery of new features into production, and really get them going on the container path," explained Ross Schibler, CEO of Opsani, and Peter Nickolov, CTO of Opsani, in this SYS-CON.tv interview at DevOps Summit at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.