Wednesday, June 04, 2008

Eclipse IDE Introduction

The Eclipse IDE is a very rich and easy to use. But; as a senior developer who have been all the time in contact with, and sometimes giving courses to junior developers; I found out that with the following introduction about Eclipse, I help them to have a faster startup time. So, I thought of sharing this quick introduction of Eclipse IDE to everyone.

This introduction will not be including any screenshots of Eclipse.
But it will only introduce what is Eclipse, how is it organized, and how to look at it as a tool for helping us writing code.

Eclipse is an Integrated Development Environment (IDE) that contains a set of tools to help an application developer building his application.

How Eclipse is organized? To answer this question; let’s have a quick look at any Enterprise Java Application and what is its main components.

Any Enterprise Java Application (EAR); and let’s take it from the widest perspective; is an application that may contains some Web Applications (WARs), may contain some Enterprise Java Beans (EJB JARs) and may contain some utility JARs.
Also, the application, from the business point of view, may contain web application, some business logic, and a data model.
The data model could be Database or XMLs ruled by XSDs or DTDs, and could be both.
Of course, your EAR would require a server to run on. And of course the server will generate some output to the console.
Having all of these in mind, we find ourselves expecting to have too many tools to help developing such an application or simply, no tools at all. Eclipse IDE, provides too many default tools (plug-ins) that are downloaded together as a bundle and also supports adding more tools (plug-ins) to the downloaded bundle. You can even create your own.

Back to our question: How Eclipse is organized?
Now, as a developer, you would be having a task assigned to you. This task could be only related to JSPs and Servlets, or could only be related to EJBs. Eclipse IDE provides something that is called "Perspective".
The perspective is the way you are looking to your application at the moment. Are you looking at it from the web components side, EJB components side, or may be from the configurations side (XMLs and XSDs). Imagine the application as a car. You need to check something at the inside of the car; you would go to the inside-perspective. To check your car’s breaking lights; you would go to the rear-perspective. And so on.
For each side (perspective) you are looking to your application, you would find the common tools that are used for that perspective of the application. For web perspective, you will find the set of tools that are focusing on editing JSPs and Servlets and putting their configurations.
For the XML perspective, you would find the XML and XSD editors in hand providing you with a GUI for editing these files.
For the Java perspective, you would find the tools to inspect Java files and edit them. For the database perspective, you would find the tools needed to connect to a database and another tool for browsing the database tables. And another tool for writting and executing SQL statements.

For each perspective, you’ll find the right tools. These tools are called views. Some views are used for editing, some are used for only viewing properties, and some are used to view output.

Of course, for each perspective, the set of tools that appears are the default commonly used tools for that perspective. You can customize that perspective and add more tools (views) to your perspective and even you can customize your current perspective and save it for having it as one of the default perspectives for that workspace.

Well, that's it.
Looking at Eclipse this way, makes it much easier to use. At least that's what my colleagues told me.

No comments: