Post by Sheldmandu » Sun Feb 28, 2010 2:08 am

I've been playing around for a while with OpenCart as well as using PHP commercially for other stuff, so I thought I'd quickly cover what I consider the best development environment setup if you want to serious work on developing OpenCart, make enhancements for your own needs or just write PHP for something else for that matter. I'm only sticking to OpenSource tools here as that's what most will want to use anyway as they're free.

1. Local Development Stack/Environment
If you're developing on Windows (like me) then I'd recommend that you use WAMP (http://www.wampserver.com/en/). In my view WAMP is a much better architected environment than any other Windows based development stack (e.g. XAMPP) as it's very logically implemented and doesn't have anything un-needed. It also has an icon in the Notification Area which lets you fully manage it. Further you can make enhancements, such as add the rewrite log into it as well for easy access.

2. Integrated Development Environment
Eclipse PDT with Aptana + Subclipse plug-ins and Zend Server Debugger. With this combination you have the most sophisticated OpenSource environment that has all the features such as intellisense, debugging, FTP uploads directly to the server and SVN integration.
Eclipse PDT - http://www.zend.com/en/community/pdt
Zend Server Debugger - http://downloads.zend.com/pdt/server-debugger/
Aptana Studio - http://www.aptana.org/studio
Subclipse - http://subclipse.tigris.org/

To give you a brief rundown of what each does:
Eclipse PDT - Provides PHP development support, code completion and so on for PHP within Eclipse. By downloading Eclipse PDT with Zend Debugger from Zend website you get the client-side debugger as well which you need to debug local files and from memory also to connect to the server debugger. I've tried using xdebug, but it had way more issues than Zend Debugger when used with PDT. You can do other nice stuff in Eclipse PDT, such as auto-comment code, auto-format code and so on. You can also jump to function definitions just by hitting F3 and so on.
Zend Server Debugger - This is a component you need to install onto your local dev server to enable you to debug the code out of Eclipse (i.e. Put breakpoints, step through code, see variable values and so on). there are a few good tutorials online on how to install this.
Aptana Studio Plug-in - This is an Eclipse PDT plug-in that adds excellent HTML and CSS formatting, jQuery support, FTP Syncrhonization functionality so you can deploy files to your website right out of PDT and so on.
Subclipse - Provides SVN integration functionality for Eclipse (although you could use Subversive) or install Subclipse as bundled with Aptana during Aptana setup.

This setup works extremely well and most certainly beats developing in Dreamweaver, Notepad++ or any other non-IDE environment.

Hope people find this useful and perhaps this can be stickied at the top of the Dev forum.

New member

Posts

Joined
Sat Feb 27, 2010 10:43 am

Post by JNeuhoff » Sun Feb 28, 2010 3:20 am

Thank you for your tips.

For those that use Linux (like me) I'd recommend using Kate, Firebug for Firefox, and of course a good FTP client such as gFTP. Usually, everything else, in particular the Apache server, PHP, MySQL, PHPMyAdmin etc. usually come pre-installed on most Linux distributions.

Also, for those that develop on a Windows desktop: Be aware that on a Unix or Linux server the file system (such as EXT3 or EXT4) is usually case sensitive for file and directory names, unlike Windows NTFS.

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Sheldmandu » Sun Feb 28, 2010 3:33 am

On a Linux based system I'd still recommend that you use Eclipse PDT and everything I've suggested with exception of WAMP as it beats any other editor which isn't designed as a full-blown PHP IDE hands down. Being able to press F3 to go to the function definition somewhere in another file will in itself save you hours.

New member

Posts

Joined
Sat Feb 27, 2010 10:43 am

Post by Xsecrets » Sun Feb 28, 2010 6:42 am

If you don't want to waste months of your life trying to figure out all the nuances of eclipse komodo edit is a good php ide.

And I personally think the easiest development stack on windows is zendserver ce.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Sheldmandu » Sun Feb 28, 2010 6:50 am

Eclipse PDT is actually extremely intuitive and unlike Komodo doesn't cost $300. The important thing with Eclipse PDT is that it supports debugging, code completion, and even finds bugs in your HTML like for example in the header template of the admin interface where the li tag isn't closed for the settings menu item.

New member

Posts

Joined
Sat Feb 27, 2010 10:43 am

Post by Sheldmandu » Sat Mar 06, 2010 4:00 am

Posting this just got me to wonder if there was any other IDE out there better than Eclipse PDT as there is some stuff in Eclipse PDT that's not very user friendly or intuitive and it requires other plug-ins like Aptana and Subclipse to do everything you want. So I had a dig around google and found NetBeans... I've had a look at the comparison between NetBeans and Eclipse on http://www.smashingmagazine.com/2009/02 ... to-choose/ and decided it was worth a try...

And, I gotta say I'm impressed. It is way more simple and intuitive than Eclipse PDT and does the same thing as Eclipse AND MORE. It even has a little colour picker for stylesheets like dreamweaver, an in-built database browser and sql code completion along with other goodies that aren't available in Eclipse.

I'm going to test it out further for real work with SVN where I need to do serious merging and so on, but so far it looks pretty sweet, would recommend you try it out. Also, unlike Eclipse it's only a 25MB download instead of 100MB+ and 75MB for Aptana Studio.

New member

Posts

Joined
Sat Feb 27, 2010 10:43 am

Post by Qphoria » Sat Mar 06, 2010 4:06 am

The best that I've found for php developing is Nusphere PhpEd. That is what I use to develop and debug. It's commercial. It has a line-by-line debugger and comes with a wizard to help you get your system set up. It's probably as powerful for php as Visual Studio is for C++. Tons of features I don't think i'll ever use, but the debugging engine is a must-have for coding.

I've also seen some people use Notepad++ with DBG for php debugging as well. Haven't tried it myself.

CodeLobster is a free php debugger, but I never tried that either.

For my setup, I find Twamp to be a great solution. Completely portable so I can work from anywhere.

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Sheldmandu » Sat Mar 06, 2010 4:17 am

There's certainly a few editors out there, but from the reviews I've seen and experience (and being free) I've found Eclipse PDT + some addons and NetBeans to be the best.

Sure, you could use some text editor like Notepad++, but then it's still just a text editor, without good code completion, debugging, color pickers, SVN integration and so on. Code completion, and debugging are a must these days i recon. Using a proper IDE increases productivity through the roof, especially for people who aren't all that familiar with all the libraries or the application.

New member

Posts

Joined
Sat Feb 27, 2010 10:43 am

Post by Qphoria » Sat Mar 06, 2010 4:52 am

Right.. which is where PhpEd dominates for me.

I did just try codelobster.. its got some decent support staff and they seem to address issues here and there. Its similar to phped and has syntax highlighting, intellisense and "hover variable to see value" options as well. Its a bit lighter than phped, but in a good way. The debugging is a bit diff tho and I have to play with it more to understand it.

I've tried to setup Eclipse with php debugging a while back but couldn't get my head around it. If you have some basic procedures that may help, that would be great.

I would prefer a non-commercial method wherever it is possible.

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Sheldmandu » Sat Mar 06, 2010 6:32 am

Debugging is dead easy to setup in both Eclipse and NetBeans. All you have to do is install either ZendDebugger or XDebug on the server, which basically involves dropping the dll into the extensions directory and adding a small section into your phi.ini file. There are plenty of tutorials on the net showing you how to do it.

Eclipse supports both ZendDebugger and XDebug, but when i tried XDebug it kept crashing apache on my windows dev machine, so I got a bit fed up with it and just started using ZendDebugger which I havn't had too many problems with. NetBeans only supports XDebug, but perhaps it won't have the same issues as Eclipse had with XDebug. I hanv't tried it yet.

I use Eclipse PDT with Aptana and Subclipse pretty much every day and havn't had any issues with it, but when I gave NetBeans a test run today I found it a bit more intuitive and easy to use, because many settings in Eclipse are a little more difficult to work out and some stuff is a little bit annoying. I was particularly impressed with NetBeans support of stylesheets where you can actually pick a colour visually or at least see the colour and see the colour when it's typed in hex. As I said before I still don't know about NetBean's support for SVN and FTP. I know you can upload individual files, which should suffice but SVN is a biggie for me as all the stuff I do is with SVN and I need to have good SVN support. If NetBeans SVN support is as good as Eclipse I'm pretty sure I'll be moving to NetBeans, although some people have said it has some memory leaks, but I certainly havn't come across that as yet, and you have a Memory toolbar in NetBeans so you can monitor memory usage anyway and force garbage collection.

Either way, using either Eclipse PDT or NetBeans beats doing it without a proper IDE.

The one thing that does annoy me with OpenCart though is that the way it's been designed doesn't allow code completion to work properly in an IDE because of the way the registry class is used throughout, but still it beats writing code in Dreamweaver.

New member

Posts

Joined
Sat Feb 27, 2010 10:43 am

Post by Xsecrets » Sat Mar 06, 2010 7:16 am

Sheldmandu wrote:Eclipse PDT is actually extremely intuitive and unlike Komodo doesn't cost $300. The important thing with Eclipse PDT is that it supports debugging, code completion...
Komodo Edit is free. Yes the full Komodo is $300, but edit is a very nice little ide and yes it does have code completion and debugging all for free.

I haven't used netbeans in ages, I may have to check it out again. I just don't like Eclipse because as someone mentioned it's a gigantic download then you have to have several plugins and it's not terribly intuitive.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Sheldmandu » Sat Mar 06, 2010 10:38 pm

I played around with NetBeans a bit more to find out better how it handles HTML markup errors and SVN and I gotta say I didn't like it.

In Eclipse PDT + Aptana you can see directly in the project tree which files have markup issues and also which files are checked out and so on. In NetBeans whether the file has been modified is identified with a different colour in the tree and you can't see in the tree which files have markup issues (although I thought they were adding this). Further I had one file where the TR tags were being echoed while the TABLE and TD tags were just being output and for some reason NetBeans decided that the opening TABLE tag didn't have a closing tag, when it in fact did. On the other hand, Eclipse/Aptana worked out that the issue was with the missing TR tags and highlighted the TD tags instead (which was correct). The FTP functionality that comes as part of Aptana is also a bit more comprehensive than in NetBeans.

So, as expected some features are better implemented in Eclipse and some in NetBeans. I think overall, some of the features in Eclipse/Aptana that rely on heavily are implemented a bit better, but perhaps it's just I havn't discovered how to use them properly in NetBeans. Either way for now I'll stick with my trusted Eclipse PDT + Aptana + Subclipse and use NetBeans if I feel like it for some stuff (as I have both installed).

New member

Posts

Joined
Sat Feb 27, 2010 10:43 am

Post by maslow788 » Wed Mar 17, 2010 6:20 am

I use KDiff3 to merge the difference between 1.4.0 and 1.4.4. Took me 20 minutes to complete the merge. When I started out programming, I do merging manually. Not anymore with KDiff3. ;D
Screenshot-KDiff3.png

Screenshot of KDiff3 - Screenshot-KDiff3.png (94.65 KiB) Viewed 10479 times


Newbie

Posts

Joined
Tue Mar 16, 2010 8:52 am

Post by achanon » Fri Apr 15, 2011 2:17 pm

Dear All,

I am a newcomer at openCart and have no idea for creating a new openCart project using those tools. Would you like to give me a step-by-step tutorial for create a new openCart project?

A lot of thanks before.
Achanon

Newbie

Posts

Joined
Tue Apr 12, 2011 11:53 pm

Post by madimar » Fri Apr 22, 2011 8:37 pm

hmmm, I have a similar request... I was intrigued to improve my programming experience using these tools instead of Notepad+ and WinMerge...
I just tried to download evaluation version of phped, installed it and maybe set up correctly with xampp, following some online procedures:
- dbg-php.dll file in xampp folder,
- modification of php.ini and verification in phpinfo
...

and now?!? O0 Maybe my question is trivial... how do you use it? I tried creating a new project, specifying one of my local opencart installation folder and I can see all the folders and files tree in the left window, being able to browse and visualize files in the editor properly.
What can I do now? How can I do, some debugging sessions, i.e. with "step into" debug? Am I on the right route?

thanks in advance for your cooperation,

M

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by JNeuhoff » Fri Apr 22, 2011 10:21 pm

maslow788 wrote:I use KDiff3 to merge the difference between 1.4.0 and 1.4.4. Took me 20 minutes to complete the merge. When I started out programming, I do merging manually. Not anymore with KDiff3. ;D
Screenshot-KDiff3.png
I am using it, too. Along with Kate - Advanced Text Editor, and Firebug. Never liked Eclipse nor Netbeans or similar :)

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by madimar » Sun May 29, 2011 8:00 am

Guys, I ask for your help!
I'm struggling try to understand how to use Eclipse to debug Opencart... but I'm wasting days and nights without results...
I already set up Eclipse + xdebug on a wamp server. I'm almost sure it is all correct, and I can "debug" index.php of an Opencart installation... but then?!?
When I end to debug/run index.php and my homepage appears in the browser, how can I continue to debug things?
What I'm trying to do, examples, is:

1) I set a breakpoint in catalog/controller/account/create.php
2) From browser home page, resulting of debug launch on eclipse I click on Log In, register...

I expected to have a break... but actually it doesn't happen, new create page is loaded without any break/debug.

I'm sorry for the question, maybe it's obvious for you... but I can't sort it out, I'm sure there is something stupid I'm missing...

Please let help me.............

thanks in advance,

M

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by Qphoria » Sun May 29, 2011 9:32 am

I could never get xdebug to work all that well. I use Nusphere PHPed with the DBG debugger and it works perfectly. You can try CodeLobster as that has a phpeditor with step by step debugger. Never tried it myself

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by madimar » Sun May 29, 2011 2:50 pm

Q, to be honest I tried also with zend debugger and trial version of phped...
My perception is the environment is
correctly set up. If I try to debug a single simple page, I'm able to do it.
I think I'm missing some trivial basics of web debugging, because I'm a newbie of it. My problem is in debugging complex web sites.
Summarizing again:
I start debugging on index.php and I can go step by step, watching variables but it seems breakpoints don't work.
I suspect there is something related to server folders mapping but up to now I didn't solve the issue!

Thank you for your patience,

M


Sent from my Desire HD using Tapatalk

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by madimar » Sun May 29, 2011 8:25 pm

Q.... you are always right... thanks thanks thanks... just tried with codelobster... and it seems working at the first try... without one minute of struggling in setup environments, all automatic!!!!
bye bye eclipse!

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm

Who is online

Users browsing this forum: No registered users and 9 guests