Duration: Hours

Zend Studio, the leading integrated development environment for PHP Web applications, maximizes developer productivity by allowing you to develop and maintain code faster, resolve application issues quickly and improve team collaboration. Backed by Zend and built on top of the Eclipse platform, Zend Studio offers unmatched reliability and extensibility.

Training Mode: Online

Enquiry

    Category:

    Description

    Zend Server is a web application server for running and also managing PHP applications. Basically Zend Server was built-in application monitoring, application problem diagnostics, caching and optimization capabilities and a Web-based administrator console.Zend Framework is an open source, object oriented web application framework for PHP 5. Zend Framework is often called a ‘component library’, because it has many loosely coupled components that you can use more or less independently.

    1.Create a PHP project

    • To start working in Zend Studio, you should at first create a new PHP project which will contain the files for your application.
    • In the procedure generally you can choose which content to use in the project – Zend Studio’s built-in PHP or Zend Framework.

    To create a new local PHP project:

    1. In the menu-bar, go to File | New | Local PHP Project. The New Local PHP Project wizard is displayed.
    2. Enter the following information:
    • Project Name: Enter the name of your project.
    • Location: Enter the location folder for your project.

    PHP Server – Click the drop-down menu then select an existing server for deploying the new server project, or click Add Server to create a new server.

    • Content: Select the content package you wish to work with in your project- Basic or Zend Studio’s built-in Zend Framework.
    • Version:
    • If you chose to work with the built-in Zend Framework content package. If you wish to use a different version of Zend Framework, click on the drop-down menu, and select Browse to use a different Zend Framework library.
    • If you chose to work with the Basic package content, click on the drop-down menu to select a PHP version.

    3.Select the libraries you wish to add to the project, and click Finish. Your project is created, and displayed in the PHP Explorer.

    2.Create PHP Files

    Basically you can now start to develop your application by creating PHP files in your project.

    To create a new PHP file within you project:

    1. In the PHP Explorer view, select the project you created.
    2. Right-click and select New | PHP File.
      The PHP File creation dialog is displayed.
    3. Enter the name of the file, and click Next.
      The Select PHP Template dialog is displayed.
    4. Select a template as the initial content of the new PHP file, and click Finish.
      Your file will open in the editor and will appear within your project in PHP Explorer view.

    3.Create PHP Elements

    You can use Zend Studio’s PHP element creation wizards to quickly and easily create PHP elements such as classes and interfaces within your code.

    To create a new PHP class/interface:

    1. In PHP Explorer view, right-click the project/file in which you want to create the new class/interface and select New | Class or Interface.
    2. The New PHP Class/Interface/Trait wizard is displayed.
    3. Enter the required details and click Finish.
      The new class/interface will be created with the required code.

    4.Code with Content Assist

    1.Manually type code in your files. As you type, content assist will suggest code options according to the context of the code.

    2.You can select a required code string to quickly insert it into your script. If the Content Assist window does not pop up automatically, press Ctrl+Space.

    5.Rename Elements (Refactoring)

    1.If at any point during your development you want to rename an element, this can be easily done using the in-place refactoring feature.

    2.This will apply the rename operation to all occurrences of the required element so that all links between elements are maintained.

    To rename an element within the editor:

    1. In the editor, place your cursor on the element to be renamed.
    2. From the menu -bar select Refactor | Rename.
      -OR-
      Right-click, and select Refactor | Rename.
      -OR-
      Press Alt-Shift-R.
      All occurrences of the element are put in a frame and the Refactor popup is displayed.
    3. Type the new element name in the box.
      All occurrences of the element name are automatically updated.

    Note:

    To preview the changes before applying them, click the arrow in the right-hand corner of the Refactor popup and select Preview.

    1. Click Enter to apply the refactoring.
      The element will be renamed and all instances where that element is referenced will be updated to reflect the changes.

    6.Comment your Code

    Generally it is good programming practice to comment all functions, classes and methods in your code. This helps both the developer and others who might look at the code to understand its purpose. Simply add a double slash “//” and comment away! Zend Studio also allows you to easily select and comment existing lines.

    To comment lines:

    1. Select all the lines that you would like to be commented.
    2. Press Ctrl + /
      Two slashes “//” will be added to the front of the line, recognizing it as a comment.

    7.Formatting Code

    Zend Studio can automatically format your code accordingly to set standards to make it easily navigable and readable.

    To format your code:

    1. Open the required file.
    2. Go to Source | Format Document or press Ctrl+Shift+F. At last your code will be automatically formatted.

    8.Finding and Replacing

    Zend Studio gives you a powerful search also replace mechanism for easily finding and replacing text strings in your code.

    To find and replace a string:

    1. From within the file, press Crtl+F.
      -OR-
      In the menu-bar, go to Edit | Find/Replace.
    2. A “Find/Replace” dialog will appear.
    3. Enter the required string to find.
    4. Enter the required string to replace it.
    5. If necessary, configure the settings under the direction, scope and options category.
    6. Click Replace.
      The found string will be replaced by the new string.

    9.Run your Application

    Finally you’ve finished coding your application. Now what? You can preview the execution of your application by running it locally as CLI, or as a Web application on your Web server.

    Run as CLI Application

    To run your application as a Web application:

    1. Place your application on a Web server.
      If you selected to create your project on a local Zend Server you can skip this step.
    2. In the PHP Explorer, right-click the file from which you would like to start the execution, and select Run As | PHP Web Application.The Run PHP Web Application dialog is displayed.
    3. Make sure the URL is correct, and then modify it if needed.
    4. Click OK. Finally your application will be run and displayed in Zend Studio’s internal browser.

    Tip:

    You can periodically rerun your application to preview any changes you have made to your files during development. In general the files that will be executed will be the files situated locally on your workspace, irrespective of any changes made to the server copies of the files.

    10.What Next?

    Once you’ve familiarized yourself with the basics, you can begin additional tasks in Zend Studio:

    • Debugging
    • Profiling
    • Deploying

    For more inputs on Zend Studio you can connect here.
    Contact the L&D Specialist at Locus IT.

    Reviews

    There are no reviews yet.

    Be the first to review “Zend Studio 13.6”

    Your email address will not be published.