Tuesday, December 23, 2008

PHP Support in NetBeans 6.5

Long dismissed as a “toy Java IDE”, NetBeans—Sun’s open source Integrated Development Evironment (IDE)—has really grown up in recent years. No longer is it just for Java, either: for web developers, NetBeans 6.5 now supports Ruby and PHP out of the box. Surprisingly, that support is so good that it now compares favourably to more established competitors like Eclipse, Komodo IDE, and Zend Studio.

I had become used to writing my PHP code in a simple text editor (jEdit, if you’re wondering), so it had been awhile since I’d enjoyed the luxuries of project-wide code completion, code refactoring, and a full debugger. All of these and more are available in NetBeans 6.5.

NetBeans includes autocomplete not just for built-in functions…

Screenshot showing the NetBeans code editor recognizing and autocompleting the str_repeat function built into PHP, along with pop-up documentation

…but also for functions defined elsewhere in your project and included libraries:

Screenshot showing the NetBeans code editor recognizing and autocompleting the registerObserver method on a custom PHP class, along with pop-up documentation

In both cases, NetBeans picks up on phpdoc comments in your code and uses them to display pop-up documentation along with its autocomplete suggestions.

Once you select a code completion for a function or method, NetBeans assists you in filling in each parameter. When you’re done filling in one parameter, hit Enter to automatically move to the next parameter.

Screenshot showing the NetBeans code editor with a box around the first parameter of a str_replace function call, to indicate it is selected for editing

NetBeans also comes with PHP code templates for developers who like to set coding speed records. For example, type fnc and then hit the Tab key. NetBeans will expand it into a full function declaration, and prompt you to fill in a function name, before placing your cursor in the function body:

Screenshot showing the NetBeans code editor with a box around the function_name portion of a PHP function delcaration

Because having complete phpdoc documentation for your code makes coding in NetBeans so much easier, NetBeans will even assist you with writing your documentation! Place your cursor immediately above a function declaration, type /** and hit Enter. NetBeans will automatically generate a phpdoc comment with placeholders for each of the function’s parameters and its return value:

Screenshot showing the NetBeans code editor having just auto-generated a phpdoc template based on a function declaration

NetBeans’s editor has plenty of other nice features, like variable name refactoring. When your text cursor is on a variable name, all other occurrences of that variable are highlighted in yellow. Type Ctrl+R and you can edit every occurrence of that variable name at once, to instantly rename it throughout the file:

Screenshot showing the NetBeans code editor with boxes around all three occurrences of the $testvalue variable, with the cursor positioned to indicate the second of these occurrences is currently being edited

And of course you can ⌘-click (Ctrl-click on Windows) on any variable, function, or class name to jump immediately to the place where it was declared—even if it’s in another file of your project.

NetBeans 6.5 combines all this PHP editing power with full support for server-side debugging with the XDebug PHP extension. You can set breakpoints in your scripts and step through your code line-by-line, inspecting the values of variables as you go.

Of course, writing PHP applications is more than just PHP code. You have to write HTML, CSS, and JavaScript code as well. When you do, you’ll be pleasantly surprised to find the same level of support for these languages built into NetBeans too! And when a single file mixes these languages together, NetBeans handles it all seamlessly.

If all those code editing features weren’t enough, NetBeans 6.5’s other core features combine to complete the experience. Built-in support for version control systems including CVS, Subversion, and Mercurial (with others, like Git, available as free plug-ins) is especially welcome, with colored bars along the sides of your code to indicate lines that you have changed since your last commit.

NetBeans isn’t a toy for learning Java anymore. These days, it’s a powerful, multi-language development environment that’s free for the taking. If you work on sizable PHP projects and you’re not using an IDE like NetBeans, you might be surprised at how much time a tool like this can save you!

Monday, December 15, 2008

Dreamweaver CS4: A Powerful Tool for an Imperfect World

With the just-released Dreamweaver CS4, Adobe has conceded that web design has moved on. No longer are designers content to limit themselves to what can be built with WYSIWYG tools; instead, Dreamweaver CS4 shifts focus to providing powerful tools for code-savvy front-end designers like you and me! With the WebKit rendering engine at its core, Dreamweaver CS4 embraces best practice in every aspect of client-side design. If only it went as far on the server side.

Up to and including Dreamweaver CS3, the program was clearly conceived to protect web designers from all the scary code that goes into building a site. It let you generate HTML markup using toolbar buttons and property inspectors instead of tags and attributes. It let you style that markup using wizards and panels instead of CSS rules and properties. The Code View was there if you needed it, but the program did its best to make sure you didn’t.

In recent years, this had become a losing battle as more and more designers needed to take control of their code. It didn’t just matter what the finished product looked like; designers had started to care about what the code looked like too. Dreamweaver’s helpful attempts to hide code behind simple tools became a hindrance more than a help.

Clearly, Adobe has been paying attention. Although the WYSIWYG Design View is still there, as are the panels and wizards, Dreamweaver CS4 adds support for a whole new way of
Open an HTML (or PHP, ColdFusion, JSP, ASP, ASP.NET) file in Dreamweaver CS4, and the new Related Files bar instantly displays every other code file in your site that is used to display that page in a browser (or assemble it on the server). Switch on the Live Preview, and instead of the dumb WYSIWYG view of your page, you’ll see the fully-rendered page with all server-side and JavaScript-powered features intact.
Powered by the open source WebKit engine at the heart of browsers like Safari and Google Chrome, the Live Preview is not merely a preview, but a code navigation tool: double-click any element on the page, and the code panel will jump to the HTML code responsible for generating it. If that code is contained in another file, that file is automatically selected in the Related Files bar so that you can edit it without leaving the main file (or its Live Preview) behind!
It gets better: Alt-click (⌘⌥-click on the Mac) any element in the Live Preview, and up pops the Code Navigator with a breakdown of the CSS rules that contribute to the element’s appearance! Click any of these to jump straight to the relevant line of code, where you can make adjustments and watch the Live Preview update instantly.

Read on for my thoughts on why Dreamweaver CS4 may or may not be for you…

Thursday, December 11, 2008

ECMAScript Harmony: New Life for JavaScript

One by one, the core standards that define the Web are getting a new lease on life. First, the W3C rebooted its development of HTML by abandoning its single-minded focus on XHTML and embracing the work of the WHAT-WG’s HTML 5 draft as a new beginning. Now, at a meeting in Oslo at the end of July, the long-divided standards body responsible for the JavaScript language has managed to find new unity through compromise.

The standard that describes JavaScript is called ECMAScript (because "JavaScript" is a trademark owned by Sun Microsystems). The last full update to ECMAScript, ECMA-262 3rd Edition, was published in 1999. In the over eight years since its publication, progress of JavaScript as a web standard has barely budged.

The lack of change to ECMAScript in that time has not been due to the language’s maturity. ECMA-262 3rd Edition has widely-recognized issues that real-world browsers have had to work around for years, so there has been plenty of need for a 4th Edition. In the absence of one, browser makers have had to reverse-engineer each other’s implementations in order to decide how to deal with the holes in the spec—pretty much the worst-case scenario for all concerned.

Wednesday, December 10, 2008

Helpfull articles

CSS Tutorials
http://www.sitepoint.com/subcat/css

JavaScript and AJAX Tutorials
http://www.sitepoint.com/subcat/javascript

PHP & MySQL Tutorials & Articles
http://www.sitepoint.com/subcat/php-tutorials

ASP & ASP.NET Tutorials & Guides
http://www.sitepoint.com/subcat/asp

Publisher Summary

Hai EveryBody....

Here i am going to take discussion about sitepoint news letters. sitepoint news letter is really worthfull service to their news readers. also they give lot of technical news and book download links. really its more worthfull.
Here i am going to publish great collections in sitepoint news letters.

For free News letter sign up please click below link.
http://www.sitepoint.com/newsletter/manage

Thanking you to all Visitors.