Welcome!

Eclipse Authors: Pat Romanski, Elizabeth White, Liz McMillan, David H Deans, JP Morgenthal

Related Topics: Eclipse, Microservices Expo

Eclipse: Article

Zend Studio for Eclipse: An IDE of Great Promise

My programming language of choice for these days is PHP

Zend saw this as a great place to cozy up and has been developing a professional version of its PDT environment (released earlier this year) for over a year now. The PDT version is its open source freeware version of an editor IDE that's based on Eclipse foundation materials.

This article will introduce you to the Professional version that's soon to be released. It's just been put into a public beta so if you get interested in trying it out, now's the time.

See www.zend.com/products/zend_studio/eclipse.

First Look - An Overview
The first thing you have to do after getting the software is of course to install it. Zend has ensured that Studio for Eclipse will work on all major operating systems and this review will cover its operation on Windows. The installation process is very straightforward and employs an install wizard.

Figure 1 shows one of the initial installation screens where you are select some of the tool options that are also included. Once the installation is done and you start up the application you'll be presented with the default PHP perspective shown here as Figure 2.

Take some time to look at Figure 2 to familiarize yourself with the layout. Seasoned users of Eclipse shouldn't see too many surprises here; only the content and the context will be different. There are a few "views" that are used in the initial perspective that are used to aid the developer with PHP code development.

The first view to look at is in the top left corner of Figure 2. This is the PHP Project Explorer. Here you can manage all the files and associations related to a single project. The great thing about this view is that you can manage more than one project at a time and so draw on code or techniques that you may have used in other projects. One other thing I like a lot here is the "Link with Editor" toggle on the project view's toolbar (); it lets the developer connect the editor with any file in the project, so that once the file gains focus in the project explorer it's automatically opened in the code editor window on the left. As I said this is a toggle, so it can be turned on and off at your discretion.

The Code Editor
Also notice in Figure 2 that the main view is the code editor. This is where you'll be doing most of your code development. The code editor view has many little features that become very valuable over time. This is a tabbed interface, so you can have as many code files open as you like. Some of the valuable features alluded to are: code colorization, code folding, and syntax checking. You can see what the code colorization is doing in this figure, the HTML directives are in green, the PHP functions are in blue, PHP variables are in red, and so on. This certainly helps a developer see if a variable is misnamed or a function misspelled.

The next feature that I mentioned is code folding. Notice that to the left of the function definitions and the major HTML directives like <Table> and <Body> there are little plus and minus icons. When clicked they toggle between collapsing or expanding code. This lends itself to moving code that you don't want to see temporarily out of view to focus on other sections. This doesn't delete the code it just "folds" it out of the way for you.

Lastly, syntax checking, this is Studio's ability to check your code as you write it and make sure that you have complete code "thoughts." It lets you know when you have mismatched braces, incorrect function calls, misnamed variables, and so on. Also, part of this syntax checking will be preformed within the collection of smaller views at the bottom of this perspective. Another tabbed interface shows a collection of code issues, what type they are (warning or error), and what line in the code they're found in. The tab can also be seen in Figure 2 labeled "Problems."

Those are just a few of the features that Studio for Eclipse has to offer. One of my favorites is code completion. This is the editor's ability to suggest the completion of the code that you're writing. It happens as you type and is quite intuitive. As shown in Figure 3, I'm typing the beginning of a MySQL PHP function, but all I've typed is "mysql_"; the pop-up box displays the functions that studio knows about that would complete what's already been typed, and pressing enter will choose the first item on the list of suggestions and insert it into the editor for you. You can select other offerings from the list with your mouse pointer and double-click on it to choose it for insertion.

Debugger
Another big aspect to Zend's Studio for Eclipse is its full-featured debugger. This is one of the best debuggers that I've seen in a long time. Figure 4 shows a sample program in debug mode in the PHP Debug Perspective. There are many views here that support the debug process. In the middle of the top pane you can track your variables, breakpoints, and parameter stack. To the right of that is a view that holds the outputs of the debugger in both HTML and browser-rendered formats. Then in the middle pane is the code that's being traversed with the debugger, so you can see the code as it's being executed.

If you can see the mouse-pointer in Figure 4 it's pointing to the toolbar items in the debugger that help you navigate through a debugging session. Here you can step into, over, or through (to the cursor) your code as you're looking for the problems in your application. Being able to stop you coding at certain stages of execution and inspecting values can be very valuable indeed.

Preferences
The plethora of options that control how the Studio works is huge! If you select the preferences option under the window menu you'll be presented with the dialog that appears in Figure 5. Here you can change the default behavior of almost every aspect of this IDE. From the editor to the SQL connections to the Internet settings it's all here. Specifically shown in Figure 5 are the options you have for altering the syntax colorization of the PHP code. Since there are so many options for you to choose from be sure to change only one or two features at a time so that you can see what the alteration really does, and so you don't have that many changes to roll back that you forget which option made the change you really wanted.

SQL Connections
Studio for Eclipse also has a very nice SQL Perspective where you can interact with any local or remote data source. As shown in Figure 6, I have a local MySQL data source selected in the left pane, the Data Source Explorer, with some executed SQL select statements running in the lower central portion of the screen. On the lower right the results of the most recently executed SQL command is displayed, and at the top is a SQL editor file where you can write your own more complex SQL commands to be executed.

This SQL interface has many features and options as well. In the Data Source Explorer a number of options are presented when you click the right-mouse button. You can even edit the data in a table directly within this perspective.

Code Gallery
One other feature that's great for team development is the code gallery that Zend has implemented into Studio for Eclipse. This is a two-pronged repository of tried and tested code snippets that can be repeatedly used in multiple projects. The idea is that you can come up with some great code segments and save them into this gallery for others to use. Figure 7 has a screen shot of an entry being made into the gallery. Once you have a library of code to draw from you can open its defined view and simply click the 'insert' button on its tool bar to insert the code at the current location of your cursor within the code you're developing.

The second prong of this code gallery is that Zend has a global gallery where it's collected some of the best code ideas of the PHP community. With your Zend username and password you can access this repository and use the code in your own projects. And if you come up with a great segment of code on your own, you can also 'suggest' it to the Zend gallery, and on review it may be included in Zend's gallery for all the world to peruse.

Summary
Zend's Studio for Eclipse has many more features that I haven't mentioned here. Below is a brief list of what else is in store for you.

  • Zend Framework integration
  • CVS file management
  • FTP/ SFTP connection
  • WYSIWYG editor
  • Zend platform integration
  • Code refactoring
As I mentioned when I started I've been looking for the perfect IDE for years and have experienced many different stages of their incantations. Zend Studio for Eclipse is still young and unseasoned, but I think it will definitely be in the running for a top icon spot on my desktop and used on a regular basis as I continue my development journey with PHP. As Studio for Eclipse matures and versions 2 and 3 show up over time I'm sure that Zend will be continually adding features to it, so it can only get better.

More Stories By Peter MacIntyre

Peter MacIntyre lives and works in Prince Edward Island, Canada where he has been in the IT business for over 18 years. Peter and co-author Ian Morse are nearing the completion of a guidebook for Zend Studio for Eclipse soon to be published by Pearson Publishers. Peter’s website is: http://www.paladin-bs.com

Comments (0)

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.


IoT & Smart Cities Stories
The deluge of IoT sensor data collected from connected devices and the powerful AI required to make that data actionable are giving rise to a hybrid ecosystem in which cloud, on-prem and edge processes become interweaved. Attendees will learn how emerging composable infrastructure solutions deliver the adaptive architecture needed to manage this new data reality. Machine learning algorithms can better anticipate data storms and automate resources to support surges, including fully scalable GPU-c...
Machine learning has taken residence at our cities' cores and now we can finally have "smart cities." Cities are a collection of buildings made to provide the structure and safety necessary for people to function, create and survive. Buildings are a pool of ever-changing performance data from large automated systems such as heating and cooling to the people that live and work within them. Through machine learning, buildings can optimize performance, reduce costs, and improve occupant comfort by ...
The explosion of new web/cloud/IoT-based applications and the data they generate are transforming our world right before our eyes. In this rush to adopt these new technologies, organizations are often ignoring fundamental questions concerning who owns the data and failing to ask for permission to conduct invasive surveillance of their customers. Organizations that are not transparent about how their systems gather data telemetry without offering shared data ownership risk product rejection, regu...
René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
Poor data quality and analytics drive down business value. In fact, Gartner estimated that the average financial impact of poor data quality on organizations is $9.7 million per year. But bad data is much more than a cost center. By eroding trust in information, analytics and the business decisions based on these, it is a serious impediment to digital transformation.
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
Predicting the future has never been more challenging - not because of the lack of data but because of the flood of ungoverned and risk laden information. Microsoft states that 2.5 exabytes of data are created every day. Expectations and reliance on data are being pushed to the limits, as demands around hybrid options continue to grow.
Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
As IoT continues to increase momentum, so does the associated risk. Secure Device Lifecycle Management (DLM) is ranked as one of the most important technology areas of IoT. Driving this trend is the realization that secure support for IoT devices provides companies the ability to deliver high-quality, reliable, secure offerings faster, create new revenue streams, and reduce support costs, all while building a competitive advantage in their markets. In this session, we will use customer use cases...